-
Notifications
You must be signed in to change notification settings - Fork 716
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(bindings): run unit tests under asan #4948
Merged
Merged
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
Otherwise it interferes with the generate command, i think
I think most of our overrides are broken, because they seem to be defined per-directory without any sort of hierarchy
I am tired of fighting with overrides.
I hate debugging remote things...
I am getting undefined symbol error, but most of the other stuff seems to be running successfully? Honestly pretty confused on this one. If it was really libasan errors, I would expect that _all_ of the tests would fail?
Actually, the issue was that I wasn't linking asan for the doc tests.
This reverts commit 4128517.
camshaft
approved these changes
Dec 4, 2024
# Rust is generally memory safe, but our bindings contain a large amount of unsafe | ||
# code. Additionally, "safe" code doesn't guarentee that the code is free of | ||
# memory leaks. | ||
asan-unit-tests: |
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.
This is a great idea. We should do the same in s2n-quic 🙂
* specify "step-local" env variables
lrstewart
approved these changes
Dec 4, 2024
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.
Description of changes:
We want to ensure that none of our unit tests are leaking memory.
We currently use "checkers" for some of our tests, but this requires us to manually annotate each test with the
checkers::test
macro.Instead of doing that, we can just use Rust's existing address sanitizer support to check for memory leaks in all of the tests.
Testing:
All existing tests should pass.
Additionally, I pushed a commit containing a memory leak here. You can see the failed asan job for that commit here
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.