]> git.ipfire.org Git - thirdparty/gcc.git/commit
libbacktrace: avoid infinite recursion
authorIan Lance Taylor <iant@golang.org>
Fri, 12 Jul 2024 02:29:04 +0000 (19:29 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 12 Jul 2024 02:34:45 +0000 (19:34 -0700)
commitbf406a53693ef664b7ee0c77c4940a71a83866c5
treec2f48a67295b26fbe38007200a291146577f5898
parent3bc1a86d534db98d2e7647b734a198098f51267f
libbacktrace: avoid infinite recursion

We could get an infinite recursion in an odd case in which a
.gnu_debugdata section was added to a debug file, and mini_debuginfo
was put into the debug file, and the debug file was put into a
/usr/lib/debug directory to be found by build ID.  This combination
doesn't really make sense but we shouldn't get an infinite recursion.

* elf.c (elf_add): Don't use .gnu_debugdata if we are already
reading a debuginfo file.
* Makefile.am (m2test_*): New test targets.
(CHECK_PROGRAMS): Add m2test.
(MAKETESTS): Add m2test_minidebug2.
(%_minidebug2): New pattern.
(CLEANFILES): Remove minidebug2 files.
* Makefile.in: Regenerate.
libbacktrace/Makefile.am
libbacktrace/Makefile.in
libbacktrace/elf.c