Closed Bug 1423767 Opened 2 years ago Closed 2 years ago

crash near null in [@ mozilla::EditorBase::SplitNodeDeep]

Categories

(Core :: DOM: Editor, defect, P1)

59 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- wontfix
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- fixed

People

(Reporter: tsmith, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Keywords: crash, regression, testcase)

Crash Data

Attachments

(2 files)

Attached file testcase.html
==104315==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000001c (pc 0x7f8d11f517f8 bp 0x7ffdb22bba90 sp 0x7ffdb22bb860 T0)
==104315==The signal is caused by a READ memory access.
==104315==Hint: address points to the zero page.
    #0 0x7f8d11f517f7 in GetBoolFlag /src/dom/base/nsINode.h:1632:12
    #1 0x7f8d11f517f7 in GetParent /src/dom/base/nsINode.h:924
    #2 0x7f8d11f517f7 in mozilla::EditorBase::SplitNodeDeep(nsIContent&, mozilla::EditorDOMPointBase<nsINode*, nsIContent*> const&, mozilla::SplitAtEdges) /src/editor/libeditor/EditorBase.cpp:4178
    #3 0x7f8d1203363f in mozilla::HTMLEditRules::BustUpInlinesAtRangeEndpoints(mozilla::RangeItem&) /src/editor/libeditor/HTMLEditRules.cpp:6483:19
    #4 0x7f8d11fd9781 in mozilla::HTMLEditRules::GetNodesForOperation(nsTArray<RefPtr<nsRange> >&, nsTArray<mozilla::OwningNonNull<nsINode> >&, EditAction, mozilla::HTMLEditRules::TouchContent) /src/editor/libeditor/HTMLEditRules.cpp:6139:12
    #5 0x7f8d120213da in mozilla::HTMLEditRules::WillHTMLIndent(mozilla::dom::Selection*, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:4239:8
    #6 0x7f8d11fa9789 in WillIndent /src/editor/libeditor/HTMLEditRules.cpp:3982:19
    #7 0x7f8d11fa9789 in mozilla::HTMLEditRules::WillDoAction(mozilla::dom::Selection*, mozilla::RulesInfo*, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:659
    #8 0x7f8d1204bf84 in mozilla::HTMLEditor::Indent(nsTSubstring<char16_t> const&) /src/editor/libeditor/HTMLEditor.cpp:2181:24
    #9 0x7f8d1214ff0a in nsIndentCommand::DoCommand(char const*, nsISupports*) /src/editor/composer/nsComposerCommands.cpp:503:22
    #10 0x7f8d1006da50 in nsControllerCommandTable::DoCommand(char const*, nsISupports*) /src/dom/commandhandler/nsControllerCommandTable.cpp:147:26
    #11 0x7f8d10063926 in nsBaseCommandController::DoCommand(char const*) /src/dom/commandhandler/nsBaseCommandController.cpp:136:25
    #12 0x7f8d1006a4a4 in nsCommandManager::DoCommand(char const*, nsICommandParams*, mozIDOMWindowProxy*) /src/dom/commandhandler/nsCommandManager.cpp:212:22
    #13 0x7f8d1059ebdb in nsHTMLDocument::ExecCommand(nsTSubstring<char16_t> const&, bool, nsTSubstring<char16_t> const&, nsIPrincipal&, mozilla::ErrorResult&) /src/dom/html/nsHTMLDocument.cpp:3276:18
    #14 0x7f8d0f9868e1 in mozilla::dom::HTMLDocumentBinding::execCommand(JSContext*, JS::Handle<JSObject*>, nsHTMLDocument*, JSJitMethodCallArgs const&) /src/obj-firefox/dom/bindings/HTMLDocumentBinding.cpp:854:21
    #15 0x7f8d0fd28ad7 in mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /src/dom/bindings/BindingUtils.cpp:3042:13
    #16 0x7f8d167c7041 in CallJSNative /src/js/src/jscntxtinlines.h:291:15
    #17 0x7f8d167c7041 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:473
    #18 0x7f8d167ad0a8 in CallFromStack /src/js/src/vm/Interpreter.cpp:528:12
    #19 0x7f8d167ad0a8 in Interpret(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:3096
    #20 0x7f8d16799810 in js::RunScript(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:423:12
    #21 0x7f8d167c74ce in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:495:15
    #22 0x7f8d167c7fd2 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) /src/js/src/vm/Interpreter.cpp:541:10
    #23 0x7f8d172c140c in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /src/js/src/jsapi.cpp:3036:12
    #24 0x7f8d0f67fcbe in mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) /src/obj-firefox/dom/bindings/EventHandlerBinding.cpp:260:37
    #25 0x7f8d101d2ba3 in Call<nsISupports *> /src/obj-firefox/dist/include/mozilla/dom/EventHandlerBinding.h:362:12
    #26 0x7f8d101d2ba3 in mozilla::JSEventHandler::HandleEvent(nsIDOMEvent*) /src/dom/events/JSEventHandler.cpp:215
    #27 0x7f8d10199661 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) /src/dom/events/EventListenerManager.cpp:1111:51
    #28 0x7f8d1019b572 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) /src/dom/events/EventListenerManager.cpp:1286:20
    #29 0x7f8d10185f5f in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /src/dom/events/EventDispatcher.cpp:462:16
    #30 0x7f8d1018984b in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /src/dom/events/EventDispatcher.cpp:826:9
    #31 0x7f8d126e0281 in nsDocumentViewer::LoadComplete(nsresult) /src/layout/base/nsDocumentViewer.cpp:1070:7
    #32 0x7f8d15a4c9c2 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /src/docshell/base/nsDocShell.cpp:7874:21
    #33 0x7f8d15a488ea in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp:7667:7
    #34 0x7f8d15a506ef in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp
    #35 0x7f8d0ca4e247 in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /src/uriloader/base/nsDocLoader.cpp:1319:3
    #36 0x7f8d0ca4d451 in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /src/uriloader/base/nsDocLoader.cpp:862:14
    #37 0x7f8d0ca4a0e4 in nsDocLoader::DocLoaderIsEmpty(bool) /src/uriloader/base/nsDocLoader.cpp:751:9
    #38 0x7f8d0ca4c11c in nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp:633:5
    #39 0x7f8d0ca4d03c in non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp
    #40 0x7f8d0ad702fa in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /src/netwerk/base/nsLoadGroup.cpp:629:28
    #41 0x7f8d0dd1ad67 in DoUnblockOnload /src/dom/base/nsDocument.cpp:9116:18
    #42 0x7f8d0dd1ad67 in nsDocument::UnblockOnload(bool) /src/dom/base/nsDocument.cpp:9038
    #43 0x7f8d0dcf6efa in nsDocument::DispatchContentLoadedEvents() /src/dom/base/nsDocument.cpp:5678:3
    #44 0x7f8d0dd76764 in applyImpl<nsDocument, void (nsDocument::*)()> /src/obj-firefox/dist/include/nsThreadUtils.h:1142:12
    #45 0x7f8d0dd76764 in apply<nsDocument, void (nsDocument::*)()> /src/obj-firefox/dist/include/nsThreadUtils.h:1148
    #46 0x7f8d0dd76764 in mozilla::detail::RunnableMethodImpl<nsDocument*, void (nsDocument::*)(), true, (mozilla::RunnableKind)0>::Run() /src/obj-firefox/dist/include/nsThreadUtils.h:1192
    #47 0x7f8d0abaf66e in nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1033:14
    #48 0x7f8d0abcb3f0 in NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:508:10
    #49 0x7f8d0ba3d99a in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:97:21
    #50 0x7f8d0b994929 in RunInternal /src/ipc/chromium/src/base/message_loop.cc:326:10
    #51 0x7f8d0b994929 in RunHandler /src/ipc/chromium/src/base/message_loop.cc:319
    #52 0x7f8d0b994929 in MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299
    #53 0x7f8d11de55ca in nsBaseAppShell::Run() /src/widget/nsBaseAppShell.cpp:157:27
    #54 0x7f8d162d7b5b in nsAppStartup::Run() /src/toolkit/components/startup/nsAppStartup.cpp:288:30
    #55 0x7f8d164f0dd8 in XREMain::XRE_mainRun() /src/toolkit/xre/nsAppRunner.cpp:4649:22
    #56 0x7f8d164f3c0e in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4811:8
    #57 0x7f8d164f5084 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4903:21
    #58 0x4ee80b in do_main /src/browser/app/nsBrowserApp.cpp:231:22
    #59 0x4ee80b in main /src/browser/app/nsBrowserApp.cpp:304
    #60 0x7f8d2960f82f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
    #61 0x41e078 in _start (firefox+0x41e078)
Flags: in-testsuite?
Crash Signature: [@ mozilla::EditorBase::SplitNodeDeep ]
Priority: -- → P1
Duplicate of this bug: 1461497
Assignee: nobody → m_kato
Comment on attachment 8976057 [details]
Bug 1423767 - Splitting node might be orphan.

https://reviewboard.mozilla.org/r/244248/#review250228

Thanks!!
Attachment #8976057 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/d25e01a0ac09
Splitting node might be orphan. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/d25e01a0ac09
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Blocks: 1413181
Has Regression Range: --- → yes
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.