2013-04-16 14:20:05 -07:00
|
|
|
#include "util/stack_trace.h"
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
void f0() {
|
|
|
|
char *p = nullptr;
|
|
|
|
*p = 10; /* SIGSEGV here!! */
|
|
|
|
}
|
|
|
|
|
|
|
|
void f1() {
|
|
|
|
f0();
|
|
|
|
}
|
|
|
|
|
|
|
|
void f2() {
|
|
|
|
f1();
|
|
|
|
}
|
|
|
|
|
|
|
|
void f3() {
|
|
|
|
f2();
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
2013-10-03 21:49:15 -07:00
|
|
|
rocksdb::InstallStackTraceHandler();
|
2013-04-16 14:20:05 -07:00
|
|
|
|
|
|
|
f3();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|