[Lldb-commits] [PATCH] D50997: Automatically set path to sanitizer runtime when running tests on macOS.

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 20 14:44:56 PDT 2018

vsk added a comment.

Thanks so much for doing this!

Comment at: lit/Suite/lit.cfg:28
+  resource_dir = subprocess.check_output(config.cmake_cxx_compiler +
+                                         ' -print-resource-dir', shell=True)
+  runtime = os.path.join(resource_dir[:-1],
This might be easier to read as either `import commands; commands.getoutput(...)` or `check_output(..., shell=True).strip()`. Then it's possible to drop the [:-1], which is nice, because it's not clear that that strips a trailing newline.

Comment at: lit/Suite/lit.cfg:31
+                         'lib/darwin/libclang_rt.asan_osx_dynamic.dylib')
+  config.environment['ASAN_OPTIONS'] =  'detect_stack_use-after_return=1'
+  config.environment['DYLD_INSERT_LIBRARIES'] = runtime
The dash should be an underscore, and lldb hits false positives when the container overflow check is enabled. How about: `ASAN_OPTIONS=detect_stack_use_after_return=1:container_overflow=0`?


More information about the lldb-commits mailing list