diff --git a/compiler-rt/lib/scudo/standalone/memtag.h b/compiler-rt/lib/scudo/standalone/memtag.h --- a/compiler-rt/lib/scudo/standalone/memtag.h +++ b/compiler-rt/lib/scudo/standalone/memtag.h @@ -41,6 +41,8 @@ inline constexpr bool archSupportsMemoryTagging() { return false; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmissing-noreturn" inline uptr archMemoryTagGranuleSize() { UNREACHABLE("memory tagging not supported"); } @@ -54,6 +56,7 @@ (void)Ptr; UNREACHABLE("memory tagging not supported"); } +#pragma clang diagnostic pop #endif @@ -109,6 +112,8 @@ inline bool systemSupportsMemoryTagging() { return false; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmissing-noreturn" inline bool systemDetectsMemoryTagFaultsTestOnly() { UNREACHABLE("memory tagging not supported"); } @@ -116,6 +121,7 @@ inline void enableSystemMemoryTaggingTestOnly() { UNREACHABLE("memory tagging not supported"); } +#pragma clang diagnostic pop #endif // SCUDO_LINUX @@ -255,6 +261,8 @@ #else +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmissing-noreturn" inline bool systemSupportsMemoryTagging() { UNREACHABLE("memory tagging not supported"); } @@ -298,6 +306,7 @@ (void)Ptr; UNREACHABLE("memory tagging not supported"); } +#pragma clang diagnostic pop #endif diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h --- a/compiler-rt/lib/scudo/standalone/secondary.h +++ b/compiler-rt/lib/scudo/standalone/secondary.h @@ -219,7 +219,7 @@ const u32 MaxCount = atomic_load_relaxed(&MaxEntriesCount); bool Found = false; CachedBlock Entry; - uptr HeaderPos; + uptr HeaderPos = 0; { ScopedLock L(Mutex); if (EntriesCount == 0)