Index: lib/lsan/lsan.h =================================================================== --- lib/lsan/lsan.h +++ lib/lsan/lsan.h @@ -49,7 +49,8 @@ __sanitizer::uptr bp, void *context, bool fast) { uptr stack_top = 0, stack_bottom = 0; ThreadContext *t; - if (fast && (t = CurrentThreadContext())) { + if (__sanitizer::StackTrace::WillUseFastUnwind(fast) && + (t = CurrentThreadContext())) { stack_top = t->stack_end(); stack_bottom = t->stack_begin(); } Index: test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc =================================================================== --- test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc +++ test/sanitizer_common/TestCases/Darwin/print-stack-trace.cc @@ -1,9 +1,6 @@ // RUN: %clangxx -O0 %s -o %t && %env_tool_opts=stack_trace_format=DEFAULT %run %t 2>&1 | FileCheck %s // RUN: %env_tool_opts=stack_trace_format='"frame:%n lineno:%l"' %run %t 2>&1 | FileCheck %s --check-prefix=CUSTOM -// FIXME(dliew): Make this test work on Darwin with LSan -// XFAIL: darwin && lsan - #include static inline void FooBarBaz() { Index: test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc =================================================================== --- test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc +++ test/sanitizer_common/TestCases/Posix/dedup_token_length_test.cc @@ -11,7 +11,7 @@ // XFAIL: netbsd && !asan // FIXME(dliew): Make this test work with other sanitizers -// XFAIL: darwin && (lsan || tsan || ubsan) +// XFAIL: darwin && (tsan || ubsan) volatile int *null = 0; Index: test/sanitizer_common/TestCases/symbolize_stack.cc =================================================================== --- test/sanitizer_common/TestCases/symbolize_stack.cc +++ test/sanitizer_common/TestCases/symbolize_stack.cc @@ -2,7 +2,7 @@ // Test that symbolizer does not crash on frame with large function name. -// FIXME(dliew): Make this test work on Darwin with LSan +// On Darwin LSan reports a false positive // XFAIL: darwin && lsan #include