[PATCH] D85433: [compiler-rt][ubsan][test] XFAIL TypeCheck/misaligned.cpp on Sparc
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 11:36:24 PDT 2020
ro added inline comments.
================
Comment at: compiler-rt/test/ubsan/TestCases/TypeCheck/misaligned.cpp:12
+// RUN: %clangxx %gmlt -fsanitize=alignment -fsanitize-trap %s -O3 -o %t
+// RUN: not --crash %run %t s1
+
----------------
vsk wrote:
> Is it possible to write this as `not --crash %run %t s1 2>&1 | FileCheck %s --check-prefix=CHECK-STORE`? I'd expect the ubsan runtime to be able to print out the diagnostic, then call abort().
Unfortunately not: with `-fsanitize-trap` the runtime isn't entered at all. Everywhere I tried (Linux/x86_84, Solaris/sparcv9, Linux/sparc64) the test program just prints
```
Illegal Instruction (core dumped)
```
IIUC this is just the use case for `-fsanitize-trap`: environments where the runtime isn't available (kernel) or cannot be used (libc).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85433/new/
https://reviews.llvm.org/D85433
More information about the llvm-commits
mailing list