Closed Bug 1718066 Opened 3 years ago Closed 3 years ago

Crash in [@ mozilla::nsRFPService::ReduceTimePrecisionImpl]

Categories

(Core :: DOM: Core & HTML, defect)

Unspecified
macOS
defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox-esr91 --- wontfix
firefox90 --- wontfix
firefox91 --- wontfix
firefox92 --- fixed

People

(Reporter: sefeng, Assigned: tjr)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/e263afb5-b450-4264-a3c3-3a6b00210622

Reason: EXC_ARITHMETIC / EXC_I386_DIV

Top 10 frames of crashing thread:

0 XUL mozilla::nsRFPService::ReduceTimePrecisionImpl toolkit/components/resistfingerprinting/nsRFPService.cpp:399
1 XUL mozilla::nsRFPService::ReduceTimePrecisionAsUSecsWrapper toolkit/components/resistfingerprinting/nsRFPService.cpp:484
2 XUL NowAsMillis js/src/jsdate.cpp:1512
3 XUL js::date_now js/src/jsdate.cpp:1551
4  @0x2684e6b804af 
5  @0x11f12e18f 
6  @0x2684e6b7cdb2 
7  @0x2b86e001f 
8  @0x2684e6b3956e 
9 XUL js::jit::MaybeEnterJit js/src/jit/Jit.cpp:207
Severity: -- → S2

The spikes in recently Nightlies look concerning. Do you mind take a look Tom?

Flags: needinfo?(tom)

So these are content processes crashes primarily on OSX. (48 out of 52)

EXC_I386_DIV is divide by zero. It's happening on a line calling nsRFPService::RandomMidpoint. foo % 0 will also cause this exception.

*aMidpointOut = rng.next() % aResolutionUSec; is within that function, and seems to be the only candidate. If it were zero though, I would expect such an error earlier. e.g. ong long clamped = floor(double(timeAsInt) / resolutionAsInt) * resolutionAsInt;

I'll post a patch but I don't really understand how we might wind up here or what we should do to address this problem.

Flags: needinfo?(tom)

I don't see why this is needed or how we got to this place
but we are getting some divide-by-zero errors and maybe
this will resolve them?

Assignee: nobody → tom
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: