Browse Source

Fixed access to freed memory in ShiftShiftShift2ShiftShift 1a on ARM

ShiftShiftShift2ShiftShift tried to access a wrong and already freed
instruction the find out whatever a shift will result in a 0 result.

For some reason this only resulted in a bug on x86_64 linux host
crosscompiler builds.

git-svn-id: trunk@23624 -
masta 12 years ago
parent
commit
96ed4e7932
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/arm/aoptcpu.pas

+ 1 - 1
compiler/arm/aoptcpu.pas

@@ -809,7 +809,7 @@ Implementation
                                         hp1.free;
                                         hp1.free;
                                         hp2.free;
                                         hp2.free;
 
 
-                                        if taicpu(hp1).oper[2]^.shifterop^.shiftimm>=32 then
+                                        if taicpu(p).oper[2]^.shifterop^.shiftimm>=32 then
                                           begin
                                           begin
                                             taicpu(p).freeop(1);
                                             taicpu(p).freeop(1);
                                             taicpu(p).freeop(2);
                                             taicpu(p).freeop(2);