Crash on V3.0.1
I compiled my program as usual but it started to crash;
FreeBSD x64, latest version (14.2-RELEASE) everything updated.
compile flags: -std=gnu++2b -march=native -m64 -static -DNDEBUG -pthread -ffast-math -O2
compiler: clang++19
LIBDIR += -L/usr/local/lib LIBS += -lmimalloc
includes on main.cpp;
#include <mimalloc.h> #include <mimalloc-new-delete.h>
main function start with these;
mi_version(); mi_stats_reset(); mi_option_set(mi_option_allow_large_os_pages , 1); mi_option_set(mi_option_reserve_os_memory, 500'000); // 512 MB
--- update ---
also idk why but I get duplicate linker errors;
no new overrides in sources and another libs.
Thanks!
- Do you have a repro so I can test ?
- Otherwise, perhaps you can compile mimalloc in debug mode (
-DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON) and see what it says? (this will check for valid pointers etc.) - Hmm, I wonder where the link warnings stem from. (Did you compile
mimallocin C++ mode? (-DMI_USE_CXX=ON)). Since you link statically with mimalloc I there is no need I think to includemimalloc-new-delete.hsince these are already overridden in the library (and thus the duplicates).
Let me know how it goes
Thanks!
- Do you have a repro so I can test ?
- Otherwise, perhaps you can compile mimalloc in debug mode (
-DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON) and see what it says? (this will check for valid pointers etc.)- Hmm, I wonder where the link warnings stem from. (Did you compile
mimallocin C++ mode? (-DMI_USE_CXX=ON)). Since you link statically with mimalloc I there is no need I think to includemimalloc-new-delete.hsince these are already overridden in the library (and thus the duplicates).Let me know how it goes
I fixed duplicate error with building mimalloc directly from source (DMI_USE_CXX = ON, MI_OVERRIDE = OFF) (i manually changed std::malloc / calloc / free to mi_malloc, mi_calloc etc)
so i can build. also crash issue fixed with mimalloc.a with builded MI_OVERRIDE = OFF flag.
before v3, i used mimalloc from freebsd's pkg repo, and i dont get this problems.
is mimalloc support sse3 or multi-optimize-path?
I builded mimalloc_static with intel c++ compiler 2025 with this flags (/MT);
and my program crashing when start;
is that normal? i dont get any problem with original vs2022 sln project (AVX2)
@daanx I'm sorry for not tagging you, I thought github was reporting automatically.