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>
1 parent 95a4e20 commit 55397b9ebe3a21a3aeb6a98131c0991bff0f7123
@Ahmad Fatoum Ahmad Fatoum authored on 20 Sep 2019
Sascha Hauer committed on 14 Oct 2019
Showing 1 changed file
View
lib/ubsan.c