HeapReAlloc should allow for 0 sized reallocations without freeing the memory block provided by the user.
_recalloc previously did not zero new memory after reallocation.
Differential D61268
[AddressSanitizer] [Windows] Fix HeapReAlloc and _recalloc bugs in asan_malloc_win.cc mcgov on Apr 29 2019, 10:19 AM. Authored by
Details
HeapReAlloc should allow for 0 sized reallocations without freeing the memory block provided by the user. _recalloc previously did not zero new memory after reallocation.
Diff Detail
Event TimelineComment Actions Let first land NFC reformatting part of this patch? Comment Actions Watch out for compiler-rt/lib/sanitizer_common/scripts/check_lint.sh, sometimes it disagrees with what clang-format does. It runs as part of check-sanitizer on Linux but not Windows. I have run into this accidentally numerous times. If you don't want to worry about that, consider using git-clang-format to avoid reformatting lines not affected by your patch. Functionality seems good, thanks! Comment Actions fix call to get_usable_size so that it is not called unless HEAP_ZERO_MEMORY is passed in (the only case when it is needed). |
not formated?