mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
merge from dev-guarded
This commit is contained in:
commit
1ab67d44c8
14 changed files with 239 additions and 29 deletions
|
@ -12,6 +12,7 @@ static void double_free1();
|
|||
static void double_free2();
|
||||
static void corrupt_free();
|
||||
static void block_overflow1();
|
||||
static void block_overflow2();
|
||||
static void invalid_free();
|
||||
static void test_aslr(void);
|
||||
static void test_process_info(void);
|
||||
|
@ -30,6 +31,7 @@ int main() {
|
|||
// double_free2();
|
||||
// corrupt_free();
|
||||
// block_overflow1();
|
||||
block_overflow2();
|
||||
// test_aslr();
|
||||
// invalid_free();
|
||||
// test_reserved();
|
||||
|
@ -88,6 +90,12 @@ static void block_overflow1() {
|
|||
free(p);
|
||||
}
|
||||
|
||||
static void block_overflow2() {
|
||||
uint8_t* p = (uint8_t*)mi_malloc(16);
|
||||
p[17] = 0;
|
||||
free(p);
|
||||
}
|
||||
|
||||
// The double free samples come ArcHeap [1] by Insu Yun (issue #161)
|
||||
// [1]: https://arxiv.org/pdf/1903.00503.pdf
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue