lkml.org 
[lkml]   [2022]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: [PATCH 1/2] pahole: avoid segfault when parsing bogus file
kkourt@ wrote:
> From: Kornilios Kourtis <kornilios@isovalent.com>
>
> When trying to use btf encoding for an apparently problematic kernel
> file, pahole segfaults. As can be seen below [1], the problem is that we
> are trying to dereference a NULL decoder.
>
> Fix this by checking the return value of dwfl_getmodules which [2] whill
> return -1 on errors or an offset if one of the modules did not return
> DWARF_CB_OK. (In this specific case, it was __cus__load_debug_types that
> returned DWARF_CB_ABORT.)
>

[...]

> [2] https://sourceware.org/git/?p=elfutils.git;a=blob;f=libdwfl/libdwfl.h;h=f98f1d525d94bc7bcfc7c816890de5907ee4bd6d;hb=HEAD#l200

Thanks for the reference and fix.

Acked-by: John Fastabend <john.fastabend@gmail.com>

\
 
 \ /
  Last update: 2022-03-17 06:20    [W:0.057 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site