The jit_test.py script sets a limit on RLIMIT_AS (address space) prior to executing tests, if that limiting feature is available on the platform: > def set_limits(): > # resource module not supported on all platforms > try: > import resource > GB = 2**30 > resource.setrlimit(resource.RLIMIT_AS, (1*GB, 1*GB)) > except: > return However, AddressSanitizer requires much more virtual memory: > The ulimit -v command can be used with ASan-ified binaries. However, you should remember that ASan consumes 16 terabytes of virtual memory for shadow state and the ulimit -v value should be set accordingly. This behavior causes make check to fail on all jit-tests. I'm working on a patch that adds a "--no-limit" option that disables the address space limit in jit_test.py. The option should then be passed by the js/src/Makefile if MOZ_ASAN is set.
I think the better option here is to just remove the setrlimit call. This wasn't working reliably for me and when it did work, it reported the tests killed by rlimits under FAIL, with other unrelated failures. Since it isn't available on all platforms anyway, the value of having it is dubious at best. What I plan to do for jstests in the nearish future is to add a mode that prints stats out for every test, including memory usage. This should be a much more reliable way to spot tests that use too much memory.
(In reply to Terrence Cole [:terrence] from comment #1) > I think the better option here is to just remove the setrlimit call. Sounds like even less work for me ;) Want to make a patch or should I do so?
Created attachment 619533 [details] [diff] [review] Patch This patch removes set_limits entirely as suggested by terrence. Luke, if this is not ok with you, we can also go for an ASan specific solution :)
Comment on attachment 619533 [details] [diff] [review] Patch I'm not a great reviewer for jit_tests.py; forwarding to Dave.
Comment on attachment 619533 [details] [diff] [review] Patch http://hg.mozilla.org/integration/mozilla-inbound/rev/f031b89c104e