Closed Bug 1772193 Opened 2 years ago Closed 2 years ago

Assertion failure: !mStyle (Shouldn't get to this code path on the root), at /layout/painting/nsDisplayList.cpp:8374

Categories

(Core :: Print Preview, defect, P3)

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1778718

People

(Reporter: jkratzer, Unassigned)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

4.24 KB, application/octet-stream
Details

Testcase found while fuzzing mozilla-central rev ac2e51f9332e (built with: --enable-debug --enable-fuzzing).

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build ac2e51f9332e --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.zip
Assertion failure: !mStyle (Shouldn't get to  this code path on the root), at /layout/painting/nsDisplayList.cpp:8374

    ==201883==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fa17d84ff06 bp 0x7ffd2af4da20 sp 0x7ffd2af4d940 T201883)
    ==201883==The signal is caused by a WRITE memory access.
    ==201883==Hint: address points to the zero page.
        #0 0x7fa17d84ff06 in mozilla::nsDisplayFilters::PaintWithContentsPaintCallback(mozilla::nsDisplayListBuilder*, gfxContext*, std::function<void (gfxContext*)> const&) /layout/painting/nsDisplayList.cpp:8374:3
        #1 0x7fa17d84fc13 in mozilla::nsDisplayFilters::Paint(mozilla::nsDisplayListBuilder*, gfxContext*) /layout/painting/nsDisplayList.cpp:8349:3
        #2 0x7fa17d804b87 in mozilla::nsDisplayList::Paint(mozilla::nsDisplayListBuilder*, gfxContext*, int) /layout/painting/nsDisplayList.cpp:2184:11
        #3 0x7fa17d847f3b in mozilla::nsDisplayTransform::Paint(mozilla::nsDisplayListBuilder*, gfxContext*, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) /layout/painting/nsDisplayList.cpp:6857:20
        #4 0x7fa17d8477f8 in mozilla::nsDisplayTransform::Paint(mozilla::nsDisplayListBuilder*, gfxContext*) /layout/painting/nsDisplayList.cpp:6824:3
        #5 0x7fa17d804b87 in mozilla::nsDisplayList::Paint(mozilla::nsDisplayListBuilder*, gfxContext*, int) /layout/painting/nsDisplayList.cpp:2184:11
        #6 0x7fa17d847f3b in mozilla::nsDisplayTransform::Paint(mozilla::nsDisplayListBuilder*, gfxContext*, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> > const&) /layout/painting/nsDisplayList.cpp:6857:20
        #7 0x7fa17d8477f8 in mozilla::nsDisplayTransform::Paint(mozilla::nsDisplayListBuilder*, gfxContext*) /layout/painting/nsDisplayList.cpp:6824:3
        #8 0x7fa17d804b87 in mozilla::nsDisplayList::Paint(mozilla::nsDisplayListBuilder*, gfxContext*, int) /layout/painting/nsDisplayList.cpp:2184:11
        #9 0x7fa17d82d586 in mozilla::nsDisplayList::PaintRoot(mozilla::nsDisplayListBuilder*, gfxContext*, unsigned int, mozilla::Maybe<double>) /layout/painting/nsDisplayList.cpp:2249:5
        #10 0x7fa17d49a139 in nsLayoutUtils::PaintFrame(gfxContext*, nsIFrame*, nsRegion const&, unsigned int, mozilla::nsDisplayListBuilderMode, nsLayoutUtils::PaintFrameFlags) /layout/base/nsLayoutUtils.cpp:3450:9
        #11 0x7fa17d63e039 in nsPageSequenceFrame::PrintNextSheet() /layout/generic/nsPageSequenceFrame.cpp:693:3
        #12 0x7fa17d86fd37 in nsPrintJob::PrintSheet(nsPrintObject*, bool&) /layout/printing/nsPrintJob.cpp:1824:31
        #13 0x7fa17d86f946 in nsPagePrintTimer::Run() /layout/printing/nsPagePrintTimer.cpp:92:43
        #14 0x7fa17836a222 in mozilla::SchedulerGroup::Runnable::Run() /xpcom/threads/SchedulerGroup.cpp:140:20
        #15 0x7fa17839991e in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:475:16
        #16 0x7fa1783742d3 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:788:26
        #17 0x7fa178372e83 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:620:15
        #18 0x7fa1783730f3 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:398:36
        #19 0x7fa17839d119 in operator() /xpcom/threads/TaskController.cpp:127:37
        #20 0x7fa17839d119 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_1>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #21 0x7fa178388b7f in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1180:16
        #22 0x7fa17838f17d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #23 0x7fa179baf23c in bool mozilla::SpinEventLoopUntil<(mozilla::ProcessFailureBehavior)1, nsGlobalWindowOuter::Print(nsIPrintSettings*, mozilla::layout::RemotePrintJobChild*, nsIWebProgressListener*, nsIDocShell*, nsGlobalWindowOuter::IsPreview, nsGlobalWindowOuter::IsForWindowDotPrint, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&, mozilla::ErrorResult&)::$_3>(nsTSubstring<char> const&, nsGlobalWindowOuter::Print(nsIPrintSettings*, mozilla::layout::RemotePrintJobChild*, nsIWebProgressListener*, nsIDocShell*, nsGlobalWindowOuter::IsPreview, nsGlobalWindowOuter::IsForWindowDotPrint, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&, mozilla::ErrorResult&)::$_3&&, nsIThread*) /builds/worker/workspace/obj-build/dist/include/mozilla/SpinEventLoopUntil.h:176:25
        #24 0x7fa179bacae9 in nsGlobalWindowOuter::Print(nsIPrintSettings*, mozilla::layout::RemotePrintJobChild*, nsIWebProgressListener*, nsIDocShell*, nsGlobalWindowOuter::IsPreview, nsGlobalWindowOuter::IsForWindowDotPrint, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&, mozilla::ErrorResult&) /dom/base/nsGlobalWindowOuter.cpp:5339:5
        #25 0x7fa179bab355 in nsGlobalWindowOuter::PrintOuter(mozilla::ErrorResult&) /dom/base/nsGlobalWindowOuter.cpp:5138:3
        #26 0x7fa17ad50733 in mozilla::dom::Window_Binding::print(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/WindowBinding.cpp:3101:24
        #27 0x7fa17b3190f0 in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /dom/bindings/BindingUtils.cpp:3271:13
        #28 0x7fa1807b08f0 in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) /js/src/vm/Interpreter.cpp:420:13
        #29 0x7fa1807b00fa in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:507:12
        #30 0x7fa1807a74d6 in CallFromStack /js/src/vm/Interpreter.cpp:578:10
        #31 0x7fa1807a74d6 in Interpret(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:3314:16
        #32 0x7fa18079e772 in js::RunScript(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:389:13
        #33 0x7fa1807afff6 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:539:13
        #34 0x7fa1807b1628 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:605:8
        #35 0x7fa17f475671 in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /js/src/vm/CallAndConstruct.cpp:117:10
        #36 0x7fa17b036bc9 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
        #37 0x7fa17b87e5e6 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
        #38 0x7fa17b87e30d in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) /dom/events/EventListenerManager.cpp:1310:43
        #39 0x7fa17b87efdd in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) /dom/events/EventListenerManager.cpp:1507:17
        #40 0x7fa17b873ec4 in HandleEvent /dom/events/EventListenerManager.h:395:5
        #41 0x7fa17b873ec4 in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) /dom/events/EventDispatcher.cpp:348:17
        #42 0x7fa17b873412 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /dom/events/EventDispatcher.cpp:550:16
        #43 0x7fa17b875cb1 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /dom/events/EventDispatcher.cpp:1119:11
        #44 0x7fa17d476aa3 in nsDocumentViewer::LoadComplete(nsresult) /layout/base/nsDocumentViewer.cpp:1085:7
        #45 0x7fa17eaa58d4 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /docshell/base/nsDocShell.cpp:6462:20
        #46 0x7fa17eaa5385 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /docshell/base/nsDocShell.cpp:5854:7
        #47 0x7fa17eaa620f in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /docshell/base/nsDocShell.cpp
        #48 0x7fa17924900c in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /uriloader/base/nsDocLoader.cpp:1377:3
        #49 0x7fa17924854a in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /uriloader/base/nsDocLoader.cpp:975:14
        #50 0x7fa179246801 in nsDocLoader::DocLoaderIsEmpty(bool, mozilla::Maybe<nsresult> const&) /uriloader/base/nsDocLoader.cpp:794:9
        #51 0x7fa1792479e8 in nsDocLoader::OnStopRequest(nsIRequest*, nsresult) /uriloader/base/nsDocLoader.cpp:677:5
        #52 0x7fa17eac6fad in nsDocShell::OnStopRequest(nsIRequest*, nsresult) /docshell/base/nsDocShell.cpp:13850:23
        #53 0x7fa17856d280 in mozilla::net::nsLoadGroup::NotifyRemovalObservers(nsIRequest*, nsresult) /netwerk/base/nsLoadGroup.cpp:614:22
        #54 0x7fa17856e793 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /netwerk/base/nsLoadGroup.cpp:518:10
        #55 0x7fa179d1ebed in mozilla::dom::Document::DoUnblockOnload() /dom/base/Document.cpp:11665:18
        #56 0x7fa179ce935f in mozilla::dom::Document::UnblockOnload(bool) /dom/base/Document.cpp:11603:9
        #57 0x7fa179d054cb in mozilla::dom::Document::DispatchContentLoadedEvents() /dom/base/Document.cpp:8137:3
        #58 0x7fa179db5c2b in applyImpl<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1147:12
        #59 0x7fa179db5c2b in apply<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1153:12
        #60 0x7fa179db5c2b 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
        #61 0x7fa17836a222 in mozilla::SchedulerGroup::Runnable::Run() /xpcom/threads/SchedulerGroup.cpp:140:20
        #62 0x7fa17839991e in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:475:16
        #63 0x7fa1783742d3 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:788:26
        #64 0x7fa178372e83 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:620:15
        #65 0x7fa1783730f3 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:398:36
        #66 0x7fa17839d0a6 in operator() /xpcom/threads/TaskController.cpp:124:37
        #67 0x7fa17839d0a6 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #68 0x7fa178388b7f in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1180:16
        #69 0x7fa17838f17d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #70 0x7fa178f50956 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:85:21
        #71 0x7fa178e78c77 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:380:10
        #72 0x7fa178e78b82 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
        #73 0x7fa178e78b82 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
        #74 0x7fa17d0ace88 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:137:27
        #75 0x7fa17f1efbfb in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:875:20
        #76 0x7fa178f5184a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
        #77 0x7fa178e78c77 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:380:10
        #78 0x7fa178e78b82 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
        #79 0x7fa178e78b82 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
        #80 0x7fa17f1ef21c in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:734:34
        #81 0x55e8dd664e90 in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #82 0x55e8dd664e90 in main /browser/app/nsBrowserApp.cpp:338:18
        #83 0x7fa1905db082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
        #84 0x55e8dd63ac3c in _start (/home/jkratzer/builds/mc-debug/firefox-bin+0x15c3c) (BuildId: da9e76af05647b6d317ba2077d910112aacae28d)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /layout/painting/nsDisplayList.cpp:8374:3 in mozilla::nsDisplayFilters::PaintWithContentsPaintCallback(mozilla::nsDisplayListBuilder*, gfxContext*, std::function<void (gfxContext*)> const&)
    ==201883==ABORTING
Attached file Testcase

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

Start: a47e970555ccc1ecc6c7d8057ce171544080ca4b (20220513160400)
End: 4aa40d4543da126a325b799542bd3fa72777bb4b (20220513134313)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a47e970555ccc1ecc6c7d8057ce171544080ca4b&tochange=4aa40d4543da126a325b799542bd3fa72777bb4b

Keywords: regression
Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]

Bugmon Analysis
Testcase crashes using the initial build (mozilla-central 20220529090310-ac2e51f9332e) but not with tip (mozilla-central 20220715212953-315e476ecf38.)

The bug appears to have been fixed in the following build range:

Start: 43b78654c3afde1e601c8b0ba1794b85954249fe (20220712094112)
End: abb9371221360a90228fa480693e5d5cdba60312 (20220712105114)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=43b78654c3afde1e601c8b0ba1794b85954249fe&tochange=abb9371221360a90228fa480693e5d5cdba60312

jkratzer, can you confirm that the above bisection range is responsible for fixing this issue?
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Flags: needinfo?(jkratzer)
Keywords: bugmon
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(jkratzer)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: