Chromium Code Reviews| Index: chrome/nacl/nacl_helper_linux.cc |
| =================================================================== |
| --- chrome/nacl/nacl_helper_linux.cc (revision 148304) |
| +++ chrome/nacl/nacl_helper_linux.cc (working copy) |
| @@ -198,6 +198,21 @@ |
| return prereserved_sandbox_size; |
| } |
| +#if defined(ADDRESS_SANITIZER) |
|
Brad Chen (chromium)
2012/07/26 20:04:58
I don't understand how this will change the behavi
Alexander Potapenko
2012/07/27 08:42:54
This will prevent ASan from installing its signal
Mark Seaborn
2012/07/27 17:21:03
It has two other effects:
1) It will allow NaCl'
|
| +// Do not install the SIGSEGV handler in ASan. This should make the NaCl |
| +// platform qualification test pass. |
| +const char *kAsanDefaultOptionsNaCl = "handle_segv=0"; |
|
Mark Seaborn
2012/07/27 17:12:02
The Chromium style is
const char kConstant[] = "
Alexander Potapenko
2012/07/27 18:51:23
Done.
|
| + |
| +// 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; |