This is the mail archive of the
mailing list for the GCC project.
Re: [PATH, libgfortran] PR 63589 Fix find_addr2line
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 18 Oct 2014 08:06:11 -0700
- Subject: Re: [PATH, libgfortran] PR 63589 Fix find_addr2line
- Authentication-results: sourceware.org; auth=none
- References: <CAO9iq9Evbnf7k5wJ0+gJy71esTHJi+_omve_niX35+FUrcuP+Q at mail dot gmail dot com>
On Sat, Oct 18, 2014 at 05:38:16PM +0300, Janne Blomqvist wrote:
> Benoit Lodej reported on the fortran list a bug in find_addr2line,
> namely that if the PATH string does not end in ":", the last PATH
> element is not tested. Rather than fixing the current implementation,
> I rewrote it in a simpler fashion by using the strtok_r function.
> Tested that it fixes the original bug, and with strace & valgrind that
> everything seems Ok (no regtest since we don't have anything in the
> testsuite which tests the backtrace functionality, AFAIK). Ok for
> 2014-10-18 Janne Blomqvist <email@example.com>
> PR libfortran/63589
> * configure.ac: Check for strtok_r.
> * runtime/main.c (gfstrtok_r): Fallback implementation of
> (find_addr2line): Use strtok_r to split PATH.
> * config.h.in: Regenerated.
> * configure: Regenerated.