[fpc-devel] FPC 2.2.2 on Linux/SPARC

Jonas Maebe jonas.maebe at elis.ugent.be
Thu Sep 4 23:46:34 CEST 2008


On 03 Sep 2008, at 22:23, Jonas Maebe wrote:

> Yes, you did. Thanks. The bug is indeed in fillchar in generic.inc:
>
>      { Align on native pointer size }
>      aligncount:=(PtrUInt(pdest) and (sizeof(PtrUInt)-1));
>      dec(count,aligncount);
>      pend:=pdest+aligncount;
>
> That make aligncount equal to the misalign count, rather than to the  
> number of bytes necessary to align the pointer. It should rather be  
> something like this:
>
>      pend:=align(pdest,sizeof(ptruint));
>      dec(count,pend-pdest);
>
> I'll look at it tomorrow.

I've committed a fix in 2.3.1. If all goes well in the testsuite run  
tonight, I'll merge it to 2.2.3 over the weekend. I don't know why  
this bug didn't cause crashes in the nightly tests I run on sparc/ 
solaris (I have gotten other alignment crashes on this machine in the  
past).


Jonas



More information about the fpc-devel mailing list