Am Montag, dem 19.12.2022 um 15:22 +0100 schrieb Martin Liška: > On 12/19/22 10:25, Martin Uecker wrote: > > Am Montag, dem 19.12.2022 um 09:44 +0100 schrieb Martin Liška: > > > On 12/17/22 20:35, Martin Uecker wrote: > > > > > > > > > > > > Hi all, > > > > > > > > what is the process for adding a new UBsan handler? > > > > > > Hello. > > > > > > Yes, we sync the run-time library from LLVM project. So a new > > > sanitizer > > > should go there first. > > > > > > > > > > > We have the source in the GCC tree, but I guess this > > > > should go via LLVM? > > > > > > And the compiler support (instrumentation) is independent. > > > > Thanks Martin! > > > > Does it make sense to send the full patch (with changes > > to the compiler and library) to gcc-patches first for > > review? > > Yep, please CC me. > > > > > I am working on a patch that calls a handler when bounds > > for VM-types do not match on assignment. > > Nice. So basically something like -fsanitize=bounds/bounds- > strict/object-size ?
Yes, it would diagnose the following mismatch and other similar cases: int a[10]; int n = 5; char (*p)[n] = &a; Martin