mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-26 21:04:27 +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 block_overflow1();
|
||||
static void invalid_free();
|
||||
static void test_aslr(void);
|
||||
|
||||
|
||||
int main() {
|
||||
mi_version();
|
||||
@ -21,6 +23,7 @@ int main() {
|
||||
// double_free2();
|
||||
// corrupt_free();
|
||||
// block_overflow1();
|
||||
// test_aslr();
|
||||
invalid_free();
|
||||
|
||||
void* p1 = malloc(78);
|
||||
@ -121,3 +124,10 @@ static void corrupt_free() {
|
||||
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