New issue
Advanced search Search tips

Issue 867355 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

SUMMARY inside BDI uses dirty flat tree

Project Member Reported by ClusterFuzz, Jul 25

Issue description

Detailed report: https://clusterfuzz.com/testcase?key=5532146194972672

Fuzzer: puzzor_svg
Job Type: linux_debug_chrome
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  !owner_->GetDocument().IsSlotAssignmentRecalcForbidden() in slot_assignment.cc
  blink::SlotAssignment::RecalcAssignment
  blink::HTMLSlotElement::AssignedNodes
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_debug_chrome&range=562324:562330

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5532146194972672

Issue filed automatically.

See https://github.com/google/clusterfuzz-tools for more information.
 
Project Member

Comment 1 by ClusterFuzz, Jul 25

Components: Blink>DOM Blink>HTML
Labels: Test-Predator-Auto-Components
Automatically applying components based on crash stacktrace and information from OWNERS files.

If this is incorrect, please apply the Test-Predator-Wrong-Components label.
Cc: kkaluri@chromium.org
Labels: M-70 Test-Predator-Wrong
Owner: yosin@chromium.org
Status: Assigned (was: Untriaged)
Predator and CL could not provide any possible suspects.

Using Code Search for the file, "slot_assignment.cc" suspecting the below Cl might have caused this issue

Suspect CL: https://chromium.googlesource.com/chromium/src/+/23c69ebdf6d274e9531065e6db23ba51fdd88107

yosin@ -- Could you please look into this issue.

Thanks!
Components: -Blink>HTML
Labels: -Pri-1 Pri-3
Owner: ----
Status: Available (was: Assigned)
Summary: SUMMARY inside BDI uses dirty flat tree (was: CHECK failure: !owner_->GetDocument().IsSlotAssignmentRecalcForbidden() in slot_assignment.cc)
Lower to Pri-3, since it is caused by unusual HTML.

Removing node inside <summary> enclosed by <bdi> calls AdjustDirectionalityIfNeededAfterChildrenChanged() which traverses flat tree.


# Minimal reproducable HTML:
<!doctype html>
<bdi><summary><i id="target"></i></summary></bdi>
<script>
document.body.offsetHeight;
document.getElementById('target').remove();
</script>


# Stack trace:
bdiSlotAssignment::RecalcAssignment() Line 224
bdiHTMLSlotElement::AssignedNodes() Line 108
bdiFlatTreeTraversalNg::TraverseChild(const blink::Node & node, blink::FlatTreeTraversalNg::TraversalDirection direction) Line 42
bdiFlatTreeTraversalNg::TraverseFirstChild(const blink::Node & node) Line 315
bdiFlatTreeTraversalNg::TraverseNext(const blink::Node & node, const blink::Node * stay_within) Line 255
bdiFlatTreeTraversalNg::Next(const blink::Node & node, const blink::Node * stay_within) Line 229
bdiFlatTreeTraversal::Next(const blink::Node & node, const blink::Node * stay_within) Line 242
bdiHTMLElement::Directionality(blink::Node * * strong_directionality_text_node) Line 1000
>	bdiHTMLElement::CalculateAndAdjustDirectionality() Line 1035
bdiHTMLElement::AdjustDirectionalityIfNeededAfterChildrenChanged(const blink::ContainerNode::ChildrenChange & change) Line 1055
bdiHTMLElement::ChildrenChanged(const blink::ContainerNode::ChildrenChange & change) Line 935
bdiContainerNode::RemoveChild(blink::Node * old_child, blink::ExceptionState & exception_state) Line 713

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 30

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

commit 15d5f5e91eca2342795fc6eaa2adf2068d143cac
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Mon Jul 30 09:36:41 2018

Change ContanerNode::RemoveChild() to allow ChildrenChanged() to use flat tree

This patch changes call site of |ChildrenChanged()| in |ContanerNode::
RemoveChild()| out side of |SlotAssignmentRecalcForbiddenScope| to allow
|ChildrenChanged()| to use flat tree.

Background:
|HTMLElement::ChildrenChanged()| adjust directionality of element, e.g.
"dir" attirbute, <bdi>, <bdo>, etc, by traversing flat tree.

Bug:  867355 
Change-Id: I8e1211f1a43afc27ba0e582030f2f2e8a6a74731
Reviewed-on: https://chromium-review.googlesource.com/1152754
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579000}
[modify] https://crrev.com/15d5f5e91eca2342795fc6eaa2adf2068d143cac/third_party/blink/renderer/core/BUILD.gn
[modify] https://crrev.com/15d5f5e91eca2342795fc6eaa2adf2068d143cac/third_party/blink/renderer/core/dom/container_node.cc
[add] https://crrev.com/15d5f5e91eca2342795fc6eaa2adf2068d143cac/third_party/blink/renderer/core/html/html_element_test.cc

Status: Fixed (was: Available)
Project Member

Comment 6 by ClusterFuzz, Jul 31

ClusterFuzz has detected this issue as fixed in range 578999:579000.

Detailed report: https://clusterfuzz.com/testcase?key=5532146194972672

Fuzzer: puzzor_svg
Job Type: linux_debug_chrome
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  !owner_->GetDocument().IsSlotAssignmentRecalcForbidden() in slot_assignment.cc
  blink::SlotAssignment::RecalcAssignment
  blink::HTMLSlotElement::AssignedNodes
  
Sanitizer: address (ASAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_debug_chrome&range=562324:562330
Fixed: https://clusterfuzz.com/revisions?job=linux_debug_chrome&range=578999:579000

Reproducer Testcase: https://clusterfuzz.com/download?testcase_id=5532146194972672

See https://github.com/google/clusterfuzz-tools 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 7 by ClusterFuzz, Jul 31

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

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

Sign in to add a comment