-
Notifications
You must be signed in to change notification settings - Fork 286
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
test: Add control flow integrity sanitizer. #2399
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #2399 +/- ##
======================================
Coverage 9.99% 9.99%
======================================
Files 141 141
Lines 32530 32530
======================================
+ Hits 3250 3251 +1
+ Misses 29280 29279 -1 ☔ View full report in Codecov by Sentry. |
CMakeLists.txt
Outdated
@@ -14,8 +14,8 @@ | |||
# | |||
################################################################################ | |||
|
|||
cmake_minimum_required(VERSION 2.8.12) | |||
cmake_policy(VERSION 2.8.12) |
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.
finally
This will check whether conversions to and casts from `void*` are correct. E.g. `int* -> void* -> float*` will trip the sanitizer. https://clang.llvm.org/docs/ControlFlowIntegrity.html
not sure what version of afl++ we are using, but it can also support cfisan |
@@ -75,6 +75,9 @@ if(APPLE) | |||
include(MacRpath) | |||
endif() | |||
|
|||
include(CheckIPOSupported) | |||
check_ipo_supported() |
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.
Calling this without any arguments makes IPO being unsupported a fatal error. I guess we can either set CMAKE_INTERPROCEDURAL_OPTIMIZATION
based on if IPO is supported, or only perform this check if CMAKE_INTERPROCEDURAL_OPTIMIZATION
is true.
This will check whether conversions to and casts from
void*
are correct. E.g.int* -> void* -> float*
will trip the sanitizer.https://clang.llvm.org/docs/ControlFlowIntegrity.html
This change is