Verification that taking address of a nested function always requires executable stack

Kevin P. Fleming kpfleming@digium.com
Wed Nov 5 23:53:00 GMT 2008


We've been playing around with using nested functions recently; they've
got some interesting applications, but now that we've learned more about
how they are generally implemented, we're concerned because it requires
making portions (or all) of the stack executable.

Is this *always* true? If so, should we be avoiding them completely so
as not to run into systems that disallow executable stack completely and
would not be able to run our code? If the stack is marked executable
(even partially), that seems to run some risk of buffer overflow code
execution anyway...

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the Gcc-help mailing list