Alexander, Its the calling line that is messing up. TLapeImportedFunc(Ptr)(@Stack[StackPos - ParamSize], Res);
* Res has a value before executing that line. However, the called method receives the 2nd param as null. Or is it in the definition: TLapeImportedFunc = procedure(const Params: PParamArray; const Result: Pointer); {$IFDEF Using_CDECL}cdecl;{$ENDIF} <-- CDECL is enabled. So, is a CDECL thing? A compile switch I need to enable/disable? Remove "const" everywhere? ... it has taken me 6 months to slow down and say, WTF. I can run everywhere but Windows. :-( On Sat, Sep 28, 2019 at 3:16 PM Alexander Grotewohl <a...@dcclost.com> wrote: > don't know off the top of my head but does the ord() bit segfault without > assigning it to anything? like if the function only had writleln(ord())! or > does the result:= section segfault using ord() without the pointers? > > my guess is it works on linux/mac purely by luck. but i could be wrong. > > -- > Alexander Grotewohl > http://dcclost.com > > On Sep 28, 2019 3:21 PM, Ozz Nixon <ozzni...@gmail.com> wrote: > > [image: image.png] > > When I evaluate the code - it is perfect. However, when I run the code, it > raises a SIGSEGV - Segmentation fault. Yet, the code runs perfectly on > Linux 64bit machine, and Mac 32bit. > > > _______________________________________________ > fpc-devel maillist - fpc-devel@lists.freepascal.org > https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel