[clang] [UBSAN] add null, alignment and array-bounds checks (PR #190739)

VASU SHARMA via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 02:04:27 PDT 2026


vasu-the-sharma wrote:

> > // CHECK: call void @__ubsan_handle_type_mismatch_v1_abort
> > // CHECK: call void @llvm.memcpy
> 
> Update these to check for the labels (with the calls being on the next line). Note that this does not cover the array bounds checking.

Done. I have updated the checks to:
```
// CHECK: handler.type_mismatch:
// CHECK-NEXT: call void @__ubsan_handle_type_mismatch_v1_abort
```
For array bounds, I have added `test_oob_rhs` with:
```
// CHECK: handler.out_of_bounds:
// CHECK-NEXT: call void @__ubsan_handle_out_of_bounds_abort
```

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


More information about the cfe-commits mailing list