-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove _FORTIFY_SOURCES from build: #1812
Conversation
This option is silently ignorned at -O0
👍
We should consider adding such 'security'/'hardening'/'fortification' options on release builds instead. Notesgcc/clang have 'fortified' default configuration on some platforms and so rippled currently builds on those platforms with source code hardening anyways, intended or not. clang sanitizers are a different thing again. They do not yet support source fortification as this issue shows:
LinksEnhance application security with FORTIFY_SOURCE "Strong" stack protection for GCC; un-fortifying-rippled stackoverflow question (incidentally, perhaps he wanted to unfortify rippled so that he could test exploits for attacking unfortified instances). |
See #1432 (reported in December 2015) Edit: -Og would be better for debugging than -O1, but apparently there were some issues. |
As a side note, I noticed that a scons debug build has "+DEBUG" appended to the |
I'm fairly confident this has nothing to do with your change, but the Travis GCC Coverage build has had an internal compiler error building server.o three times in a row. It's vaguely possible that we need to split the server.cpp unity file into two pieces... |
👍 Other than the Travis build problem this change looks good to me. I built clang.debug.nounity and clang.release using both scons and cmake on OS X. No warnings on any of the builds. Unit tests ran on all builds. |
@scottschurr Thanks for the note about the cmake build. I'll open an issue. |
Current coverage is 71.00% (diff: 100%)@@ develop #1812 diff @@
==========================================
Files 869 869
Lines 69535 69535
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 49363 49376 +13
+ Misses 20172 20159 -13
Partials 0 0
|
Merged as b0704b4 |
This option is silently ignorned at -O0 on ubuntu. On fedora, we get a warning that
requires compiling with optimization (-O)
.I see two options:
-O1
when debugging_FORTIFY_SOURCES
I'm opting for (2). We have been building this way since at least Oct/2014 and the clang sanitizers serve a similar function.