Trapping on overflow
Posted Feb 23, 2008 22:24 UTC (Sat) by
giraffedata (subscriber, #1954)
In reply to:
Trapping on overflow by anton
Parent article:
vmsplice(): the making of a local root exploit
MIPS and Alpha have separate arithmetic instructions that trap on signed overflow ...
Nice. Do you know if there is any way to make GCC (or any other C compiler) generate such instructions?
I can understand people resisting adding instructions to handle overflow, but if I could declare in my C program "no arithmetic in here is supposed to wrap around" and get signalled to death if it does, I'd do it a lot.
(
Log in to post comments)