Erix A. 8 Posted July 5, 2019 (edited) I have app, which works fine on Windows and I'm now trying to convert it to MacOS (Mojave). App uses some DLLs, written in C and compiled with gcc. Parameters to C functions are mostly passed as records (enums at the C side). Now, I recompiled the same DLLs as dylibs on a MAC and program works, but I get random crashes in libsystem_malloc, libsystem_platform and so on. I guess there's some issue with the memory management in my program, I just cannot catch it as crashes happen at pretty random places. Is there something special about how memory must be aligned or something when dealing with dylibs in MacOS? I'm loading those libraries dynamically and functions are resolved via GetProcAddress and they are defined as cdecl. Edited July 5, 2019 by Erix A. Share this post Link to post
Erix A. 8 Posted July 5, 2019 Huh, solved the issue. Problem was in the C code, which was working fine on Windows, but was failing on MacOS (where gcc is actually clang). Share this post Link to post
Sherlock 663 Posted July 8, 2019 It aint always Delphis fault... good to know Share this post Link to post