diff --git a/compiler-rt/lib/hwasan/hwasan.cpp b/compiler-rt/lib/hwasan/hwasan.cpp --- a/compiler-rt/lib/hwasan/hwasan.cpp +++ b/compiler-rt/lib/hwasan/hwasan.cpp @@ -129,6 +129,9 @@ // Override from user-specified string. if (__hwasan_default_options) parser.ParseString(__hwasan_default_options()); +#if CAN_SANITIZE_LEAKS + lsan_parser.ParseString(__lsan_default_options()); +#endif #if HWASAN_CONTAINS_UBSAN const char *ubsan_default_options = __ubsan_default_options(); ubsan_parser.ParseString(ubsan_default_options); diff --git a/compiler-rt/test/lsan/TestCases/default_options.cpp b/compiler-rt/test/lsan/TestCases/default_options.cpp --- a/compiler-rt/test/lsan/TestCases/default_options.cpp +++ b/compiler-rt/test/lsan/TestCases/default_options.cpp @@ -1,11 +1,8 @@ // RUN: %clangxx_lsan -O2 %s -o %t && %run %t 2>&1 | FileCheck %s -// Fixme: remove once test passes with hwasan -// UNSUPPORTED: hwasan - extern "C" const char *__lsan_default_options() { - // CHECK: Available flags for {{Leak|Address}}Sanitizer: + // CHECK: Available flags for {{Leak|Address|HWAddress}}Sanitizer: return "verbosity=1 help=1"; }