microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test 'malloc-nomem1' failure on 32-bit architectures after v2.1.4

MatthewGentoo opened this issue · comments

In mimalloc 2.1.4, malloc-nomem1 in test-api fails.

test: malloc-nomem1...
FAILED: malloc-nomem1: /var/tmp/portage/dev-libs/mimalloc-2.1.4/work/mimalloc-2.1.4/test/test-api.c:77

CHECK_BODY("malloc-nomem1") {
  result = (mi_malloc((size_t)PTRDIFF_MAX + (size_t)1) == NULL);
};

I think that it was broken by 78418b3 (#877). If I edit the huge allocation check at the beginning of mi_find_page back to use PTRDIFF_MAX, the test is passing. However, I'm not sure what the correct behaviour is supposed to be.

commented

Should be fixed now :-)