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

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Sep 23 17:29:23 CEST 2012


I was not able to reproduce the crash in a simple program. So I'm
asking for help to create a good bug report.

The crash happens in lazbuild only on powerpc 64bit Linux with fpc
2.6.0 and fpc 2.7.1. It works on Linux 32+64bit intel+amd and powerpc
32bit OS X with any fpc.

The crashing line looks pretty common:


OnGetIncludePath is a property:

TOnGetIncludePath = function(const Directory: string; UseCache: boolean): string of object;
property OnGetIncludePath: TOnGetIncludePath read fOnGetIncludePath write fOnGetIncludePath;

Calling the method directly does not crash.
Comparing the property and the address gives true:

writeln('This gives true=',OnGetIncludePath = @CodeToolBoss.GetIncludePathForDirectory);

Here is the assembler of the line

# [1514] IncludePath:=OnGetIncludePath(FullDir,false);
        ld      r3,152(r1)
        ld      r3,184(r3)
        ld      r5,184(r1)
        addi    r4,r1,200
        li      r6,0
        ld      r7,152(r1)
        ld      r30,176(r7)
        ld      r31,0(r30)
        std     r2,40(r1)
        mtctr   r31
        ld      r2,8(r30)
        ld      r11,16(r30)
        ld      r2,40(r1)

And here is the assembler of the working call:

# [1512] IncludePath:=CodeToolBoss.GetIncludePathForDirectory(FullDir);
        ld      r5,184(r1)
        addi    r4,r1,200
        lis     r3,(U_CODETOOLMANAGER_CODETOOLBOSS)@highesta
        ori     r3,r3,(U_CODETOOLMANAGER_CODETOOLBOSS)@highera
        sldi    r3,r3,32
        oris    r3,r3,(U_CODETOOLMANAGER_CODETOOLBOSS)@ha
        ld      r3,(U_CODETOOLMANAGER_CODETOOLBOSS)@l(r3)
        li      r6,1


More information about the fpc-pascal mailing list