Commit 46ef520
committed
Mark buffers as defined to Valgrind consistently.
Make PinBuffer() mark buffers as defined to Valgrind unconditionally,
including when the buffer header spinlock must be acquired. Failure to
handle that case could lead to false positive reports from Valgrind.
This theoretically creates a risk that we'll mark buffers defined even
when external callers don't end up with a buffer pin. That seems
perfectly acceptable, though, since in general we make no guarantees
about buffers that are unsafe to access being reliably marked as unsafe.
Oversight in commit 1e0dfd1, which added valgrind buffer access
instrumentation.1 parent 72eab84 commit 46ef520
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1636 | 1636 | | |
1637 | 1637 | | |
1638 | 1638 | | |
1639 | | - | |
1640 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
1641 | 1644 | | |
1642 | | - | |
1643 | | - | |
| 1645 | + | |
1644 | 1646 | | |
1645 | 1647 | | |
1646 | 1648 | | |
| |||
0 commit comments