Closed Bug 1429427 Opened 6 years ago Closed 3 years ago

Assertion failure: nsContentUtils::ComparePoints(mStart.Container(), static_cast<int32_t>(mStart.Offset()), mEnd.Container(), static_cast<int32_t>(mEnd.Offset())) <= 0, at /builds/worker/workspace/build/src/dom/events/ContentEventHandler.cpp:53

Categories

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

59 Branch
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox59 --- affected

People

(Reporter: jkratzer, Unassigned)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

Attached file testcase
Testcase found while fuzzing mozilla-central rev d5f42a23909e.

OS|Linux|0.0.0 Linux 4.4.0-104-generic #127-Ubuntu SMP Mon Dec 11 12:16:42 UTC 2017 x86_64
CPU|amd64|family 6 model 78 stepping 3|1
GPU|||
Crash|SIGSEGV|0x0|0
0|0|libxul.so|mozilla::ContentEventHandler::RawRange::AssertStartIsBeforeOrEqualToEnd|hg:hg.mozilla.org/mozilla-central:dom/events/ContentEventHandler.cpp:d5f42a23909e|49|0x18
0|1|libxul.so|mozilla::ContentEventHandler::RawRange::SetEnd|hg:hg.mozilla.org/mozilla-central:dom/events/ContentEventHandler.cpp:d5f42a23909e|100|0x8
0|2|libxul.so|mozilla::ContentEventHandler::GetFlatTextLengthInRange|hg:hg.mozilla.org/mozilla-central:dom/events/ContentEventHandler.cpp:d5f42a23909e|2925|0xb
0|3|libxul.so|mozilla::IMEContentObserver::MaybeNotifyIMEOfAddedTextDuringDocumentChange|hg:hg.mozilla.org/mozilla-central:dom/events/IMEContentObserver.cpp:d5f42a23909e|1347|0x5
0|4|libxul.so|mozilla::IMEContentObserver::ContentRemoved|hg:hg.mozilla.org/mozilla-central:dom/events/IMEContentObserver.cpp:d5f42a23909e|1147|0x8
0|5|libxul.so|nsNodeUtils::ContentRemoved|hg:hg.mozilla.org/mozilla-central:dom/base/nsNodeUtils.cpp:d5f42a23909e|252|0x1c
0|6|libxul.so|nsINode::doRemoveChildAt|hg:hg.mozilla.org/mozilla-central:dom/base/nsINode.cpp:d5f42a23909e|1951|0xb
0|7|libxul.so|mozilla::dom::FragmentOrElement::RemoveChildAt_Deprecated|hg:hg.mozilla.org/mozilla-central:dom/base/FragmentOrElement.cpp:d5f42a23909e|1168|0x12
0|8|libxul.so|nsHtml5TreeOperation::Detach|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5TreeOperation.cpp:d5f42a23909e|248|0x1c
0|9|libxul.so|nsHtml5TreeOperation::Perform|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5TreeOperation.cpp:d5f42a23909e|832|0x8
0|10|libxul.so|nsHtml5TreeOpExecutor::FlushDocumentWrite|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5TreeOpExecutor.cpp:d5f42a23909e|606|0x1a
0|11|libxul.so|nsHtml5Parser::Parse|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5Parser.cpp:d5f42a23909e|463|0x14
0|12|libxul.so|nsHTMLDocument::WriteCommon|hg:hg.mozilla.org/mozilla-central:dom/html/nsHTMLDocument.cpp:d5f42a23909e|2016|0x1f
0|13|libxul.so|nsHTMLDocument::WriteCommon|hg:hg.mozilla.org/mozilla-central:dom/html/nsHTMLDocument.cpp:d5f42a23909e|1900|0xd
0|14|libxul.so|mozilla::dom::HTMLDocumentBinding::write|s3:gecko-generated-sources:bd7e3c9624667f754c178c56640a582675cc4fa40b58ce593779e34213542c814c37dfbdbe2654f2b1abb9cb16840e5402ccf864fc236338739efc1fd3e31d91/dom/bindings/HTMLDocumentBinding.cpp:|653|0x15
0|15|libxul.so|mozilla::dom::GenericBindingMethod|hg:hg.mozilla.org/mozilla-central:dom/bindings/BindingUtils.cpp:d5f42a23909e|3042|0x9
0|16|libxul.so|js::CallJSNative|hg:hg.mozilla.org/mozilla-central:js/src/jscntxtinlines.h:d5f42a23909e|291|0x6
0|17|libxul.so|js::InternalCallOrConstruct|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d5f42a23909e|473|0xf
0|18|libxul.so|InternalCall|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d5f42a23909e|522|0xd
0|19|libxul.so|Interpret|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d5f42a23909e|528|0xf
0|20|libxul.so|js::RunScript|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d5f42a23909e|423|0xb
0|21|libxul.so|js::ExecuteKernel|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d5f42a23909e|706|0x5
0|22|libxul.so|js::Execute|hg:hg.mozilla.org/mozilla-central:js/src/vm/Interpreter.cpp:d5f42a23909e|739|0x5
0|23|libxul.so|ExecuteScript|hg:hg.mozilla.org/mozilla-central:js/src/jsapi.cpp:d5f42a23909e|4693|0x11
0|24|libxul.so|ExecuteScript|hg:hg.mozilla.org/mozilla-central:js/src/jsapi.cpp:d5f42a23909e|4712|0x8
0|25|libxul.so|nsJSUtils::ExecutionContext::CompileAndExec|hg:hg.mozilla.org/mozilla-central:dom/base/nsJSUtils.cpp:d5f42a23909e|266|0xc
0|26|libxul.so|mozilla::dom::ScriptLoader::EvaluateScript|hg:hg.mozilla.org/mozilla-central:dom/script/ScriptLoader.cpp:d5f42a23909e|2233|0x12
0|27|libxul.so|mozilla::dom::ScriptLoader::ProcessRequest|hg:hg.mozilla.org/mozilla-central:dom/script/ScriptLoader.cpp:d5f42a23909e|1876|0xb
0|28|libxul.so|mozilla::dom::ScriptLoader::ProcessScriptElement|hg:hg.mozilla.org/mozilla-central:dom/script/ScriptLoader.cpp:d5f42a23909e|1574|0xf
0|29|libxul.so|mozilla::dom::ScriptElement::MaybeProcessScript|hg:hg.mozilla.org/mozilla-central:dom/script/ScriptElement.cpp:d5f42a23909e|147|0x13
0|30|libxul.so|nsIScriptElement::AttemptToExecute|hg:hg.mozilla.org/mozilla-central:dom/script/nsIScriptElement.h:d5f42a23909e|240|0x3
0|31|libxul.so|nsHtml5TreeOpExecutor::RunScript|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5TreeOpExecutor.cpp:d5f42a23909e|736|0x10
0|32|libxul.so|nsHtml5TreeOpExecutor::RunFlushLoop|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5TreeOpExecutor.cpp:d5f42a23909e|540|0x8
0|33|libxul.so|nsHtml5ExecutorFlusher::Run|hg:hg.mozilla.org/mozilla-central:parser/html/nsHtml5StreamParser.cpp:d5f42a23909e|131|0x10
0|34|libxul.so|mozilla::SchedulerGroup::Runnable::Run|hg:hg.mozilla.org/mozilla-central:xpcom/threads/SchedulerGroup.cpp:d5f42a23909e|395|0x1c
0|35|libxul.so|nsThread::ProcessNextEvent|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThread.cpp:d5f42a23909e|1040|0x15
0|36|libxul.so|NS_ProcessNextEvent|hg:hg.mozilla.org/mozilla-central:xpcom/threads/nsThreadUtils.cpp:d5f42a23909e|517|0x11
0|37|libxul.so|mozilla::ipc::MessagePump::Run|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:d5f42a23909e|97|0xa
0|38|libxul.so|MessageLoop::RunInternal|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:d5f42a23909e|326|0x17
0|39|libxul.so|MessageLoop::Run|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:d5f42a23909e|319|0x8
0|40|libxul.so|nsBaseAppShell::Run|hg:hg.mozilla.org/mozilla-central:widget/nsBaseAppShell.cpp:d5f42a23909e|157|0xd
0|41|libxul.so|XRE_RunAppShell|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:d5f42a23909e|877|0x11
0|42|libxul.so|mozilla::ipc::MessagePumpForChildProcess::Run|hg:hg.mozilla.org/mozilla-central:ipc/glue/MessagePump.cpp:d5f42a23909e|269|0x5
0|43|libxul.so|MessageLoop::RunInternal|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:d5f42a23909e|326|0x17
0|44|libxul.so|MessageLoop::Run|hg:hg.mozilla.org/mozilla-central:ipc/chromium/src/base/message_loop.cc:d5f42a23909e|319|0x8
0|45|libxul.so|XRE_InitChildProcess|hg:hg.mozilla.org/mozilla-central:toolkit/xre/nsEmbedFunctions.cpp:d5f42a23909e|703|0x8
0|46|firefox|content_process_main|hg:hg.mozilla.org/mozilla-central:ipc/contentproc/plugin-container.cpp:d5f42a23909e|63|0x14
0|47|firefox|main|hg:hg.mozilla.org/mozilla-central:browser/app/nsBrowserApp.cpp:d5f42a23909e|280|0x11
0|48|libc-2.23.so||||0x20830
0|49|firefox|MOZ_ReportAssertionFailure|hg:hg.mozilla.org/mozilla-central:mfbt/Assertions.h:d5f42a23909e|165|0x5
Flags: in-testsuite?
Henri, do you have an idea why this assert happens.
Flags: needinfo?(hsivonen)
It doesn't assert if e10s is disabled. I suspect this has to do with the content process spinning its event loop in some way during window.open but in a different way than in the pre-e10s world.
Also, it doesn't seem to be about document.write blowing away the document per se but also about actually what gets written.
Still happens if RemoveChildAt_Deprecated is replaced with a non-deprecated RemoveChild.
I don't know why this happens, but I'm going to claim this is an editor bug.
Component: DOM: Events → Editor
Flags: needinfo?(hsivonen)
Priority: -- → P3
Attachment #8941420 - Attachment description: trigger.html → testcase

Bugmon Analysis:
Unable to reproduce bug using the following builds:

mozilla-central 20210223085042-916497e295fe
mozilla-central 20200225042307-7d59549f2fda

Whiteboard: [bugmon:confirmed]
See Also: → 1489231

This seems to have been fixed somewhere else more than a year ago.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: