[PATCH] D61268: [AddressSanitizer] [Windows] Fix HeapReAlloc and _recalloc bugs in asan_malloc_win.cc

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 13:01:28 PDT 2019


rnk added inline comments.


================
Comment at: compiler-rt/lib/asan/asan_malloc_win.cc:23
 typedef void *LPVOID;
+typedef unsigned char BYTE;
 
----------------
I don't think this is needed, you can use `u8 *` instead which is more common across the rest of the ASan runtime.


================
Comment at: compiler-rt/lib/asan/asan_malloc_win.cc:147
+    if (old_size < size)
+        REAL(memset)(((BYTE *)new_alloc) + old_size, 0, size - old_size);
+    free(p);
----------------
vitalybuka wrote:
> not formated?
Make sure this is just 2 space indentation.


Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61268/new/

https://reviews.llvm.org/D61268





More information about the llvm-commits mailing list