Trapping on overflow
Posted Feb 28, 2008 21:23 UTC (Thu) by
anton (guest, #25547)
In reply to:
Trapping on overflow by giraffedata
Parent article:
vmsplice(): the making of a local root exploit
Apart from asm statements and modifying gcc I don't know of a way to
get gcc or other compilers to use the trapping instructions for C
code.
Concerning "no arithmetic in here is supposed to wrap around",
unsigned arithmetic is supposed to wrap around in standard C, only
signed arithmetic is allowed to trap (or do anything else) on
overflow.
(
Log in to post comments)