mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 19:10:23 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a74b452af |
No files matched your search
@@ -8,6 +8,7 @@
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <setjmp.h>
|
||||
#include <signal.h>
|
||||
#include "../utils/mono-errno.h"
|
||||
#include "../utils/mono-compiler.h"
|
||||
|
||||
@@ -8011,6 +8012,64 @@ mono_test_MerpCrashUnhandledExceptionHook (void)
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalTerm (void)
|
||||
{
|
||||
raise (SIGTERM);
|
||||
}
|
||||
|
||||
// for the rest of the signal tests, we use SIGTERM as a fallback
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalAbrt (void)
|
||||
{
|
||||
#if defined (SIGABRT)
|
||||
raise (SIGABRT);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalFpe (void)
|
||||
{
|
||||
#if defined (SIGFPE)
|
||||
raise (SIGFPE);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalBus (void)
|
||||
{
|
||||
#if defined (SIGBUS)
|
||||
raise (SIGBUS);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalSegv (void)
|
||||
{
|
||||
#if defined (SIGSEGV)
|
||||
raise (SIGSEGV);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
LIBTEST_API void STDCALL
|
||||
mono_test_MerpCrashSignalIll (void)
|
||||
{
|
||||
#if defined (SIGILL)
|
||||
raise (SIGILL);
|
||||
#else
|
||||
raise (SIGTERM);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern C
|
||||
#endif
|
||||
@@ -38,6 +38,12 @@ class C
|
||||
Crashers.Add(new Tuple<String, Action> ("MerpCrashSnprintf", MerpCrashSnprintf));
|
||||
Crashers.Add(new Tuple<String, Action> ("MerpCrashDomainUnload", MerpCrashDomainUnload));
|
||||
Crashers.Add(new Tuple<String, Action> ("MerpCrashUnbalancedGCSafe", MerpCrashUnbalancedGCSafe));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalTerm", MerpCrashSignalTerm));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalTerm", MerpCrashSignalAbrt));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalKill", MerpCrashSignalFpe));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalKill", MerpCrashSignalBus));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalSegv", MerpCrashSignalSegv));
|
||||
Crashers.Add(new Tuple<String,Action> ("MerpCrashSignalIll", MerpCrashSignalIll));
|
||||
}
|
||||
|
||||
public static void
|
||||
@@ -113,6 +119,60 @@ class C
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashUnhandledExceptionHook ();
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalTerm ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalTerm ()
|
||||
{
|
||||
mono_test_MerpCrashSignalTerm ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalAbrt ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalAbrt ()
|
||||
{
|
||||
mono_test_MerpCrashSignalAbrt ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalFpe ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalFpe ()
|
||||
{
|
||||
mono_test_MerpCrashSignalFpe ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalBus ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalBus ()
|
||||
{
|
||||
mono_test_MerpCrashSignalBus ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalSegv ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalSegv ()
|
||||
{
|
||||
mono_test_MerpCrashSignalSegv ();
|
||||
}
|
||||
|
||||
[DllImport("libtest")]
|
||||
public static extern void mono_test_MerpCrashSignalIll ();
|
||||
|
||||
public static void
|
||||
MerpCrashSignalIll ()
|
||||
{
|
||||
mono_test_MerpCrashSignalIll ();
|
||||
}
|
||||
|
||||
public static void
|
||||
MerpCrashUnhandledExceptionHook ()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user