[PATCH] Common flags in ASan.

Sergey Matveev earthdok at google.com
Mon May 6 04:13:43 PDT 2013



================
Comment at: lib/sanitizer_common/sanitizer_flags.h:42
@@ +41,3 @@
+
+INLINE CommonFlags *common_flags() {
+  return &common_flags_dont_use_directly;
----------------
Kostya Serebryany wrote:
> just 'inline'
ok

================
Comment at: lib/sanitizer_common/sanitizer_flags.h:26
@@ +25,3 @@
+struct CommonFlags {
+  // If set, use in-process symbolizer from common sanitizer runtime.
+  bool symbolize;
----------------
Evgeniy Stepanov wrote:
> This comment looks out of date?
fixed

================
Comment at: lib/asan/asan_stack.cc:17
@@ -16,2 +16,3 @@
 #include "asan_stack.h"
+#include "sanitizer_common/sanitizer_flags.h"
 
----------------
Evgeniy Stepanov wrote:
> You seem to be including this way too often. Can it be done in asan_flags.h? Why asan_flags.h is not included this often?
fixed

================
Comment at: lib/asan/asan_rtl.cc:432
@@ -433,3 +431,3 @@
   // Check if external symbolizer is defined before parsing the flags.
-  asan_external_symbolizer = GetEnv("ASAN_SYMBOLIZER_PATH");
+  common_flags()->external_symbolizer_path = GetEnv("ASAN_SYMBOLIZER_PATH");
   // Initialize flags. This must be done early, because most of the
----------------
Evgeniy Stepanov wrote:
> Please move this to InitializeFlags.
done


http://llvm-reviews.chandlerc.com/D747



More information about the llvm-commits mailing list