[fpc-pascal] Stack alignmennt in call from C++ to FPC
Josue Andrade Gomes
josuegomes at gmail.com
Wed Jun 12 23:42:16 CEST 2013
Initializing the thread system with a dummy thread as suggested by
http://wiki.freepascal.org/Multithreaded_Application_Tutorial has
(apparently) fixed the problem.
Thanks all for the support.
--
Josue Andrade Gomes
On Fri, Jun 7, 2013 at 10:03 AM, Josue Andrade Gomes
<josuegomes at gmail.com> wrote:
> On Thu, Jun 6, 2013 at 11:09 AM, Josue Andrade Gomes
> <josuegomes at gmail.com> wrote:
>
> I reproduced the problem with a small Lazarus application. The crash
> occurs inside fpc_popaddrstack.
>
> 0x40b750 <fpc_popaddrstack+48> jmp 0x40b759 <fpc_popaddrstack+5
> 0x40b752 <fpc_popaddrstack+50> mov (%ebx),%eax
>> 0x40b754 <fpc_popaddrstack+52> mov 0x4(%eax),%eax
> 0x40b757 <fpc_popaddrstack+55> mov %eax,(%ebx)
> 0x40b759 <fpc_popaddrstack+57> mov (%esp),%ebx
> 0x40b75c <fpc_popaddrstack+60> add $0x4,%esp
> 0x40b75f <fpc_popaddrstack+63> ret
>
> I also found this http://comments.gmane.org/gmane.comp.ide.lazarus.general/68243
>
> Could be related? Any ideas?
>
> Sourcecode for my tests can be found at: www.josuegomes.com/fp-msvc.zip
>
> regards,
> josue
More information about the fpc-pascal
mailing list