Skip to content

Conversation

ericriff
Copy link
Contributor

@ericriff ericriff commented Oct 7, 2025

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.

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
@ericriff ericriff force-pushed the eriff/sanitizers branch 2 times, most recently from a7d6c34 to 0a5ee4d Compare October 7, 2025 19:16
@ericriff ericriff force-pushed the eriff/sanitizers branch 2 times, most recently from c1b6dce to 715d882 Compare October 7, 2025 19:42
@ericriff ericriff mentioned this pull request Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant