-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add -fstrict-flex-arrays. Fixes #249 #263
Conversation
Signed-off-by: David A. Wheeler <[email protected]>
@kees - this seem correct? We're trying to encourage others to do what the Linux kernel has already done. |
Signed-off-by: David A. Wheeler <[email protected]>
Yes, this looks good, though perhaps more commentary on using "C99 flexible arrays" over the GNU Extension of 0-sized arrays maybe worth calling out. |
docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md
Outdated
Show resolved
Hide resolved
docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md
Outdated
Show resolved
Hide resolved
docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md
Outdated
Show resolved
Hide resolved
Signed-off-by: David A. Wheeler <[email protected]>
I made changes per review. I think it's ready to merge. Any last comments? |
docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md
Outdated
Show resolved
Hide resolved
Could we add the LSS talk Progress On Bounds Checking in C and the Linux Kernel by Kees Cook and Gustavo A.R. Silva |
Signed-off-by: David A. Wheeler <[email protected]>
Sure! Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md
Outdated
Show resolved
Hide resolved
Signed-off-by: David A. Wheeler <[email protected]>
Signed-off-by: David A. Wheeler <[email protected]>
Minor rewording to the description accordingly and fix description of -fstrict-flex-arrays=2 to correctly omit [1] case. Remove separate note on compiler versions as this is now apparent from the table. Signed-off-by: Thomas Nyman <[email protected]>
Reordered Did some minor rewording to the description accordingly and fixed the description of Also did consistency pass for the references and moved the footnotes to the relevant parts of the description. Added new references to the GCC Manual for the level descriptions found for |
Move footnotes to the relevant parts of the description. Add references to the GCC Manual for the level descriptions found for -Wstrict-flex-arrays and the -fsanitize=bounds option. Signed-off-by: Thomas Nyman <[email protected]>
dbcc8a1
to
7d26a9e
Compare
No description provided.