[PATCH] D121853: [scudo][NFC] Suppress warnings for missing-noreturn, conditional-uninitialized, zero-length-array
Dominic Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 25 16:43:44 PDT 2022
ddcc updated this revision to Diff 418358.
ddcc added a comment.
Initialize HeaderPos, drop Quarantine changes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121853/new/
https://reviews.llvm.org/D121853
Files:
compiler-rt/lib/scudo/standalone/memtag.h
compiler-rt/lib/scudo/standalone/secondary.h
Index: compiler-rt/lib/scudo/standalone/secondary.h
===================================================================
--- compiler-rt/lib/scudo/standalone/secondary.h
+++ 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)
Index: compiler-rt/lib/scudo/standalone/memtag.h
===================================================================
--- compiler-rt/lib/scudo/standalone/memtag.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121853.418358.patch
Type: text/x-patch
Size: 1862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220325/f0e661b1/attachment.bin>
More information about the llvm-commits
mailing list