aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/terminate_handler/sample/segv/main.cpp
blob: 61479edc1cfdeebd240cc892fcd70e765cecfb1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "../../segv_handler.h"

void Bar(int* x) {
    *x = 11;
}

void Foo(int* x) {
    Bar(x);
}

int main() {
    InstallSegvHandler();
    Foo((int*)1); 
    return 0;
}