mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-27 13:33:18 +08:00
add aslr test (issue #289)
This commit is contained in:
parent
f107acb3c8
commit
d73d6beb71
@ -12,6 +12,8 @@ static void double_free2();
|
|||||||
static void corrupt_free();
|
static void corrupt_free();
|
||||||
static void block_overflow1();
|
static void block_overflow1();
|
||||||
static void invalid_free();
|
static void invalid_free();
|
||||||
|
static void test_aslr(void);
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
mi_version();
|
mi_version();
|
||||||
@ -21,6 +23,7 @@ int main() {
|
|||||||
// double_free2();
|
// double_free2();
|
||||||
// corrupt_free();
|
// corrupt_free();
|
||||||
// block_overflow1();
|
// block_overflow1();
|
||||||
|
// test_aslr();
|
||||||
invalid_free();
|
invalid_free();
|
||||||
|
|
||||||
void* p1 = malloc(78);
|
void* p1 = malloc(78);
|
||||||
@ -121,3 +124,10 @@ static void corrupt_free() {
|
|||||||
malloc(SZ);
|
malloc(SZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_aslr(void) {
|
||||||
|
void* p[256];
|
||||||
|
p[0] = malloc(378200);
|
||||||
|
p[1] = malloc(1134626);
|
||||||
|
printf("p1: %p, p2: %p\n", p[0], p[1]);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user