Status: New
Owner: ----

New issue 3392 by [email protected]: Miscompilation of numeric comparison
http://code.google.com/p/v8/issues/detail?id=3392

The following code defines a deterministic function "enb" which performs some numeric comparisons to return a boolean result, calls said function 3000 times, and counts how many times true and false are returned.

I would expect "enb" to always return the same value (true), but in practice it seems that the first approx 2000 iterations return true, and then the remaining iterations instead return false.

--------------------------
function enb(){
  var d,g;
  d={c:-4611686018427387904};
  for(g=0;g<1;){
    g++;
    d.c=360;
  }
  return 356<=d.c}

var ctr = {"false":0,"true":0};
for(var i = 0; i < 3000; ++i)
  ctr[enb()]++;
print(ctr[false], ctr[true]);
--------------------------


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to