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

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Sep 24 22:01:07 CEST 2012

On 24 Sep 2012, at 20:31, Florian Klämpfl wrote:

> Am 24.09.2012 11:43, schrieb Jonas Maebe:
>> Mattias Gaertner wrote on Sun, 23 Sep 2012:
>>> 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.

You mean the code pointers stored inside the descriptor? That would introduce other inconsistencies, like making "pointer(procvar1)<>pointer(procvar2)" give a potentially different result from "procvar1<>procvar2". gcc also behaves the same as we do right now. I'm wary of inventing our own conventions in this regard.


More information about the fpc-pascal mailing list