hello_invalid_free4.c 313 Bytes
Newer Older
Adam Blank's avatar
Adam Blank committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main() {
    void *x = malloc(10);
    (void) x;
    free((void *) 0x12345678);
}

// 20

// stderr: Invalid free(): 0x12345678 is not an allocation
// stderr: at bin/hello_invalid_free4(main+0x20)
// stderr: main
// stderr: hello_invalid_free4.c:8