[llvm-branch-commits] [clang] [Clang] Add __builtin_allow_sanitize_check() (PR #172030)

Marco Elver via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Dec 13 02:34:33 PST 2025


melver wrote:

> Tangent: we don't disable UBSAN in noinstr (yet) -- do we need to consider including it here, though? (I suspect not, as it rather different from the others, but I thought I'd ask.)

We don't have any explicitly inserted (non-compiler generated) UBSAN checks (not even sure it makes sense), so `no_sanitize` just works.

UBSAN also works a bit differently, in that the instrumentation is inserted during Clang codegen, and not in the LLVM middle-end, so generalizing this builtin to allow for checking if UBSAN is enabled or not would be a lot more involved (but again, I think it's not required).

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


More information about the llvm-branch-commits mailing list