Closed Bug 1753342 Opened 2 years ago Closed 2 years ago

Assertion failure: isSome(), at /builds/worker/workspace/obj-build/dist/include/mozilla/Maybe.h:746

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1751679
Tracking Status
firefox98 --- affected

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

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

Crash Data

Attachments

(1 file)

Attached file testcase.html (deleted) —

Found while fuzzing m-c 20211209-d60a17f4f7bf (--enable-address-sanitizer --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch -a --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html --xvfb

Assertion failure: isSome(), at /builds/worker/workspace/obj-build/dist/include/mozilla/Maybe.h:746

#0 0x7f75f73efc78 in value /builds/worker/workspace/obj-build/dist/include/mozilla/Maybe.h:746:3
#1 0x7f75f73efc78 in mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent> >::Offset() const /gecko/editor/libeditor/EditorDOMPoint.h:502:20
#2 0x7f75f74f3c0f in mozilla::HTMLEditor::MoveOneHardLineContents(mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent> > const&, mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent> > const&, mozilla::HTMLEditor::MoveToEndOfContainer) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:4714:36
#3 0x7f75f7572bbc in mozilla::WhiteSpaceVisibilityKeeper::MergeFirstLineOfRightBlockElementIntoAncestorLeftBlockElement(mozilla::HTMLEditor&, mozilla::dom::Element&, mozilla::dom::Element&, mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent> > const&, nsIContent&, mozilla::Maybe<nsAtom*> const&, mozilla::dom::HTMLBRElement const*) /gecko/editor/libeditor/WSRunObject.cpp:515:49
#4 0x7f75f74e80eb in mozilla::HTMLEditor::AutoDeleteRangesHandler::AutoBlockElementsJoiner::AutoInclusiveAncestorBlockElementsJoiner::Run(mozilla::HTMLEditor&) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:4581:31
#5 0x7f75f74e87ad in mozilla::HTMLEditor::AutoDeleteRangesHandler::AutoBlockElementsJoiner::HandleDeleteAtCurrentBlockBoundary(mozilla::HTMLEditor&, mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent> > const&) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:2848:22
#6 0x7f75f74e2253 in mozilla::HTMLEditor::AutoDeleteRangesHandler::AutoBlockElementsJoiner::Run(mozilla::HTMLEditor&, short, short, mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent> > const&, mozilla::AutoRangeArray&) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:523:15
#7 0x7f75f74dccfa in mozilla::HTMLEditor::AutoDeleteRangesHandler::HandleDeleteAroundCollapsedRanges(mozilla::HTMLEditor&, short, short, mozilla::AutoRangeArray&, mozilla::WSRunScanner const&, mozilla::WSScanResult const&) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:1882:16
#8 0x7f75f74d800d in mozilla::HTMLEditor::AutoDeleteRangesHandler::Run(mozilla::HTMLEditor&, short, short, mozilla::AutoRangeArray&) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:1631:33
#9 0x7f75f74d5e5d in mozilla::HTMLEditor::HandleDeleteSelection(short, short) /gecko/editor/libeditor/HTMLEditorDeleteHandler.cpp:1126:43
#10 0x7f75f73e6873 in mozilla::EditorBase::DeleteSelectionAsSubAction(short, short) /gecko/editor/libeditor/EditorBase.cpp:4207:7
#11 0x7f75f73df4e7 in mozilla::EditorBase::DeleteSelectionAsAction(short, short, nsIPrincipal*) /gecko/editor/libeditor/EditorBase.cpp:4171:8
#12 0x7f75f27829f3 in mozilla::dom::Document::ExecCommand(nsTSubstring<char16_t> const&, bool, nsTSubstring<char16_t> const&, nsIPrincipal&, mozilla::ErrorResult&) /gecko/dom/base/Document.cpp:5425:37
#13 0x7f75f41588cc in mozilla::dom::Document_Binding::execCommand(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/DocumentBinding.cpp:3772:36
#14 0x7f75f460c80d in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /gecko/dom/bindings/BindingUtils.cpp:3306:13
#15 0x7f75fc0f8134 in CallJSNative /gecko/js/src/vm/Interpreter.cpp:388:13
#16 0x7f75fc0f8134 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:475:12
#17 0x7f75fc0e45fe in CallFromStack /gecko/js/src/vm/Interpreter.cpp:539:10
#18 0x7f75fc0e45fe in Interpret(JSContext*, js::RunState&) /gecko/js/src/vm/Interpreter.cpp:3243:16
#19 0x7f75fc0c9401 in js::RunScript(JSContext*, js::RunState&) /gecko/js/src/vm/Interpreter.cpp:357:13
#20 0x7f75fc0f826f in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:507:13
#21 0x7f75fc0fa3bb in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:552:8
#22 0x7f75fc373a5d in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /gecko/js/src/vm/CallAndConstruct.cpp:117:10
#23 0x7f75f4222fef 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:283:37
#24 0x7f75f4f0fb03 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:365:12
#25 0x7f75f4f0e034 in mozilla::JSEventHandler::HandleEvent(mozilla::dom::Event*) /gecko/dom/events/JSEventHandler.cpp:201:12
#26 0x7f75f4ed5278 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) /gecko/dom/events/EventListenerManager.cpp:1309:22
#27 0x7f75f4ed688c in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) /gecko/dom/events/EventListenerManager.cpp:1500:17
#28 0x7f75f4ec4b7e in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) /gecko/dom/events/EventDispatcher.cpp:348:17
#29 0x7f75f4ec338d in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /gecko/dom/events/EventDispatcher.cpp:550:16
#30 0x7f75f4ec7605 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /gecko/dom/events/EventDispatcher.cpp:1085:11
#31 0x7f75f785dfcf in nsDocumentViewer::LoadComplete(nsresult) /gecko/layout/base/nsDocumentViewer.cpp:1085:7
#32 0x7f75fb1bcab3 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /gecko/docshell/base/nsDocShell.cpp:6338:20
#33 0x7f75fb1bbdab in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /gecko/docshell/base/nsDocShell.cpp:5727:7
#34 0x7f75fb1bdd7f in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /gecko/docshell/base/nsDocShell.cpp
#35 0x7f75f159c790 in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /gecko/uriloader/base/nsDocLoader.cpp:1376:3
#36 0x7f75f159b3a4 in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /gecko/uriloader/base/nsDocLoader.cpp:974:14
#37 0x7f75f1597bd2 in nsDocLoader::DocLoaderIsEmpty(bool, mozilla::Maybe<nsresult> const&) /gecko/uriloader/base/nsDocLoader.cpp:793:9
#38 0x7f75f1599d95 in nsDocLoader::OnStopRequest(nsIRequest*, nsresult) /gecko/uriloader/base/nsDocLoader.cpp:676:5
#39 0x7f75fb1f60ab in nsDocShell::OnStopRequest(nsIRequest*, nsresult) /gecko/docshell/base/nsDocShell.cpp:13605:23
#40 0x7f75ef2d866e in mozilla::net::nsLoadGroup::NotifyRemovalObservers(nsIRequest*, nsresult) /gecko/netwerk/base/nsLoadGroup.cpp:614:22
#41 0x7f75ef2db0b3 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /gecko/netwerk/base/nsLoadGroup.cpp:518:10
#42 0x7f75f27c6402 in mozilla::dom::Document::DoUnblockOnload() /gecko/dom/base/Document.cpp:11569:18
#43 0x7f75f2773467 in mozilla::dom::Document::UnblockOnload(bool) /gecko/dom/base/Document.cpp:11499:9
#44 0x7f75f279e0e1 in mozilla::dom::Document::DispatchContentLoadedEvents() /gecko/dom/base/Document.cpp:8012:3
#45 0x7f75f2891b2d in applyImpl<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1147:12
#46 0x7f75f2891b2d in apply<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1153:12
#47 0x7f75f2891b2d 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
#48 0x7f75eef4a20f in mozilla::SchedulerGroup::Runnable::Run() /gecko/xpcom/threads/SchedulerGroup.cpp:144:20
#49 0x7f75eef96db2 in mozilla::RunnableTask::Run() /gecko/xpcom/threads/TaskController.cpp:468:16
#50 0x7f75eef5c2cd in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /gecko/xpcom/threads/TaskController.cpp:771:26
#51 0x7f75eef59828 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /gecko/xpcom/threads/TaskController.cpp:607:15
#52 0x7f75eef59f39 in mozilla::TaskController::ProcessPendingMTTask(bool) /gecko/xpcom/threads/TaskController.cpp:391:36
#53 0x7f75eefa03f1 in operator() /gecko/xpcom/threads/TaskController.cpp:124:37
#54 0x7f75eefa03f1 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /gecko/xpcom/threads/nsThreadUtils.h:531:5
#55 0x7f75eef7c697 in nsThread::ProcessNextEvent(bool, bool*) /gecko/xpcom/threads/nsThread.cpp:1183:16
#56 0x7f75eef87b8c in NS_ProcessNextEvent(nsIThread*, bool) /gecko/xpcom/threads/nsThreadUtils.cpp:467:10
#57 0x7f75f048f21f in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /gecko/ipc/glue/MessagePump.cpp:85:21
#58 0x7f75f030e851 in RunInternal /gecko/ipc/chromium/src/base/message_loop.cc:331:10
#59 0x7f75f030e851 in RunHandler /gecko/ipc/chromium/src/base/message_loop.cc:324:3
#60 0x7f75f030e851 in MessageLoop::Run() /gecko/ipc/chromium/src/base/message_loop.cc:306:3
#61 0x7f75f71da7c7 in nsBaseAppShell::Run() /gecko/widget/nsBaseAppShell.cpp:137:27
#62 0x7f75fbe15c9f in XRE_RunAppShell() /gecko/toolkit/xre/nsEmbedFunctions.cpp:864:20
#63 0x7f75f030e851 in RunInternal /gecko/ipc/chromium/src/base/message_loop.cc:331:10
#64 0x7f75f030e851 in RunHandler /gecko/ipc/chromium/src/base/message_loop.cc:324:3
#65 0x7f75f030e851 in MessageLoop::Run() /gecko/ipc/chromium/src/base/message_loop.cc:306:3
#66 0x7f75fbe14ed2 in XRE_InitChildProcess(int, char**, XREChildData const*) /gecko/toolkit/xre/nsEmbedFunctions.cpp:701:34
#67 0x558e87e33e8d in content_process_main(mozilla::Bootstrap*, int, char**) /gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
#68 0x558e87e342b8 in main /gecko/browser/app/nsBrowserApp.cpp:327:18
#69 0x7f7612fed0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
#70 0x558e87d82f59 in _start (/home/worker/builds/m-c-20211209155024-fuzzing-asan-opt/firefox+0x5cf59)
Flags: in-testsuite?
Crash Signature: [@ mozilla::EditorDOMPointBase<T>::Offset ]

see also: bug 1751679

Keywords: crash
Group: core-security
Group: core-security → dom-core-security

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

Start: 40709ff771bf99ea19a7c20a080e77ca0f531d00 (20211209113448)
End: d60a17f4f7bfe21849ba8282d5227264010e36f1 (20211209130147)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=40709ff771bf99ea19a7c20a080e77ca0f531d00&tochange=d60a17f4f7bfe21849ba8282d5227264010e36f1

Whiteboard: [bugmon:bisected,confirmed]
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

As comment 2 said, this is probably a dupe of bug 1751679.

No valid actions for resolution (DUPLICATE).
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Keywords: bugmon
Group: dom-core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: