Skip to content

Commit e7ffea7

Browse files
authored
Merge pull request #30927 from compnerd/undefined-is-the-only-desired-behaviour
runtime: fix a UBSAN issue
2 parents ddef929 + c8e8b17 commit e7ffea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/runtime/MetadataCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class MetadataCacheKey {
471471

472472
private:
473473
uint32_t computeHash() const {
474-
size_t H = 0x56ba80d1 * NumKeyParameters;
474+
size_t H = 0x56ba80d1u * NumKeyParameters;
475475
for (unsigned index = 0; index != NumKeyParameters; ++index) {
476476
H = (H >> 10) | (H << ((sizeof(size_t) * 8) - 10));
477477
H ^= (reinterpret_cast<size_t>(Data[index])

0 commit comments

Comments
 (0)