Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Nested function
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== No-execute stacks === [[GNU Compiler Collection|GCC]]'s implementation of nested functions causes a loss of [[NX bit|no-execute]] [[Call stack|stacks]] (NX stacks). This implementation calls nested functions through a [[jump instruction]] placed on the machine stack at runtime. This requires the stack to be executable. No-execute stacks and nested functions are therefore mutually exclusive in GCC. If a nested function is used in the development of a program, then the NX stack is silently lost, unless GCC is called with the <code>‑Wtrampoline</code> option to alert of the condition. Software engineered using [[Software Development Security|Secure Development Lifecycle]] often do not allow the use of nested functions in this particular compiler due to the loss of NX stacks.<ref>{{cite web | url = http://www.owasp.org/index.php/C-Based_Toolchain_Hardening#GCC.2FBinutils | title = C-Based Toolchain Hardening | last = Walton | first = Jeffrey | publisher = The Open Web Application Security Project (OWASP) | access-date = 28 February 2017 }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)