Idiom exclusion is really so important
Idiom exclusion is really so important
Posted Nov 13, 2024 10:50 UTC (Wed) by pm215 (subscriber, #98099)In reply to: Idiom exclusion is really so important by intelfx
Parent article: Progress on toolchain security features
I certainly wouldn't use the naked builtin directly, but that's true of most GCC builtins. But I'll absolutely take "looks like a function call and has 'add' as a word rather than '+' as a symbol, but is extremely obviously doing an overflow check" over "has '+' in the expression but is ridiculously opaque about what it is actually doing", especially when the thing it is doing is important for correctness and often for security.
No objections if you want to get nicer facilities added to the compiler, but in the interim I'll use the ones we have. And if I did have to work with a compiler where I had to use "x + y < x" I would wrap it in a function so I could give it a clearer name...
