Bug 77614 - NULL ptr in WebCore::Range::processAncestorsAndTheirSiblings
Summary: NULL ptr in WebCore::Range::processAncestorsAndTheirSiblings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows Vista
: P1 Normal
Assignee: Yuta Kitamura
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2012-02-02 00:55 PST by Berend-Jan Wever
Modified: 2013-07-15 23:54 PDT (History)
7 users (show)

See Also:


Attachments
reduction (463 bytes, application/xhtml+xml)
2012-02-02 01:53 PST, Ryosuke Niwa
no flags Details
Patch (10.66 KB, patch)
2013-07-03 19:32 PDT, Yuta Kitamura
no flags Details | Formatted Diff | Diff
Patch v2 (10.45 KB, patch)
2013-07-08 23:12 PDT, Yuta Kitamura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Berend-Jan Wever 2012-02-02 00:55:59 PST
Chromium: http://code.google.com/p/chromium/issues/detail?id=112427
Detailed report: https://cluster-fuzz.appspot.com/testcase?key=17443217

Fuzzer: Bj_doc_fuzzer

Crash Type: UNKNOWN
Crash Address: 0x000000000026
Crash State:
  - crash stack -
  WebCore::Range::processAncestorsAndTheirSiblings
  WebCore::Range::processContents
  WebCore::Range::deleteContents
  
Regressed: https://cluster-fuzz.appspot.com/revisions?range=108839:108881

Minimized Testcase (0.97 Kb): https://cluster-fuzz.appspot.com/download/AMIfv95ceK8J7bne4cv4iUyHvS6W5Dm-Lg_ZCryRU2Y42ayuWg6nWS3qKv0A1aj2WSdRHboY3FKGUuNs6YNK6wPyxBjL16K7Ni7ew9n6iM_dyvpEhsjBEWjBJsxY6X5xq2-j2qmgBeDqaRfLk17tLBcPV45QJChXEQ
Comment 1 Ryosuke Niwa 2012-02-02 01:53:37 PST
Created attachment 125099 [details]
reduction
Comment 2 Yuta Kitamura 2013-07-03 19:32:07 PDT
Created attachment 206046 [details]
Patch
Comment 3 Ryosuke Niwa 2013-07-07 18:39:02 PDT
Comment on attachment 206046 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=206046&action=review

> Source/WebCore/ChangeLog:15
> +        of the range since mutation observers can change the state of the range.

You mean mutation events?  Mutation observes are never called synchronously.

> Source/WebCore/dom/Range.cpp:755
> +    originalStart.clear();
> +    originalEnd.clear();
> +

It doesn't seem right/necessary to clear these ranges here.

> LayoutTests/fast/dom/Range/resources/detach-range-during-deletecontents-iframe.xhtml:8
> +var f = function ()

Why don't we just do:
function f()
instead?
Also, please give it a more descriptive name.

> LayoutTests/fast/dom/Range/resources/detach-range-during-deletecontents-iframe.xhtml:16
> +var g = function ()
> +{

Ditto.
Comment 4 Yuta Kitamura 2013-07-08 23:12:37 PDT
Created attachment 206293 [details]
Patch v2
Comment 5 Yuta Kitamura 2013-07-08 23:15:34 PDT
Comment on attachment 206046 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=206046&action=review

>> Source/WebCore/ChangeLog:15
>> +        of the range since mutation observers can change the state of the range.
> 
> You mean mutation events?  Mutation observes are never called synchronously.

You are right. Fixed.

>> Source/WebCore/dom/Range.cpp:755
>> +
> 
> It doesn't seem right/necessary to clear these ranges here.

Removed.

>> LayoutTests/fast/dom/Range/resources/detach-range-during-deletecontents-iframe.xhtml:8
>> +var f = function ()
> 
> Why don't we just do:
> function f()
> instead?
> Also, please give it a more descriptive name.

Fixed.

>> LayoutTests/fast/dom/Range/resources/detach-range-during-deletecontents-iframe.xhtml:16
>> +{
> 
> Ditto.

Fixed.
Comment 6 Ryosuke Niwa 2013-07-15 21:24:11 PDT
Could you land a patch for this?
Comment 7 Ryosuke Niwa 2013-07-15 21:24:35 PDT
The patch got landed in https://chromium.googlesource.com/chromium/blink/+/0c1f35bf0bd7df75db2b862efc883b1ae418c453 for Blink.
Comment 8 Yuta Kitamura 2013-07-15 23:34:18 PDT
Sorry for delay, I just cq+'ed.
Comment 9 WebKit Commit Bot 2013-07-15 23:54:41 PDT
Comment on attachment 206293 [details]
Patch v2

Clearing flags on attachment: 206293

Committed r152707: <http://trac.webkit.org/changeset/152707>
Comment 10 WebKit Commit Bot 2013-07-15 23:54:44 PDT
All reviewed patches have been landed.  Closing bug.