Closed colesbury closed 2 months ago
This was seen in https://github.com/python/cpython/issues/117755 on s390x (Linux on IBMz) for an allocation of 0x7fffffffffffffff bytes:
0x7fffffffffffffff
https://github.com/microsoft/mimalloc/blob/f199b888b47f77261aac9b63b612e77ff3fbd880/src/segment.c#L617-L618
The mi_segment_os_alloc is successful (possibly due to overcommit), but then the slice_count is truncated, which leads to either an assertion error (in debug builds) or floating point error due to a divide by zero.
mi_segment_os_alloc
I proposed a fix: https://github.com/microsoft/mimalloc/pull/877
Ah, that is a terrible bug but I just merged a fix. I am going to do a fresh release tag soon. Thanks so much!
This was seen in https://github.com/python/cpython/issues/117755 on s390x (Linux on IBMz) for an allocation of
0x7fffffffffffffff
bytes:https://github.com/microsoft/mimalloc/blob/f199b888b47f77261aac9b63b612e77ff3fbd880/src/segment.c#L617-L618
The
mi_segment_os_alloc
is successful (possibly due to overcommit), but then the slice_count is truncated, which leads to either an assertion error (in debug builds) or floating point error due to a divide by zero.