Commit 9b6edd72 authored by glider@chromium.org's avatar glider@chromium.org

Redefine the ASan options for nacl_helper so that ASan does not handle SIGSEGV/SIGBUS

This should allow the platform qualification test to pass and make it possible to launch NaCl programs from an instrumented browser without additional env settings.
Review URL: https://chromiumcodereview.appspot.com/10830009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152314 0039d316-1c4b-4281-b951-d872f2087c98
parent ac2d29d1
......@@ -198,6 +198,21 @@ static size_t CheckReservedAtZero() {
return prereserved_sandbox_size;
}
#if defined(ADDRESS_SANITIZER)
// Do not install the SIGSEGV handler in ASan. This should make the NaCl
// platform qualification test pass.
static const char kAsanDefaultOptionsNaCl[] = "handle_segv=0";
// Override the default ASan options for the NaCl helper.
// __asan_default_options should not be instrumented, because it is called
// before ASan is initialized.
extern "C"
__attribute__((no_address_safety_analysis))
const char *__asan_default_options() {
return kAsanDefaultOptionsNaCl;
}
#endif
int main(int argc, char *argv[]) {
CommandLine::Init(argc, argv);
base::AtExitManager exit_manager;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment