Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 415791 - dev-lang/spidermonkey-1.8.5-r1 fails test on hardened
Summary: dev-lang/spidermonkey-1.8.5-r1 fails test on hardened
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-13 20:18 UTC by Markus Walter
Modified: 2013-08-30 17:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (build.log,179.35 KB, text/plain)
2012-05-13 20:18 UTC, Markus Walter
Details
emerge --info (info.txt,5.27 KB, text/plain)
2012-05-13 20:18 UTC, Markus Walter
Details
run pax-mark before jsapi-tests (pax-mark_jsapi-tests.tar.xz,65.83 KB, application/x-xz-compressed-tar)
2013-01-23 19:35 UTC, iGentoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Walter 2012-05-13 20:18:40 UTC
Created attachment 311669 [details]
build log

On my hardened ~amd64 machine with gcc-4.6.2 the test-suite of spidermonkey segfaults with the following error message.

../dist/bin/jsapi-tests
testCustomIterator_bug612523
make: *** [check] Segmentation fault
Comment 1 Markus Walter 2012-05-13 20:18:56 UTC
Created attachment 311671 [details]
emerge --info
Comment 2 Nikoli 2012-09-01 20:19:40 UTC
Same problem, dmesg:
[399297.634568] grsec: denied RWX mmap of <anonymous mapping> by /var/tmp/portage/dev-lang/spidermonkey-1.8.5-r1/work/js-1.8.5/js/src/jsapi-tests/jsapi-tests[jsapi-tests:31664] uid/euid:250/250 gid/egid:250/250, parent /usr/bin/gmake[make:31662] uid/euid:250/250 gid/egid:250/250
[399297.634584] jsapi-tests[31664]: segfault at 10 ip 000002c1884750c4 sp 000003c64e116890 error 4 in libpthread-2.15.so[2c18846b000+17000]
[399297.634596] grsec: Segmentation fault occurred at 0000000000000010 in /var/tmp/portage/dev-lang/spidermonkey-1.8.5-r1/work/js-1.8.5/js/src/jsapi-tests/jsapi-tests[jsapi-tests:31664] uid/euid:250/250 gid/egid:250/250, parent /usr/bin/gmake[make:31662] uid/euid:250/250 gid/egid:250/250
[399297.634624] grsec: denied resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 for /var/tmp/portage/dev-lang/spidermonkey-1.8.5-r1/work/js-1.8.5/js/src/jsapi-tests/jsapi-tests[jsapi-tests:31664] uid/euid:250/250 gid/egid:250/250, parent /usr/bin/gmake[make:31662] uid/euid:250/250 gid/egid:250/250

https://developer.mozilla.org/en-US/docs/SpiderMonkey/Internals
"In addition to the interpreter, SpiderMonkey contains a Just-In-Time (JIT) compiler, a garbage collector, code implementing the basic behavior of JavaScript values, a standard library implementing"

jit will not work without pax marking.
Comment 3 Anthony Basile gentoo-dev 2012-09-01 21:25:58 UTC
(In reply to comment #2)
> 
> https://developer.mozilla.org/en-US/docs/SpiderMonkey/Internals
> "In addition to the interpreter, SpiderMonkey contains a Just-In-Time (JIT)
> compiler, a garbage collector, code implementing the basic behavior of
> JavaScript values, a standard library implementing"
> 
> jit will not work without pax marking.

Yeah this is a real pita situation because you need to pax-mark in the middle of src_test().

My recommendation is that you patchout this test contingent on USE=-jit.  Since we have jit masked on hardened, the test won't run and you won't hit the failure.  Its not a useful test in hardened anyhow.
Comment 4 Jory A. Pratt gentoo-dev 2012-09-01 22:17:44 UTC
Use spidermonkey-1.8.7 if you insist on running tests, it supports disabling all of jit which would promote a successful test run.
Comment 5 Nikoli 2012-10-07 13:52:29 UTC
1.8.7 is now hard masked, since sys-auth/polkit-0.107-r1 is marked stable dev-lang/spidermonkey-1.8.5-r1 is installed for most desktop systems. If you do not want backport fixes for tests please just restrict them in ebuild.
Comment 6 iGentoo 2013-01-23 19:35:33 UTC
Created attachment 336626 [details]
run pax-mark before jsapi-tests
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2013-08-30 17:30:14 UTC
+  30 Aug 2013; Ian Stakenvicius <axs@gentoo.org> metadata.xml,
+  spidermonkey-1.8.5-r4.ebuild:
+  added x64-macos keyword and extra dep (bug 464654); pax-marked tests so they
+  finish on hardened (bug 415791)
+