Let @skipUnlessUndefinedBehaviorSanitizer imply @skipIfAsan
authorAdrian Prantl <aprantl@apple.com>
Fri, 29 May 2020 16:45:43 +0000 (09:45 -0700)
committerAdrian Prantl <aprantl@apple.com>
Fri, 29 May 2020 16:45:43 +0000 (09:45 -0700)
Don't run tests that use undefined behavior sanitizer inside an
address-sanitized LLDB. The tests don't support that
configuration. Incidentally they were skipped on green dragon for a
different reason, so this hasn't come up there before.

lldb/packages/Python/lldbsuite/test/decorators.py

index d02c946..0ef2f93 100644 (file)
@@ -745,6 +745,9 @@ def skipUnlessUndefinedBehaviorSanitizer(func):
     """Decorate the item to skip test unless -fsanitize=undefined is supported."""
 
     def is_compiler_clang_with_ubsan(self):
+        if is_running_under_asan():
+            return "Undefined behavior sanitizer tests are disabled when runing under ASAN"
+
         # Write out a temp file which exhibits UB.
         inputf = tempfile.NamedTemporaryFile(suffix='.c', mode='w')
         inputf.write('int main() { int x = 0; return x / x; }\n')