Re: [PATCH bpf-next v1 11/14] bpf: Preserve source attribution without source text

Eduard Zingerman <[email protected]>
Newsgroups org.kernel.vger.bpf
Message-ID <[email protected]>
On Sun, 2026-08-16 at 03:57 +0200, Kumar Kartikeya Dwivedi wrote:
> GCC emits BTF line records with a file name and line number, but leaves the
> source line string empty. bpf_diag_source() currently treats that empty string
> as if the complete line record were unavailable, so diagnostics fall back to
> an instruction number and discard the function, file, and line attribution.
> 
> Print the available source location before deciding whether source context can
> be rendered. When source text is absent, omit only the source context and retain
> the diagnostic annotation and instruction context.
> 
> Fixes: b9c5d822f677 ("bpf: Add source and instruction diagnostic context")
> Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]>
> ---

Acked-by: Eduard Zingerman <[email protected]>

...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.