Add support for sanitizers, including some GHAs#1019
Merged
facontidavide merged 7 commits intoBehaviorTree:masterfrom Oct 14, 2025
Merged
Add support for sanitizers, including some GHAs#1019facontidavide merged 7 commits intoBehaviorTree:masterfrom
facontidavide merged 7 commits intoBehaviorTree:masterfrom
Conversation
this modern approach registers many individual tests instead of a single monolitic test so if one fails the rest continue running which allows the developer to flag multiple failing tests on a single run It also speeds up testing since tests run in parallel
a7d6c34 to
0a5ee4d
Compare
c1b6dce to
715d882
Compare
715d882 to
d6221b0
Compare
Closed
facontidavide
added a commit
that referenced
this pull request
Oct 14, 2025
Thread and Address sanitizers (#1019 + fixes)
This file contains hidden or 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
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.
Add support for Address, Undefined Behavior and Thread sanitizer.
I've also included a new GHA that runs on PR builds. It triggers a build with with ASan and UBsan and a separate one with TSan, since this sanitizer is not compatible with the previous two.
I also lightly tweaked how tests are registered to use a more modern approach, which lets gtest query the test target to figure out how many unit tests it has and registers them individually instead of as a monolithic test. This speeds up the testing since all tests can now run in parallel, but also allows the test suite to continue running if a test failed. So a developer can identify multiple issues on a single run. As it is now the first failure aborts the test run.
This PR exposes a memory leak (#1017) and a handful of TSan related issues.
TODO: docs. This is just a draft to validate the GHAs.