Open Bug 1758205 Opened 2 years ago Updated 1 year ago

crash at null in [@ nsFrameManager::CaptureFrameState]

Categories

(Core :: Layout, defect)

defect

Tracking

()

Tracking Status
firefox-esr91 --- unaffected
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- fix-optional
firefox102 --- fix-optional

People

(Reporter: tsmith, Unassigned, NeedInfo)

References

(Blocks 1 open bug, Regression)

Details

(4 keywords, Whiteboard: [bugmon:bisected,confirmed])

Crash Data

Attachments

(1 file)

Attached file testcase.html

Found while fuzzing m-c 20220224-fb443d9a5f9c (--enable-address-sanitizer --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch -a --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
==528==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f301026fbaa bp 0x7ffe6ab47730 sp 0x7ffe6ab475e0 T0)
==528==The signal is caused by a READ memory access.
==528==Hint: address points to the zero page.
    #0 0x7f301026fbaa in ChildLists /gecko/layout/generic/nsIFrame.h:1696:5
    #1 0x7f301026fbaa in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:166:40
    #2 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #3 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #4 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #5 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #6 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #7 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #8 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #9 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #10 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #11 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #12 0x7f301026fcb1 in nsFrameManager::CaptureFrameState(nsIFrame*, nsILayoutHistoryState*) /gecko/layout/base/nsFrameManager.cpp:175:7
    #13 0x7f3010269b7d in nsCSSFrameConstructor::CaptureStateForFramesOf(nsIContent*, nsILayoutHistoryState*) /gecko/layout/base/nsCSSFrameConstructor.cpp:8195:5
    #14 0x7f3010268d94 in nsCSSFrameConstructor::ContentRemoved(nsIContent*, nsIContent*, nsCSSFrameConstructor::RemoveFlags) /gecko/layout/base/nsCSSFrameConstructor.cpp:7462:7
    #15 0x7f301025da47 in nsCSSFrameConstructor::RecreateFramesForContent(nsIContent*, nsCSSFrameConstructor::InsertionKind) /gecko/layout/base/nsCSSFrameConstructor.cpp:8563:7
    #16 0x7f30101ca4e2 in mozilla::PresShell::ReconstructFrames() /gecko/layout/base/PresShell.cpp:4557:22
    #17 0x7f3010a3bef5 in nsPrintJob::ReconstructAndReflow(bool) /gecko/layout/printing/nsPrintJob.cpp:931:16
    #18 0x7f3010a39bb0 in nsPrintJob::SetupToPrintContent() /gecko/layout/printing/nsPrintJob.cpp:1048:21
    #19 0x7f3010a4123c in DocumentReadyForPrinting /gecko/layout/printing/nsPrintJob.cpp:788:17
    #20 0x7f3010a4123c in nsPrintJob::FinishPrintPreview() /gecko/layout/printing/nsPrintJob.cpp:2313:8
    #21 0x7f3010a40bd1 in nsPrintJob::MaybeResumePrintAfterResourcesLoaded(bool) /gecko/layout/printing/nsPrintJob.cpp:1296:10
    #22 0x7f3010a3772e in nsPrintJob::InitPrintDocConstruction(bool) /gecko/layout/printing/nsPrintJob.cpp:1250:3
    #23 0x7f3010a33d50 in nsPrintJob::DoCommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*) /gecko/layout/printing/nsPrintJob.cpp:619:3
    #24 0x7f3010a32423 in nsPrintJob::CommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*) /gecko/layout/printing/nsPrintJob.cpp:457:17
    #25 0x7f3010a38052 in nsPrintJob::PrintPreview(mozilla::dom::Document*, nsIPrintSettings*, nsIWebProgressListener*, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&) /gecko/layout/printing/nsPrintJob.cpp:676:7
    #26 0x7f30102943ca in nsDocumentViewer::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&) /gecko/layout/base/nsDocumentViewer.cpp:2980:18
    #27 0x7f300ae3174e in nsGlobalWindowOuter::Print(nsIPrintSettings*, nsIWebProgressListener*, nsIDocShell*, nsGlobalWindowOuter::IsPreview, nsGlobalWindowOuter::IsForWindowDotPrint, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&, mozilla::ErrorResult&) /gecko/dom/base/nsGlobalWindowOuter.cpp:5322:33
    #28 0x7f300adcb911 in nsGlobalWindowInner::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, nsIDocShell*, mozilla::ErrorResult&) /gecko/dom/base/nsGlobalWindowInner.cpp:3829:3
    #29 0x7f300c7379c1 in mozilla::dom::Window_Binding::printPreview(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/WindowBinding.cpp:3216:59
    #30 0x7f300cf3aa7b in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /gecko/dom/bindings/BindingUtils.cpp:3306:13
    #31 0x7f3014c5bec4 in CallJSNative /gecko/js/src/vm/Interpreter.cpp:425:13
    #32 0x7f3014c5bec4 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:512:12
    #33 0x7f3014c483de in CallFromStack /gecko/js/src/vm/Interpreter.cpp:576:10
    #34 0x7f3014c483de in Interpret(JSContext*, js::RunState&) /gecko/js/src/vm/Interpreter.cpp:3309:16
    #35 0x7f3014c2d1e1 in js::RunScript(JSContext*, js::RunState&) /gecko/js/src/vm/Interpreter.cpp:394:13
    #36 0x7f3014c5bfff in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:544:13
    #37 0x7f3014c5e14b in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:589:8
    #38 0x7f3014e1883d in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /gecko/js/src/vm/CallAndConstruct.cpp:117:10
    #39 0x7f300c523221 in mozilla::dom::IdleRequestCallback::Call(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::IdleDeadline&, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/WindowBinding.cpp:852:8
    #40 0x7f300af346f8 in mozilla::dom::IdleRequestCallback::Call(mozilla::dom::IdleDeadline&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WindowBinding.h:695:12
    #41 0x7f300b14db6e in Call /builds/worker/workspace/obj-build/dist/include/mozilla/dom/WindowBinding.h:708:12
    #42 0x7f300b14db6e in mozilla::dom::IdleRequest::IdleRun(nsPIDOMWindowInner*, double, bool) /gecko/dom/base/IdleRequest.cpp:61:13
    #43 0x7f300ada321f in nsGlobalWindowInner::RunIdleRequest(mozilla::dom::IdleRequest*, double, bool) /gecko/dom/base/nsGlobalWindowInner.cpp:737:12
    #44 0x7f300ada1aa2 in nsGlobalWindowInner::ExecuteIdleRequest(mozilla::TimeStamp) /gecko/dom/base/nsGlobalWindowInner.cpp:765:3
    #45 0x7f300ada17e4 in IdleRequestExecutor::Run() /gecko/dom/base/nsGlobalWindowInner.cpp:606:13
    #46 0x7f300775cc92 in mozilla::RunnableTask::Run() /gecko/xpcom/threads/TaskController.cpp:467:16
    #47 0x7f30077211bd in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /gecko/xpcom/threads/TaskController.cpp:770:26
    #48 0x7f300771ea35 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /gecko/xpcom/threads/TaskController.cpp:648:15
    #49 0x7f300771ee29 in mozilla::TaskController::ProcessPendingMTTask(bool) /gecko/xpcom/threads/TaskController.cpp:390:36
    #50 0x7f3007765601 in operator() /gecko/xpcom/threads/TaskController.cpp:124:37
    #51 0x7f3007765601 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /gecko/xpcom/threads/nsThreadUtils.h:531:5
    #52 0x7f3007741f57 in nsThread::ProcessNextEvent(bool, bool*) /gecko/xpcom/threads/nsThread.cpp:1173:16
    #53 0x7f300774d4cc in NS_ProcessNextEvent(nsIThread*, bool) /gecko/xpcom/threads/nsThreadUtils.cpp:467:10
    #54 0x7f3008c765ff in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /gecko/ipc/glue/MessagePump.cpp:85:21
    #55 0x7f3008aeec31 in RunInternal /gecko/ipc/chromium/src/base/message_loop.cc:331:10
    #56 0x7f3008aeec31 in RunHandler /gecko/ipc/chromium/src/base/message_loop.cc:324:3
    #57 0x7f3008aeec31 in MessageLoop::Run() /gecko/ipc/chromium/src/base/message_loop.cc:306:3
    #58 0x7f300fc20eb7 in nsBaseAppShell::Run() /gecko/widget/nsBaseAppShell.cpp:137:27
    #59 0x7f30149787ff in XRE_RunAppShell() /gecko/toolkit/xre/nsEmbedFunctions.cpp:878:20
    #60 0x7f3008aeec31 in RunInternal /gecko/ipc/chromium/src/base/message_loop.cc:331:10
    #61 0x7f3008aeec31 in RunHandler /gecko/ipc/chromium/src/base/message_loop.cc:324:3
    #62 0x7f3008aeec31 in MessageLoop::Run() /gecko/ipc/chromium/src/base/message_loop.cc:306:3
    #63 0x7f3014977a33 in XRE_InitChildProcess(int, char**, XREChildData const*) /gecko/toolkit/xre/nsEmbedFunctions.cpp:715:34
    #64 0x560b451fc7ed in content_process_main(mozilla::Bootstrap*, int, char**) /gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
    #65 0x560b451fcc20 in main /gecko/browser/app/nsBrowserApp.cpp:327:18
    #66 0x7f302c19f0b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
    #67 0x560b4514b8d9 in _start (/home/worker/builds/m-c-20220224214601-fuzzing-asan-opt/firefox+0x5d8d9)
