Asan: Print stacktrace on SIGFPE

Would it make sense to add the possibility to print a stacktrace also on SIGFPE and not only on SIGSEGV or SIGBUS?
Only noticed that LibFuzzer doesn’t generate any crash report because asan is not handling the signal.

Kind regards,

Karl Skomski

Would it make sense to add the possibility to print a stacktrace also on
SIGFPE and not only on SIGSEGV or SIGBUS?

Yes, under a separate flag (handle_sigfpe=1).
I think it's fine to have this flag on by default.
Would you like to contribute a patch?

Only noticed that LibFuzzer doesn't generate any crash report because asan
is not handling the signal.

Makes sense. The sanitizers (except maybe a bit of ubsan) typically don't
deal with floating point errors,
so no one cared about SIGFPE. But libFuzzer may discover some of those
errors.

--kcc

SIGFPE is thrown (at least on Linux x86_64) for integer divide by zero.

This sounds like a worthy target for a fuzzer.