-
Notifications
You must be signed in to change notification settings - Fork 374
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
CI: Enable sanitizers #565
Merged
sbernard31
merged 7 commits into
eclipse-wakaama:master
from
husqvarnagroup:gardena/rs/improve-ci-2
Mar 31, 2021
Merged
CI: Enable sanitizers #565
sbernard31
merged 7 commits into
eclipse-wakaama:master
from
husqvarnagroup:gardena/rs/improve-ci-2
Mar 31, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Would also be OK with spelling it out as long as we keep it consistent. Signed-off-by: Reto Schneider <code@reto-schneider.ch>
Also, add curly braces around variables. Signed-off-by: Reto Schneider <code@reto-schneider.ch>
rettichschnidi
force-pushed
the
gardena/rs/improve-ci-2
branch
3 times, most recently
from
March 30, 2021 01:09
6f5ab6f
to
b559d83
Compare
rettichschnidi
changed the title
CI: Run binaries with sanitizers
CI: Enable sanitizers
Mar 30, 2021
rettichschnidi
force-pushed
the
gardena/rs/improve-ci-2
branch
from
March 30, 2021 14:27
b559d83
to
216fe2c
Compare
@mlasch Please review |
Please note: - Thread sanitizer does not make too much sense on a single threaded code base, but who knows, what the future will bring? - Memory sanitizer is not (yet) used as only Clang supports it - Set CMake build type to RelWithDebInfo to allow pinpointing found leaks to the respective source code line, while also allowing to find bugs which only show a higher optimization levels. - Bumping CMake requirement to 3.13 for target_link_options(). This commit fixes also the one memory leak found while adding sanitizer support. Signed-off-by: Reto Schneider <code@reto-schneider.ch>
rettichschnidi
force-pushed
the
gardena/rs/improve-ci-2
branch
3 times, most recently
from
March 30, 2021 16:18
6792eba
to
3970fa1
Compare
Found by undefined behavior sanitizer: core/utils.c:284:56: runtime error: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'long' Signed-off-by: Reto Schneider <code@reto-schneider.ch>
This change makes it easier to read the code. I need this to hunt down a runtime error found by the undefined behavior sanitizer. Signed-off-by: Reto Schneider <code@reto-schneider.ch>
Fix findings by undefined behavior sanitizer: runtime error: null pointer passed as argument 2, which is declared to never be null Signed-off-by: Reto Schneider <code@reto-schneider.ch>
Error found by the leak sanitizer. Signed-off-by: Reto Schneider <code@reto-schneider.ch>
rettichschnidi
force-pushed
the
gardena/rs/improve-ci-2
branch
from
March 30, 2021 16:29
3970fa1
to
7c23858
Compare
@mlasch Pls retry |
mlasch
approved these changes
Mar 30, 2021
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.
Looks good, the CI script also runs nicely on my local machine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should help keep us fairly save from memory corruption bugs - at least as far as we have unit tests for the code in question.