Am 24.09.2012 11:43, schrieb Jonas Maebe:
> 
> Mattias Gaertner wrote on Sun, 23 Sep 2012:
> 
>> Calling the method directly does not crash.
>> Comparing the property and the address gives true:
>>
>> writeln('This gives true=',OnGetIncludePath =
>> @CodeToolBoss.GetIncludePathForDirectory);
> 
> The result of such an expression is unpredictable on Linux/ppc64 and on
> AIX. The reason is that on those platforms, procedure variables are
> actually pointers to a descriptor (their ABI requires this). This
> descriptor is 3 pointer large and contains the address of the routine to
> be called, the value of the TOC pointer (r2) and the value of a nested
> frame pointer (r11; unused by FPC). It's possible to have an arbitrarily
> large number of different descriptors for the same routine in a program,
> although the linker will try to merge them as much as possible.

Do we consider procedure variables as opaque? In this case we could
compare the descriptor on ppc64.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to