New issue
Advanced search Search tips

Issue 832639 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 832497
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

TextOffsetMapping::ComputeTextOffset() crashes Empty DIV/Q

Project Member Reported by ClusterFuzz, Apr 13 2018

Issue description

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

Fuzzer: bj_broddelwerk
Job Type: linux_msan_chrome
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  start <= end (Q class="CLASS0"@beforeAnchor vs. DIV class="CLASS4 CLASS12"@offse
  blink::TextIteratorAlgorithm<blink::EditingAlgorithm<blink::FlatTreeTraversal> >
  blink::TextIteratorAlgorithm<blink::EditingAlgorithm<blink::FlatTreeTraversal> >
  
Sanitizer: memory (MSAN)

Regressed: https://clusterfuzz.com/revisions?job=linux_msan_chrome&range=550102:550107

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

Issue filed automatically.

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

Comment 1 by ClusterFuzz, Apr 13 2018

Components: Internals>Core
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.
Project Member

Comment 2 by ClusterFuzz, Apr 13 2018

Labels: Test-Predator-Auto-Owner
Owner: yosin@chromium.org
Status: Assigned (was: Untriaged)
Automatically assigning owner based on suspected regression changelist https://chromium.googlesource.com/chromium/src/+/1324be868df000cb2e070199ce2d10cd0c5a2706 (Make NextWordPosition() to utilize TextOffsetMapping).

If this is incorrect, please let us know why and apply the Test-Predator-Wrong-CLs label. If you aren't the correct owner for this issue, please unassign yourself as soon as possible so it can be re-triaged.

Comment 3 by yosin@chromium.org, Apr 16 2018

Status: Started (was: Assigned)
Minimal HTML to reproduce:
<div>
<q></q></div>
<script>
const selection = window.getSelection();
selection.collapse(document.querySelector('q'), 0);
selection.modify('move', 'forward', 'word');
</script>

NextWordPosition(DIV@0)
TextOffsetMapping::GetRange() = {Before(Q), After(Q)}

Comment 4 by yosin@chromium.org, Apr 17 2018

Summary: TextOffsetMapping::ComputeTextOffset() crashes Empty DIV/Q (was: CHECK failure: start <= end (Q class="CLASS0"@beforeAnchor vs. DIV class="CLASS4 CLASS12"@offse)
In HTML of #c3, newline after "<div>" is required.
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dec40a582a3805fb28dfd67ba49fc2cdb28a1b6c

commit dec40a582a3805fb28dfd67ba49fc2cdb28a1b6c
Author: Yoshifumi Inoue <yosin@chromium.org>
Date: Tue Apr 17 04:30:18 2018

Revert "Make NextWordPosition() to utilize TextOffsetMapping"

This reverts commit 1324be868df000cb2e070199ce2d10cd0c5a2706 for M67/Beta

TextOffsetMapping is not ready for release.
It should support edge cases.

TBR=yosin@chromium.org

Bug:  832055 ,  832061 ,  832101 ,  832261 ,  832350 ,  832497 ,  832639 ,  833172 ,  833180 
Change-Id: Iac5f58716619a626650088a55109922daf1a4f3a
Reviewed-on: https://chromium-review.googlesource.com/1013445
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#36}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/dec40a582a3805fb28dfd67ba49fc2cdb28a1b6c/third_party/blink/renderer/core/editing/visible_units_word.cc
[modify] https://crrev.com/dec40a582a3805fb28dfd67ba49fc2cdb28a1b6c/third_party/blink/renderer/core/editing/visible_units_word_test.cc

Comment 6 by yosin@chromium.org, Apr 17 2018

Components: -Internals>Core Blink>Editing>Selection

Comment 7 by yosin@chromium.org, Apr 17 2018

Mergedinto: 832497
Status: Duplicate (was: Started)

Sign in to add a comment