Clang compiler provides a number of useful runtime checks, like e.g. -fsanitize=unsigned-integer-overflow
. Can I print a backtrace (e.g. using gdb) when one of the checks fails? Currently I get the exact location of the problem, but I do not have the context. How could I get more information from these runtime checks, especially the backtrace?
An easier solution which does not require enabling fatal errors is to set env. variable UBSAN_OPTIONS=print_stacktrace=1
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With