-
Notifications
You must be signed in to change notification settings - Fork 240
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 address sanitizers only on 64bit machines #149
Conversation
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
@tfoote @dirk-thomas please review and merge. Required for Tier2 Armhf support on Dashing. |
@piraka9011 An immediate workaround for this is to change the Armhf build configuration to explicitly pass in I would like to run a PR job on an armhf build machine first to verify the result of this PR. I currently don't know how to do that though. |
@Karsten1987 Here's an armhf CI run: build upto rosbag2 test select rosbag2 |
Thanks @tfoote for the build. I somehow must have been ignoring the fact that ci.ros2.org is provisioned with a 32bit armhf job 😇 The referenced build job explicitly disabled asan by passing in the flag. I've triggered another one which uses the logic of this PR. Also, a regular CI job: |
This is up for review. |
rosbag2/CMakeLists.txt
Outdated
@@ -16,6 +16,11 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | |||
endif() | |||
|
|||
option(DISABLE_SANITIZERS "disables the use of gcc saniztizers") | |||
# Only enable sanitizers on x64 architectures | |||
# https://github.com/google/sanitizers/issues/794 | |||
if(NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL "8") |
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.
qq: Were you unable to get this running without the quotes? Ideally it would be int not str comaprison.
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
set(DISABLE_SANITIZERS ON)
endif()
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.
absolutely right. 3c1ab0d addresses this.
Signed-off-by: Karsten Knese <karsten@openrobotics.org>
* enable address sanitizers only on 64bit machines Signed-off-by: Karsten Knese <karsten@openrobotics.org> * remove quotes to compare integers Signed-off-by: Karsten Knese <karsten@openrobotics.org>
addresses #142
Signed-off-by: Karsten Knese karsten@openrobotics.org