Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: syzygy/agent/asan/runtime.cc

Issue 2363733003: Make syzyasan_rtl compile in 64 bit (Closed)
Patch Set: Nits. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « syzygy/agent/asan/runtime.h ('k') | syzygy/agent/asan/shadow_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/agent/asan/runtime.cc
diff --git a/syzygy/agent/asan/runtime.cc b/syzygy/agent/asan/runtime.cc
index bf1e217ed5e84da04d4e783c8137893da9d9f376..a29be0b1adc29257cb025388d4130977f597d314 100644
--- a/syzygy/agent/asan/runtime.cc
+++ b/syzygy/agent/asan/runtime.cc
@@ -1023,7 +1023,8 @@ void AsanRuntime::GetBadAccessInformation(AsanErrorInfo* error_info) {
// Checks if this is an access to an internal structure or if it's an access
// in the upper region of the memory (over the 2 GB limit).
- if ((reinterpret_cast<size_t>(error_info->location) & (1 << 31)) != 0 ||
+ if ((reinterpret_cast<size_t>(error_info->location) >=
+ shadow()->memory_size()) ||
shadow()->GetShadowMarkerForAddress(error_info->location) ==
kAsanMemoryMarker) {
error_info->error_type = WILD_ACCESS;
@@ -1051,7 +1052,7 @@ void AsanRuntime::AddThreadId(uint32_t thread_id) {
bool AsanRuntime::ThreadIdIsValid(uint32_t thread_id) {
base::AutoLock lock(thread_ids_lock_);
- return thread_ids_.count(thread_id) > 0;
+ return thread_ids_.find(thread_id) != thread_ids_.end();
}
bool AsanRuntime::HeapIdIsValid(HeapManagerInterface::HeapId heap_id) {
« no previous file with comments | « syzygy/agent/asan/runtime.h ('k') | syzygy/agent/asan/shadow_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698