2
0
Эх сурвалжийг харах

r47711 | pierre | 2020-12-07 16:35:46 +0000 (Mon, 07 Dec 2020) | 9 lines

    * Initialize result out parameter by caling the constructor Init, not the method Reset.
      This out parameter called 'result' is of type tcgpara, which is an object, but not a class,
      it has no virtual method, which means that the VMT is never used, and thus the
      fact that the object is not 'constructed' can be easily missed.
      Nevertheless, it could generate problems as the different fields have unassigned
      and thus random value, while reset method can dereference location field
      if not nil.
      Issue found by using -gttt compiler option.

------------------------------------------------------------------------
--- Merging r47711 into '.':
U    compiler/aarch64/cpupara.pas
--- Recording mergeinfo for merge of r47711 into '.':
 U   .

git-svn-id: branches/fixes_3_2@47723 -
pierre 4 жил өмнө
parent
commit
23eb698f81

+ 1 - 1
compiler/aarch64/cpupara.pas

@@ -419,7 +419,7 @@ unit cpupara;
         paracgsize, locsize: tcgsize;
         firstparaloc: boolean;
       begin
-        result.reset;
+        result.init;
 
         { currently only support C-style array of const,
           there should be no location assigned to the vararg array itself }