merge from dev

This commit is contained in:
daan 2020-08-27 22:43:57 -07:00
commit 2cffc3b851
26 changed files with 467 additions and 208 deletions

View file

@ -175,6 +175,7 @@ static void double_free1();
static void double_free2();
static void corrupt_free();
static void block_overflow1();
static void invalid_free();
int main() {
@ -185,6 +186,7 @@ int main() {
// double_free2();
// corrupt_free();
//block_overflow1();
invalid_free();
void* p1 = malloc(78);
void* p2 = malloc(24);
@ -209,6 +211,11 @@ int main() {
return 0;
}
static void invalid_free() {
free((void*)0xBADBEEF);
realloc((void*)0xBADBEEF,10);
}
static void block_overflow1() {
uint8_t* p = (uint8_t*)mi_malloc(17);
p[18] = 0;

View file

@ -14,7 +14,9 @@
#include <mimalloc.h>
#include <assert.h>
#ifdef _WIN32
#include <mimalloc-new-delete.h>
#endif
#ifdef _WIN32
#include <windows.h>