From 6c96437bc55363537d995f00a5a4abaa0051b055 Mon Sep 17 00:00:00 2001 From: Leonardo Carreras Date: Tue, 14 Jul 2026 16:14:54 +0200 Subject: [PATCH] node shmem: reset Sample::signals before shared-memory write Signed-off-by: Leonardo Carreras --- lib/shmem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/shmem.cpp b/lib/shmem.cpp index 19c0e871a..1e32b3ced 100644 --- a/lib/shmem.cpp +++ b/lib/shmem.cpp @@ -194,6 +194,10 @@ int villas::node::shmem_int_write(struct ShmemInterface *shm, atomic_fetch_add(&shm->writers, 1); + // Signals is a heap shared_ptr; a reader in another process can't deref it. + for (unsigned i = 0; i < cnt; i++) + const_cast(smps[i])->signals.reset(); + ret = queue_signalled_push_many(&shm->write.shared->queue, (void **)smps, cnt);