From 223d66a41455033e77e8c2cbb8170eaf0217b954 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 23 Mar 2019 23:38:43 +0100 Subject: add fsm_dealloc_test.c Despite efforts to properly handle "GONE" events and entering a ST_DESTROYING only once, so far this test runs straight into a heap use-after-free. With current fsm.c, it is hard to resolve the situation with the objects named "other" also causing deallocations besides the FSM instance parent/child relations. For illustration, add an "expected" test output file fsm_dealloc_test.err, making this pass will follow in a subsequent patch. Change-Id: If801907c541bca9f524c9e5fd22ac280ca16979a --- tests/Makefile.am | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/Makefile.am') diff --git a/tests/Makefile.am b/tests/Makefile.am index d123ee2a..09a1c189 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -51,7 +51,11 @@ check_PROGRAMS += vty/vty_test endif if ENABLE_CTRL -check_PROGRAMS += ctrl/ctrl_test fsm/fsm_test +check_PROGRAMS += \ + ctrl/ctrl_test \ + fsm/fsm_test \ + fsm/fsm_dealloc_test \ + $(NULL) endif if ENABLE_STATS_TEST @@ -207,6 +211,9 @@ fsm_fsm_test_LDADD = \ $(top_builddir)/src/gsm/libosmogsm.la \ $(top_builddir)/src/vty/libosmovty.la +fsm_fsm_dealloc_test_SOURCES = fsm/fsm_dealloc_test.c +fsm_fsm_dealloc_test_LDADD = $(LDADD) + write_queue_wqueue_test_SOURCES = write_queue/wqueue_test.c socket_socket_test_SOURCES = socket/socket_test.c -- cgit v1.2.3