Need advice on bounds checking approaches

Greg McGary gkm@eng.ascend.com
Tue Mar 28 14:25:00 GMT 2000


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.


More information about the Gcc mailing list