Re: [ubsan PATCH] -fsanitize=null fails to sanitize >i (PR sanitizer/80797)

2017-05-18 Thread Marek Polacek
On Thu, May 18, 2017 at 09:03:31AM +0200, Richard Biener wrote: > On Wed, May 17, 2017 at 4:10 PM, Marek Polacek wrote: > > We are failing to detect accessing a null pointer in >i because > > v_3 = _2->i; > > is not gimple_assign_load_p: > > 1997 if (flag_sanitize &

Re: [ubsan PATCH] -fsanitize=null fails to sanitize >i (PR sanitizer/80797)

2017-05-18 Thread Richard Biener
On Wed, May 17, 2017 at 4:10 PM, Marek Polacek wrote: > We are failing to detect accessing a null pointer in >i because > v_3 = _2->i; > is not gimple_assign_load_p: > 1997 if (flag_sanitize & (SANITIZE_NULL | SANITIZE_ALIGNMENT)) > 1998 { > 1999

[ubsan PATCH] -fsanitize=null fails to sanitize >i (PR sanitizer/80797)

2017-05-17 Thread Marek Polacek
We are failing to detect accessing a null pointer in >i because v_3 = _2->i; is not gimple_assign_load_p: 1997 if (flag_sanitize & (SANITIZE_NULL | SANITIZE_ALIGNMENT)) 1998 { 1999 if (gimple_store_p (stmt)) 2000 instrument_null (gsi, true);