Closed Bug 1922153 Opened 1 year ago Closed 6 months ago

Assertion failure: startContent->IsInComposedDoc(), at /builds/worker/checkouts/gecko/dom/base/Selection.cpp:1909

Categories

(Core :: DOM: Selection, defect)

defect

Tracking

()

VERIFIED FIXED
139 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- disabled
firefox131 --- disabled
firefox132 --- disabled
firefox133 --- disabled
firefox137 --- disabled
firefox138 --- disabled
firefox139 --- verified

People

(Reporter: tsmith, Assigned: sefeng211)

References

(Blocks 1 open bug, Regression)

Details

(4 keywords, Whiteboard: [bugmon:bisected,confirmed])

Crash Data

Attachments

(2 files)

Attached file testcase.html

Found while fuzzing m-c 20240913-b91e1b615932 (--enable-debug --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch -d --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>

Assertion failure: startContent->IsInComposedDoc(), at /builds/worker/checkouts/gecko/dom/base/Selection.cpp:1909

#0 0x734fe7085ca6 in mozilla::dom::Selection::SelectFrames(nsPresContext*, mozilla::dom::AbstractRange&, bool) const /builds/worker/checkouts/gecko/dom/base/Selection.cpp:1909:3
#1 0x734fe7084e89 in mozilla::dom::Selection::Clear(nsPresContext*) /builds/worker/checkouts/gecko/dom/base/Selection.cpp:1449:5
#2 0x734fe707f755 in mozilla::dom::Selection::RemoveAllRangesInternal(mozilla::ErrorResult&) /builds/worker/checkouts/gecko/dom/base/Selection.cpp:2420:3
#3 0x734feb46c13d in nsWebBrowserFind::SearchInFrame(nsPIDOMWindowOuter*, bool, bool*) /builds/worker/checkouts/gecko/toolkit/components/find/nsWebBrowserFind.cpp:671:10
#4 0x734feb46b5e6 in nsWebBrowserFind::FindNext(bool*) /builds/worker/checkouts/gecko/toolkit/components/find/nsWebBrowserFind.cpp:106:8
#5 0x734fe6d8fb6e in nsGlobalWindowOuter::FindOuter(nsTSubstring<char16_t> const&, bool, bool, bool, bool, bool, bool, mozilla::ErrorResult&) /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowOuter.cpp:6450:20
#6 0x734fe6d403a5 in nsGlobalWindowInner::Find(nsTSubstring<char16_t> const&, bool, bool, bool, bool, bool, bool, mozilla::ErrorResult&) /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowInner.cpp:4086:3
#7 0x734fe7ccdd2f in mozilla::dom::Window_Binding::find(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/./WindowBinding.cpp:6375:36
#8 0x734fe81980b2 in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /builds/worker/checkouts/gecko/dom/bindings/BindingUtils.cpp:3268:13
#9 0x734feb858ea4 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:528:13
#10 0x734feb85868f in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /builds/worker/checkouts/gecko/js/src/vm/Interpreter.cpp:624:12
#11 0x734fec31b516 in js::jit::DoCallFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICFallbackStub*, unsigned int, JS::Value*, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/jit/BaselineIC.cpp:1677:10
#12 0x1618ff4ffd5e  ([anon:js-executable-memory]+0x1bd5e)
Flags: in-testsuite?

Verified bug as reproducible on mozilla-central 20241001155138-0546d4eb6429.
The bug appears to have been introduced in the following build range:

Start: 5969005dae85cc8ac486b2f0bdbb7454b660f252 (20240325134037)
End: 19dcff1ee3fcbb431110e0639c80a3ba51ee0a34 (20240325140555)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5969005dae85cc8ac486b2f0bdbb7454b660f252&tochange=19dcff1ee3fcbb431110e0639c80a3ba51ee0a34

Keywords: regression
Whiteboard: [bugmon:bisected,confirmed]

dom.shadowdom.selection_across_boundary.enabled is nightly only

Thanks. I plan to revisit this bug after bug 1932150 is done.

Depends on: 1932150
Flags: needinfo?(sefeng)
Severity: -- → S3
See Also: → 1885462

The testcase crashes for me on latest Win11x64 Nightly. Open the testcase and do a CTRL + A.
https://crash-stats.mozilla.org/report/index/7b4a3626-bf3e-43fc-88e6-b2b280250408

Crash Signature: [@ mozilla::dom::Selection::SelectFrames ]
Keywords: crash
Assignee: nobody → sefeng
Status: NEW → ASSIGNED
Pushed by sefeng@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f343cad674d6 Ensure CrossShadowBoundaryRange clears the boundaries when they are not in composed document anymore r=jjaschke
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch

Verified bug as fixed on rev mozilla-central 20250410092904-1ac598af5141.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon
Flags: in-testsuite? → in-testsuite+
No longer depends on: 1932150
See Also: → 1932150
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: