feat(sanitizers): add AddressSanitizer and UndefinedBehaviorSanitizer options for Debug builds on macOS - #15
Merged
Conversation
… options for Debug builds on macOS fix(build): remove ZSTD and libsodium linking from benchmarks, examples, and CLI CMake files test: add regression test for encryption reporting in bfc_list
… and encrypted content
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.
This pull request introduces improvements to sanitizer configuration, fixes a bug in encryption reporting, and cleans up unnecessary library linkage in CMake files. The most important changes are summarized below.
Sanitizer configuration improvements:
CMakeLists.txt: Sanitizer options are now configurable viaBFC_ASANandBFC_UBSAN, with AddressSanitizer disabled by default on macOS due to platform issues. The sanitizer flags are only applied if enabled, and debug output indicates which sanitizers are active. [1] [2]Bug fix: encryption field reporting in file listing:
src/lib/bfc_reader.c: Theencfield is now correctly set in thebfc_entry_tstructure returned bybfc_list, fixing a bug where listed entries always reportedBFC_ENC_NONEeven when encrypted.tests/unit/test_reader.c: Added a regression test (test_list_reports_encryption) to verify thatbfc_listandbfc_statagree on the encryption and compression status of entries. [1] [2]CMake cleanup: unnecessary linkage removed:
benchmarks/CMakeLists.txt,examples/CMakeLists.txt,src/cli/CMakeLists.txt,tests/unit/CMakeLists.txt: Removed redundanttarget_link_librariescalls for ZSTD and libsodium, as these are not needed when using static libraries; onlytarget_link_directoriesandtarget_compile_definitionsare now set. [1] [2] [3] [4] [5] [6]