mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 11:58:41 +03:00
always use non-flat map in secure mode and validate pointers passed to free
This commit is contained in:
parent
09c2b7fdcf
commit
8a66ae818a
5 changed files with 13 additions and 3 deletions
|
@ -89,9 +89,11 @@ int main(void) {
|
|||
CHECK_BODY("malloc-free-null") {
|
||||
mi_free(NULL);
|
||||
};
|
||||
#if MI_INTPTR_BITS >= 64
|
||||
CHECK_BODY("malloc-free-invalid-low") {
|
||||
mi_free((void*)(MI_ZU(0x0000000003990080))); // issue #1087
|
||||
};
|
||||
#endif
|
||||
CHECK_BODY("calloc-overflow") {
|
||||
// use (size_t)&mi_calloc to get some number without triggering compiler warnings
|
||||
result = (mi_calloc((size_t)&mi_calloc,SIZE_MAX/1000) == NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue