[fpc-pascal] crash in lazbuild only on powerpc 64bit

Florian Klämpfl florian at freepascal.org
Mon Sep 24 20:31:54 CEST 2012


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.




More information about the fpc-pascal mailing list