Flags: in-testsuite?
Component: DOM: Editor → Layout
Crash Signature: [@ nsFrameManager::CaptureFrameState ]

A Pernosco session is available here: https://pernos.co/debug/oVKrygj4cCC7AJNsBaku9g/index.html

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

Start: e8c61e20953952b1c6727143e249656e9ef87cb2 (20211216135031)
End: 9896c12c490709e214030cd99f598e1ffa0076de (20211216153418)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=e8c61e20953952b1c6727143e249656e9ef87cb2&tochange=9896c12c490709e214030cd99f598e1ffa0076de

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

jwatt, looks like the regression range here points to Bug 1745452. Would you mind taking a look? (Looks like we've got a repro'ing testcase and a pernosco session, so hopefully pretty debuggable.)

Flags: needinfo?(jwatt)

:dholbert Is the severity on this ticket correct given the volume?

Flags: needinfo?(dholbert)
Regressions: 1745452

Fair point; probably better-classified as S3, given the relatively low crash volume here.

Severity: S2 → S3
Flags: needinfo?(dholbert)

Bugmon was unable reproduce this issue.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Keywords: bugmon
Keywords: bugmon

A change to the Taskcluster build definitions over the weekend caused Bugmon to fail when reproducing issues. This issue has been corrected. Re-enabling bugmon.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: