[PATCH] Memory protection in sanitizer_procmaps.h

Alexander Potapenko glider at google.com
Thu Feb 28 01:26:24 PST 2013


  LGTM with two nits.


================
Comment at: lib/sanitizer_common/sanitizer_procmaps.h:73
@@ -65,2 +72,3 @@
     uptr start, end, file_offset;
-    for (int i = 0; Next(&start, &end, &file_offset, filename, filename_size);
+    for (int i = 0; Next(&start, &end, &file_offset, filename, filename_size,
+                         protection);
----------------
Won't a while-loop fit better here?

================
Comment at: lib/msan/msan.cc:76
@@ -75,3 +75,3 @@
   while (proc_maps.Next(/* start */0, /* end */0, /* file_offset */0,
-                        filename, kBufSize)) {
+                        filename, kBufSize, /* protection */0)) {
     if (internal_strstr(filename, "libdynamorio") != 0) {
----------------
I think it's fine to omit the spaces around the variable names like it's done in other files below.


http://llvm-reviews.chandlerc.com/D470



More information about the llvm-commits mailing list