Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9f7361e authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Add SIGFPE to crasher.

Bug: 3399996

(cherry picked from commit 3ecc4210)

Change-Id: I075613ca3c022ce8d38a06a5ba236ceff32d181c
parent 7e55d889
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -146,6 +146,9 @@ static int do_action(const char* arg)
        LOG_ALWAYS_FATAL("hello %s", "world");
    } else if (!strcmp(arg, "LOG_ALWAYS_FATAL_IF")) {
        LOG_ALWAYS_FATAL_IF(true, "hello %s", "world");
    } else if (!strcmp(arg, "SIGFPE")) {
        raise(SIGFPE);
        return EXIT_SUCCESS;
    } else if (!strcmp(arg, "SIGPIPE")) {
        int pipe_fds[2];
        pipe(pipe_fds);
@@ -177,6 +180,7 @@ static int do_action(const char* arg)
    fprintf(stderr, "  assert2               call assert() with a function\n");
    fprintf(stderr, "  LOG_ALWAYS_FATAL      call LOG_ALWAYS_FATAL\n");
    fprintf(stderr, "  LOG_ALWAYS_FATAL_IF   call LOG_ALWAYS_FATAL\n");
    fprintf(stderr, "  SIGFPE                cause a SIGFPE\n");
    fprintf(stderr, "  SIGPIPE               cause a SIGPIPE\n");
    fprintf(stderr, "  SIGSEGV               cause a SIGSEGV at address 0x0 (synonym: crash)\n");
    fprintf(stderr, "  SIGSEGV-non-null      cause a SIGSEGV at a non-zero address\n");