diff options
author | Marvin Borner | 2021-02-27 18:25:45 +0100 |
---|---|---|
committer | Marvin Borner | 2021-03-14 16:14:33 +0100 |
commit | b7ae466ac77c68d0a1e1a124e6ea8c4cfc8d7100 (patch) | |
tree | fe50d308f8b43bbb5a5f529388b04906ff90e6bd /libc | |
parent | 268f3ccdb90ab4b9bd70ca176478797aae97ca05 (diff) |
Added ubsan shift overflow log
Diffstat (limited to 'libc')
-rw-r--r-- | libc/sanitize.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libc/sanitize.c b/libc/sanitize.c index 8514e49..02eef84 100644 --- a/libc/sanitize.c +++ b/libc/sanitize.c @@ -133,10 +133,14 @@ void __ubsan_handle_mul_overflow(struct overflow *data, void *left, void *right) panic("%s:%d: UBSAN: mul-overflow [type: %s]\n", loc->file, loc->line, data->type->name); } -void __ubsan_handle_shift_out_of_bounds(void); -void __ubsan_handle_shift_out_of_bounds(void) +void __ubsan_handle_shift_out_of_bounds(struct overflow *data, void *left, void *right); +void __ubsan_handle_shift_out_of_bounds(struct overflow *data, void *left, void *right) { - panic("UBSAN: shift-out-of-bounds\n"); + UNUSED(left); + UNUSED(right); + struct source_location *loc = &data->location; + panic("%s:%d: UBSAN: shift-out-of-bounds [type: %s]\n", loc->file, loc->line, + data->type->name); } void __ubsan_handle_divrem_overflow(struct overflow *data, void *left, void *right); |