From 825a8c2ae7b91d50bc54dedf7ef03f8a89850bfa Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 19 May 2026 08:58:00 -0700 Subject: [PATCH] client: RequestFL lock during dtor pacify valgrind over what is likely a false positive --- src/clientimpl.h | 1 + src/clientmon.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/clientimpl.h b/src/clientimpl.h index 4e4eb51..b15fff9 100644 --- a/src/clientimpl.h +++ b/src/clientimpl.h @@ -69,6 +69,7 @@ struct RequestFL { std::vector unused; explicit RequestFL(size_t limit) :limit(limit) {} + ~RequestFL(); }; struct RequestInfo { diff --git a/src/clientmon.cpp b/src/clientmon.cpp index f80ebd8..288f1ec 100644 --- a/src/clientmon.cpp +++ b/src/clientmon.cpp @@ -21,6 +21,12 @@ typedef epicsGuard Guard; DEFINE_LOGGER(monevt, "pvxs.client.monitor"); DEFINE_LOGGER(io, "pvxs.client.io"); +RequestFL::~RequestFL() +{ + Guard G(lock); + unused.clear(); // pacify valgrind with free() under lock +} + namespace { struct Entry { Value val;