[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non-exec stack
On Thu, Jul 25, 2002 at 08:44:21PM +0900, Kamo Hiroyasu wrote:
> Just for your information.
>
> GCC depends on executable stacks to implement nested functions. It
> generates dynamically a tiny wrapper on the stack if a pointer to a
> local function is evaluated.
>
> In other words, you cannot use a pointer to a local function with GCC
> and non-executable stacks.
As a matter of fact, there is an entry in gcc testsuite that triggers
that specific issue.
If you look at gcc's code, you'll notice that some arches can exec-protect
the stack before running such trampolines.
However, other schemes such as propolice abort on the same example
even without non-exec stacks.