Bug#873778: mozjs52 on s390x and other big-endian machines

Simon McVittie smcv at debian.org
Wed Oct 11 23:16:32 UTC 2017


On Mon, 09 Oct 2017 at 10:36:52 +0100, Simon McVittie wrote:
> On Sun, 01 Oct 2017 at 23:36:52 +0200, Michael Biebl wrote:
> > >> The remaining problem seems to be a big-endian issue (mips, s390x, 
> > >> hppa, powerpc, sparc64). ppc64 fails in a slightly different
> > >> manner, might just be it's failing earlier for a different reason
> > >> but would also suffer from this bug.
> 
> Here is some work-in-progress on this:
> 
> https://anonscm.debian.org/git/users/smcv/mozjs52.git
> 
> I've made it regenerate the data file on both endiannesses in the hope
> that this will make us more likely to catch errors. The generated file
> on little-endian is not the same as the pregenerated one :-(
> 
> This is only build-tested on x86_64 at this point, not runtime-tested.

The unit tests all pass or are skipped on x86_64 (on barriere).

On s390x (zelenka), I now see meaningful test results, with the unexpected
failures listed below. So something is wrong on s390x in at least a
few cases, but it's basically a functional JavaScript interpreter,
and a lot of the tests pass. That seems a lot better than the current
situation. Good enough for experimental, at least?

-------8<--------

## ecma_6/TypedArray/Tconstructor-fromTypedArray-byteLength.js: rc = 3, run time = 0.025008
ecma_6/TypedArray/Tconstructor-fromTypedArray-byteLength.js:8:9 Error: Assertion failed: got 3, expected 0
Stack:
  @ecma_6/TypedArray/Tconstructor-fromTypedArray-byteLength.js:8:9
TEST-UNEXPECTED-FAIL | ecma_6/TypedArray/Tconstructor-fromTypedArray-byteLength.js | (args: "")

## ecma_6/TypedArray/set-same-buffer-different-source-target-types.js: rc = 3, run time = 0.022477
896116: When setting a typed array from an overlapping typed array of different element type, copy the source elements into properly-sized temporary memory, and properly copy them into the target without overflow (of either source *or* target) when finished
ecma_6/TypedArray/set-same-buffer-different-source-target-types.js:27:11 RangeError: attempting to construct out-of-bounds TypedArray on ArrayBuffer
Stack:
  @ecma_6/TypedArray/set-same-buffer-different-source-target-types.js:27:11
TEST-UNEXPECTED-FAIL | ecma_6/TypedArray/set-same-buffer-different-source-target-types.js | (args: "")

## ecma_6/TypedArray/subarray.js: rc = 3, run time = 0.021673
ecma_6/TypedArray/subarray.js:8:26 RangeError: attempting to construct out-of-bounds TypedArray on ArrayBuffer
Stack:
  @ecma_6/TypedArray/subarray.js:8:26
TEST-UNEXPECTED-FAIL | ecma_6/TypedArray/subarray.js | (args: "")

## ecma_6/TypedArray/indexOf-and-lastIndexOf.js: rc = 3, run time = 0.023659
ecma_6/TypedArray/indexOf-and-lastIndexOf.js:53:9 Error: Assertion failed: got 0, expected 8
Stack:
  @ecma_6/TypedArray/indexOf-and-lastIndexOf.js:53:9
TEST-UNEXPECTED-FAIL | ecma_6/TypedArray/indexOf-and-lastIndexOf.js | (args: "")

## ecma_6/TypedArray/sort_snans.js: rc = 3, run time = 0.055719
ecma_6/shell.js:93:23 Error: Assertion failed: got -1.8938930325389462e+304, expected NaN at _[0]
Stack:
  assertSameValue at ecma_6/shell.js:93:23
  check at ecma_6/shell.js:198:21
  assertSameProps at ecma_6/shell.js:162:25
  check at ecma_6/shell.js:213:25
  assertDeepEq at ecma_6/shell.js:221:13
  testFloat64NaNRanges at ecma_6/TypedArray/sort_snans.js:60:5
  @ecma_6/TypedArray/sort_snans.js:68:1
TEST-UNEXPECTED-FAIL | ecma_6/TypedArray/sort_snans.js | (args: "")

## ecma_6/ArrayBuffer/CloneArrayBuffer.js: rc = 3, run time = 0.021813
1264941: CloneArrayBuffer should be called with byteLength of source typedArray
ecma_6/ArrayBuffer/CloneArrayBuffer.js:16:7 Error: Assertion failed: got 8, expected 0
Stack:
  test at ecma_6/ArrayBuffer/CloneArrayBuffer.js:16:7
  @ecma_6/ArrayBuffer/CloneArrayBuffer.js:27:1
TEST-UNEXPECTED-FAIL | ecma_6/ArrayBuffer/CloneArrayBuffer.js | (args: "")

## js1_8_5/extensions/clone-transferables.js: rc = 3, run time = 0.022512
js1_8_5/extensions/clone-transferables.js:42:17 Error: Assertion failed: got 0, expected NaN
Stack:
  test at js1_8_5/extensions/clone-transferables.js:42:17
  @js1_8_5/extensions/clone-transferables.js:111:1
TEST-UNEXPECTED-FAIL | js1_8_5/extensions/clone-transferables.js | (args: "")

## js1_8_5/extensions/clone-many-transferables.js: rc = -11, run time = 0.783352
 PASSED! ok
TEST-UNEXPECTED-FAIL | js1_8_5/extensions/clone-many-transferables.js | (args: "")
## js1_8_5/extensions/clone-errors.js: rc = -11, run time = 0.03348
 PASSED! ok
TEST-UNEXPECTED-FAIL | js1_8_5/extensions/clone-errors.js | (args: "")

## js1_8_5/extensions/typedarray.js: rc = 0, run time = 0.167332
BUGNUMBER: 532774
STATUS: js typed arrays (webgl arrays)
=== FAILED ===
check at js1_8_5/extensions/typedarray.js:62:22
test at js1_8_5/extensions/typedarray.js:488:5
@js1_8_5/extensions/typedarray.js:17:1

==============
=== FAILED ===
check at js1_8_5/extensions/typedarray.js:62:22
test at js1_8_5/extensions/typedarray.js:489:5
@js1_8_5/extensions/typedarray.js:17:1

==============
=== FAILED ===
check at js1_8_5/extensions/typedarray.js:62:22
test at js1_8_5/extensions/typedarray.js:490:5
@js1_8_5/extensions/typedarray.js:17:1

==============
=== FAILED ===
check at js1_8_5/extensions/typedarray.js:62:22
test at js1_8_5/extensions/typedarray.js:491:5
@js1_8_5/extensions/typedarray.js:17:1

==============
done
 FAILED! [reported from test()] typed array tests : Expected value '0', Actual value '4'

-------8<--------

I think this is probably at a point where it would benefit from someone
who actually knows about JavaScript and/or s390x taking over.

Regards,
    smcv



More information about the pkg-gnome-maintainers mailing list