Closed epoupon closed 4 weeks ago
Ah, I think this is fixed in v2.1.7. see commit: https://github.com/microsoft/mimalloc/commit/d824b9db2b339650b4dd04ffae5ede8abd84889c
Can you try that?
Hello! Thanks for your answer, I do confirm it is fixed in 2.1.7!
Hello,
Using windows, static build, with mimalloc 2.1.4, here is the test case:
A thread creates a heap, performs an allocation in it, and calls
mi_heap_delete
. The thread is then destroyed.Later when the process shuts down, we have this crash:
Exception thrown: read access violation. segment was 0x353EA000000.
When inspecting callstack at
mi_heap_page_collect
, it looks likepage
was actually already unmapped. Callingmi_heap_collect
before callingmi_heap_delete
makes the crash disappear.Is this known?
(by the way, the API doc of
mi_heap_delete
states:But the code seems to use the backing heap to migrate allocated blocks)