Skip to content

Commit

Permalink
[hal] Raise SIGKILL instead of calling abort() (wpilibsuite#6427)
Browse files Browse the repository at this point in the history
We don't need to generate a core dump here if core dumps are enabled.
  • Loading branch information
PeterJohnson authored Mar 11, 2024
1 parent fbd239d commit 3d9152a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hal/src/main/native/cpp/jni/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@

#include <jni.h>

#ifdef __FRC_ROBORIO__
#include <signal.h>
#endif

#include <cassert>
#include <cstdlib>
#include <cstring>

#include <fmt/format.h>
Expand Down Expand Up @@ -93,7 +96,7 @@ Java_edu_wpi_first_hal_HAL_terminate
(JNIEnv*, jclass)
{
#ifdef __FRC_ROBORIO__
std::abort();
::raise(SIGILL);
#endif
}

Expand Down

0 comments on commit 3d9152a

Please sign in to comment.