fix(cli): avoid Argparse default aliasing (Void/Library#62); record sanitizer run
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 10s

This commit is contained in:
faumaray committed 2026-12-05 08:02:31 +03:00
1 parent 4bd2999b49
commit 7756bd9f60
4 files changed
+30 -2

No files matched your search

+21
View File
@@ -1475,6 +1475,27 @@ invocations. VBS is slower on this small fixture because every invocation recomp
description; the numbers are recorded in [22](../roadmap/22-superiority-and-gaps.md) as the
optimization target.
## Sanitizer Groundwork (ASan + UBSan, GCC 16.2, pin `0002e74`)
```sh
dev cpp-gcc -c cmake -S . -B build/asan -G Ninja -DCMAKE_BUILD_TYPE=Debug -DVBS_VOID_SOURCE_DIR=/tmp/opencode/vl-pin \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" \
-DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,undefined"
dev cpp-gcc -c cmake --build build/asan --parallel 8
ASAN_OPTIONS=detect_leaks=1 build/asan/bin/vbs_core_tests --no-color
```
- `vbs_core_tests` under ASan+UBSan with leak detection: **7 / 7 passed**, no sanitizer reports.
- Found and filed a real library bug: [Void/Library#62](https://git.faumaray.com/Void/Library/issues/62)
- `Argparse::option_default` is a heap-use-after-free when `default_value` aliases `out`
(`vbs --version` reproduced it). The two aliasing call sites in `Main.cpp` (`gc`, `clean`) now
pass a separate default copy, and `vbs --version` is ASan-clean.
- Limitation: full CLI E2E under ASan is blocked because the out-of-process descriptor compile
does not inherit the sanitizer flags while it links the instrumented SDK archive; this is
recorded as tooling work (propagate sanitizer flags to descriptor compilation), not a code bug.
- Normal build CTest after the fix: **8 / 8 passed** in 278.59 s.
## Limits and Unrun Checks
1. **HTTPS git fetch**: the host shell is proxy-restricted, but the Docker container could clone `https://git.faumaray.com/Void/VoidLibrary.git`; the pinned commit `3e254055e081a104f08df68dde39711bc7813518` was fetched directly for the verification above. A separate configure against the local `/home/faumaray/Projects/Library` checkout via `VBS_VOID_SOURCE_DIR` also succeeded (development-only override, checkout unmodified).