Skip to content

feat(sanitizers): add AddressSanitizer and UndefinedBehaviorSanitizer options for Debug builds on macOS - #15

Merged
zombocoder merged 2 commits into
mainfrom
bugfix/mac-os-address-sanitizer
Aug 1, 2026
Merged

feat(sanitizers): add AddressSanitizer and UndefinedBehaviorSanitizer options for Debug builds on macOS#15
zombocoder merged 2 commits into
mainfrom
bugfix/mac-os-address-sanitizer

Conversation

@zombocoder

Copy link
Copy Markdown
Owner

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 via BFC_ASAN and BFC_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: The enc field is now correctly set in the bfc_entry_t structure returned by bfc_list, fixing a bug where listed entries always reported BFC_ENC_NONE even when encrypted.
  • tests/unit/test_reader.c: Added a regression test (test_list_reports_encryption) to verify that bfc_list and bfc_stat agree 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 redundant target_link_libraries calls for ZSTD and libsodium, as these are not needed when using static libraries; only target_link_directories and target_compile_definitions are now set. [1] [2] [3] [4] [5] [6]

… 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
@zombocoder
zombocoder merged commit 211bc23 into main Aug 1, 2026
11 checks passed
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