chk_expn_thd *chk_exp_get_thread_expn() { if(!_exception_st) { _exception_st = calloc(1,sizeof(*_exception_st)); list_init(&_exception_st->expstack); setup_sigsegv(); setup_sigbus(); setup_sigfpe(); pthread_atfork(NULL,NULL,reset_perthread_exception_st); } return _exception_st; }
static void __attribute((constructor)) init(void) { setup_sigsegv(); }
__attribute__((constructor(103))) static void chk_sig_init() { setup_sigsegv(); setup_sigbus(); setup_sigfpe(); }
int main(void) { setup_sigsegv(); trace(); return (0); }