[Interest] Void pointers for Mac ARM

Turtle Creek Software support at turtlesoft.com
Mon Jun 19 13:13:51 CEST 2023


Alignment is definitely possible.  There was a similar problem earlier in
execution, and that had pointers to 2-byte aligned structs.
We just rewrote the ugly void* code rather than try to diagnose it
further.  The debugger showed the correct address but failed to cast a
parameter.

Can the ARM compiler handle #pragma pack (2) ?

Thanks,
Casey McDermott
TurtleSoft.com

On Mon, Jun 19, 2023 at 2:50 AM coroberti <coroberti at gmail.com> wrote:

> On Sat, Jun 17, 2023 at 8:12 PM Turtle Creek Software
> <support at turtlesoft.com> wrote:
> >
> > Our app contains some old C-ish C++ code from an early 90's database
> called NeoAccess. It often uses function pointers with void pointers as
> parameters.  Their code works OK for Mac & Windows, when built with the
> latest Qt5 on Intel.
> >
> > The code also builds OK with the latest Qt6, but running it on an M1 Mac
> gives run-time errors. Void pointers to structs and objects don't cast
> properly and stay null.  We haven't tried Qt6 on Windows yet but will do
> that soon.
> >
> > Any ideas on how to fix it?  We've abandoned NeoAccess for our new app
> but still need it to convert data from existing files.  Rewriting their
> code is a nightmare.
>
> Casey,
> Perhaps, checking the alignment of the void* pointers in question
> could provide you with some clues.
>
> Kind regards,
> Robert Iakobashvili
> ............................
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230619/fe130890/attachment.htm>


More information about the Interest mailing list