Repository navigation
Commit 0bac3bc
committed
X1a forward-stance-python#4 fix: JIT_CHECK_C loud-fail on phx_bc_offset_set_insert realloc OOM
Per theologian SR-3(a) 02:40:16Z catch on d5a9280. Original
phx_bc_offset_set_insert had silent-skip on OOM realloc:
s->data = (int *)realloc(s->data, new_cap * sizeof(int));
If OOM: s->data = NULL, capacity update succeeds, subsequent
s->data[pos] = key crashes via NULL-deref instead of clean abort.
Same class as W2-A1 silent-skip violation + gatekeeper forward stance
python#4 codified rule (feedback_no_silent_bailout_in_helpers, supervisor
2026-04-30 20:10Z): BLOCK silent-return-on-malloc/resource-fail in
Cat-A/B C helpers; loud-fail JIT_CHECK_C required regardless of tier.
Fix (+5/-1 LOC):
- Capture realloc result in new_data local before assigning to s->data
- JIT_CHECK_C(new_data != NULL, "phx_bc_offset_set_insert realloc
failed (new_cap=%zu)", new_cap) — loud-fail with diagnostic
- Assign s->data = new_data only after the check
- #include cinderx/Common/jit_log_c.h (matches builder_state_c.h
pattern at line 31)
Forward-fix per CLAUDE.md ("create NEW commit rather than amending");
d5a9280 stays as the X1a parent commit.
Pre-commit chat-recheck applied per codified discipline; theologian
flag at 02:40:16Z confirmed as latest disposition (no reversal).1 parent d5a9280 commit 0bac3bc
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
| |||
0 commit comments