-
Notifications
You must be signed in to change notification settings - Fork 25
Add sanitizing build job #281
Add sanitizing build job #281
Conversation
prbt_hardware_support/test/unittests/unittest_brake_test_executor.cpp
Outdated
Show resolved
Hide resolved
prbt_hardware_support/test/unittests/unittest_speed_observer.cpp
Outdated
Show resolved
Hide resolved
prbt_hardware_support/test/unittests/unittest_speed_observer.cpp
Outdated
Show resolved
Hide resolved
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.
Really like having these checks included in the CI. Maybe even interesting for a upstream PR on industrial_ci. Just some minor remarks.
Just as an idea. This would be nice to have as a dedicated package just like https://github.com/mikeferguson/code_coverage for providing a simple macro to enable the sanitizing. However this is far beyond the scope of this PR. Maybe https://github.com/agutenkunst/cmake_extras_demo_pkg could be a starting point.
We could split the commits which are only needed to satisfy the clang compiler into a separate PR. @agutenkunst What do you think? See PR #283. |
For information on how-to execute a sanitizer locally see PR PilzDE/.github#7. |
As it turns out gcc already supports address and undefined behavior sanitizing (see gcc online documentation). Memory sanitizing is only available with clang. However, every dependency needs to be build with the memory sanitizing flags (described for example in the rosproject-scripts repo on GitHub). Therefore, I decided to skip this sanitizer completely (at least for the moment). |
GCC provides address and undefined behavior sanitizing. Memory sanitizing is not included because all dependend libraries need to be build with memory sanitizing flags, otherwise it comes to false-positive error detection. Furthermore, memory sanitizing is currently only supported by clang. Note: Using clang to sanitize (address or undefined bahvior sanitizing) leads to false-positive error detections in libraries not build with clang.
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.
👍 for adding sanitizing
Why not use cmake arguments instead of environment variables for ENABLE_ADDRESS_SANITIZING, etc.?
Good question 😄 I will give it a try. |
This reverts commit 6b81792.
OK. I only use the travis config file now. This should satisfy you. |
But now I get sanitizing errors in the repositories previously not included 🙈 ARRRRRRRGH... I want to merge. |
Interesting fact: |
Only guessing: from
This "graveyard" is a std::vector holding raw pointers. So maybe that is why these metaobjects are not destroyed. |
I opened an issue: ros/class_loader#131 |
This PR adds sanitizing as CI jobs to the pilz_robots repository.