View Issue Details

IDProjectCategoryView StatusLast Update
0007630GNUnettesting librarypublic2023-06-01 20:26
Reporterulfvonbelow Assigned Tot3sserakt  
PrioritynormalSeveritytrivialReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Target Version0.19.4 
Summary0007630: Memory leak in (?) finish_test in testing_api_loop.c
DescriptionThe barriers are never freed. I don't know whether this is the job of the testing library or the caller.
Steps To Reproduce./configure --enable-sanitizer
make
make install
make check
Additional InformationIf it's the testing library's job to free the barriers, then the attached patch will do that. Otherwise, we have an incorrect test case somewhere that isn't freeing them (I don't remember which).
Tagsmemory-leak, patch
Attached Files
0001-TESTING-don-t-leak-barriers.patch (684 bytes)   
From 001a8272d906a2a358d986b82a6082217e4525e2 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <strilen@tilde.club>
Date: Sun, 29 Jan 2023 05:56:32 -0600
Subject: [PATCH] TESTING: don't leak barriers.

---
 src/testing/testing_api_loop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index 7d719afc0..fc9f04c48 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -285,6 +285,7 @@ finish_test (void *cls)
   GNUNET_free (is->commands);
   is->rc (is->rc_cls,
           is->result);
+  TST_interpreter_delete_barriers (is);
   GNUNET_free (is->helper);
   GNUNET_free (is);
 }
-- 
2.38.1

Activities

t3sserakt

2023-02-07 17:44

developer   ~0019772

Fix committed to master branch.

schanzen

2023-06-01 20:26

administrator   ~0020214

released some time ago

Related Changesets

gnunet: master fb61e1a7

2023-02-07 18:25

t3sserakt


Details Diff
Fixed 0007630: Memory leak in (?) finish_test in testing_api_loop.c Affected Issues
0007630
mod - src/testing/testing.h Diff File
mod - src/testing/testing_api_cmd_barrier.c Diff File
mod - src/testing/testing_api_cmd_netjail_start_cmds_helper.c Diff File
mod - src/testing/testing_api_loop.c Diff File

Issue History

Date Modified Username Field Change
2023-01-29 22:33 ulfvonbelow New Issue
2023-01-29 22:33 ulfvonbelow Tag Attached: memory-leak
2023-01-29 22:33 ulfvonbelow Tag Attached: patch
2023-01-29 22:33 ulfvonbelow File Added: 0001-TESTING-don-t-leak-barriers.patch
2023-02-06 06:11 schanzen Assigned To => t3sserakt
2023-02-06 06:11 schanzen Status new => assigned
2023-02-06 06:11 schanzen Target Version => 0.19.4
2023-02-07 17:44 t3sserakt Changeset attached => gnunet master fb61e1a7
2023-02-07 17:44 t3sserakt Note Added: 0019772
2023-02-07 17:44 t3sserakt Status assigned => resolved
2023-02-07 17:44 t3sserakt Resolution open => fixed
2023-06-01 20:26 schanzen Note Added: 0020214
2023-06-01 20:26 schanzen Status resolved => closed