Actions
Misc #15053
closedUsing -fstack-protector-strong instead of -fstack-protector conditionally.
Misc #15053:
Using -fstack-protector-strong instead of -fstack-protector conditionally.
Status:
Closed
Assignee:
-
Description
When running a code analysis tool for ruby, I got a warning Insufficient stack protection: -fstack-protector
, it seems setting "-fstack-protector-strong" is better than "-fstack-protector".
Currently in configure.ac
, "-fstack-protector" is set.
Seeing a document about it [1], it looks "-fstack-protector-strong" is supported from gcc-4.9.
I prepared the pull-request here. [2]
If gcc is >= 4.9 (but I did >=5 simplify the logic), use "-fstack-protector-strong", otherwise use "-fstack-protector".
How do you think?
[1] https://lwn.net/Articles/584225/
[2] https://gcc.gnu.org/ml/gcc-patches/2012-06/msg00974.html
[3] https://github.com/ruby/ruby/pull/1944
Actions