Bug 914174 - Ensure JS standalone builds have the right ASan options. r=luke

--HG--
extra : rebase_source : d82eae20a4f1c18f5b12c5a4acd3e6733809221d
This commit is contained in:
Christian Holler 2013-09-10 17:00:07 +02:00
parent b73c4d22a4
commit 56db8793a1
2 changed files with 13 additions and 0 deletions

View File

@ -149,6 +149,7 @@ if test "$JS_STANDALONE" = no; then
JS_STANDALONE=
else
JS_STANDALONE=1
AC_DEFINE(JS_STANDALONE)
fi
AC_SUBST(JS_STANDALONE)

View File

@ -1033,3 +1033,15 @@ js::TriggerOperationCallbackForAsmJSCode(JSRuntime *rt)
MOZ_CRASH();
#endif
}
#ifdef MOZ_ASAN
#ifdef JS_STANDALONE
// Usually, this definition is found in mozglue (see mozglue/build/AsanOptions.cpp).
// However, when doing standalone JS builds, mozglue is not used and we must ensure
// that we still allow custom SIGSEGV handlers for asm.js and ion to work correctly.
extern "C" MOZ_ASAN_BLACKLIST
const char* __asan_default_options() {
return "allow_user_segv_handler=1";
}
#endif
#endif