Closed
Bug 699161
Opened 13 years ago
Closed 13 years ago
Intermittent JIT failure with equality testing of float values
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: brbaker, Unassigned)
References
Details
Attachments
(2 files)
There are a handfull of equality tests in floatOperations.as in the "=== float op Any (float) ===" section, comparing float with float. I have tried to narrow this testcase down but it 'appears' that if I remove too much code that is not related to these tests I am not able to get this issue to happen. ./runtests.py --vmargs="-Ojit" as3/Types/Float/floatOperations.as >> >> GT !FAILED! = 0 FAILED! expected: 1 >> >> GTE !FAILED! = 1 FAILED! expected: 0 >> >> LT !FAILED! = 0 FAILED! expected: 1 >> >> LTE !FAILED! = 1 FAILED! expected: 0 >> EQ !FAILED! = 0 FAILED! expected: 1 >> SEQ !FAILED! = 0 FAILED! expected: 1 >> NEQ !FAILED! = 1 FAILED! expected: 0 >> sneq !FAILED! = 1 FAILED! expected: 0 I have seen this happen on mac os x 64bit and on linux 64bit. It may take 30+ iterations before you see this failure, although it could happen on the first run if you are lucky :) or is that unlucky...
Reporter | ||
Updated•13 years ago
|
Flags: in-testsuite+
Flags: flashplayer-triage+
Flags: flashplayer-qrb+
Flags: flashplayer-bug-
Comment 1•13 years ago
|
||
I could repro in Debug-Debugger build, 32bits, OSx (in Release-Debugger, both 32-bit and 64-bit, doesn't reproduce in a few thousand iterations). My results are somehow different: FltAnyOps SUB !FAILED! = 0 FAILED! expected: 28.260000228881836 FltAnyOps MUL !FAILED! = 985.9599609375 FAILED! expected: 98.59600067138672 FltAnyOps DIV !FAILED! = 1 FAILED! expected: 10 FltAnyOps MOD !FAILED! = 0 FAILED! expected: 3.140000104904175 FltAnyOps UMINUS !FAILED! = -31.399999618530273 FAILED! expected: -3.140000104904175 FltAnyOps UPLUS !FAILED! = 31.399999618530273 FAILED! expected: 3.140000104904175 >> FltAnyOps GT !FAILED! = 1 FAILED! expected: 0 >> FltAnyOps GTE !FAILED! = 0 FAILED! expected: 1 >> FltAnyOps LT !FAILED! = 1 FAILED! expected: 0 >> FltAnyOps LTE !FAILED! = 0 FAILED! expected: 1 FltAnyOps EQ !FAILED! = 1 FAILED! expected: 0 >> FltAnyOps EQ !FAILED! = 0 FAILED! expected: 1 FltAnyOps SEQ !FAILED! = 1 FAILED! expected: 0 >> FltAnyOps SEQ !FAILED! = 0 FAILED! expected: 1 FltAnyOps NEQ !FAILED! = 0 FAILED! expected: 1 >> FltAnyOps NEQ !FAILED! = 1 FAILED! expected: 0 FltAnyOps SNEQ !FAILED! = 0 FAILED! expected: 1 >> FltAnyOps SNEQ !FAILED! = 1 FAILED! expected: 0 (in one run I got the faiures starting with "MUL" -i.e. "SUB" passed...)
Comment 2•13 years ago
|
||
Using -Dgreedy on a Mac DD 32-bit build provokes a bunch of failures on the first try.
Comment 3•13 years ago
|
||
And also on a Mac R 32-bit build.
Comment 4•13 years ago
|
||
This is enough to provoke failures on the first attempt with -Dgreedy on Release and Debug-Debugger; the failure sets are mostly nonoverlapping in the two cases. Release: FltAnyOps GTE FltAnyOps LT FltAnyOps LTE FltAnyOps EQ FltAnyOps EQ FltAnyOps SEQ FltAnyOps SEQ FltAnyOps NEQ FltAnyOps NEQ FltAnyOps SNEQ FltAnyOps SNEQ Debug-debugger: FltAnyOps ADD FltAnyOps SUB FltAnyOps MUL FltAnyOps DIV FltAnyOps MOD FltAnyOps UMINUS FltAnyOps UPLUS FltAnyOps LTE FltAnyOps NEQ FltAnyOps SNEQ
Comment 5•13 years ago
|
||
It is virtually guaranteed that this is related to interface calls, since if I remove the IFloatOps annotation on the "obj" variable then the errors go away (in Release mode so far, still waiting for DD to finish).
Comment 6•13 years ago
|
||
Ditto in the DD build: no failures with the annotation commented out.
Reporter | ||
Comment 7•13 years ago
|
||
Another testcase: (cribbed from Float/flt_6_3_10.as) 64bit release-debugger OSX: u: 2.1413118839263916 flt: 2.1413118839263916 o: 3.1413118839263916 flt_plus_1: 4.1413116455078125 64bit release-debugger OSX with -Dgreedy: u: 2.1413118839263916 flt: 2.1413118839263916 o: 0 flt_plus_1: 2.4026954939393893e-38
Reporter | ||
Comment 8•13 years ago
|
||
(In reply to Brent Baker from comment #7) > Created attachment 572807 [details] > Another simple testcase I actually get different results with this test based on the following combinations: No switches (hybrid mode) o: 3.1413118839263916 flt_plus_1: 4.1413116455078125 -Dgreedy -Dinterp o: 0 flt_plus_1: 2.4026954939393893e-38 -Dgreedy -Ojit o: 2.403771691159991e-38 flt_plus_1: 2.4026932518618464e-38
Comment 9•13 years ago
|
||
That's normal; heap dynamics are essentially chaotic (at least in an informal way). Virgil's assumption has been that we're interpreting a float as a pointer in one context and thus shifting heap content would play a role.
Comment 10•13 years ago
|
||
Fixed (by Lars :) ) in changeset 6812:164a8a012b2a.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 11•13 years ago
|
||
In case someone encounters something similar in the future: besides the MMgc folder, there is GC work happening in AvmCore (e.g. atomWriteBarrier), and in Traits.cpp (e.g. Traits::traceSlotsFromBitmap). I missed the "Traits.cpp" part, so the GC was not properly marking the used bibop pages
Comment 12•13 years ago
|
||
At one point I tried moving the traits code into the GC, but the change did not stick. Might be a good idea to rethink that.
Reporter | ||
Comment 13•13 years ago
|
||
Verified that the failure is no longer reproducible in changeset 6813:e7f048b5fdf2
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•