[PATCH] Don't return the main file as the separate debug info

H.J. Lu hjl.tools@gmail.com
Sat Dec 11 00:31:02 GMT 2021


On Fri, Dec 10, 2021 at 4:11 PM Alan Modra <amodra@gmail.com> wrote:
>
> On Fri, Dec 10, 2021 at 01:48:39PM -0800, H.J. Lu wrote:
> > Return NULL if the separate debug info is the same as the input main
> > file to avoid infinite recursion.
>
> Your backtrace says it's actually the separate debug info file
> pointing to itself, not to the main file.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2031278

>
> >       PR binutils/28679
> >       * dwarf.c (load_separate_debug_info): Don't return the input
> >       main file.
>
> You missed two places where canon_filename should be freed when
> returning NULL.  OK with those fixed.
>
> --
> Alan Modra
> Australia Development Lab, IBM

Here is the v2 patch I am checking in.

Thanks.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0001-Don-t-return-the-main-file-as-the-separate-debug-.patch
Type: text/x-patch
Size: 3354 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20211210/27288644/attachment.bin>


More information about the Binutils mailing list