[Lazarus] EXC_BAD_ACCESS, Could not access memory

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Apr 27 19:26:09 CEST 2009


On Mon, 27 Apr 2009 17:27:30 +0200
Roland Turcan <konf at rotursoft.sk> wrote:

> Hello Dmitry,
> 
> Thanks for your reply, but I think, that you haven't understood me
> what I am trying to explain.
> 
> I have binary contents which are copied from memory using by an
> application which is written in Delphi. I am porting an application to
> MacOS X 10.5, but I need to use the same structures as I have in
> Delphi and Kylix where "NOT PACKED" records are aligned.
> 
> The fact is, that FPC compiler on intel based Mac OS X builds up
> application which contains records "packed" by 4 bytes by default.

Use packed records and add gap variables.

 
> I need to get the same behavior in intel based mac os x as I have in
> other platforms.
> 
> What should I do to build FPC compiler which will behave the same on
> all platforms.

This won't work. The other sources and libs expect another alignment.
FPC uses the various alignments for good reason.


Mattias



More information about the Lazarus mailing list