On 04.02.2019 04:10, matthew green wrote: > Module Name: src > Committed By: mrg > Date: Mon Feb 4 03:10:33 UTC 2019 > > Modified Files: > src/tests/lib/libc/misc: Makefile t_ubsan.c > > Log Message: > - revert previous to t_ubsan.c, it is desired behaviour. from kamil. > - use -Wno-int-in-bool-context instead > > @@ -376,7 +376,7 @@ test_mul_overflow_signed(void) > volatile int a = INT_MAX; > volatile int b = atoi("2"); > > - raise((a && b) ? SIGSEGV : SIGBUS); > + raise((a * b) ? SIGSEGV : SIGBUS); If GCC is fine with it, we could try raise(!!(a * b) ? SIGSEGV : SIGBUS); It just matters to perform multiplication and overflow here. If it works, we can drop -Wno. > } > > UBSAN_TC_BODY(mul_overflow_signed, tc) >
Attachment:
signature.asc
Description: OpenPGP digital signature