-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pointer being freed was not allocated #942
Comments
Also ran into the same issue, it looks something goes wrong on thread destruction. Simplified version like this crashed for me with familiar:
mimalloc compiled via:
and then statically linked with the code above. I'm on macOS 14.3 (23D56) running on arm64 |
Looking into this. I can repro the second example -- it looks it has to do with zone initialization as it works when using a dynamic library to override and use Also, if you link with the static object file it also works,
Here it is best to compile mimalloc with Mmm, usually object files take precedence when resolving function names over library names so it may be a particular function is not overridden correctly with an archive. We may want to advice to not use a static library on MacOS (but the static object file or dylib). I'll try to figure out which function(s) is/are causing the issue. |
I'm trying out mimalloc, and immediately run into an issue, with the following test code. I've tried both with the latest master and with v2.1.7.
Compiling this on macOS, like this:
c++ -std=c++20 -g -Wall -Wextra -L/Users/martijn/test -lmimalloc -o allocate allocate.cpp
leads to the following output when run:
The text was updated successfully, but these errors were encountered: