0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-11 23:00:52 +00:00
termux-packages/packages/openjdk-21/0024-Fix-StackOverflowError-on-ARM.patch
eval Nya 940a37f5f0 addpkg(main/openjdk-21): 21.0.3-ga
cherry-pick all patches, apply them on upstream JDK, and adapted for
newer $UPDATE version

fix: type redefinition introduced in 21.0.2
2024-10-17 14:02:06 +02:00

32 lines
898 B
Diff

From 5e010b218d6e4e8750aefef98222665fca3e5b5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BA=AF=E6=B4=84?= <1840686745@qq.com>
Date: Thu, 26 Aug 2021 03:53:25 +0800
Subject: [PATCH 24/37] Fix StackOverflowError on ARM
---
src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
index ee7d1bbad..42e7791ed 100644
--- a/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
+++ b/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
@@ -92,8 +92,14 @@ enum {
#endif
address os::current_stack_pointer() {
+#if defined(__clang__) || defined(__llvm__)
+ void *sp;
+ __asm__("mov %0, " SPELL_REG_SP : "=r"(sp));
+ return (address) sp;
+#else
register address sp __asm__ (SPELL_REG_SP);
return sp;
+#endif
}
char* os::non_memory_address_word() {
--
2.45.2