diff --git a/src/core/impl/utils/debug.cpp b/src/core/impl/utils/debug.cpp index 088dca3562c7942f430c324f4ba1e8f999401022..eb3a996d397874819765f40bb64d8fc626e70ba7 100644 --- a/src/core/impl/utils/debug.cpp +++ b/src/core/impl/utils/debug.cpp @@ -194,7 +194,14 @@ class InitCaller { InitCaller() { #ifndef WIN32 - SigHandlerInit::init_for_segv(); + if (MGB_GETENV("MGB_REGISTER_SEGV_HANDLER")) { + mgb_log_warn( + "env config MGB_REGISTER_SEGV_HANDLER, which means " + "megbrain will catch crash SEGV signal, if you do not want " + "to megbrain do this, do unset MGB_REGISTER_SEGV_HANDLER " + "and rerun"); + SigHandlerInit::init_for_segv(); + } #endif #if MGB_CUDA CudaCheckOnFork::init();