Repository navigation
Conversation
The ENABLE_SANITIZER_* options only instrumented the test executables: libclass_loader and the test plugins were built without -fsanitize, so AddressSanitizer and ThreadSanitizer couldn't see memory errors or races inside the library itself. Set the sanitizer options on the top-level directory before any target is defined, so the library, test plugins and tests are all instrumented. Directory options aren't exported, so the installed library's consumers are unaffected. UndefinedBehaviorSanitizer is made fatal so it fails the test instead of only printing a diagnostic, and gets its own CI job. enable_sanitizers() is kept for compatibility, since the file is installed. Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
ahcorde
approved these changes
Nov 11, 2026
ahcorde
marked this pull request as ready for review
November 11, 2026 08:01
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.
Description
ENABLE_SANITIZER_*only instrumented the test executables, so ASan and TSan couldn't see errors insidelibclass_loaderor the test plugins.class_loader_enable_sanitizers()now sets the flags for the whole directory before any target is defined. This also adds a UBSan CI job built with-fno-sanitize-recover=undefined, so UB fails the test.Is this user-facing behavior change?
No.
enable_sanitizers(target)is kept becausecmake/sanitizers.cmakeis installed.Did you use Generative AI?
Claude Code (Claude Opus 5.5) wrote the change; I reviewed it.
Additional Information
Conflicts with #248, which links
project_options; whichever merges second needs a small rebase.