atrosinenko added inline comments.

================
Comment at: compiler-rt/lib/builtins/int_mulo_impl.inc:22
+// themselves indefinitely when compiled with UBSan.
+#if defined(__clang__)
+#define NO_UBSAN __attribute__((no_sanitize("undefined")))
----------------
MaskRay wrote:
> AFAIK LLVM_USE_SANITIZER does not instrument compiler-rt. 
> libclang_rt.builtins- is at the bottom of the library layering. How did you 
> enable sanitizers?
> AFAIK LLVM_USE_SANITIZER does not instrument compiler-rt. 
> libclang_rt.builtins- is at the bottom of the library layering. How did you 
> enable sanitizers?

No, I have not managed to force CMake to enable UBSan on `builtins`. I just 
passed `-fsanitize=undefined -fsanitize-undefined-trap-on-error` cflags 
explicitly. The second option is exactly because I cannot link UBSan runtime 
libraries here but can enable `-ggdb3` and look where sanitizer triggered.

So, this hack works for this particular setup, so I can manually run such 
checks at least manually at least on clang, etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86299/new/

https://reviews.llvm.org/D86299

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to