Skip to content

Commit 1159223

Browse files
authored
Merge pull request #21038 from sarveshtamba/master
Change 'isValidPointerForNativeRetain' check for PowerPC(ppc64le)
2 parents 4017416 + 7dbda78 commit 1159223

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/runtime/HeapObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ using namespace swift;
6161
/// Returns true if the pointer passed to a native retain or release is valid.
6262
/// If false, the operation should immediately return.
6363
static inline bool isValidPointerForNativeRetain(const void *p) {
64-
#if defined(__x86_64__) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) || defined(__s390x__)
64+
#if defined(__x86_64__) || defined(__arm64__) || defined(__aarch64__) || defined(_M_ARM64) || defined(__s390x__) || (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__))
6565
// On these platforms, except s390x, the upper half of address space is reserved for the
6666
// kernel, so we can assume that pointer values in this range are invalid.
6767
// On s390x it is theoretically possible to have high bit set but in practice

0 commit comments

Comments
 (0)