Closed Bug 1768269 Opened 2 years ago Closed 2 years ago

Assertion failure: !Failed(), at /builds/worker/workspace/obj-build/dist/include/mozilla/ErrorResult.h:583

Categories

(Core :: Disability Access APIs, defect)

defect

Tracking

()

VERIFIED FIXED
104 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- wontfix
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix
firefox104 --- verified

People

(Reporter: tsmith, Assigned: Jamie)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: assertion, regression, testcase, Whiteboard: [bugmon:bisected,confirmed][fuzzblocker])

Attachments

(2 files)

Attached file testcase.html

Found while fuzzing m-c 20220506-fe0b18ac5fe1 (--enable-debug --enable-fuzzing) with GNOME_ACCESSIBILITY=1

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch -d --fuzzing -n firefox
$ GNOME_ACCESSIBILITY=1 python -m grizzly.replay ./firefox/firefox testcase.html

Assertion failure: !Failed(), at /builds/worker/workspace/obj-build/dist/include/mozilla/ErrorResult.h:583

#0 0x7f668838bfa8 in mozilla::binding_danger::TErrorResult<mozilla::binding_danger::AssertAndSuppressCleanupPolicy>::~TErrorResult() /builds/worker/workspace/obj-build/dist/include/mozilla/ErrorResult.h
#1 0x7f668ebe6a8c in mozilla::a11y::LocalAccessible::IsActiveDescendant(mozilla::a11y::LocalAccessible**) const src/accessible/generic/LocalAccessible.cpp:2990:1
#2 0x7f668ebe72b6 in ARIAActiveDescendantIDMaybeMoved src/accessible/generic/DocAccessible.cpp:2591:20
#3 0x7f668ebe72b6 in mozilla::a11y::DocAccessible::AttributeChanged(mozilla::dom::Element*, int, nsAtom*, int, nsAttrValue const*) src/accessible/generic/DocAccessible.cpp:791:5
#4 0x7f6689eb1f5c in operator() src/dom/base/MutationObservers.cpp:146:3
#5 0x7f6689eb1f5c in ForEachAncestorObserver<(lambda at src/dom/base/MutationObservers.cpp:146:3)> src/dom/base/MutationObservers.cpp:63:9
#6 0x7f6689eb1f5c in Notify<IsRemoval::No, ShouldAssert::Yes, (lambda at src/dom/base/MutationObservers.cpp:146:3), (lambda at src/dom/base/MutationObservers.cpp:146:3)> src/dom/base/MutationObservers.cpp:93:19
#7 0x7f6689eb1f5c in mozilla::dom::MutationObservers::NotifyAttributeChanged(mozilla::dom::Element*, int, nsAtom*, int, nsAttrValue const*) src/dom/base/MutationObservers.cpp:148:3
#8 0x7f6689e1298b in mozilla::dom::Element::SetAttrAndNotify(int, nsAtom*, nsAtom*, nsAttrValue const*, nsAttrValue&, nsIPrincipal*, unsigned char, bool, bool, bool, mozilla::dom::Document*, mozAutoDocUpdate const&) src/dom/base/Element.cpp:2599:5
#9 0x7f6689e0bd4c in mozilla::dom::Element::SetAttr(int, nsAtom*, nsAtom*, nsTSubstring<char16_t> const&, nsIPrincipal*, bool) src/dom/base/Element.cpp:2439:10
#10 0x7f668b0cd7f2 in SetAttr /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Element.h:947:12
#11 0x7f668b0cd7f2 in SetAttr /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Element.h:943:12
#12 0x7f668b0cd7f2 in SetId /builds/worker/workspace/obj-build/dist/include/mozilla/dom/Element.h:1133:5
#13 0x7f668b0cd7f2 in mozilla::dom::Element_Binding::set_id(JSContext*, JS::Handle<JSObject*>, void*, JSJitSetterCallArgs) /builds/worker/workspace/obj-build/dom/bindings/ElementBinding.cpp:936:24
#14 0x7f668b3d414a in bool mozilla::dom::binding_detail::GenericSetter<mozilla::dom::binding_detail::NormalThisPolicy>(JSContext*, unsigned int, JS::Value*) src/dom/bindings/BindingUtils.cpp:3219:8
#15 0x7f66907c8f70 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) src/js/src/vm/Interpreter.cpp:420:13
#16 0x7f66907c877a in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) src/js/src/vm/Interpreter.cpp:507:12
#17 0x7f66907c9ca8 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) src/js/src/vm/Interpreter.cpp:605:8
#18 0x7f66907caeef in js::CallSetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::Handle<JS::Value>) src/js/src/vm/Interpreter.cpp:746:10
#19 0x7f668f5e44e0 in SetExistingProperty(JSContext*, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::Handle<js::NativeObject*>, js::PropertyResult const&, JS::ObjectOpResult&) src/js/src/vm/NativeObject.cpp:2490:8
#20 0x7f668f5e35c5 in bool js::NativeSetProperty<(js::QualifiedBool)1>(JSContext*, JS::Handle<js::NativeObject*>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::ObjectOpResult&) src/js/src/vm/NativeObject.cpp:2524:14
#21 0x7f66907cfc46 in SetProperty src/js/src/vm/ObjectOperations-inl.h:308:10
#22 0x7f66907cfc46 in SetObjectElementOperation(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::PropertyKey>, JS::Handle<JS::Value>, JS::Handle<JS::Value>, bool) src/js/src/vm/Interpreter.cpp:1817:10
#23 0x7f66907bd5b8 in Interpret(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:3075:12
#24 0x7f66907b6e52 in js::RunScript(JSContext*, js::RunState&) src/js/src/vm/Interpreter.cpp:389:13
#25 0x7f66907c8676 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) src/js/src/vm/Interpreter.cpp:539:13
#26 0x7f66907c9ca8 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) src/js/src/vm/Interpreter.cpp:605:8
#27 0x7f668f496e61 in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) src/js/src/vm/CallAndConstruct.cpp:117:10
#28 0x7f668b0f4073 in mozilla::dom::EventHandlerNonNull::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/EventHandlerBinding.cpp:266:37
#29 0x7f668b9524f9 in void mozilla::dom::EventHandlerNonNull::Call<nsCOMPtr<mozilla::dom::EventTarget> >(nsCOMPtr<mozilla::dom::EventTarget> const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/EventHandlerBinding.h:362:12
#30 0x7f668b9516d3 in mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) src/dom/events/JSEventHandler.cpp:201:12
#31 0x7f668b93295e in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) src/dom/events/EventListenerManager.cpp:1316:22
#32 0x7f668b9335ed in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) src/dom/events/EventListenerManager.cpp:1507:17
#33 0x7f668b9284d4 in HandleEvent src/dom/events/EventListenerManager.h:395:5
#34 0x7f668b9284d4 in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) src/dom/events/EventDispatcher.cpp:348:17
#35 0x7f668b927a22 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) src/dom/events/EventDispatcher.cpp:550:16
#36 0x7f668b92a2c1 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) src/dom/events/EventDispatcher.cpp:1119:11
#37 0x7f668d4ad373 in nsDocumentViewer::LoadComplete(nsresult) src/layout/base/nsDocumentViewer.cpp:1084:7
#38 0x7f668eada884 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) src/docshell/base/nsDocShell.cpp:6458:20
#39 0x7f668eada335 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) src/docshell/base/nsDocShell.cpp:5850:7
#40 0x7f668eadb1bf in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) src/docshell/base/nsDocShell.cpp
#41 0x7f668931748c in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) src/uriloader/base/nsDocLoader.cpp:1377:3
#42 0x7f66893169ca in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) src/uriloader/base/nsDocLoader.cpp:975:14
#43 0x7f6689314c81 in nsDocLoader::DocLoaderIsEmpty(bool, mozilla::Maybe<nsresult> const&) src/uriloader/base/nsDocLoader.cpp:794:9
#44 0x7f6689315e68 in nsDocLoader::OnStopRequest(nsIRequest*, nsresult) src/uriloader/base/nsDocLoader.cpp:677:5
#45 0x7f668eafc00d in nsDocShell::OnStopRequest(nsIRequest*, nsresult) src/docshell/base/nsDocShell.cpp:13855:23
#46 0x7f6688646b90 in mozilla::net::nsLoadGroup::NotifyRemovalObservers(nsIRequest*, nsresult) src/netwerk/base/nsLoadGroup.cpp:614:22
#47 0x7f66886480a3 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) src/netwerk/base/nsLoadGroup.cpp:518:10
#48 0x7f6689dd0cfd in mozilla::dom::Document::DoUnblockOnload() src/dom/base/Document.cpp:11658:18
#49 0x7f6689d9b7ef in mozilla::dom::Document::UnblockOnload(bool) src/dom/base/Document.cpp:11596:9
#50 0x7f6689db75eb in mozilla::dom::Document::DispatchContentLoadedEvents() src/dom/base/Document.cpp:8131:3
#51 0x7f6689e67ffb in applyImpl<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1147:12
#52 0x7f6689e67ffb in apply<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1153:12
#53 0x7f6689e67ffb in mozilla::detail::RunnableMethodImpl<mozilla::dom::Document*, void (mozilla::dom::Document::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1200:13
#54 0x7f6688444172 in mozilla::SchedulerGroup::Runnable::Run() src/xpcom/threads/SchedulerGroup.cpp:140:20
#55 0x7f668847383e in mozilla::RunnableTask::Run() src/xpcom/threads/TaskController.cpp:467:16
#56 0x7f668844e1f3 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) src/xpcom/threads/TaskController.cpp:780:26
#57 0x7f668844cda3 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) src/xpcom/threads/TaskController.cpp:612:15
#58 0x7f668844d013 in mozilla::TaskController::ProcessPendingMTTask(bool) src/xpcom/threads/TaskController.cpp:390:36
#59 0x7f6688476fc6 in operator() src/xpcom/threads/TaskController.cpp:124:37
#60 0x7f6688476fc6 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
#61 0x7f6688462a9f in nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1180:16
#62 0x7f668846909d in NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:465:10
#63 0x7f6689018c26 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:85:21
#64 0x7f6688f34bc7 in MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:380:10
#65 0x7f6688f34ad2 in RunHandler src/ipc/chromium/src/base/message_loop.cc:373:3
#66 0x7f6688f34ad2 in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:355:3
#67 0x7f668d0e7cd8 in nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:137:27
#68 0x7f668f21150b in XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:874:20
#69 0x7f6689019b1a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:235:9
#70 0x7f6688f34bc7 in MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:380:10
#71 0x7f6688f34ad2 in RunHandler src/ipc/chromium/src/base/message_loop.cc:373:3
#72 0x7f6688f34ad2 in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:355:3
#73 0x7f668f210b2c in XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:733:34
#74 0x55c66491de30 in content_process_main src/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
#75 0x55c66491de30 in main src/browser/app/nsBrowserApp.cpp:327:18
#76 0x7f66a04f60b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
#77 0x55c6648f3bdc in _start (/home/worker/builds/m-c-20220506095052-fuzzing-debug/firefox-bin+0x15bdc) (BuildId: 17b7fbb61a14f52672e5e2856af873356df7e357)
Flags: in-testsuite?

