common: ubsan: ignore shifting one into sign bit
...
The __ubsan_handle_shift_out_of_bounds handler would be called for code
shifting a one into the sign bit like (1 << 31), which is all too common
in barebox. It's technically UB, but it's so prevalent that it's highly
unlikely to be treated by a compiler as anything else than the
standard-compliant (1U << 31).
Check for this case here and ignore it selectively.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ahmad Fatoum
authored
on 20 Sep 2019
Sascha Hauer
committed
on 14 Oct 2019