mimalloc icon indicating copy to clipboard operation
mimalloc copied to clipboard

mi_malloc didn't return NULL while no memory available

Open helloellite opened this issue 2 years ago • 0 comments

malloc would return NULL when no memory available, but mi_malloc will crash in its own implement. The following code could reproduce this issue. Add into test-api.c and build in release configuration (windows). Both master and tagv2.1.2 have this issue.

 CHECK_BODY("malloc-nomem2") {
    while(result)
		result = mi_malloc(1000000000) ;
    result = !result;
  };

helloellite avatar Dec 14 '23 16:12 helloellite