Open Bug 1775475 Opened 2 years ago Updated 2 years ago

Assertion failure: aXRadius >= 0 && aYRadius >= 0 (must not pass negatives to CheckCorner), at /layout/base/nsLayoutUtils.cpp:1990

Categories

(Core :: Layout, defect)

x86_64
Linux
defect

Tracking

()

People

(Reporter: jkratzer, Unassigned)

References

(Blocks 1 open bug)

Details

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

Attachments

(1 file)

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

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 0242545b34ca --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: aXRadius >= 0 && aYRadius >= 0 (must not pass negatives to CheckCorner), at /layout/base/nsLayoutUtils.cpp:1990

    ==882352==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fc7a53d9d35 bp 0x7ffcdf3a6330 sp 0x7ffcdf3a6330 T882352)
    ==882352==The signal is caused by a WRITE memory access.
    ==882352==Hint: address points to the zero page.
        #0 0x7fc7a53d9d35 in CheckCorner(int, int, int, int) /layout/base/nsLayoutUtils.cpp:1989:3
        #1 0x7fc7a53d9c02 in nsLayoutUtils::RoundedRectIntersectsRect(nsRect const&, int const*, nsRect const&) /layout/base/nsLayoutUtils.cpp:2020:10
        #2 0x7fc7a573b9d7 in mozilla::DisplayItemClip::MayIntersect(nsRect const&) const /layout/painting/DisplayItemClip.cpp:58:10
        #3 0x7fc7a57729d9 in mozilla::nsDisplayList::HitTest(mozilla::nsDisplayListBuilder*, nsRect const&, mozilla::nsDisplayItem::HitTestState*, nsTArray<nsIFrame*>*) const /layout/painting/nsDisplayList.cpp:2447:42
        #4 0x7fc7a5786b80 in mozilla::nsDisplayAsyncZoom::HitTest(mozilla::nsDisplayListBuilder*, nsRect const&, mozilla::nsDisplayItem::HitTestState*, nsTArray<nsIFrame*>*) /layout/painting/nsDisplayList.cpp:5969:9
        #5 0x7fc7a5772a69 in mozilla::nsDisplayList::HitTest(mozilla::nsDisplayListBuilder*, nsRect const&, mozilla::nsDisplayItem::HitTestState*, nsTArray<nsIFrame*>*) const /layout/painting/nsDisplayList.cpp:2449:13
        #6 0x7fc7a53ddbd7 in nsLayoutUtils::GetFramesForArea(mozilla::RelativeTo, nsRect const&, nsTArray<nsIFrame*>&, nsLayoutUtils::FrameForPointOptions const&) /layout/base/nsLayoutUtils.cpp:2790:8
        #7 0x7fc7a53dd8cc in nsLayoutUtils::GetFrameForPoint(mozilla::RelativeTo, nsPoint, nsLayoutUtils::FrameForPointOptions const&) /layout/base/nsLayoutUtils.cpp:2732:8
        #8 0x7fc7a53334eb in mozilla::FindFrameTargetedByInputEvent(mozilla::WidgetGUIEvent*, mozilla::RelativeTo, nsPoint const&, unsigned int) /layout/base/PositionedEventTargeting.cpp:486:22
        #9 0x7fc7a5358a34 in mozilla::PresShell::EventHandler::GetFrameToHandleNonTouchEvent(nsIFrame*, mozilla::WidgetGUIEvent*) /layout/base/PresShell.cpp:7202:7
        #10 0x7fc7a53575de in mozilla::PresShell::EventHandler::ComputeEventTargetFrameAndPresShellAtEventPoint(nsIFrame*, mozilla::WidgetGUIEvent*, mozilla::PresShell::EventHandler::EventTargetData*) /layout/base/PresShell.cpp:7252:7
        #11 0x7fc7a5354736 in mozilla::PresShell::EventHandler::MaybeHandleEventWithAccessibleCaret(nsIFrame*, mozilla::WidgetGUIEvent*, nsEventStatus*) /layout/base/PresShell.cpp:7366:10
        #12 0x7fc7a5354416 in mozilla::PresShell::EventHandler::HandleEvent(nsIFrame*, mozilla::WidgetGUIEvent*, bool, nsEventStatus*) /layout/base/PresShell.cpp:6900:7
        #13 0x7fc7a5353b1c in mozilla::PresShell::HandleEvent(nsIFrame*, mozilla::WidgetGUIEvent*, bool, nsEventStatus*) /layout/base/PresShell.cpp:6871:23
        #14 0x7fc7a4f86fa2 in nsViewManager::DispatchEvent(mozilla::WidgetGUIEvent*, nsView*, nsEventStatus*) /view/nsViewManager.cpp:685:18
        #15 0x7fc7a4f86d49 in nsView::HandleEvent(mozilla::WidgetGUIEvent*, bool) /view/nsView.cpp:1129:9
        #16 0x7fc7a4fbd935 in mozilla::widget::PuppetWidget::DispatchEvent(mozilla::WidgetGUIEvent*, nsEventStatus&) /widget/PuppetWidget.cpp:352:37
        #17 0x7fc7a155ebdd in mozilla::layers::APZCCallbackHelper::DispatchWidgetEvent(mozilla::WidgetGUIEvent&) /gfx/layers/apz/util/APZCCallbackHelper.cpp:502:21
        #18 0x7fc7a482a265 in DispatchWidgetEventViaAPZ /dom/ipc/BrowserChild.cpp:1785:10
        #19 0x7fc7a482a265 in mozilla::dom::BrowserChild::HandleRealMouseButtonEvent(mozilla::WidgetMouseEvent const&, mozilla::layers::ScrollableLayerGuid const&, unsigned long const&) /dom/ipc/BrowserChild.cpp:1748:3
        #20 0x7fc7a482b7bf in mozilla::dom::BrowserChild::RecvRealMouseButtonEvent(mozilla::WidgetMouseEvent const&, mozilla::layers::ScrollableLayerGuid const&, unsigned long const&) /dom/ipc/BrowserChild.cpp:1715:3
        #21 0x7fc7a482b929 in mozilla::dom::BrowserChild::RecvSynthMouseMoveEvent(mozilla::WidgetMouseEvent const&, mozilla::layers::ScrollableLayerGuid const&, unsigned long const&) /dom/ipc/BrowserChild.cpp:1680:8
        #22 0x7fc7a49341dd in mozilla::dom::PBrowserChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PBrowserChild.cpp:5645:80
        #23 0x7fc7a49ac003 in mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) /builds/worker/workspace/obj-build/ipc/ipdl/PContentChild.cpp:8475:32
        #24 0x7fc7a0e77ec1 in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) /ipc/glue/MessageChannel.cpp:1749:25
        #25 0x7fc7a0e74a15 in mozilla::ipc::MessageChannel::DispatchMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::UniquePtr<IPC::Message, mozilla::DefaultDelete<IPC::Message> >) /ipc/glue/MessageChannel.cpp:1674:9
        #26 0x7fc7a0e755b6 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::ActorLifecycleProxy*, mozilla::ipc::MessageChannel::MessageTask&) /ipc/glue/MessageChannel.cpp:1474:3
        #27 0x7fc7a0e76941 in mozilla::ipc::MessageChannel::MessageTask::Run() /ipc/glue/MessageChannel.cpp:1572:14
        #28 0x7fc7a02bedfe in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:538:16
        #29 0x7fc7a0297529 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:851:26
        #30 0x7fc7a02960b3 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:683:15
        #31 0x7fc7a0296323 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:461:36
        #32 0x7fc7a02c26c9 in operator() /xpcom/threads/TaskController.cpp:190:37
        #33 0x7fc7a02c26c9 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_1>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #34 0x7fc7a02abf6f in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1205:16
        #35 0x7fc7a02b257d in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:465:10
        #36 0x7fc7a0e7d8f4 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:107:5
        #37 0x7fc7a0da5087 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:380:10
        #38 0x7fc7a0da4f92 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
        #39 0x7fc7a0da4f92 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
        #40 0x7fc7a4fef558 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:150:27
        #41 0x7fc7a712539b in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:875:20
        #42 0x7fc7a0e7e83a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
        #43 0x7fc7a0da5087 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:380:10
        #44 0x7fc7a0da4f92 in RunHandler /ipc/chromium/src/base/message_loop.cc:373:3
        #45 0x7fc7a0da4f92 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:355:3
        #46 0x7fc7a71249bc in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:734:34
        #47 0x5644e6c64f70 in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #48 0x5644e6c64f70 in main /browser/app/nsBrowserApp.cpp:338:18
        #49 0x7fc7b75c4082 in __libc_start_main /build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16
        #50 0x5644e6c3ad1c in _start (/home/jkratzer/builds/mc-debug/firefox-bin+0x15d1c) (BuildId: dd6e9f4140ebb5f07010c92403424520bc60bcea)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /layout/base/nsLayoutUtils.cpp:1989:3 in CheckCorner(int, int, int, int)
    ==882352==ABORTING
Attached file Testcase
Attachment #9282377 - Attachment mime type: application/octet-stream → text/html

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

Start: 1d31a009897964e94d43db5961ff68538d5e8ddb (20220520153703)
End: f0c4c97a8e6aa34214f287cb499321b6a0186c2f (20220520152255)
Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1d31a009897964e94d43db5961ff68538d5e8ddb&tochange=f0c4c97a8e6aa34214f287cb499321b6a0186c2f

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

This might be related to Bug 1769512. cc Emilio.

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

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.

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

Attachment

General

Created:
Updated:
Size: