From 1e5240b5a46973da0da4b1e8bf8bb277240bdf09 Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Thu, 2 May 2024 13:52:04 +0000 Subject: [PATCH] Do allocate a new regset for top_regset for ARM compiler to avoid heap memory corruption --- compiler/aasmtai.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas index af2a4aeed6..ed77040674 100644 --- a/compiler/aasmtai.pas +++ b/compiler/aasmtai.pas @@ -3159,6 +3159,11 @@ implementation {$endif jvm} end; {$ifdef ARM} + top_regset: + begin + new(p.oper[i]^.regset); + p.oper[i]^.regset^:=oper[i]^.regset^; + end; top_shifterop: begin new(p.oper[i]^.shifterop);