4 ms·
I've seen toolchains emit a warning for programs that require an executable stack; however, I can't seem to track down what toolchains and warning options produ
by JoshTriplett 11y ago
I've seen toolchains emit a warning for programs that require an executable stack; however, I can't seem to track down what toolchains and warning options produce that. In any case, I've filed https://sourceware.org/bugzilla/show_bug.cgi?id=20025 https://sourceware.org/bugzilla/show_bug.cgi?id=20025 to get such a warning enabled by default.
While I don't think it's possible at this point to default to marking the stack non-executable without explicit information, it seems perfectly reasonable to emit a warning about that by default. That would cause far more developers to notice.
- burfog 11y agoPeople ignore warnings. The build should just fail if the result would have an executable stack, unless the final linking step includes an option to explicitly demand an executable stack. The error message should mention how to get rid of the code that causes the stack to be executable. No mention should be made of how to continue on with an executable stack; people can read the man page if they really really want to have that.
- kazinator 11y agoAlso, dlopen should fail on an object that requires an executable stack, unless some RTLD_WHATEVER flag is passed to allow it. There should also be some finer granularity than opening execute access in every single thread's stack.
- deleted 11y ago[deleted]
- jey 11y agoWell, that's their mistake. Many of us do use -Wall -Werror though.