> ---------- Forwarded message ----------
> From: Simon McVittie <s...@debian.org>
> To: Alban Browaeys <pra...@yahoo.com>, 848190-d...@bugs.debian.org, Liam 
> Wilson <cosinusoida...@gmail.com>, Marian Mihailescu <mihailesc...@gmail.com>
> Cc:
> Bcc:
> Date: Mon, 13 Aug 2018 09:47:15 +0100
> Subject: Re: Bug#848190: libmozjs-24-0: gnome-shell segfault and hundreds of 
> libmozjs tests fails
> Package: libmozjs-52-0
> Version: 52.9.1-1
>
> On Thu, 15 Dec 2016 at 01:07:14 +0100, Alban Browaeys wrote:
>> gnome-shell ion armhf segfaults
>
> On Thu, 05 Apr 2018 at 16:10:23 +0100, Liam Wilson wrote:
>> This package is totally bust on armhf in stretch
>
> mozjs24 has been superseded by mozjs52 in testing/unstable, and mozjs52
> passes tests on armhf. This bug remains present in mozjs24 in stretch,
> but version tracking will keep track of that.
>
>     smcv

Sorry, not sure if I follow. Do you mean that this issue with mozjs24
will not be fixed for stretch on armhf? mozjs52 is not a drop in
replacement for mozjs24 (it is not API or ABI compatible). Also you
appear to have disabled jsctypes in mozjs52 (which is a very useful
FFI, which I happen to require). For my purposes I've built my own
armhf shell build of mozjs60, but it would be nice if the version that
shipped with stretch armhf worked.

I think adding some compiler flags to disable problematic
optimisations will resolve the issue. Adding the following lines to
debian/rules seems to fix the crashes and test failures:

export DEB_CFLAGS_MAINT_APPEND = -fno-schedule-insns2
-fno-lifetime-dse -fno-delete-null-pointer-checks -fno-schedule-insns
export DEB_CXXFLAGS_MAINT_APPEND = -fno-schedule-insns2
-fno-lifetime-dse -fno-delete-null-pointer-checks -fno-schedule-insns

I then built js24 with debian/rules build. Once it had built I ran
both the jit-tests and the jstests. There were vastly fewer test
failures (about 7 total as opposed to hundreds). The test case I
posted also runs to completion without segfaulting:

pi@raspberrypi:~/src/mozjs/mozjs24-24.2.0/js/src $ dist/bin/js24  -e
"for(var i=0;i<1e5;i++){}"
pi@raspberrypi:~/src/mozjs/mozjs24-24.2.0/js/src $ echo $?
0

Test results (I think the format is something like [PASS|UNEXPECTED
FAILURE|EXPECTED FAILURE|SKIPPED]):

pi@raspberrypi:~/src/mozjs/mozjs24-24.2.0/js/src $ time
./jit-test/jit_test.py  dist/bin/js24
[ 928|   0|   0|   0]  25% =========>                                 |  77.8s
FAIL - 
/home/pi/src/mozjs/mozjs24-24.2.0/js/src/jit-test/tests/basic/bug698584.js
[1033|   1|   0|   0]  28% ===========>                               |  86.9s
FAIL - 
/home/pi/src/mozjs/mozjs24-24.2.0/js/src/jit-test/tests/basic/bug839215.js
[3685|   2|   0|   0] 100% ==========================================>| 296.6s
FAILURES:
    /home/pi/src/mozjs/mozjs24-24.2.0/js/src/jit-test/tests/basic/bug698584.js
    /home/pi/src/mozjs/mozjs24-24.2.0/js/src/jit-test/tests/basic/bug839215.js
TIMEOUTS:


pi@raspberrypi:~/src/mozjs/mozjs24-24.2.0/js/src $ time
./tests/jstests.py  dist/bin/js24
[ 146|   0|   0| 601]  11% ====>                                      |  11.2s
REGRESSION - js1_8_5/extensions/typedarray.js
[ 991|   1|   0| 601]  25% =========>                                 | 110.5s
REGRESSION - js1_5/extensions/toLocaleFormat-01.js
[1118|   2|   0| 602]  27% ==========>                                | 119.3s
REGRESSION - js1_5/extensions/toLocaleFormat-02.js
[1552|   3|   0| 603]  34% =============>                             | 145.2s
REGRESSION - ecma_5/RegExp/regress-617935.js
[5601|   4|   0| 607]  98% =========================================> | 566.7s
REGRESSION - ecma_3/Date/15.9.5.6.js
[5706|   5|   0| 609] 100% ==========================================>| 572.4s
REGRESSIONS
    js1_8_5/extensions/typedarray.js
    js1_5/extensions/toLocaleFormat-01.js
    js1_5/extensions/toLocaleFormat-02.js
    ecma_5/RegExp/regress-617935.js
    ecma_3/Date/15.9.5.6.js
FAIL

When I was building test packages locally I tried to enable these
flags conditionally, but I had trouble doing so (maybe something to do
with being on Raspbian?). Any chance you can enable those compiler
flags on stretch armhf?

Thanks
Liam

Reply via email to