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

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Sep 24 11:43:32 CEST 2012


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.

That may also be related to main problem in your code, although the  
fact that the descriptors match suggests that it isn't.


Jonas



More information about the fpc-pascal mailing list