summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Chen <ddchen@apple.com>2022-04-19 01:38:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-19 01:38:08 +0000
commit1a94ad0a512c3cbf6bd6b132ed1993422eb082d6 (patch)
tree05aae419125bd7a0f175838d1eb528230aea3fea
parent5fa0609bcfe79c66f5166d1f2e417fbf4a540572 (diff)
parentc44a9e165650a9b51a87572efee85061ea9967e2 (diff)
downloadscudo-1a94ad0a512c3cbf6bd6b132ed1993422eb082d6.tar.gz
Revert "[scudo] Wrap clang pragma to avoid GCC error" am: 99755b0ed5 am: 6efe5e781c am: 94369c99a5 am: c44a9e1656
Original change: https://android-review.googlesource.com/c/platform/external/scudo/+/2066955 Change-Id: If1e2a9aed0ced67903663ad4ecbd4b9bf1fd3d4e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--standalone/memtag.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/standalone/memtag.h b/standalone/memtag.h
index 966bf6b9ee2..df346bce1bd 100644
--- a/standalone/memtag.h
+++ b/standalone/memtag.h
@@ -41,16 +41,16 @@ inline uint8_t extractTag(uptr Ptr) { return (Ptr >> 56) & 0xf; }
inline constexpr bool archSupportsMemoryTagging() { return false; }
-inline NORETURN uptr archMemoryTagGranuleSize() {
+inline uptr archMemoryTagGranuleSize() {
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN uptr untagPointer(uptr Ptr) {
+inline uptr untagPointer(uptr Ptr) {
(void)Ptr;
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN uint8_t extractTag(uptr Ptr) {
+inline uint8_t extractTag(uptr Ptr) {
(void)Ptr;
UNREACHABLE("memory tagging not supported");
}
@@ -109,11 +109,11 @@ inline void enableSystemMemoryTaggingTestOnly() {
inline bool systemSupportsMemoryTagging() { return false; }
-inline NORETURN bool systemDetectsMemoryTagFaultsTestOnly() {
+inline bool systemDetectsMemoryTagFaultsTestOnly() {
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN void enableSystemMemoryTaggingTestOnly() {
+inline void enableSystemMemoryTaggingTestOnly() {
UNREACHABLE("memory tagging not supported");
}
@@ -255,15 +255,15 @@ inline uptr loadTag(uptr Ptr) {
#else
-inline NORETURN bool systemSupportsMemoryTagging() {
+inline bool systemSupportsMemoryTagging() {
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN bool systemDetectsMemoryTagFaultsTestOnly() {
+inline bool systemDetectsMemoryTagFaultsTestOnly() {
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN void enableSystemMemoryTaggingTestOnly() {
+inline void enableSystemMemoryTaggingTestOnly() {
UNREACHABLE("memory tagging not supported");
}
@@ -271,46 +271,41 @@ struct ScopedDisableMemoryTagChecks {
ScopedDisableMemoryTagChecks() {}
};
-inline NORETURN uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) {
+inline uptr selectRandomTag(uptr Ptr, uptr ExcludeMask) {
(void)Ptr;
(void)ExcludeMask;
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN uptr addFixedTag(uptr Ptr, uptr Tag) {
+inline uptr addFixedTag(uptr Ptr, uptr Tag) {
(void)Ptr;
(void)Tag;
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN uptr storeTags(uptr Begin, uptr End) {
+inline uptr storeTags(uptr Begin, uptr End) {
(void)Begin;
(void)End;
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN void storeTag(uptr Ptr) {
+inline void storeTag(uptr Ptr) {
(void)Ptr;
UNREACHABLE("memory tagging not supported");
}
-inline NORETURN uptr loadTag(uptr Ptr) {
+inline uptr loadTag(uptr Ptr) {
(void)Ptr;
UNREACHABLE("memory tagging not supported");
}
#endif
-#if __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wmissing-noreturn"
inline void setRandomTag(void *Ptr, uptr Size, uptr ExcludeMask,
uptr *TaggedBegin, uptr *TaggedEnd) {
*TaggedBegin = selectRandomTag(reinterpret_cast<uptr>(Ptr), ExcludeMask);
*TaggedEnd = storeTags(*TaggedBegin, *TaggedBegin + Size);
}
-#pragma clang diagnostic pop
-#endif
inline void *untagPointer(void *Ptr) {
return reinterpret_cast<void *>(untagPointer(reinterpret_cast<uptr>(Ptr)));