This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]