This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bounds checking and traps
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~