Closed Bug 1414581 Opened 7 years ago Closed 7 years ago

crash near null [@ IsList]

Categories

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

34 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox-esr52 --- wontfix
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: tsmith, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

(Keywords: crash, testcase)

Crash Data

Attachments

(3 files)

Attached file testcase.html
==25952==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000001c (pc 0x7fa84d3133ab bp 0x7ffc8bb27150 sp 0x7ffc8bb268e0 T0)
==25952==The signal is caused by a READ memory access.
==25952==Hint: address points to the zero page.
    #0 0x7fa84d3133aa in GetBoolFlag /src/dom/base/nsINode.h:1614:12
    #1 0x7fa84d3133aa in IsElement /src/dom/base/nsINode.h:456
    #2 0x7fa84d3133aa in IsHTMLElement /src/dom/base/nsINode.h:633
    #3 0x7fa84d3133aa in IsAnyOfHTMLElements<nsStaticAtom *, nsStaticAtom *, nsStaticAtom *> /src/dom/base/nsINode.h:644
    #4 0x7fa84d3133aa in IsList /src/editor/libeditor/HTMLEditUtils.cpp:270
    #5 0x7fa84d3133aa in mozilla::HTMLEditRules::WillOutdent(mozilla::dom::Selection&, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:4458
    #6 0x7fa84d2ff90e in mozilla::HTMLEditRules::WillDoAction(mozilla::dom::Selection*, mozilla::RulesInfo*, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:660:14
    #7 0x7fa84d37a4f5 in mozilla::HTMLEditor::Indent(nsTSubstring<char16_t> const&) /src/editor/libeditor/HTMLEditor.cpp:2191:24
    #8 0x7fa84d45eaba in nsOutdentCommand::DoCommand(char const*, nsISupports*) /src/editor/composer/nsComposerCommands.cpp:554:22
    #9 0x7fa84b5ef075 in nsControllerCommandTable::DoCommand(char const*, nsISupports*) /src/dom/commandhandler/nsControllerCommandTable.cpp:147:26
    #10 0x7fa84b5e5d5e in nsBaseCommandController::DoCommand(char const*) /src/dom/commandhandler/nsBaseCommandController.cpp:136:25
    #11 0x7fa84b5ec364 in nsCommandManager::DoCommand(char const*, nsICommandParams*, mozIDOMWindowProxy*) /src/dom/commandhandler/nsCommandManager.cpp:212:22
    #12 0x7fa84bb1f502 in nsHTMLDocument::ExecCommand(nsTSubstring<char16_t> const&, bool, nsTSubstring<char16_t> const&, nsIPrincipal&, mozilla::ErrorResult&) /src/dom/html/nsHTMLDocument.cpp:3349:18
    #13 0x7fa84b02fed0 in mozilla::dom::HTMLDocumentBinding::execCommand(JSContext*, JS::Handle<JSObject*>, nsHTMLDocument*, JSJitMethodCallArgs const&) /src/obj-firefox/dom/bindings/HTMLDocumentBinding.cpp:891:21
    #14 0x7fa84b320d10 in mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /src/dom/bindings/BindingUtils.cpp:3040:13
    #15 0x7fa85171b040 in CallJSNative /src/js/src/jscntxtinlines.h:291:15
    #16 0x7fa85171b040 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:472
    #17 0x7fa8517068cb in CallFromStack /src/js/src/vm/Interpreter.cpp:527:12
    #18 0x7fa8517068cb in Interpret(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:3061
    #19 0x7fa8516ee4aa in js::RunScript(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:422:12
    #20 0x7fa85171b13f in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:494:15
    #21 0x7fa85171c032 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:540:10
    #22 0x7fa85216222b in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /src/js/src/jsapi.cpp:3033:12
    #23 0x7fa84ad3c005 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
    #24 0x7fa84b73e36d in Call<nsISupports *> /src/obj-firefox/dist/include/mozilla/dom/EventHandlerBinding.h:362:12
    #25 0x7fa84b73e36d in mozilla::JSEventHandler::HandleEvent(nsIDOMEvent*) /src/dom/events/JSEventHandler.cpp:215
    #26 0x7fa84b707026 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) /src/dom/events/EventListenerManager.cpp:1118:51
    #27 0x7fa84b7091f2 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) /src/dom/events/EventListenerManager.cpp:1293:20
    #28 0x7fa84b6e88d1 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /src/dom/events/EventDispatcher.cpp:462:16
    #29 0x7fa84b6ebda2 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /src/dom/events/EventDispatcher.cpp:826:9
    #30 0x7fa84d9bcace in nsDocumentViewer::LoadComplete(nsresult) /src/layout/base/nsDocumentViewer.cpp:1064:7
    #31 0x7fa850a5c4da in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /src/docshell/base/nsDocShell.cpp:7764:21
    #32 0x7fa850a58504 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp:7562:7
    #33 0x7fa850a5fd5f in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp:7459:13
    #34 0x7fa8485ea813 in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /src/uriloader/base/nsDocLoader.cpp:1321:3
    #35 0x7fa8485e997c in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /src/uriloader/base/nsDocLoader.cpp:862:14
    #36 0x7fa8485e6a08 in nsDocLoader::DocLoaderIsEmpty(bool) /src/uriloader/base/nsDocLoader.cpp:751:9
    #37 0x7fa8485e8922 in nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp:633:5
    #38 0x7fa8485e957c in non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp:489:14
    #39 0x7fa846b579d0 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /src/netwerk/base/nsLoadGroup.cpp:629:28
    #40 0x7fa8497c8b7d in nsDocument::DoUnblockOnload() /src/dom/base/nsDocument.cpp:9374:18
    #41 0x7fa84981265f in nsUnblockOnloadEvent::Run() /src/dom/base/nsDocument.cpp:9325:11
    #42 0x7fa8469a6ee6 in nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1037:14
    #43 0x7fa8469c13a8 in NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:513:10
    #44 0x7fa8477935d1 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:97:21
    #45 0x7fa8476f3c2b in RunInternal /src/ipc/chromium/src/base/message_loop.cc:326:10
    #46 0x7fa8476f3c2b in RunHandler /src/ipc/chromium/src/base/message_loop.cc:319
    #47 0x7fa8476f3c2b in MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299
    #48 0x7fa84d1647cf in nsBaseAppShell::Run() /src/widget/nsBaseAppShell.cpp:158:27
    #49 0x7fa851271ec1 in nsAppStartup::Run() /src/toolkit/components/startup/nsAppStartup.cpp:288:30
    #50 0x7fa851469c4b in XREMain::XRE_mainRun() /src/toolkit/xre/nsAppRunner.cpp:4675:22
    #51 0x7fa85146b815 in XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4837:8
    #52 0x7fa85146cbc6 in XRE_main(int, char**, mozilla::BootstrapConfig const&) /src/toolkit/xre/nsAppRunner.cpp:4932:21
    #53 0x4ec4ec in do_main /src/browser/app/nsBrowserApp.cpp:231:22
    #54 0x4ec4ec in main /src/browser/app/nsBrowserApp.cpp:304
    #55 0x7fa8644af82f in __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
    #56 0x41dbc8 in _start (/home/user/workspace/browsers/m-c-1509789532-asan-opt/firefox+0x41dbc8)
