Index: util/win/process_info.cc |
diff --git a/util/win/process_info.cc b/util/win/process_info.cc |
index a0364cb59b6e58d3a8fcff89625eb1ac72837318..d34a34b3741c7b379f7eea1e9d644830a1caf400 100644 |
--- a/util/win/process_info.cc |
+++ b/util/win/process_info.cc |
@@ -107,11 +107,10 @@ bool ReadStruct(HANDLE process, WinVMAddress at, T* into) { |
return true; |
} |
-bool RegionIsInaccessible(const ProcessInfo::MemoryInfo& memory_info) { |
- return memory_info.state == MEM_FREE || |
- (memory_info.state == MEM_COMMIT && |
- ((memory_info.protect & PAGE_NOACCESS) || |
- (memory_info.protect & PAGE_GUARD))); |
+bool RegionIsAccessible(const ProcessInfo::MemoryInfo& memory_info) { |
+ return (memory_info.state == MEM_COMMIT && |
+ ((memory_info.protect & PAGE_NOACCESS) == 0 || |
+ (memory_info.protect & PAGE_GUARD) == 0)); |
Mark Mentovai
2015/10/01 20:51:09
(Re your comment yesterday about PAGE_EXECUTE bein
scottmg
2015/10/01 21:30:20
Aha, make sense.
|
} |
} // namespace |
@@ -468,7 +467,7 @@ std::vector<CheckedRange<WinVMAddress, WinVMSize>> GetReadableRangesOfMemoryMap( |
overlapping.erase(std::remove_if(overlapping.begin(), |
overlapping.end(), |
[](const ProcessInfo::MemoryInfo& mi) { |
- return RegionIsInaccessible(mi); |
+ return !RegionIsAccessible(mi); |
}), |
overlapping.end()); |
if (overlapping.empty()) |