Browse Source

Do allocate a new regset for top_regset for ARM compiler to avoid heap memory corruption

(cherry picked from commit 1e5240b5a46973da0da4b1e8bf8bb277240bdf09)
Pierre Muller 1 năm trước cách đây
mục cha
commit
3326d095df
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      compiler/aasmtai.pas

+ 5 - 0
compiler/aasmtai.pas

@@ -2893,6 +2893,11 @@ implementation
                   p.oper[i]^.ref^:=oper[i]^.ref^;
                 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);