Closed
Bug 504516
Opened 16 years ago
Closed 15 years ago
TM: Crash with a "divide by zero" error (really -2147483648 / -1)
Categories
(Core :: JavaScript Engine, defect, P2)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
status1.9.1 | --- | unaffected |
People
(Reporter: gkw, Assigned: gal)
References
Details
(Keywords: crash, regression, testcase, Whiteboard: [ccbr][sg:dos], fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
1.54 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
for (d in [0, 0]) {
const a = (d -= (++d).toString())
for each(b in [Number(1) << d, 0, 0xC]) {
b / a
}
}
crashes with TM branch js opt shell with -j with a DIVIDE BY ZERO error. Doesn't seem to occur in 1.9.1.
Exception Type: EXC_ARITHMETIC (SIGFPE)
Exception Codes: EXC_I386_DIV (divide by zero)
Crashed Thread: 0
Thread 0 Crashed:
0 ??? 0x0017ff51 0 + 1572689
1 ??? 0xbffff228 0 + 3221221928
2 js-opt-tm-intelmac 0x000f0e7e js_MonitorLoopEdge(JSContext*, unsigned int&) + 1326
3 js-opt-tm-intelmac 0x00054ffa js_Interpret + 44266
4 js-opt-tm-intelmac 0x0005a0c7 js_Execute + 407
5 js-opt-tm-intelmac 0x0000e54c JS_ExecuteScript + 60
6 js-opt-tm-intelmac 0x00004100 Process(JSContext*, JSObject*, char*, int) + 1616
7 js-opt-tm-intelmac 0x000077cf main + 879
8 js-opt-tm-intelmac 0x000022db _start + 209
9 js-opt-tm-intelmac 0x00002209 start + 41
Flags: blocking1.9.2?
Reporter | ||
Comment 1•16 years ago
|
||
autoBisect shows this is probably related to bug 474443 :
The first bad revision is:
changeset: 28973:812a94dc7dd5
user: Andreas Gal <gal@mozilla.com>
date: Fri Jun 12 08:33:32 2009 -0700
summary: Implement oracle-based speculative fmod/fdiv/fmul demotion (474443, r=graydon,dvander).
Blocks: 474443
Updated•16 years ago
|
Updated•16 years ago
|
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Reporter | ||
Updated•15 years ago
|
Flags: in-testsuite?
Comment 2•15 years ago
|
||
Still crashes for me.
Updated•15 years ago
|
Whiteboard: [sg:dos] → [ccbr][sg:dos]
Assignee | ||
Comment 3•15 years ago
|
||
Assignee: general → gal
Attachment #395550 -
Flags: review?(dvander)
Comment on attachment 395550 [details] [diff] [review]
patch
The reason this happens is that it's dividing -2147483648 / -1, the result of which is 2147483648. But that doesn't fit in a 32-bit signed integer so the CPU bizarrely throws the "divide by zero" exception.
Might want to add a comment about that in the patch, or change the comment above the line.
Attachment #395550 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Attachment #395550 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #396364 -
Flags: review?(dvander)
Comment on attachment 396364 [details] [diff] [review]
patch
>- if (!d1->isconst())
Should we keep this check?
Updated•15 years ago
|
Summary: TM: Crash with a divide by zero error → TM: Crash with a "divide by zero" error (really -2147483648 / -1)
Assignee | ||
Comment 7•15 years ago
|
||
Attachment #396364 -
Attachment is obsolete: true
Attachment #396364 -
Flags: review?(dvander)
Assignee | ||
Updated•15 years ago
|
Attachment #396678 -
Flags: review?(dvander)
Updated•15 years ago
|
Attachment #396678 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 8•15 years ago
|
||
Whiteboard: [ccbr][sg:dos] → [ccbr][sg:dos], fixed-in-tracemonkey
Assignee | ||
Comment 9•15 years ago
|
||
Backed out. As much as I can't believe I am guilty it looks like I made us go orange.
http://hg.mozilla.org/tracemonkey/rev/dc2598d08078
Whiteboard: [ccbr][sg:dos], fixed-in-tracemonkey → [ccbr][sg:dos]
Comment 10•15 years ago
|
||
The orange that happened with this checkin looked random. The serious permaorange was clearly caused by bug 471214.
Assignee | ||
Comment 11•15 years ago
|
||
Testing Jesse's theory. Brendan backed out 471214.
http://hg.mozilla.org/tracemonkey/rev/dc2598d08078
Whiteboard: [ccbr][sg:dos] → [ccbr][sg:dos], fixed-in-tracemonkey
Updated•15 years ago
|
Assignee | ||
Comment 12•15 years ago
|
||
Added testcase
http://hg.mozilla.org/tracemonkey/rev/9ad5876ecea2
Comment 13•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 14•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/3a8acec84491 (for real, apparently)
Comment 15•15 years ago
|
||
status1.9.2:
--- → beta1-fixed
Comment 16•12 years ago
|
||
Automatically extracted testcase for this bug was committed:
https://hg.mozilla.org/mozilla-central/rev/efaf8960a929
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•