Using the Valgrind Framework to Build a Persistent Memory Error Detector
summary
Built on Valgrind, Pmemcheck instruments binaries to detect persistent memory mistakes like missing cacheline flushes, double or unnecessary flushes, stores performed outside declared transactions, and leftover or conflicting transactions. It modifies Valgrind core to distinguish CLWB/CLFLUSH ordering and fence semantics, implements per-byte state tracking rather than cache-line granularity, and accepts client macros for region/transaction registration. It can record store/flush logging and replay permutations at fences for crash simulation and uses transaction snapshot checks to flag unsafe updates. Functionally effective but incurs significant runtime overhead and some post‑processing features remain prototype.
AI-written summary · about
chapters (28)
- 0:00Introduction
- 1:17Persistent Memory Programming Model
- 4:18Phase Safety
- 8:37Atomicity
- 11:08Story
- 12:52Requirements
- 16:40New tool
- 17:55Binary instrumentation framework
- 18:55Twoyear tool
- 19:55Request mechanism
- 21:55Implementation
- 22:55Pros Cons
- 25:00What is MemCheck
- 26:21What is MemCheck not
- 29:50Implementation of MemCheck
- 31:46CRM Macros
- 34:51State Machine
- 37:38In Practice
- 42:45Simple Example
- 44:12Another Problem
- 45:02Example
- 45:17Transaction Nesting
- 45:56Transaction IDs
- 46:49Logging
- 49:51Testing
- 50:12repos
- 51:04future work
- 53:24questions
related talks
48mProfiling data structures
01h 29mModern Linux C++ Debugging Tools - Under the Covers
15mMemoryTrap: Booby Trapping Memory to Counter Memory Disclosure Attacks with...
52mFantastic C++ Bugs and How to Test Them
15mMLEE: Effective Detection of Memory Leaks on Early-Exit Paths in OS Kernels
25mDebugging memory issues with Valgrind and GDB
45mPerf tools updates and beyond
15mFoundations of Empirical Memory Consistency Testing
