Re: [PATCH bpf-next v1 12/14] selftests/bpf: Fix array bounds warning in jit_disasm_helpers

From: Eduard Zingerman

Date: Thu Feb 12 2026 - 20:02:35 EST


On Wed, 2026-02-11 at 17:13 -0800, Ihor Solodrai wrote:
> Compiler cannot infer upper bound for labels.cnt and warns about
> potential buffer overflow in snprintf. Add an explicit bounds
> check (... && i < MAX_LOCAL_LABELS) in the loop condition to fix the
> warning.
>
> Signed-off-by: Ihor Solodrai <ihor.solodrai@xxxxxxxxx>
> ---

This annoying false positive strikes again :(

Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

[...]