Skip to content

Commit c78af6f

Browse files
remove hack
1 parent 0b773f9 commit c78af6f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Python/jit.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,13 @@ patch_32r(unsigned char *location, uint64_t value)
216216
value -= (uintptr_t)location;
217217
// Check that we're not out of range of 32 signed bits:
218218
assert((int64_t)value >= -(1LL << 31));
219-
#if defined(__APPLE__) && defined(Py_DEBUG)
220-
// LLVM 20 on macOS debug builds: GOT entries may exceed ±2GB PC-relative
221-
// range. Truncation is safe as the target is a GOT trampoline.
219+
// assert((int64_t)value < (1LL << 31));
222220
if ((int64_t)value >= (1LL << 31)) {
223-
value = (uint32_t)value;
221+
__builtin_debugtrap();
224222
}
225-
#else
226-
assert((int64_t)value < (1LL << 31));
227-
#endif
223+
228224
*loc32 = (uint32_t)value;
225+
229226
}
230227

231228
// 64-bit absolute address.

0 commit comments

Comments
 (0)