ibmruntimes / v8ppc

Port of Google V8 javascript engine to PowerPC®
Other
94 stars 19 forks source link

test/mjsunit/nans.js is not endian-neutral #102

Closed mtbrandy closed 10 years ago

mtbrandy commented 10 years ago

This test creates an initialized typed integer array and then interprets the array buffer as a type float64 array:

// NaN with signal bit set
var bytes = new Uint32Array([1, 0x7FF00000]); 
var doubles = new Float64Array(bytes.buffer); 

Thus the result depends on the endianness of the architecture.

andrewlow commented 10 years ago

Simple command line to replicate

$ ./out/ppc.release/d8  --allow-natives-syntax ./test/mjsunit/mjsunit.js ./test/mjsunit/nans.js
andrewlow commented 10 years ago

Patched in 66570962cb398c82e9ee95d9ee336dd65268a261

andrewlow commented 10 years ago

Manually tested on x64, works fine. Jenkins based tests on ppc / ppc64 are clean too.