diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2013-11-19 15:00:06 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2014-03-21 06:28:48 +0100 |
commit | 4d474fa3297c0d5d632e2c0bff6ccb0edbedaa5d (patch) | |
tree | 61ca2f19e552df821eb2dc06cd9e06c81993aacf /tests/Makefile.am | |
parent | ospf6d: fix refcounting in ospf6_asbr_lsa_remove (diff) | |
download | frr-4d474fa3297c0d5d632e2c0bff6ccb0edbedaa5d.tar.xz frr-4d474fa3297c0d5d632e2c0bff6ccb0edbedaa5d.zip |
lib: fix backtraces broken by 837d16c...
837d16c ("*: use array_size() helper macro") accidentally changed one of
the expressions in the backtrace code, which afterwards read:
zlog_backtrace_sigsafe():
if (((size = backtrace(array,array_size(array)) <= 0) ||
which boils down to: (size = backtrace(...) <= 0). The braces were
intended to go: (size = backtrace(...)) <= 0.
All in all, this makes a nice textbook example of the original author
being too clever (trying to save a single line by pulling the assignment
into the condition) and the next person touching the code tripping over
it...
This code occurs another time in zlog_backtrace() where it is actually
correct. Pulling out the assignment nonetheless. Also, new test
program.
Cc: Andrew J. Schorr <ajschorr@alumni.princeton.edu>
Cc: Balaji.G <balajig81@gmail.com>
Cc: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 9260a900b..5e631d6a8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,13 +24,14 @@ else TESTS_BGPD = endif -check_PROGRAMS = testsig testbuffer testmemory heavy heavywq heavythread \ +check_PROGRAMS = testsig testsegv testbuffer testmemory heavy heavywq heavythread \ testprivs teststream testchecksum tabletest testnexthopiter \ $(TESTS_BGPD) noinst_HEADERS = prng.h testsig_SOURCES = test-sig.c +testsegv_SOURCES = test-segv.c testbuffer_SOURCES = test-buffer.c testmemory_SOURCES = test-memory.c testprivs_SOURCES = test-privs.c @@ -48,6 +49,7 @@ tabletest_SOURCES = table_test.c testnexthopiter_SOURCES = test-nexthop-iter.c prng.c testsig_LDADD = ../lib/libzebra.la @LIBCAP@ +testsegv_LDADD = ../lib/libzebra.la @LIBCAP@ testbuffer_LDADD = ../lib/libzebra.la @LIBCAP@ testmemory_LDADD = ../lib/libzebra.la @LIBCAP@ testprivs_LDADD = ../lib/libzebra.la @LIBCAP@ |