Explorar o código

* fix padding on 64 bit big endian CPUs in TInterfaceEntry: wrong offset of a member caused memory corruption and then access violations during object creation. Fixes timplements* tests.

git-svn-id: trunk@11031 -
tom_at_work %!s(int64=17) %!d(string=hai) anos
pai
achega
94ead30261
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      rtl/inc/objpash.inc

+ 4 - 0
rtl/inc/objpash.inc

@@ -125,7 +125,11 @@
          IOffset     : ptruint;
          IIDStr      : pshortstring; { never nil. Com: upper(GuidToString(IID^)) }
          case boolean of
+{$ifdef ENDIAN_BIG}
+           true      : ({$IFDEF CPU64}__pad: longint;{$ENDIF}IType : tinterfaceentrytype);
+{$else ENDIAN_BIG}
            true      : (IType       : tinterfaceentrytype);
+{$endif ENDIAN_BIG}
            false     : (__pad_dummy : pointer);
        end;