Open
Bug 977403
Opened 11 years ago
Updated 1 month ago
Assertion failure: ToInteger(t) == t, at e:\dev\mozilla\central\js\src\jsdate.cpp:278
Categories
(Core :: JavaScript: Standard Library, defect, P5)
Tracking
()
NEW
People
(Reporter: jgilbert, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: assertion, Whiteboard: [js:p2])
Attachments
(1 file)
6.15 KB,
text/plain
|
Details |
I get this sporatically while I'm debugging other things. This fatal assert is really annoying, given its intermittency.
Reporter | ||
Comment 1•11 years ago
|
||
Looks like :waldo's fault:
https://hg.mozilla.org/mozilla-central/annotate/bb9edb4d5144/js/src/jsdate.cpp#l278
Flags: needinfo?(jwalden+bmo)
Comment 2•11 years ago
|
||
Kyle's mentioned seeing this too. It would be extremely helpful in these cases to know where the bad |t| came from. In his case it came from a Date object with a weird value in one of the reserved slots, but he couldn't backtrack it in a debugger to determine that exact value. Knowing that value would probably make it trivially easy to create a testcase, and from there a fix.
Reporter | ||
Comment 3•11 years ago
|
||
(In reply to Jeff Walden [:Waldo] (remove +bmo to email) from comment #2)
> Kyle's mentioned seeing this too. It would be extremely helpful in these
> cases to know where the bad |t| came from. In his case it came from a Date
> object with a weird value in one of the reserved slots, but he couldn't
> backtrack it in a debugger to determine that exact value. Knowing that
> value would probably make it trivially easy to create a testcase, and from
> there a fix.
Alright. I get this fairly often when letting the webgl conformance suite chug away on its own. I'll try to dig into it next time I see this. (And remove the patch I keep that comments this out :P)
Flags: needinfo?(jwalden+bmo) → needinfo?(jgilbert)
Reporter | ||
Comment 4•11 years ago
|
||
Flags: needinfo?(jgilbert)
Reporter | ||
Comment 5•11 years ago
|
||
`t` shows up as: 1.#QNAN00000000000
This value comes from js::DateObject::fillLocalTimeSlots():
double localTime = LocalTime(utcTime, dtInfo);
`utcTime` looks valid:
utcTime 1393548142294.0000 double
`dtInfo`:
localTZA_ -28800000.000000000 double
offsetMilliseconds 0 __int64
rangeStartSeconds 1391047070 __int64
rangeEndSeconds 1393886007 __int64
oldOffsetMilliseconds 0 __int64
oldRangeStartSeconds 1391047070 __int64
oldRangeEndSeconds 1393647160 __int64
utcToLocalStandardOffsetSeconds -28800 int
Tracing this back, the result of `AdjustTime(utcTime, dtInfo)` appears to be returning NaN.
`DaylightSavingTA` explicitly returns NaN if `!Finite(t)`, but we already check that earlier in fillLocalTimeSLots().
I'll also note that this code seems to be full of double->int conversions, which is happily converting well-behaved NaNs to garbage ints.
Reporter | ||
Comment 6•11 years ago
|
||
I duplicated `utcTime` and `dtInfo` and called LocalTime(), but it gave a normal result. The only thing I can think of would be a race condition with something in `dtInfo`, since LocalTime() is otherwise a pure function.
Reporter | ||
Comment 7•11 years ago
|
||
Actually, getDSTOffsetMilliseconds() does a bunch of non-const modifications. Lemme try to use its data to unwind things.
Reporter | ||
Comment 8•11 years ago
|
||
Yeah, that doesn't matter, since we we already inside either 'window'. I'm out of ideas here. Someone who knows this better should have a look.
Updated•3 years ago
|
Severity: normal → S3
Updated•3 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•