diff --git a/runtime/macos_host/illegal_probe.cpp b/runtime/macos_host/illegal_probe.cpp index 11268e8aaf..ca28d9fe49 100644 --- a/runtime/macos_host/illegal_probe.cpp +++ b/runtime/macos_host/illegal_probe.cpp @@ -12,6 +12,7 @@ bool fix_illegal(ucontext_t* uc); static int traps; +static int fails; static void on_ill(int, siginfo_t*, void* uc) { ++traps; if (!fix_illegal(static_cast(uc))) { std::puts("unhandled SIGILL"); _exit(1); } @@ -39,11 +40,13 @@ static unsigned __int128 run(std::vector body, uint64_t a, uint64_t b, mprotect(g_code, 1 << 16, PROT_READ | PROT_EXEC); auto f = reinterpret_cast(p); unsigned __int128 r1 = f(), r2 = f(); - if (r1 != r2) std::puts(" first and second run differ"); + if (r1 != r2) { + std::puts(" first and second run differ"); + ++fails; + } return r1; } -static int fails; static void check(const char* what, uint64_t got, uint64_t want) { std::printf("%-40s %s got %016llx want %016llx\n", what, got == want ? "ok " : "FAIL", (unsigned long long)got, (unsigned long long)want);