[PATCH] D43318: [asan] Be more careful and verbose when allocating dynamic shadow memory

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 23 17:32:18 PST 2018


kubamracek added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_mac.cc:901
   if (largest_gap_found) *largest_gap_found = 0;
+  if (max_vm_address) *max_vm_address = 0;
   while (kr == KERN_SUCCESS) {
----------------
kubamracek wrote:
> george.karpenkov wrote:
> > Is this assignment necessary? Maximum size is zero unless set otherwise?
> I'd rather not leave garbage in `max_vm_address` if for some reason the loop below doesn't find any regions at all.
I mean, I don't want the semantics of this (or any) function to only partially (on some paths) initialize pointer-passed values...


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43318





More information about the llvm-commits mailing list