mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-25 13:11:36 +00:00
fix(shmem): fill the result of Monitor::GetDebugInfo()
- The function reserved each result vector and then wrote to result[segment][handle], past the end of the vector: it returned empty vectors and corrupted the heap - Append one entry per buffer, in the order of the buffer offset - Check the debug map for null before its first use - Name the map entries (segment id, offset, buffer) instead of .first and .second - Enable Monitor.GetDebugInfo (needs FAIRMQ_DEBUG_MODE) - Update the documentation page that described the defect Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -100,11 +100,7 @@ TEST(Monitor, CleanupAfterNoCleanup)
|
||||
}
|
||||
|
||||
#ifdef FAIRMQ_DEBUG_MODE
|
||||
// Known defect: Monitor::GetDebugInfo() only reserves each result vector and
|
||||
// then writes to result[segment][handle], out of the bounds of the vector.
|
||||
// It returns empty vectors and corrupts the heap. It also dereferences the
|
||||
// debug map before its null check. Enable this test with the fix.
|
||||
TEST(Monitor, DISABLED_GetDebugInfo)
|
||||
TEST(Monitor, GetDebugInfo)
|
||||
{
|
||||
ProgOptions config;
|
||||
auto const session = ShmConfig(config, false);
|
||||
|
||||
Reference in New Issue
Block a user