New issue
Advanced search Search tips

Issue 623547 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

&node == innerEditor->lastChild()

Project Member Reported by ClusterFuzz, Jun 27 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=6261245795893248

Fuzzer: mbarbella_js_mutation_layout
Job Type: linux_debug_chrome
Platform Id: linux

Crash Type: ASSERT
Crash Address: 
Crash State:
  &node == innerEditor->lastChild()
  blink::HTMLTextAreaElement::subtreeHasChanged
  blink::HTMLTextFormControlElement::defaultEventHandler
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_debug_chrome&range=173978:174317

Unminimized Testcase: https://cluster-fuzz.appspot.com/download/AMIfv97HIC6XGdLFyCwRVLG1QcR9QVXUKXzuPu48onbMW7lH-NT73IXwXgIy7iMrbve109PX37oRmPNMvZ9d3xasW4z304m2zrj70oTEv5svzRp6tOY6Sdeuj1NmA_LFhKnNWRXzN41VEBk4UT76AlB1fhNSaSDoSxavUhsTJcCeChN4kir3xeo?testcase_id=6261245795893248


Additional requirements: Requires Gestures

Filer: tkonchada

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Cc: yosin@chromium.org
Labels: Te-Logged M-52
Owner: tkent@chromium.org
Status: Assigned (was: Available)
Suspected CLs	No CL in the regression range changes the crashed files. The result is the blame information.

Author: tkent
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/37f57d892222dc0ed816ae004074d7c80600ad46
Time: Thu Mar 10 10:53:00 2016
The CL last changed line 285 of file HTMLTextAreaElement.cpp, which is stack frame 0.

Author: rniwa@webkit.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/e4a39a278c3f514f2e81f631864ab2db2a9031e9
Time: Thu Jul 14 17:45:04 2011
The CL last changed line 103 of file HTMLTextFormControlElement.cpp, which is stack frame 1.

Author: rniwa@webkit.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/93fd8cf7efea2cba564b2c5e45c20c63c1698596
Time: Tue Jul 12 21:20:35 2011
The CL last changed line 265 of file HTMLTextAreaElement.cpp, which is stack frame 2.

Author: darin@apple.com
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/f72a89bff16c87042ef47c3cddff8cb1e22f99d4
Time: Sun May 30 21:22:42 2010
The CL last changed line 128 of file TextControlInnerElements.cpp, which is stack frame 3.

Author: hayato@chromium.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/1ba07c4838e2394ff30601821eec77a840c9c26a
Time: Tue Feb 19 07:57:37 2013
The CL last changed line 229 of file EventDispatcher.cpp, which is stack frame 4.

Author: hayato@chromium.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/1ba07c4838e2394ff30601821eec77a840c9c26a
Time: Tue Feb 19 07:57:37 2013
The CL last changed line 131 of file EventDispatcher.cpp, which is stack frame 5.

Author: hayato@chromium.org
Project: chromium
Changelist: https://chromium.googlesource.com/chromium/src//+/956ec238461ddb5a1c9fff130061a58dd59e64e4
Time: Mon Dec 01 11:29:43 2014
The CL last changed line 56 of file EventDispatchMediator.cpp, which is stack frame 6.

Suspected Project: chromium-blink
Suspected Component: Blink>HTML

Possible suspect from blame information
https://codereview.chromium.org/1785603002

Please reassign if this is not related to your change.

Comment 2 by tkent@chromium.org, Jun 27 2016

Components: Blink>Editing>Command Blink>Forms>Textarea
Labels: -Pri-1 -M-52 Pri-3

Comment 3 by tkent@chromium.org, Jun 28 2016

	TEXTAREA	0x3f5a29c24358 (focused)
		#shadow-root	0x3f5a29c24438
			DIV	0x3f5a29c24508 ID="inner-editor" (editable)
				#text	0x3f5a29c263e8 "\n"
*				BR	0x3f5a29c26438 (editable)
				#text	0x3f5a29c245c0 ""

There is an empty Text node after <br>.  It's harmless.

Comment 4 by tkent@chromium.org, Jun 28 2016

Minimized test case:

<!DOCTYPE html>
<body>
<script>
onload = function() {
    document.querySelector('textarea').focus();
    document.execCommand('selectAll');
    selection = document.getSelection();
    selection.deleteFromDocument();
    document.execCommand('insertText', false, '\n');
}
</script>
<textarea>
text3
 </textarea>
</body>

Project Member

Comment 5 by ClusterFuzz, Jul 1 2016

ClusterFuzz has detected this issue as fixed in range 403408:403412.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=6261245795893248

Fuzzer: mbarbella_js_mutation_layout
Job Type: linux_debug_chrome
Platform Id: linux

Crash Type: ASSERT
Crash Address: 
Crash State:
  &node == innerEditor->lastChild()
  blink::HTMLTextAreaElement::subtreeHasChanged
  blink::HTMLTextFormControlElement::defaultEventHandler
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_debug_chrome&range=173978:174317
Fixed: https://cluster-fuzz.appspot.com/revisions?job=linux_debug_chrome&range=403408:403412

Unminimized Testcase: https://cluster-fuzz.appspot.com/download/AMIfv97HIC6XGdLFyCwRVLG1QcR9QVXUKXzuPu48onbMW7lH-NT73IXwXgIy7iMrbve109PX37oRmPNMvZ9d3xasW4z304m2zrj70oTEv5svzRp6tOY6Sdeuj1NmA_LFhKnNWRXzN41VEBk4UT76AlB1fhNSaSDoSxavUhsTJcCeChN4kir3xeo?testcase_id=6261245795893248


Additional requirements: Requires Gestures

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 6 by ClusterFuzz, Jul 1 2016

Labels: ClusterFuzz-Verified
Status: Verified (was: Assigned)
ClusterFuzz testcase is verified as fixed, closing issue.

If this is incorrect, please add ClusterFuzz-Wrong label and re-open the issue.

Comment 7 by tkent@chromium.org, Jul 5 2016

Status: Assigned (was: Verified)
This is still reproducible with #4.

Comment 8 by tkent@chromium.org, Jul 5 2016

Status: Started (was: Assigned)
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 6 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f6836d02c1cc98aec47ae8c1ff1e64522290403

commit 3f6836d02c1cc98aec47ae8c1ff1e64522290403
Author: tkent <tkent@chromium.org>
Date: Wed Jul 06 05:21:40 2016

Fix an assertion failure in HTMLTextAreaElement::subtreeHasChanged.

Selection.deleteFromDocument() leaves an empty Text node in innerEditor of
TEXTAREA element, and InsertLineBreakCommand inserted a placeholder BR element
*before* the empty Text node.  It broke the assumption of TEXTAREA element.

This CL makes sure the BR element is appended at the last.

BUG= 623547 

Review-Url: https://codereview.chromium.org/2125553002
Cr-Commit-Position: refs/heads/master@{#403853}

[add] https://crrev.com/3f6836d02c1cc98aec47ae8c1ff1e64522290403/third_party/WebKit/LayoutTests/editing/inserting/insert-paragraph-empty-textarea.html
[modify] https://crrev.com/3f6836d02c1cc98aec47ae8c1ff1e64522290403/third_party/WebKit/Source/core/editing/commands/InsertLineBreakCommand.cpp

Status: Fixed (was: Started)
Project Member

Comment 11 by sheriffbot@chromium.org, Nov 22 2016

Labels: -Restrict-View-EditIssue
Removing EditIssue view restrictions from ClusterFuzz filed bugs. If you believe that this issue should still be restricted, please reapply the label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment