[clang] [Clang] Correctly handle UBSan libraries for the GPU (PR #188290)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 05:31:35 PDT 2026


jhuber6 wrote:

> Can `-fsanitize=undefined -fsanitize-trap=all` now be used for GPUs? This doesn't require any library installed.
> 
> Is the PR enabling UBSan for HIP?

Yes, this enables UBSan on HIP / OpenMP / Whatever. All it does is respect the flags so they make it to the device. The `-fsanitize=trap` already functions without a library and https://github.com/llvm/llvm-project/pull/188289 adds the minimal runtime which actually prints the error.

https://github.com/llvm/llvm-project/pull/188290


More information about the cfe-commits mailing list