-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use unique_ptr in PartialData in incr test helpers
- Loading branch information
Showing
1 changed file
with
16 additions
and
13 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 is just a comment.] When the test runs under ASan, it is not necessary to make the new pointer different from the old pointer. When I studied this bug, I found that erasing/corrupting the old buffer before freeing it (which you do at lines 150-152) helps catch use-after-free errors without ASan, but the code needs to actually use the values in the buffer. What you do here should also help in the non-ASan case.