Assertion failure: mState != State::Dirty (mElements should've been cleared if dirty), at checkouts/gecko/dom/base/ContentList.cpp:361
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: tsmith, Assigned: vhilla)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: assertion, regression, testcase, Whiteboard: [bugmon:bisected,confirmed])
Attachments
(1 file, 1 external file)
|
584 bytes,
text/html
|
Details |
Found while fuzzing m-c 20261029-0d3cae2fecc4 (--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: mState != State::Dirty (mElements should've been cleared if dirty), at checkouts/gecko/dom/base/ContentList.cpp:361
#0 0x7fffe6e2d216 in MOZ_CrashSequence /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:261:3
#1 0x7fffe6e2d216 in mozilla::dom::ContentList::Item(unsigned int) /builds/worker/workspace/obj-build/dom/base/./../../../../checkouts/gecko/dom/base/ContentList.cpp:360:3
#2 0x7fffe7781714 in IndexedGetter /builds/worker/workspace/obj-build/dist/include/mozilla/dom/NodeList.h:36:24
#3 0x7fffe7781714 in mozilla::dom::NodeList_Binding::DOMProxyHandler::getOwnPropDescriptor(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, bool, JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>>) const /builds/worker/workspace/obj-build/dom/bindings/./NodeListBinding.cpp:298:62
#4 0x7fffe840a078 in mozilla::dom::XrayResolveOwnProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>>, bool&) /builds/worker/workspace/obj-build/dom/bindings/./../../../../checkouts/gecko/dom/bindings/BindingUtils.cpp:1919:12
#5 0x7fffe5a86bf5 in xpc::DOMXrayTraits::resolveOwnProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>>) /builds/worker/checkouts/gecko/js/xpconnect/wrappers/XrayWrapper.cpp:1692:8
#6 0x7fffe5a866ca in xpc::XrayWrapper<js::CrossCompartmentWrapper, xpc::DOMXrayTraits>::getOwnPropertyDescriptor(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>>) const /builds/worker/checkouts/gecko/js/xpconnect/wrappers/XrayWrapper.cpp:1885:28
#7 0x7fffed474330 in js::BaseProxyHandler::hasOwn(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, bool*) const /builds/worker/workspace/obj-build/js/src/proxy/./../../../../../checkouts/gecko/js/src/proxy/BaseProxyHandler.cpp:70:8
#8 0x7fffed47f541 in js::Proxy::getInternal(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/workspace/obj-build/js/src/proxy/./../../../../../checkouts/gecko/js/src/proxy/Proxy.cpp:526:19
#9 0x7fffed47f1da in js::Proxy::get(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::PropertyKey>, JS::MutableHandle<JS::Value>) /builds/worker/workspace/obj-build/js/src/proxy/./../../../../../checkouts/gecko/js/src/proxy/Proxy.cpp:549:10
#10 0x7fffeca02b94 in GetElement /builds/worker/checkouts/gecko/js/src/vm/ObjectOperations-inl.h:143:10
#11 0x7fffeca02b94 in js::GetObjectElementOperation(JSContext*, JSOp, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/checkouts/gecko/js/src/vm/Interpreter-inl.h:376:12
#12 0x7fffeca0112f in GetElementOperationWithStackIndex /builds/worker/checkouts/gecko/js/src/vm/Interpreter-inl.h:486:10
#13 0x7fffeca0112f in GetElementOperation /builds/worker/checkouts/gecko/js/src/vm/Interpreter-inl.h:494:10
#14 0x7fffeca0112f in js::jit::DoGetElemFallback(JSContext*, js::jit::BaselineFrame*, js::jit::ICFallbackStub*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) /builds/worker/workspace/obj-build/js/src/jit/./../../../../../checkouts/gecko/js/src/jit/BaselineIC.cpp:752:8
#15 0x21d7b245bbde ([anon:js-executable-memory]+0x1cbde)
Comment 1•14 days ago
|
||
Testcase crashes using the initial build (mozilla-central 20261029212358-0d3cae2fecc4) but not with tip (mozilla-central 20261105050539-c4c42dae1d0d.)
Unable to bisect testcase (Start build didn't crash!):
Start: 0d3cae2fecc47097a51629b29675099ceed72c5f (20261029212358)
End: c4c42dae1d0d3b75e92b93fad45620c86b26878f (20261105050539)
BuildFlags: BuildFlags(asan=False, tsan=False, debug=True, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False, nyx=False, searchfox=False, afl=False)
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.
Comment 2•14 days ago
|
||
This assertion was added by bug 2082419, which landed on 2026-10-27, two days before the fuzzed build. Bugmon's start build didn't crash either, so the testcase seems intermittent rather than fixed on tip.
Vincent, could you take a look?
(AI-assisted triage, with review.)
| Assignee | ||
Comment 3•14 days ago
|
||
PopulateSelf can leave the state dirty when !mRootNode and I think the following would be better but it doesn't fix the issue.
Element* ContentList::Item(uint32_t aIndex) {
uint32_t count = mElements.Length();
+ MOZ_ASSERT_IF(mState == State::Dirty, count == 0);
if (aIndex >= count && mState != State::UpToDate) {
// Prefetch progressively more elements if access is sequential
uint32_t prefetch = aIndex == count ? std::min(count, 64u) : 0;
PopulateSelf(std::min(aIndex, UINT32_MAX - 1 - prefetch) + prefetch + 1);
}
- MOZ_ASSERT(mState != State::Dirty,
- "mElements should've been cleared if dirty");
This still fails if I revert bug 2082419, it then hits the NS_ASSERTION.
| Assignee | ||
Comment 4•14 days ago
|
||
I guess this was there from the beginning in bug 556743. Maybe fuzzers don't care about NS_ASSERTION? Or it's hard to trigger.
| Assignee | ||
Comment 5•14 days ago
|
||
Updated•14 days ago
|
| Assignee | ||
Updated•14 days ago
|
Comment 6•12 days ago
|
||
This bug has been marked as a regression. Setting status flag for Nightly to affected.
| Assignee | ||
Updated•10 days ago
|
| Assignee | ||
Comment 7•10 days ago
|
||
Comment 9•10 days ago
|
||
| bugherder | ||
Comment 10•10 days ago
|
||
The patch landed in nightly and beta is affected.
:vhilla, please make an uplift decision for beta:
- For beta, nominate the patch for beta uplift approval if the fix should be included in this release, or set
status-firefox161towontfixif the fix can wait for the next release.
Uplift requests can be submitted from Lando: D340031.
See Requesting an Uplift for documentation on how to request an uplift.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 11•10 days ago
|
||
This has been around since 56 and isn't too important.
Updated•6 days ago
|
Updated•6 days ago
|
Description
•