getting both log and crash from ubsan?

Hi all,

When using ubsan it seems one has a choice of getting nice output like:

runtime error: shift exponent -1 is negative

or a SIGILL crash.

Is it possible to have both?

I think it would be useful for automated nightly buildbots. The crash is useful because any test rig worth its salt will flag a crash as a failed test. But without the log in addition, you're left with either nothing or a backtrace if you're lucky (ctest/cdash for example don't gather crash backtraces).

Thanks,

Hi all,

When using ubsan it seems one has a choice of getting nice output like:

runtime error: shift exponent -1 is negative

or a SIGILL crash.

Is it possible to have both?

Yes. Use -fno-sanitize-recover instead of -fsanitize-undefined-trap-on-error.

Awesome, thanks! The word "recover" does not appear here BTW:

<http://clang.llvm.org/docs/UsersManual.html&gt;

Cheers,

Good point. Fixed, thanks!