5 ms·
Wow. I don't want this in release mode. Please tell me that this overflow checking is turned off by default.
by stephc_int13 6y ago
Wow.
I don't want this in release mode.
Please tell me that this overflow checking is turned off by default.
- commandlinefan 6y agoHm - I was wondering exactly what "ud2" does when it's triggered (looks like an "undefined opcode"... causes a seg fault?), but what's worse? An app that crashes with no apparent cause, or a bank account that resets to $0 if it gets too big?
- saagarjha 6y agoYou’ll get a SIGILL.
- cbarrick 6y agoYou have to explicitly enable UBSan checks: -fsanitize=signed-integer-overflow See the UBSan docs: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html