[prev in list] [next in list] [prev in thread] [next in thread]
List: bird-users
Subject: [patch] Assertion failed in add_tail caused by default_log_list
From: Mikael <mikma.bird () lists ! m7n ! se>
Date: 2020-08-31 20:58:21
Message-ID: 0ced3c63-fe53-eeee-8057-8eee617210b2 () m7n ! se
[Download RAW message or body]
Hello,
the following configuration file (without a log configuration) causes
assertion failed in add_tail. There is no output but it can be seen with
gdb.
protocol device {
interface "*";
}
Tested version: git dc8d9dec
Proposed patch see attachment.
/Mikael
["0001-Log-Fix-assert-in-add_tail-caused-by-default_log_lis.patch" (text/x-patch)]
From 0b6a043c1f084bad3716b63044cdaff0008a20a1 Mon Sep 17 00:00:00 2001
From: Mikael Magnusson <mikma@users.sourceforge.net>
Date: Mon, 31 Aug 2020 22:43:29 +0200
Subject: [PATCH] Log: Fix assert in add_tail caused by default_log_list
Clean up old log_list in default_log_list if it has been
initialized already. A log_config node may be reused which
otherwise causes an assertion (if built with --enable-debug).
---
sysdep/unix/log.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c
index e24322c6..13cab04f 100644
--- a/sysdep/unix/log.c
+++ b/sysdep/unix/log.c
@@ -335,6 +335,13 @@ static list *
default_log_list(int initial, const char **syslog_name)
{
static list log_list;
+ struct log_config *lc, *lc_next;
+
+ /* Clean up old log_list. */
+ if (log_list.head)
+ WALK_LIST_DELSAFE(lc, lc_next, log_list)
+ rem_node(&lc->n);
+
init_list(&log_list);
*syslog_name = NULL;
--
2.25.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic