This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Need advice on bounds checking approaches
- To: Alan Lehotsky <lehotsky at sunspot dot tiac dot net>
- Subject: Re: Need advice on bounds checking approaches
- From: Greg McGary <gkm at eng dot ascend dot com>
- Date: 28 Mar 2000 15:24:04 -0700
- Cc: geoffk at cygnus dot com, law at cygnus dot com, gcc at gcc dot gnu dot org
- References: <200003282136.QAA04388@sunspot.tiac.net>
Alan Lehotsky <lehotsky@sunspot.tiac.net> writes:
> One advantage of checking before stomping is that if stomping
> memory destroys your stack, it is darn hard to debug the problem...
Excellent point. I think the thing to do is implement both
alternatives, benchmark and see if there's any compelling reason to
relax barrier semantics. If the performance difference is negligible,
then always use barrier semantics. If the performance difference is
significant, then make it optional. Some might wish to pay the
runtime penalty for a guarantee that bounds violations won't stomp the
stack.