[fpc-devel] Printing to PDF on Mac crashes due to unaligned MOVDQA
jonas.maebe at elis.ugent.be
Sat Jun 20 11:57:45 CEST 2015
On 19/06/15 18:22, Martin Grajcar wrote:
> My trivial Lazarus 1.4 application crashes whenever it prints a TBitMap
> on MAC. In _platform_memmove$VARIANT$sse4 it tries to execute MOVDQA
> (Move Aligned Double Quadword) with an unaligned address.
> I'd call it a bug as fpc uses unaligned addresses while the system(?)
> library does not.
memmove is a system library function, and is responsible for aligning
memory addresses if it uses movdqa on them. The problem is most likely
not that it is loading from an unaligned address, but from an invalid
address (which will presumably be aligned, as the logic in that routine
will align addresses before trying to access them with movdqa).
I need to fix it somehow... and know just a little
> about OSX.
The problem is unrelated to OS X. It's a bug either in your program or
in the LCL, that just coincidentally happens to manifest itself inside
that system routine.
More information about the fpc-devel