For discussion: Introduce sanitizer options and run with sanitizer on Linux/MacOS #78
+244
−6
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.
Clang has excellent sanitizers, that are very well supported under MacOS and Linux. Add AddressSanitizer, LeakSanitizer and UndefinedBehaviourSanitizer configure options.
Introduce GH action to run the tests with and without sanitizers.
After #77 I have suppressed the leaks during the
pkg
builds. I thought I would introduce the sanitizers and a corresponding CI run also here.The patch got bigger than I hoped it would be and has some issues I would like to discuss here:
The sanitizers affect both compiler flags as well as ldflags, they need to be passed down to the pkg-config script, otherwise an instrumented atf cannot be linked against by a compliant user looking at pkg-config.
I have abandoned
automake
>20y ago, so the hack that I have put in place should be re-done by somebody actually knowing automake.Questions:
automake
stuff and clean it up.I case of interest I can continue supporting this until it produces reasonable output (atf report showing the leaks, bailing out with test failure), but I will not be able to go into fixing all the leaks.