mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 20:08:41 +03:00
faster backtrace; show predecessor blocks on block overflow
This commit is contained in:
parent
b6e2b6e975
commit
5739714b8d
4 changed files with 20 additions and 16 deletions
|
@ -62,7 +62,8 @@ int main() {
|
|||
|
||||
static void invalid_free() {
|
||||
free((void*)0xBADBEEF);
|
||||
realloc((void*)0xBADBEEF,10);
|
||||
void* p = realloc((void*)0xBADBEEF,10);
|
||||
free(p);
|
||||
}
|
||||
|
||||
static void block_overflow1() {
|
||||
|
@ -165,7 +166,7 @@ static void corrupt_free2() {
|
|||
// allocate more.. trying to trigger an allocation from a corrupted entry
|
||||
// this may need many allocations to get there (if at all)
|
||||
for (int i = 0; i < 4096; i++) {
|
||||
malloc(SZ);
|
||||
void* p = malloc(SZ);
|
||||
}
|
||||
// free the rest
|
||||
for (int i = 0; i < N; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue