Re: [PATCH][pushed] Fix ubsan error in opts-global.cc

2022-05-16 Thread Richard Biener via Gcc-patches
On Mon, May 16, 2022 at 9:53 AM Martin Liška wrote: > > Fixes: > opts-global.cc:75:15: runtime error: store to address 0x0bc9be70 with > insufficient space for an object of type 'char' > which happens when mask == 0, len == 0 and we allocate zero elements. > Eventually, result[0] is called wh

[PATCH][pushed] Fix ubsan error in opts-global.cc

2022-05-16 Thread Martin Liška
Fixes: opts-global.cc:75:15: runtime error: store to address 0x0bc9be70 with insufficient space for an object of type 'char' which happens when mask == 0, len == 0 and we allocate zero elements. Eventually, result[0] is called which triggers the UBSAN. It's newly discovered after the Siddhesh