From 7704fe9319a6e7b251022149216d04993b4f94a9 Mon Sep 17 00:00:00 2001 From: Benito van der Zander Date: Tue, 7 Jun 2022 19:44:31 +0000 Subject: [PATCH] fix stack trace crash, see #39492 --- rtl/aarch64/aarch64.inc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rtl/aarch64/aarch64.inc b/rtl/aarch64/aarch64.inc index 378892968e..3ddadbf9e8 100644 --- a/rtl/aarch64/aarch64.inc +++ b/rtl/aarch64/aarch64.inc @@ -165,10 +165,7 @@ procedure fpc_cpuinit; function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;assembler; nostackframe; asm cbz x0, .Lcaller_addr_invalid - ldur x0, [x0] -{$ifndef cpullvm} - cbz x0, .Lcaller_addr_invalid -{$else cpullvm} +{$ifdef cpullvm} movn w1, #0 cmp x0, x1 csel x0, xzr, x0, ls @@ -178,7 +175,6 @@ function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;assembler; no .Lcaller_addr_invalid: end; - {$define FPC_SYSTEM_HAS_GET_CALLER_FRAME} function get_caller_frame(framebp:pointer;addr:pointer=nil):pointer;assembler; nostackframe; asm