23int divide_by_zero(
void);
24void cause_segfault(
void);
25int stack_overflow(
void);
26void infinite_loop(
void);
27void illegal_instruction(
void);
28void cause_calamity(
void);
30char *progname = NULL ;
32int main(
int argc,
char * argv[])
51void cause_calamity(
void)
56 (void)divide_by_zero();
60 illegal_instruction();
65int divide_by_zero(
void)
72void cause_segfault(
void)
74 int * p = (
int*)0x12345678;
78int stack_overflow(
void)
82 foo = stack_overflow();
87void infinite_loop(
void)
100void illegal_instruction(
void)
#define n_log(__LEVEL__,...)
Logging function wrapper to get line and func.
#define LOG_DEBUG
debug-level messages
#define LOG_STDERR
internal, default LOG_TYPE
void set_log_level(const int log_level)
Set the global log level value ( static int LOG_LEVEL )
void set_signal_handler(const char *progname)
Install a signal handler for progname.
Signals general handling with stack printing, from https://gist.github.com/jvranish/4441299.