Skip to contentSkip to conversation

latmus: avoid segmentation fault on cleanup when test_ulat is

PATCH Applied Giulio Moro 2 participants 2 messages Oct 9, 2025 – Oct 11, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 latmus: avoid segmentation fault on cleanup when test_ulat is

From 98a8b8808cfc34e20684b4298f554f353eb1468a Mon Sep 17 00:00:00 2001
From: Giulio Moro <[email protected]>
Date: Wed, 8 Oct 2025 17:41:03 +0000
Subject: [PATCH] latmus: avoid segmentation fault on cleanup when test_ulat is
not set

test case: latmus --sirq -P 90 -T 1s

---
 latmus/timer.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
latmus/timer.c +4 -2
index e496d0f..ce44ffe 100644
@@ -159,8 +159,10 @@ void run_timer_test(size_t histogram_cells)
 	sigwait(&sigmask, &sig);
 	pthread_cancel(sitter);
 	pthread_join(sitter, NULL);
-	pthread_cancel(responder);
-	pthread_join(responder, NULL);
+	if (test_ulat) {
+		pthread_cancel(responder);
+		pthread_join(responder, NULL);
+	}
 	pthread_cancel(logger);
 	pthread_join(logger, NULL);
 

--
2.39.5

#1 lore raw
Quoted 19 lines · Giulio Moro

From 98a8b8808cfc34e20684b4298f554f353eb1468a Mon Sep 17 00:00:00 2001
From: Giulio Moro <[email protected]>
Date: Wed, 8 Oct 2025 17:41:03 +0000
Subject: [PATCH] latmus: avoid segmentation fault on cleanup when test_ulat is
not set

test case: latmus --sirq -P 90 -T 1s

---
 latmus/timer.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
latmus/timer.c +0 -0
index e496d0f..ce44ffe 100644
@@ -159,8 +159,10 @@ void run_timer_test(size_t histogram_cells)
 	sigwait(&sigmask, &sig);

latmus/timer.c void run_timer_test(size_t histogram_cells) · line 167

Quoted 10 lines
latmus/timer.c +4 -2
 	pthread_cancel(sitter);
 	pthread_join(sitter, NULL);
-	pthread_cancel(responder);
-	pthread_join(responder, NULL);
+	if (test_ulat) {
+		pthread_cancel(responder);
+		pthread_join(responder, NULL);
+	}
 	pthread_cancel(logger);
 	pthread_join(logger, NULL);

Merged, thanks (short log slightly amended for brevity).

Signature · 1 line
Philippe.