-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable OSSF compiler hardening flags by default #9441
Enable OSSF compiler hardening flags by default #9441
Conversation
CT Test Results 11 files 253 suites 3h 23m 19s ⏱️ Results for commit 9c916ab. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts// Erlang/OTP Github Action Bot |
f29ae91
to
32841a7
Compare
facce89
to
727cf7c
Compare
I've come to the realization that if we want to be able to enable these flags by default, we need to force usage of It is only I don't think doing this should break anything, but it is hard to know for sure. |
259d8b3
to
df6ccf4
Compare
We do this as AC_LINK_IFELSE needs LDFLAGS to be in $(CC) format to work and all OSs support using $(CC) as the linker.
This is done so that we in docker environments can install valgrind after configure has been run.
df6ccf4
to
9c916ab
Compare
This PR enables some extra gcc/clang flags by default that disallow certain types of bugs/attack vectors. From what I can tell the flags do not impact performance, but depending on the usecase they might.
The flags are taken from https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md#-fno-strict-overflow