Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2855)

Unified Diff: chrome/nacl/nacl_helper_linux.cc

Issue 10830009: Redefine the ASan options for nacl_helper so that ASan does not handle SIGSEGV/SIGBUS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698