Jump to content
Sign in to follow this  
Erix A.

Random app crashes on MacOS

Recommended Posts

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 by Erix A.

Share this post


Link to post

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×