Repository navigation
Commit a864eca
committed
fix(build): rebuild lsp_all.o when its included headers change
lsp_all.o is a unity object that #includes every lsp/*.c resolver; those include
cbm.h, and CBMCall is copied BY VALUE across the lsp->pipeline boundary
(cbm_calls_push). Its Make rule depended only on lsp_all.c, not on the headers it
pulls in. So after CBMCall gained a field (is_method, DeusData#477) an incremental build
kept a stale lsp_all.o with the old struct layout while the rest of the tree
recompiled against the new one -- an ODR mismatch ASan flags as a
stack-buffer-underflow in cbm_calls_push (the by-value copy under-reads the
shorter stale struct). Clean builds (CI) always match, so it only bites
incremental developer builds.
Add an LSP_UNITY_DEPS prerequisite (lsp/*.c + lsp/*.h + lsp/generated/*.c +
internal/cbm/*.h) to lsp_all.o and prod_lsp_all.o so the object rebuilds when any
included header or unity source changes. Wildcard-based, so new LSP resolvers are
covered automatically; explicit because this Makefile has no -MMD auto-deps.
Verified: touching internal/cbm/cbm.h now rebuilds lsp_all.o (was stale before);
clean build + full ASan suite green, rustlsp_dbg_macro_inner_call no longer aborts.
Signed-off-by: Kris Kersey <kris@kerseyfabrications.com>1 parent b075f05 commit a864eca
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
138 | 150 | | |
139 | 151 | | |
140 | 152 | | |
| |||
434 | 446 | | |
435 | 447 | | |
436 | 448 | | |
437 | | - | |
| 449 | + | |
438 | 450 | | |
439 | 451 | | |
440 | 452 | | |
| |||
524 | 536 | | |
525 | 537 | | |
526 | 538 | | |
527 | | - | |
| 539 | + | |
528 | 540 | | |
529 | 541 | | |
530 | 542 | | |
| |||
0 commit comments