Closed Bug 1603807 Opened 4 years ago Closed 4 years ago

division by zero in layout/generic/nsGfxScrollFrame.cpp:2595

Categories

(Core :: Layout: Scrolling and Overflow, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: tsmith, Assigned: emilio)

References

(Blocks 2 open bugs)

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file testcase.html

Reduced with m-c 20191212-ca62389e0be3

To enable this check add the following to your mozconfig:

ac_add_options --enable-undefined-sanitizer="float-divide-by-zero"
src/layout/generic/nsGfxScrollFrame.cpp:2595:67: runtime error: division by zero
    #0 0x7fcfcdf66e20 in ClampAndAlignWithPixels(int, int, int, int, int, int, double, int) src/layout/generic/nsGfxScrollFrame.cpp:2595:67
    #1 0x7fcfcdefe556 in ClampAndAlignWithLayerPixels(nsPoint const&, nsRect const&, nsRect const&, nsPoint const&, int, mozilla::gfx::SizeTyped<mozilla::gfx::UnknownUnits, double> const&) src/layout/generic/nsGfxScrollFrame.cpp:2634:7
    #2 0x7fcfcdef9327 in mozilla::ScrollFrameHelper::ScrollToImpl(nsPoint, nsRect const&, nsAtom*) src/layout/generic/nsGfxScrollFrame.cpp:2766:7
    #3 0x7fcfcdf0fb20 in mozilla::ScrollFrameHelper::ReflowFinished() src/layout/generic/nsGfxScrollFrame.cpp:5897:5
    #4 0x7fcfcdc19198 in mozilla::PresShell::HandlePostedReflowCallbacks(bool) src/layout/base/PresShell.cpp:3846:21
    #5 0x7fcfcdc0d3e4 in mozilla::PresShell::DidDoReflow(bool) src/layout/base/PresShell.cpp:8982:3
    #6 0x7fcfcdc1af94 in mozilla::PresShell::ProcessReflowCommands(bool) src/layout/base/PresShell.cpp:9370:7
    #7 0x7fcfcdc1a205 in mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) src/layout/base/PresShell.cpp:4109:11
    #8 0x7fcfcdbbac7f in nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:2051:20
    #9 0x7fcfcdbca5ae in mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) src/layout/base/nsRefreshDriver.cpp:351:7
    #10 0x7fcfcdbca311 in mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:368:5
    #11 0x7fcfcdbc8cf9 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:740:16
    #12 0x7fcfcdbc8057 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&) src/layout/base/nsRefreshDriver.cpp:635:9
    #13 0x7fcfce2a14c6 in mozilla::layout::VsyncChild::RecvNotify(mozilla::VsyncEvent const&) src/layout/ipc/VsyncChild.cpp:65:16
    #14 0x7fcfc731e3f6 in mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) src/objdir-ff-ubsan/ipc/ipdl/PVsyncChild.cpp:187:54
    #15 0x7fcfc6d028eb in mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) src/objdir-ff-ubsan/ipc/ipdl/PBackgroundChild.cpp:5876:32
    #16 0x7fcfc64b5b5b in mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&) src/ipc/glue/MessageChannel.cpp:2209:25
    #17 0x7fcfc64b0ff7 in mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) src/ipc/glue/MessageChannel.cpp:2131:9
    #18 0x7fcfc64b2b73 in mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) src/ipc/glue/MessageChannel.cpp:1973:3
    #19 0x7fcfc64b3ab8 in mozilla::ipc::MessageChannel::MessageTask::Run() src/ipc/glue/MessageChannel.cpp:2004:13
    #20 0x7fcfc50cdec4 in nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1240:14
    #21 0x7fcfc50d3b5e in NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:486:10
    #22 0x7fcfc64c272e in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:87:21
    #23 0x7fcfc63053e4 in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:290:3
    #24 0x7fcfcd7c1c1a in nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:137:27
    #25 0x7fcfd18b93c9 in XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:946:20
    #26 0x7fcfc64c3d41 in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:237:9
    #27 0x7fcfc63053e4 in MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:290:3
    #28 0x7fcfd18b8817 in XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:781:34
    #29 0x5608092e41c5 in content_process_main(mozilla::Bootstrap*, int, char**) src/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28
    #30 0x5608092e43ef in main src/browser/app/nsBrowserApp.cpp:303:18
Flags: in-testsuite?

A Pernosco session is available here: https://pernos.co/debug/s6DT4iBOl8dq2l9-w88Chg/index.html

Assignee: nobody → emilio
Priority: -- → P3
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2d8fdc554f28
Don't divide by zero in ClampAndAlignWithPixels. r=botond
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: