Closed rwiesenfarth closed 4 months ago
Thanks for report -- I pushed a possible fix (in dev
for now); can you test it?
Did not test it explicitely, but as setting MI_DEBUG to 1 (which makes mi_assert_internal() a no-op) solves the issue, your change will do the same.
I have some applications built by myself which call abort() on exit. I could trace this down to _mi_segment_of(). Here an example call stack:
The code is this:
The pointer in question (p) is 0x00000000005bf070, so it was probably not allocated using mimalloc. Nevertheless, I would expect _mi_segment_of() returns NULL (as the comment says) if p is not a valid pointer.
The workaround for Release builds is to define NDEBUG (as suggested in types.h(40)), but this will not work for Debug builds (which define _DEBUG).
Is this behavior intended? Or could
be replaced by