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

CLOSED TREE
This commit is contained in:
Christian Holler 2013-09-10 17:00:07 +02:00
parent 60407aa9dc
commit e9b7f6611f
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