-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: improve use-after-free test coverage for compactions
To increase confidence that use-after-free bugs are not present on compaction codepaths, use the `invalidatingIter` wrapper to mutate the previous key and value during iteration. Alter the `invalidatingIter` to avoid zeroing range deletion key / value pairs, which aligns with the current assumption `(*compactionIter).Next()`. Add an in-line comment to point out that storage of a reference to the previous key / value pairs is safe for range deletion keys during compaction iteration. Enable some previously dead code to mutate released byte slices. This allows for easier detection of use-after-free-type bugs.
- Loading branch information
Showing
5 changed files
with
94 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters