New issue
Advanced search Search tips

Issue 606535 link

Starred by 1 user

Issue metadata

Status: Verified
Owner: ----
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocked on:
issue 625533



Sign in to add a comment

InputMethodController::getSelectionOffsets() should return empty for display:none

Project Member Reported by ClusterFuzz, Apr 25 2016

Issue description

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

Fuzzer: inferno_layout_test_unmodified
Job Type: linux_debug_content_shell_drt
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  CHECK failed: start <= end in PlainTextRange.cpp
  blink::PlainTextRange::PlainTextRange
  blink::PlainTextRange::create
  

Minimized Testcase (0.42 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv96td2NjAtxYH5Vi7_FznBCqdteXNEmp2dexZ9Il9tiTEs6NuIA-jzDuKca62BramOGonmQMRfSCXokb0MQhsu8Pd6pCoMzWbfx753qijxRzbfB18ZX_1BaFuA0FXmFZzN2mE8GY6l4-KAZtqK0dQKnicqkP0g
<div id="test" contenteditable></div>
<pre>
<script>
function runSingleTest( isStart) {
    test.innerHTML = '<span>hello</span> world';
    var selection = window.getSelection();
        selection.setBaseAndExtent(test.firstChild.firstChild, 2, test.lastChild, 3);
}
function runTestPairs() {
        runSingleTest();
}
function runTests() {
    runTestPairs();
}
runTests();
test.style.display = 'none';
</script>



Filer: manoranjanr

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Cc: tkent@chromium.org
Components: Blink>Architecture Tools>Test>FindIt>NoResult
Labels: Te-Logged
Owner: koten...@yandex-team.ru
Status: Assigned (was: Available)
kotenkov@, i am not very sure this is also 'Dupe' of https://bugs.chromium.org/p/chromium/issues/detail?id=606515 ? However the root cause looks similar?

Thank you!

Comment 2 by tkent@chromium.org, Apr 25 2016

Cc: -tkent@chromium.org
Components: -Blink>Architecture Blink>Editing
Owner: ----
Status: Untriaged (was: Assigned)
Route to Editing triage

Comment 3 by yosin@chromium.org, Apr 26 2016

Components: -Blink>Editing Blink>TextSelection
Labels: -OS-Linux OS-All
Status: Available (was: Untriaged)
Summary: InputMethodController::getSelectionOffsets() should return empty for display:none (was: CHECK failed: start <= end in PlainTextRange.cpp)
Since FrameSelection depends on layout tree, clients of FrameSelection should check layout objects available for selection.

In the sample, FrameSelection has no layout objects, they are removed by |test.style.display='none'|

Comment 4 by yosin@chromium.org, Apr 26 2016

Labels: -Pri-1 Pri-2
Lower to Pri-2, the scenario to reproduce isn't usual.

Comment 5 by yosin@chromium.org, Jul 4 2016

Blockedon: 625533
Project Member

Comment 6 by ClusterFuzz, Jul 28 2016

ClusterFuzz has detected this issue as fixed in range 408050:408071.

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

Fuzzer: inferno_layout_test_unmodified
Job Type: linux_debug_content_shell_drt
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  start <= end in PlainTextRange.cpp
  blink::PlainTextRange::PlainTextRange
  blink::PlainTextRange::create
  
Regressed: https://cluster-fuzz.appspot.com/revisions?job=linux_debug_content_shell_drt&range=283188:283414
Fixed: https://cluster-fuzz.appspot.com/revisions?job=linux_debug_content_shell_drt&range=408050:408071

Minimized Testcase (0.42 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv94s9uPiSAkVuXWWB9mykr4ID1rJuENtziZgrjk9ZLdUYytCH-mzJPfPRW4gqLFkppjZf42i4t9ZBjRYFd8LfEOiN-dwm9DtD_65MQTpPSE3g24MR6wGRqDlC4Uwq704kjDeAzkiYznx4m7X60rd1oVYK6mNFQ?testcase_id=5385491528024064
<div id="test" contenteditable></div>
<pre>
<script>
function runSingleTest( isStart) {
    test.innerHTML = '<span>hello</span> world';
    var selection = window.getSelection();
        selection.setBaseAndExtent(test.firstChild.firstChild, 2, test.lastChild, 3);
}
function runTestPairs() {
        runSingleTest();
}
function runTests() {
    runTestPairs();
}
runTests();
test.style.display = 'none';
</script>



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 7 by ClusterFuzz, Jul 28 2016

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

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

Comment 8 by tkent@chromium.org, Oct 12 2016

Components: -Blink>TextSelection Blink>Editing>Selection
Components: -Tools>Test>FindIt>NoResult
Project Member

Comment 10 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