Fix 'malloc-nomem1' test for 32-bit architectures

This commit is contained in:
Artur Sinila 2021-06-29 21:07:13 +03:00
parent 076f815cec
commit edb0b93c6f
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: CCC2023706A0FA7E

View file

@ -83,7 +83,7 @@ int main() {
void* p = mi_malloc(0); mi_free(p);
});
CHECK_BODY("malloc-nomem1",{
result = (mi_malloc(SIZE_MAX/2) == NULL);
result = (mi_malloc((size_t)PTRDIFF_MAX + (size_t)1) == NULL);
});
CHECK_BODY("malloc-null",{
mi_free(NULL);