[clang] [compiler-rt] [UBSan] Add -fsanitize=uninitialized-read check (ISO C 6.3.2.1p2) (PR #207529)

Thurston Dang via cfe-commits cfe-commits at lists.llvm.org
Sun Jul 12 23:38:13 PDT 2026


thurstond wrote:

> Yeah, agreed, alloca+store+load per candidate isn't "small runtime cost, no ABI impact." That's just not the UBSan contract. Easiest fix: pull `uninitialized-read` out of the default `Undefined` group, make it opt-in like `unsigned-integer-overflow` already is. Keeps the check, drops the "changes what `-fsanitize=undefined` costs you by default" problem.

That doesn't fix it: the quote about "small runtime cost and no impact on address space layout or ABI" applies to all the UBSan checks, even the opt-in ones.

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


More information about the cfe-commits mailing list