bounds checking and traps

Richard Henderson rth@redhat.com
Fri Aug 13 00:52:00 GMT 2004


On Thu, Aug 12, 2004 at 04:42:48PM -0700, James E Wilson wrote:
> Jan Beulich wrote:
> >When I came across the x86 backend emitting int 5 instructions I
> >wondered what that would be good for
> 
> These are standard named patterns.  Grep for "gen_trap", and note where 
> it is called.
> 
> Yes, this may need to be OS dependent.

I'm pretty sure that "int 5" is the same exception as "#BR"
as would be raised by the "bound" instruction.  And thus all
x86 operating systems should map it to something reasonable
that kills the process.


r~



More information about the Gcc mailing list