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.
Our cmake config has long supported an option to add a sanitizer but we'd never followed through with doing so. This won't catch quite everything that valgrind or the memory sanitizer will (in particular, read-before-init type errors) but it can check for leaks.
When testing the workflow I created an intentional leak to verify that it did correctly catch the error. See https://github.com/jmalkin/datasketches-cpp/actions/runs/7394385600 to view the output.
The thread sanitizer isn't relevant to us at this point. The memory sanitizer may need to run in docker since it needs a full toolchain compiled with the memory sanitizer enabled. This seems to be all we get for now.
EDIT: A comparison of memory tools can be found here.