News for hackers. Stuff that matters.
Re:Efficient Integer Overflow Checking in LLVM (2016) by stephc_int13 on Thursday September 24, 2020 @06:06AM (#24577052)
Wow.

I don't want this in release mode.

Please tell me that this overflow checking is turned off by default.

Re:Efficient Integer Overflow Checking in LLVM (2016) by cbarrick on Thursday September 24, 2020 @10:12AM (#24578766)
You have to explicitly enable UBSan checks:

    -fsanitize=signed-integer-overflow
See the UBSan docs: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
Re:Efficient Integer Overflow Checking in LLVM (2016) by commandlinefan on Thursday September 24, 2020 @09:49AM (#24578571)
Hm - 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?
Re:Efficient Integer Overflow Checking in LLVM (2016) by saagarjha on Thursday September 24, 2020 @11:05AM (#24579278)
You’ll get a SIGILL.