summaryrefslogtreecommitdiff
path: root/libbacktrace/Makefile.am
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2018-11-27 08:25:52 +0000
committerTom de Vries <vries@gcc.gnu.org>2018-11-27 08:25:52 +0000
commit0c155f24a945a55c37a963f64e89870f60543e64 (patch)
tree5936c40993d7b836b78772d3d1b6d97cd1055148 /libbacktrace/Makefile.am
parent1ea7ea181d8d3139df4ea66dc2ee98b27fa66b6f (diff)
downloadgcc-0c155f24a945a55c37a963f64e89870f60543e64.tar.gz
[libbacktrace] Avoid realloc with size == 0 in backtrace_vector_release
As of C17, realloc with size 0 is marked as an obsolescent feature. Fix this in backtrace_vector_release by using free instead. Bootstrapped and reg-tested on x86_64. 2018-11-27 Tom de Vries <tdevries@suse.de> * alloc.c (backtrace_vector_release): Handle vec->size == 0 using free instead of realloc. * Makefile.am (check_PROGRAMS): Add unittest. * Makefile.in: Regenerate. * unittest.c: New file. From-SVN: r266504
Diffstat (limited to 'libbacktrace/Makefile.am')
-rw-r--r--libbacktrace/Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am
index 3c1bd49dd7b..13e94f27aef 100644
--- a/libbacktrace/Makefile.am
+++ b/libbacktrace/Makefile.am
@@ -89,6 +89,10 @@ check_PROGRAMS =
TESTS = $(check_PROGRAMS)
if NATIVE
+unittest_SOURCES = unittest.c testlib.c
+unittest_LDADD = libbacktrace.la
+
+check_PROGRAMS += unittest
btest_SOURCES = btest.c testlib.c
btest_CFLAGS = $(AM_CFLAGS) -g -O