llama.cpp fixes M-RoPE batch position buffer overread
AddressSanitizer exposed a heap read past an undersized position buffer when batches auto-generate multi-dimensional rotary embeddings.
llama.cpp has fixed a heap buffer overread in batch position handling when auto-generating multi-dimensional rotary position embeddings (M-RoPE).
The position buffer was allocated to the batch token count, but the M-RoPE auto-generation path read past the end of that storage while splitting and adding micro-batches. AddressSanitizer flagged a four-byte read immediately after a short heap region. Ordinary unit tests still passed: leftover values in a wider vector meant validation still saw familiar inputs, so the overread could stay latent until a sanitizer build or a targeted regression test hit it.
llama.cpp is a common local runtime for large language models. Workloads that rely on automatic M-RoPE positions, including some multimodal setups, could crash or hit undefined behavior on the broken path. The change adds coverage for that case. A separate allocation path that still uses a plain malloc-sized position array is left for follow-up work.