How can I break on UBSan reports in gdb and continue?
问题 Recent versions of GCC and Clang feature Undefined Behavior Sanitizer (UBSan) which is a compile flag ( -fsanitize=undefined ) that adds runtime instrumentation code. On errors, a warning such as this one is shown: packet-ber.c:1917:23: runtime error: left shift of 54645397829836991 by 8 places cannot be represented in type 'long int' Now I would like to debug this and get a debug break on said line. For Address Sanitizer (ASAN) there is ASAN_OPTIONS=abort_on_error=1 which results in a fatal