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

Unified Diff: runtime/vm/object.cc

Issue 2325863002: Fix some errors from UBSan. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | runtime/vm/weak_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 3af1f3694b089533b614c41d7eaa7a86be8b49a1..4ed0793fa99666770af0f9bd18773f57af2726bb 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -4554,7 +4554,7 @@ static uint32_t FinalizeHash(uint32_t hash, intptr_t hashbits) {
hash += hash << 3;
hash ^= hash >> 11; // Logical shift, unsigned hash.
hash += hash << 15;
- hash &= ((static_cast<intptr_t>(1) << hashbits) - 1);
+ hash &= ((static_cast<uintptr_t>(1) << hashbits) - 1);
return (hash == 0) ? 1 : hash;
}
« no previous file with comments | « no previous file | runtime/vm/weak_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698