https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67520
Alexander Ivchenko <aivchenk at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aivchenk at gmail dot com --- Comment #2 from Alexander Ivchenko <aivchenk at gmail dot com> --- (In reply to Richard Biener from comment #1) > IMHO libraries should have a way to specify a custom handler (and default > that to abort maybe). Indeed exit (255) isn't very canonical. Addressed in: ------------------------------------------------------------------------ r243928 | aivchenk | 2016-12-26 18:14:06 +0300 (Mon, 26 Dec 2016) | 14 lines 2016-12-26 Alexander Ivchenko <alexander.ivche...@intel.com> * mpxrt/libtool-version: New version. * mpxrt/mpxrt-utils.c (set_mpx_rt_stop_handler): New function. (print_help): Add help for CHKP_RT_STOP_HANDLER environment variable. (__mpxrt_init_env_vars): Add initialization of stop_handler. (__mpxrt_stop_handler): New function. (__mpxrt_stop): Ditto. * mpxrt/mpxrt-utils.h (mpx_rt_stop_mode_handler_t): New enum. * mpxrt/mpxrt.c (handler): Replace exit(255) with __mpxrt_stop function call. Now libmpx will call abort on bounds violations by default (User can restore previous behavior with CHKP_RT_STOP_HANDLER env variable)