Re: gcc-4.0.1 = nested functions are not supported on MacOSX?
Re: gcc-4.0.1 = nested functions are not supported on MacOSX?
- Subject: Re: gcc-4.0.1 = nested functions are not supported on MacOSX?
- From: Eric Albert <email@hidden>
- Date: Thu, 10 Nov 2005 23:48:21 -0800
On Nov 10, 2005, at 10:24 PM, Daryn wrote:
The new xcode 2.2's gcc 4.0.1 compiler update has apparently dropped
support for nested functions. Apple's release notes for gcc do not
even mention this change... :(
Before I downgrade to gcc 4.0, is there a command line option to
re-enable nested functions?
Why were they disabled? Are they going to be re-enabled?
gcc's implementation of nested functions involves placing code on the
stack and then executing it. Stack execution is a common operation in
malicious code, particularly as a side effect of buffer overflows.
While the proper fix is of course to not make buffer overflows possible
in the first place, disabling stack execution decreases the likelihood
that a buffer overflow or other stack-smashing attack will be
exploitable.
In future releases of Mac OS X, we may disable stack execution.
(Obviously we'll have to keep binary compatibility in mind when or if
we do that.) Nested functions were disabled to help prepare for that
change.
As for whether nested functions will be re-enabled, if someone
contributes a patch to GCC to change the nested function implementation
to not rely on stack execution, presumably there'd be a chance they'd
be re-enabled.
Hope this helps,
Eric
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden