You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lsp_all.o not rebuilt when cbm.h changes → stale-object ODR mismatch (ASan stack-buffer-underflow in cbm_calls_push) #661
Makefile.cbm builds lsp_all.o (the unity object for all lsp/*.c resolvers) with a rule that depends only on lsp_all.c, not on the headers it transitively includes. Because lsp_all.c pulls in cbm.h, and CBMCall is copied by value across the lsp→pipeline boundary (cbm_calls_push), any change to CBMCall's layout leaves a stale lsp_all.o on incremental builds, an ODR mismatch. ASan flags it as a stack-buffer-underflow.
Reproduction
On a tree where lsp_all.o predates the most recent CBMCall change (i.e., any incremental build spanning #477):
$ make -f Makefile.cbm build/c/test-runner # incremental; lsp_all.o NOT rebuilt
$ ./build/c/test-runner # suite_rust_lsp
==NNNNN==ERROR: AddressSanitizer: stack-buffer-underflow ... in __interceptor_memcpy
#1 cbm_calls_push internal/cbm/cbm.c:128
#2 rust_inject_syn_call internal/cbm/lsp/rust_lsp.c:3366
#3 rust_emit_resolved_call internal/cbm/lsp/rust_lsp.c:3382
...
#19 test_rustlsp_dbg_macro_inner_call tests/test_rust_lsp.c:861
This frame has 1 object(s):
[48, 352) 'call' (line 3363) <== Memory access at offset 0 partially underflows this variable
Confirm it's staleness, not a source bug:
$ ls -l build/c/lsp_all.o internal/cbm/cbm.h # lsp_all.o older than cbm.h
$ make -f Makefile.cbm clean-c && make ... && ./build/c/test-runner # clean build → no abort
Logs
Project scale (if relevant)
No response
Confirmations
I searched existing issues and this is not a duplicate.
My reproduction uses shareable code (a dummy snippet or a public OSS repository), not proprietary code.
Thanks for the build-system report. I’ve triaged this under #390. This should become a build dependency regression: changing cbm.h must force lsp_all.o to rebuild so stale object files cannot produce ABI mismatches.
Activity
DeusData commentedon Jun 29, 2026
Thanks for the build-system report. I’ve triaged this under #390. This should become a build dependency regression: changing
cbm.hmust forcelsp_all.oto rebuild so stale object files cannot produce ABI mismatches.