From 0530302fe51e4de2db808255a0bc3d8d63575c98 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sun, 10 Mar 2024 17:05:36 -0700 Subject: [PATCH 1/2] [hal] Raise SIGILL instead of calling abort() We don't need to generate a core dump here if core dumps are enabled. --- hal/src/main/native/cpp/jni/HAL.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hal/src/main/native/cpp/jni/HAL.cpp b/hal/src/main/native/cpp/jni/HAL.cpp index 9918f46d6ec..5c6e5a1d4c0 100644 --- a/hal/src/main/native/cpp/jni/HAL.cpp +++ b/hal/src/main/native/cpp/jni/HAL.cpp @@ -5,9 +5,11 @@ #include "hal/HAL.h" #include +#ifdef __FRC_ROBORIO__ +#include +#endif #include -#include #include #include @@ -93,7 +95,7 @@ Java_edu_wpi_first_hal_HAL_terminate (JNIEnv*, jclass) { #ifdef __FRC_ROBORIO__ - std::abort(); + ::raise(SIGILL); #endif } From 948db29992194ee03da859ef4b9b0c1ee57c19c2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 00:22:31 +0000 Subject: [PATCH 2/2] Formatting fixes --- hal/src/main/native/cpp/jni/HAL.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/hal/src/main/native/cpp/jni/HAL.cpp b/hal/src/main/native/cpp/jni/HAL.cpp index 5c6e5a1d4c0..99e4675ea9c 100644 --- a/hal/src/main/native/cpp/jni/HAL.cpp +++ b/hal/src/main/native/cpp/jni/HAL.cpp @@ -5,6 +5,7 @@ #include "hal/HAL.h" #include + #ifdef __FRC_ROBORIO__ #include #endif