build: VALGRIND.md + make valgrind-pcl phase-1 baseline Verified
Drops VALGRIND.md into the worktree (was authored in a sibling
clone) and adds the smallest possible target that runs the
self-compiled funcl under memcheck on a chosen reproducer.
Phase 1 only — no source changes. Just:
valgrind --tool=memcheck --track-origins=yes --smc-check=all \
--leak-check=no --error-exitcode=99 \
build/funcl --hosted SOURCE OUTPUT
--smc-check=all is mandatory because file-compile streams code
into the RWX region at +elf-mmap-vaddr+ and runs it in the same
process; without that valgrind's JIT cache holds stale
translations of overwritten bytes.
The PCL bootstrap concat (build/pcl-bootstrap-src.lisp) is the
default reproducer — the very crash that motivated this
integration. Memcheck on it pinpoints the failure as a CALL
to a tagged-function-pointer whose target lands in the BSS
heap, not the code region: a "called a non-function" bug, not
heap corruption. Confirmed in this commit's diff against an
earlier blind chase.
Phases 2-7 (client requests, redzones, mempool annotations)
remain future work tracked in VALGRIND.md.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By:
Claude Opus 4.7 (1M context) <noreply@anthropic.com>