fsanitize=enum (ubsan) runtime error for nsEventStatus in PresShell.cpp

RESOLVED FIXED in Firefox 58

Status

()

P3
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: arthur, Assigned: arthur)

Tracking

(Blocks: 2 bugs)

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 wontfix, firefox58 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

a year ago
When I run Mozilla's automated tests on a gcc fsanitize=enum build,the following runtime error:

Here is the stack trace:
[task 2017-09-30T01:38:24.282Z] 01:38:24     INFO -  /builds/worker/workspace/build/src/layout/base/PresShell.cpp:6828:21: runtime error: load of value 4287326164, which is not a valid value for type 'nsEventStatus'^M
[task 2017-09-30T01:38:24.284Z] 01:38:24     INFO -      #0 0xf0b27b72 in mozilla::PresShell::HandleEvent(nsIFrame*, mozilla::WidgetG\
UIEvent*, bool, nsEventStatus*, nsIContent**) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25f8b72)^M
[task 2017-09-30T01:38:24.285Z] 01:38:24     INFO -      #1 0xf08a643b in nsViewManager::DispatchEvent(mozilla::WidgetGUIEvent*, nsVi\
ew*, nsEventStatus*) (/builds/worker/workspace/build/application/firefox/libxul.so+0x237743b)^M
[task 2017-09-30T01:38:24.286Z] 01:38:24     INFO -      #2 0xf0b015df in mozilla::PresShell::DispatchSynthMouseMove(mozilla::WidgetG\
UIEvent*, bool) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25d25df)^M
[task 2017-09-30T01:38:24.287Z] 01:38:24     INFO -      #3 0xf0b0bd76 in mozilla::PresShell::ProcessSynthMouseMoveEvent(bool) (/buil\
ds/worker/workspace/build/application/firefox/libxul.so+0x25dcd76)^M
[task 2017-09-30T01:38:24.288Z] 01:38:24     INFO -      #4 0xf0b22f7a in mozilla::PresShell::nsSynthMouseMoveEvent::WillRefresh(mozi\
lla::TimeStamp) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25f3f7a)^M
[task 2017-09-30T01:38:24.289Z] 01:38:24     INFO -      #5 0xf0aed684 in nsRefreshDriver::Tick(long long, mozilla::TimeStamp) (/buil\
ds/worker/workspace/build/application/firefox/libxul.so+0x25be684)^M                                                                  
[task 2017-09-30T01:38:24.290Z] 01:38:24     INFO -      #6 0xf0aeecbc in mozilla::RefreshDriverTimer::TickRefreshDrivers(long long, \
mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25bfcbc)^M
[task 2017-09-30T01:38:24.291Z] 01:38:24     INFO -      #7 0xf0aeedc6 in mozilla::RefreshDriverTimer::Tick(long long, mozilla::TimeS\
tamp) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25bfdc6)^M
[task 2017-09-30T01:38:24.293Z] 01:38:24     INFO -      #8 0xf0aeefd1 in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserve\
r::TickRefreshDriver(mozilla::TimeStamp) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25bffd1)^M
[task 2017-09-30T01:38:24.293Z] 01:38:24     INFO -      #9 0xf0aef22f in mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserve\
r::NotifyVsync(mozilla::TimeStamp) (/builds/worker/workspace/build/application/firefox/libxul.so+0x25c022f)^M
(Assignee)

Comment 1

a year ago
Created attachment 8913925 [details] [diff] [review]
0001-Bug-1404570-Fix-ubsan-runtime-error-for-nsEventStatu.patch

Hi -- unfortunately I'm not sure if I should be using nsEventStatus_eIgnore or nsEventStatus_eConsumeNoDefault here.
Attachment #8913925 - Flags: review?(bugs)
(Assignee)

Comment 2

a year ago
I meant to say: I'm not sure if I should be using nsEventStatus_eIgnore or nsEventStatus_eConsumeDoDefault here.
(Assignee)

Updated

a year ago
Blocks: 1404547
status-firefox57: --- → wontfix
Priority: -- → P3
Attachment #8913925 - Flags: review?(bugs) → review+
(Assignee)

Comment 3

a year ago
Thanks for the review.
Keywords: checkin-needed
Assignee: nobody → arthuredelstein

Comment 4

a year ago
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/45eb821ac9d5
Fix ubsan runtime error for nsEventStatus enum in PresShell.cpp. r=smaug
Keywords: checkin-needed

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/45eb821ac9d5
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox58: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.