r268269 - in /trunk/libbacktrace: ChangeLog Mak...

vries@gcc.gnu.org vries@gcc.gnu.org
Fri Jan 25 14:39:00 GMT 2019


Author: vries
Date: Fri Jan 25 14:39:58 2019
New Revision: 268269

URL: https://gcc.gnu.org/viewcvs?rev=268269&root=gcc&view=rev
Log:
[libbacktrace] Fix strrchr segfault

Currently, when running a libbacktrace testcase t with .gnu_debuglink to
t.debug, and t.debug having a .gnu_debugaltlink to t.alt.debug, a segfault
is triggered when calling strrchr with a NULL string from
elf_find_debugfile_by_debuglink.  The NULL string originates from the elf_add
called for the .gnu_debugaltlink, which uses NULL as filename argument.

Fix this by using "" as filename argument instead.

2019-01-25  Tom de Vries  <tdevries@suse.de>

	* elf.c (elf_add): When handling .gnu_debugaltlink, call elf_add with
	filename == "".
	* Makefile.am (TESTS): Add btest_dwz_gnudebuglink.
	* Makefile.in: Regenerate.

Modified:
    trunk/libbacktrace/ChangeLog
    trunk/libbacktrace/Makefile.am
    trunk/libbacktrace/Makefile.in
    trunk/libbacktrace/elf.c



More information about the Gcc-cvs mailing list