While at it add SIGFPE as a crash signal.

Signed-off-by: Marius Vlad <[email protected]>
CC: Chris Wilson <[email protected]>
---
 lib/igt_core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/igt_core.c b/lib/igt_core.c
index 801f02f..67e1a4f 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1482,7 +1482,8 @@ static bool exit_handler_disabled;
 #define SILENT(x) { x, NULL, 0 }
 static const struct { int number; const char *name; size_t name_len; } 
handled_signals[] =
        { SILENT(SIGINT), SILENT(SIGHUP), SILENT(SIGTERM), SILENT(SIGQUIT),
-         SILENT(SIGPIPE), SIGDEF(SIGABRT), SIGDEF(SIGSEGV), SIGDEF(SIGBUS) };
+         SILENT(SIGPIPE), SIGDEF(SIGABRT), SIGDEF(SIGSEGV), SIGDEF(SIGBUS),
+         SIGDEF(SIGFPE) };
 #undef SILENT
 #undef SIGDEF
 
@@ -1542,6 +1543,7 @@ static bool crash_signal(int sig)
        switch (sig) {
        case SIGILL:
        case SIGBUS:
+       case SIGFPE:
        case SIGSEGV:
                return true;
        default:
@@ -1571,7 +1573,7 @@ static void fatal_sig_handler(int sig)
                                igt_exitcode = 128 + sig;
 
                        failed_one = true;
-
+                       print_backtrace();
                        exit_subtest("CRASH");
                }
                break;
-- 
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to