File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -967,6 +967,16 @@ void SegmentationFaultHandler(int) {
967967 abort ();
968968}
969969
970+ void FloatingPointExceptionHandler (int ) {
971+ NColorizer::TColors colors = NColorizer::AutoColors (Cerr);
972+
973+ Cerr << colors.Red () << " ======= floating point exception call stack ========" << colors.Default () << Endl;
974+ FormatBackTrace (&Cerr);
975+ Cerr << colors.Red () << " ==============================================" << colors.Default () << Endl;
976+
977+ abort ();
978+ }
979+
970980#ifdef PROFILE_MEMORY_ALLOCATIONS
971981void InterruptHandler (int ) {
972982 NColorizer::TColors colors = NColorizer::AutoColors (Cerr);
@@ -985,6 +995,7 @@ void InterruptHandler(int) {
985995int main (int argc, const char * argv[]) {
986996 std::set_terminate (NKqpRun::KqprunTerminateHandler);
987997 signal (SIGSEGV, &NKqpRun::SegmentationFaultHandler);
998+ signal (SIGFPE, &NKqpRun::FloatingPointExceptionHandler);
988999
9891000#ifdef PROFILE_MEMORY_ALLOCATIONS
9901001 signal (SIGINT, &NKqpRun::InterruptHandler);
You can’t perform that action at this time.
0 commit comments