odyaka341 / thread-sanitizer

Automatically exported from code.google.com/p/thread-sanitizer
0 stars 0 forks source link

tsan should understand the common sanitizer flags from sanitizer_common/sanitizer_flags.h #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
... and should call ParseCommonFlagsFromString in __tsan_init

Original issue reported on code.google.com by konstant...@gmail.com on 6 Sep 2013 at 11:04

GoogleCodeExporter commented 9 years ago
when fixed, please re-enable the test tsan/lit_tests/malloc_overflow.cc
and/or extend the test tsan/lit_tests/allocator_returns_null.cc
to check TSAN_OPTIONS=allocator_may_return_null=1

Original comment by konstant...@gmail.com on 6 Sep 2013 at 11:07

GoogleCodeExporter commented 9 years ago
the common flags seems to be asan flags, I do not see how the following is 
relevant to tsan:

  // Use fast (frame-pointer-based) unwinder on fatal errors (if available).
  bool fast_unwind_on_fatal;
  // Use fast (frame-pointer-based) unwinder on malloc/free (if available).
  bool fast_unwind_on_malloc;
  // Intercept and handle ioctl requests.
  bool handle_ioctl;
  // Max number of stack frames kept for each allocation/deallocation.
  int malloc_context_size;
  // Enable memory leak detection.
  bool detect_leaks;
  // Invoke leak checking in an atexit handler. Has no effect if
  // detect_leaks=false, or if __lsan_do_leak_check() is called before the
  // handler has a chance to run.
  bool leak_check_at_exit;

Original comment by dvyu...@google.com on 6 Sep 2013 at 11:40

GoogleCodeExporter commented 9 years ago
some of the flags are already used by msan too.
Those that are not applicable to tsan should be simply ignored. 

Original comment by konstant...@gmail.com on 6 Sep 2013 at 11:48

GoogleCodeExporter commented 9 years ago
Fixed by r191482.

Original comment by dvyu...@google.com on 27 Sep 2013 at 2:34

GoogleCodeExporter commented 9 years ago
I afraid this should not be considered a fix. 
We need to unify the way we use common flags on asan/msan and in tsan.

Original comment by konstant...@gmail.com on 27 Sep 2013 at 8:00

GoogleCodeExporter commented 9 years ago
ah, I though this bug is only about calloc behavior, because it was referenced 
from calloc test

Original comment by dvyu...@google.com on 27 Sep 2013 at 8:04

GoogleCodeExporter commented 9 years ago
Fixed by r192692

Original comment by dvyu...@google.com on 17 Oct 2013 at 8:25