[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
Wed Mar 16 14:09:29 PDT 2022
ddcc created this revision.
ddcc added reviewers: vitalybuka, eugenis, cryptoad, mcgrathr, hctim.
Herald added a project: All.
ddcc requested review of this revision.
Herald added a project: Sanitizers.
Repository:
rG LLVM Github Monorepo
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
@@ -245,8 +245,11 @@
}
}
if (Found) {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wconditional-uninitialized"
*H = reinterpret_cast<LargeBlock::Header *>(
LargeBlock::addHeaderTag<Config>(HeaderPos));
+#pragma clang diagnostic pop
*Zeroed = Entry.Time == 0;
if (useMemoryTagging<Config>(Options))
setMemoryPermission(Entry.CommitBase, Entry.CommitSize, 0, &Entry.Data);
@@ -395,7 +398,10 @@
atomic_s32 ReleaseToOsIntervalMs = {};
CachedBlock Entries[Config::SecondaryCacheEntriesArraySize] = {};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wzero-length-array"
CachedBlock Quarantine[Config::SecondaryCacheQuarantineSize] = {};
+#pragma clang diagnostic pop
};
template <typename Config> class MapAllocator {
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.415977.patch
Type: text/x-patch
Size: 2444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/d5fa56e8/attachment.bin>
More information about the llvm-commits
mailing list