Add signal handler for SIGABRT, SIGSEGV with stacktrace
One could add a handler to main(...) to print a stacktrace in case a run is aborted or a segmentation fault occurred. See e.g. here. I don't know if this is portable. One could also have a look at how Glog does it in Google::InstallFailureSignalHandler().