Flags: in-testsuite?
Assignee: nobody → m_kato
Crash Signature: [@ mozilla::HTMLEditRules::WillOutdent ]
Priority: -- → P1
INFO: Last good revision: ffdd1a398105 (2014-08-20)
INFO: First bad revision: dac8b4a0bd7c (2014-08-21)
INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ffdd1a398105&tochange=dac8b4a0bd7c
Has Regression Range: --- → yes
Version: 58 Branch → 34 Branch
Comment on attachment 8925792 [details]
Bug 1414581 - Part 1. Require more nullptr check of parent node.

https://reviewboard.mozilla.org/r/196972/#review202194

::: commit-message-c2fe4:3
(Diff revision 1)
> +Bug 1402904 added nullptr check for parent node, but I forgot to add this for
> +this situation.  So I need to add more nullptr check.

I don't understand what does "forgot to add 'this' for 'this' situation". Please make it clearer before landing.
Attachment #8925792 - Flags: review?(masayuki) → review+
Comment on attachment 8925793 [details]
Bug 1414581 - Part 2. Add crashtest.

https://reviewboard.mozilla.org/r/196974/#review202196
Attachment #8925793 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/c95fd22b6a4f
Part 1. Require more nullptr check of parent node. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/9903b9dbd27f
Part 2. Add crashtest. r=masayuki
Comment on attachment 8925792 [details]
Bug 1414581 - Part 1. Require more nullptr check of parent node.

https://reviewboard.mozilla.org/r/196972/#review202768


C/C++ static analysis found 0 defects in this patch.

You can run this analysis locally with: `./mach static-analysis check path/to/file.cpp`
https://hg.mozilla.org/mozilla-central/rev/c95fd22b6a4f
https://hg.mozilla.org/mozilla-central/rev/9903b9dbd27f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: