[Bug other/87220] -fstack-check produces inefficient and wrong tests

bugdal at aerifal dot cx gcc-bugzilla@gcc.gnu.org
Tue Sep 4 20:20:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87220

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
-fstack-clash-protection works as desired.

Based on the documentation:

"Most targets do not fully support stack clash protection. However, on those
targets -fstack-clash-protection will protect dynamic stack allocations.
-fstack-clash-protection may also provide limited protection for static stack
allocations if the target supports -fstack-check=specific. "

I understood that -fstack-check would still be needed to get reliable
protection on all targets. Perhaps that's wrong. Is there a recommended
approach for determining at build time the right options for the target to
ensure that code which jumps over the guard page is not generated?


More information about the Gcc-bugs mailing list