RootCauseunvalidated
The `ptrn_missing` path at line 1334 artificially advances `p_end` to `p_ptrn_lines+1` — The fake-line tracking (p_bfake, p_efake) only covers the REPLACEMENT positions set up by the fill, not the PATTERN positions 2..p_ptrn_lines. Tension: leaving `p_line[2..p_ptrn_lines]` holding dangling pointers from the previous hunk's cleanup. Outcome: The next cleanup call then frees those already-freed pointers.
6c5eb406-5c06-4170-99a2-0e588b58054f
The ptrn_missing path at line 1334 artificially advances p_end to p_ptrn_lines+1 — The fake-line tracking (p_bfake, p_efake) only covers the REPLACEMENT positions set up by the fill, not the PATTERN positions 2..p_ptrn_lines. Tension: leaving p_line[2..p_ptrn_lines] holding dangling pointers from the previous hunk's cleanup. Outcome: The next cleanup call then frees those already-freed pointers.