A Pernosco session is available here: https://pernos.co/debug/WhYT8iem47iuPUXQbIKtDA/index.html

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220506222931-d6ef5a49cd7d.
The bug appears to have been introduced in the following build range:

Start: 3d82df1ca684e1d14bd77677e9532aba01c752a9 (20211111152544)
End: 1685016c0c79535b5cc70c0a33d7bab682e90a18 (20211111174032)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3d82df1ca684e1d14bd77677e9532aba01c752a9&tochange=1685016c0c79535b5cc70c0a33d7bab682e90a18

Keywords: regression
Whiteboard: [bugmon:bisected,confirmed]
Has Regression Range: --- → yes
Regressed by: 1733263

Set release status flags based on info from the regressing bug 1733263

:eeejay, since you are the author of the regressor, bug 1733263, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(eitan)
Severity: -- → S4

This bug is triggering so frequently it's having a negative effect on fuzzing. Marking as a fuzzblocker. Please prioritize accordingly.

Whiteboard: [bugmon:bisected,confirmed] → [bugmon:bisected,confirmed][fuzzblocker]

QuerySelector can fail if the id is invalid; e.g. if it contains a quote (") character.
ErrorResult treats a failure as an exception, so it asserts.
We explicitly check for and handle failure ourselves, so use IgnoredErrorResult instead.

Assignee: nobody → jteh
Status: NEW → ASSIGNED
Flags: needinfo?(eitan)
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/919ec20e9cef
Use IgnoredErrorResult instead of ErrorResult in LocalAccessible::IsActiveDescendant. r=eeejay
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch

The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox103 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(jteh)

Bugmon Analysis
Verified bug as fixed on rev mozilla-central 20220712093327-1e32960788ea.
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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: