1#include <stdio.h>
2#include <stdlib.h>
3
4char *pointer;
5char *another_pointer;
6
7void f1() {
8 pointer = malloc(size: 10); // malloc line
9 another_pointer = malloc(size: 20); // malloc2 line
10}
11
12void f2() {
13 free(ptr: pointer); // free line
14}
15
16int main (int argc, char const *argv[])
17{
18 f1();
19 f2();
20
21 printf(format: "Hello world!\n"); // break line
22
23 pointer[0] = 'A'; // BOOM line
24
25 return 0;
26}
27

source code of lldb/test/API/functionalities/asan/main.c