Open
Bug 1952313
Opened 1 year ago
Updated 1 year ago
Assertion failure: mContent->IsEditable(), at /editor/libeditor/WSRunScanner.cpp:86
Categories
(Core :: DOM: Editor, defect)
Tracking
()
NEW
People
(Reporter: jkratzer, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: bugmon, testcase, Whiteboard: [bugmon:bisected,confirmed])
Attachments
(1 file)
|
350 bytes,
text/plain
|
Details |
Testcase found while fuzzing mozilla-central rev 29ca7ddfb776 (built with: --enable-debug --enable-fuzzing).
Testcase can be reproduced using the following commands:
$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch --build 29ca7ddfb776 --debug --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>
Assertion failure: mContent->IsEditable(), at /editor/libeditor/WSRunScanner.cpp:86
==153483==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x75e955abc4a2 bp 0x7fffc261abc0 sp 0x7fffc261abb0 T153483)
==153483==The signal is caused by a WRITE memory access.
==153483==Hint: address points to the zero page.
#0 0x75e955abc4a2 in MOZ_CrashSequence /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:267:3
#1 0x75e955abc4a2 in mozilla::WSScanResult::AssertIfInvalidData(mozilla::WSRunScanner const&) const /editor/libeditor/WSRunScanner.cpp:84:3
#2 0x75e955ad6f0e in mozilla::WSScanResult mozilla::WSRunScanner::ScanInclusiveNextVisibleNodeOrBlockBoundaryFrom<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>>(mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>> const&) const /editor/libeditor/WSRunScanner.cpp:320:10
#3 0x75e955981c61 in mozilla::WSScanResult mozilla::WSRunScanner::ScanInclusiveNextVisibleNodeOrBlockBoundary<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>>(mozilla::WSRunScanner::Scan, mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>> const&, mozilla::BlockInlineCheck, mozilla::dom::Element const*) /editor/libeditor/WSRunScanner.h:395:10
#4 0x75e955a7bd27 in mozilla::HTMLEditor::AutoInlineStyleSetter::ExtendOrShrinkRangeToApplyTheStyle(mozilla::HTMLEditor const&, mozilla::EditorDOMRangeBase<mozilla::EditorDOMPointBase<nsCOMPtr<nsINode>, nsCOMPtr<nsIContent>>> const&) const /editor/libeditor/HTMLStyleEditor.cpp:1940:9
#5 0x75e955ab8ca3 in nsresult mozilla::HTMLEditor::SetInlinePropertiesAroundRanges<32ul>(mozilla::AutoClonedRangeArray&, AutoTArray<mozilla::EditorInlineStyleAndValue, 32ul> const&)::'lambda'()::operator()() const /editor/libeditor/HTMLStyleEditor.cpp:370:31
#6 0x75e955ab7ac4 in nsresult mozilla::HTMLEditor::SetInlinePropertiesAroundRanges<1ul>(mozilla::AutoClonedRangeArray&, AutoTArray<mozilla::EditorInlineStyleAndValue, 1ul> const&) /editor/libeditor/HTMLStyleEditor.cpp:336:11
#7 0x75e955a6f388 in nsresult mozilla::HTMLEditor::SetInlinePropertiesAsSubAction<1ul>(AutoTArray<mozilla::EditorInlineStyleAndValue, 1ul> const&, mozilla::dom::Element const&) /editor/libeditor/HTMLStyleEditor.cpp:311:17
#8 0x75e955a6c889 in mozilla::HTMLEditor::SetInlinePropertyAsAction(nsStaticAtom&, nsStaticAtom*, nsTSubstring<char16_t> const&, nsIPrincipal*) /editor/libeditor/HTMLStyleEditor.cpp:198:8
#9 0x75e9559fbc41 in mozilla::HighlightColorStateCommand::SetState(mozilla::HTMLEditor*, nsTSubstring<char16_t> const&, nsIPrincipal*) const /editor/libeditor/HTMLEditorCommands.cpp:813:30
#10 0x75e9559fa53f in mozilla::MultiStateCommandBase::DoCommandParam(mozilla::Command, nsTSubstring<char16_t> const&, mozilla::EditorBase&, nsIPrincipal*) const /editor/libeditor/HTMLEditorCommands.cpp:492:17
#11 0x75e951e2c29b in mozilla::dom::Document::ExecCommand(nsTSubstring<char16_t> const&, bool, mozilla::dom::TrustedHTMLOrString const&, nsIPrincipal&, mozilla::ErrorResult&) /dom/base/Document.cpp:5671:27
#12 0x75e952f0f210 in mozilla::dom::Document_Binding::execCommand(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/./DocumentBinding.cpp:4164:36
#13 0x75e9531e7d9d in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /dom/bindings/BindingUtils.cpp:3302:13
#14 0x75e95695c254 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) /js/src/vm/Interpreter.cpp:493:13
#15 0x75e95695baaf in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:589:12
#16 0x75e95696f69a in CallFromStack /js/src/vm/Interpreter.cpp:661:10
#17 0x75e95696f69a in js::Interpret(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:3265:16
#18 0x75e95695b0f1 in js::RunScript(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:463:13
#19 0x75e95695bad5 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:621:13
#20 0x75e95695cefb in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /js/src/vm/Interpreter.cpp:688:8
#21 0x75e956a30c5b in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /js/src/vm/CallAndConstruct.cpp:119:10
#22 0x75e952ef0b3a in mozilla::dom::EventListener::HandleEvent(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/./EventListenerBinding.cpp:62:8
#23 0x75e953aa3c66 in void mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/EventListenerBinding.h:65:12
#24 0x75e953aa3652 in mozilla::EventListenerManager::HandleEventSingleListener(mozilla::EventListenerManager::Listener*, nsAtom*, mozilla::WidgetEvent*, mozilla::dom::Event*, mozilla::dom::EventTarget*, bool) /dom/events/EventListenerManager.cpp:1356:43
#25 0x75e953aa4919 in mozilla::EventListenerManager::HandleEventWithListenerArray(mozilla::EventListenerManager::ListenerArray*, nsAtom*, mozilla::EventMessage, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, bool) /dom/events/EventListenerManager.cpp:1679:12
#26 0x75e953aa4181 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) /dom/events/EventListenerManager.cpp:1576:35
#27 0x75e953a986be in HandleEvent /builds/worker/workspace/obj-build/dist/include/mozilla/EventListenerManager.h:466:5
#28 0x75e953a986be in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) /dom/events/EventDispatcher.cpp:365:17
#29 0x75e953a97d8c in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /dom/events/EventDispatcher.cpp:606:16
#30 0x75e953a9a45d in mozilla::EventDispatcher::Dispatch(mozilla::dom::EventTarget*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /dom/events/EventDispatcher.cpp:1221:11
#31 0x75e953a9d2ba in mozilla::EventDispatcher::DispatchDOMEvent(mozilla::dom::EventTarget*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) /dom/events/EventDispatcher.cpp
#32 0x75e9520fe716 in nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) /dom/base/nsINode.cpp:1495:17
#33 0x75e951bcadb0 in nsContentUtils::DispatchEvent(mozilla::dom::Document*, mozilla::dom::EventTarget*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::Cancelable, mozilla::Composed, mozilla::Trusted, bool*, mozilla::ChromeOnlyDispatch) /dom/base/nsContentUtils.cpp:5168:29
#34 0x75e951bcac26 in nsContentUtils::DispatchTrustedEvent(mozilla::dom::Document*, mozilla::dom::EventTarget*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::Cancelable, mozilla::Composed, bool*) /dom/base/nsContentUtils.cpp:5134:10
#35 0x75e951e4145d in mozilla::dom::Document::DispatchContentLoadedEvents() /dom/base/Document.cpp:8366:3
#36 0x75e951f018c5 in operator()<> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1085:18
#37 0x75e951f018c5 in __invoke_impl<void, (lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9)> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:60:14
#38 0x75e951f018c5 in __invoke<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9)> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/invoke.h:95:14
#39 0x75e951f018c5 in __apply_impl<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1678:14
#40 0x75e951f018c5 in apply<(lambda at /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1084:9), std::tuple<> &> /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/tuple:1687:14
#41 0x75e951f018c5 in apply<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1083:12
#42 0x75e951f018c5 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:1134:13
#43 0x75e94fff4e57 in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:703:16
#44 0x75e94ffee32e in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:1250:20
#45 0x75e94ffed067 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:1073:15
#46 0x75e94ffed4e5 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:639:36
#47 0x75e94fffbf26 in operator() /xpcom/threads/TaskController.cpp:333:37
#48 0x75e94fffbf26 in mozilla::detail::RunnableFunction<mozilla::TaskController::TaskController()::$_0>::Run() /xpcom/threads/nsThreadUtils.h:548:5
#49 0x75e95000df83 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1159:16
#50 0x75e9500145af in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:480:10
#51 0x75e950b726c7 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:85:21
#52 0x75e950acd1e1 in RunHandler /ipc/chromium/src/base/message_loop.cc:362:3
#53 0x75e950acd1e1 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:344:3
#54 0x75e9558111b8 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:148:27
#55 0x75e9558d35f4 in nsAppShell::Run() /widget/gtk/nsAppShell.cpp:470:33
#56 0x75e9567c373b in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:646:20
#57 0x75e950b73574 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
#58 0x75e950acd1e1 in RunHandler /ipc/chromium/src/base/message_loop.cc:362:3
#59 0x75e950acd1e1 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:344:3
#60 0x75e9567c2b79 in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:584:34
#61 0x5d6f73a7a1de in main /browser/app/nsBrowserApp.cpp:397:22
#62 0x75e9600c31c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#63 0x75e9600c328a in __libc_start_main csu/../csu/libc-start.c:360:3
#64 0x5d6f73a4da48 in _start (/home/jkratzer/builds/m-c-20250306092841-fuzzing-debug/firefox-bin+0x5da48) (BuildId: 395562403624ed8bc6460ae01e7788791389e9f1)
==153483==Register values:
rax = 0x0000000000000000 rbx = 0x00007fffc261aed0 rcx = 0x0000000000000056 rdx = 0x000075e96029d563
rdi = 0x000075e96029e700 rsi = 0x0000000000000000 rbp = 0x00007fffc261abc0 rsp = 0x00007fffc261abb0
r8 = 0x0000000000000000 r9 = 0x0000000000000003 r10 = 0x0000000000000000 r11 = 0x0000000000000293
r12 = 0x000000000000000b r13 = 0x0000000000000001 r14 = 0x00007fffc261ac40 r15 = 0x00007fffc261acb8
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:267:3 in MOZ_CrashSequence
==153483==ABORTING
| Reporter | ||
Comment 1•1 year ago
|
||
Comment 2•1 year ago
|
||
Verified bug as reproducible on mozilla-central 20250306213030-deee0cffec33.
Unable to bisect testcase (Testcase reproduces on start build!):
Start: ac5529a784bdd0522e58c4bcdb3293674601ac52 (20240308044528)
End: 29ca7ddfb7762e3b16be4961eff0e7b5b2755dd9 (20250306092841)
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)
Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]
This detects a bug of handling hidden editable element, but it does not cause crash/security issues.
Severity: -- → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•