This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compiler alternatives to no-exec (was Re: non exec stack...)
- To: linux-kernel at vger dot rutgers dot edu
- Subject: Re: Compiler alternatives to no-exec (was Re: non exec stack...)
- From: Marcin Dalecki <dalecki at cs dot net dot pl>
- Date: Mon, 10 Aug 1998 10:33:41 -0700 (MST)
- cc: egcs at cygnus dot com
On 7 Aug 1998 06:20:07 GMT, Linus Torvalds (torvalds@transmeta.com) wrote:
>There's an even simpler fix, with the compiler just pushing 0 on entry
>to all functions, and on exit it pops it off and aborts if it is
>non-zero.
>
>If somebody is using a overlong string, it cannot contain an all-zero
>value in the middle, so nobody can use the standard string overflow
>trick.
>
>Zero also happens to be very cheap to test against. Total overhead: four
>instructions per function
And what about an optional warning in the compiler which would you inform
about all uses of hardcoded array bounds? This would incure at least no
cost in the executable at all and make the fixing of the offending broken
apps just a breeze... Maybe someone on egcs with some spare time should
consider this seriously?
Marcin
=========================================================================
In real life: System Programmer at AIS AXON GmbH