On 24.02.2020 20:32, Christos Zoulas wrote: > In article <20200221222550.325A6FBF6%cvs.NetBSD.org@localhost>, > Kamil Rytarowski <source-changes-d%NetBSD.org@localhost> wrote: >> -=-=-=-=-=- >> >> Module Name: src >> Committed By: kamil >> Date: Fri Feb 21 22:25:50 UTC 2020 >> >> Modified Files: >> src/tests/lib/libc/gen: t_siginfo.c >> >> Log Message: >> Mark division by 0 as expected in sigfpe_int >> >> Disable ubsan instrumentation on the operation. > >> +#if defined(__clang__) >> +__attribute__((no_sanitize("undefined"))) >> +#else >> +__attribute__((no_sanitize_undefined)) >> +#endif >> +static long int >> +sigfpe_int_division(long int a, long int b) >> +{ >> + >> + return a / b; >> +} > > Have you tested this? I recall I needed to make it a separate function... > > christos > It was tested and kind of worked, but I decided to fully disable the tests and revert this change. The sanitizers can change the logic here to avoid division by zero and interfere with crash signals. It's not worth the effort to force them to be compatible with all the tests.
Attachment:
signature.asc
Description: OpenPGP digital signature