diff options
author | monojenkins <jo.shields+jenkins@xamarin.com> | 2020-02-07 01:27:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 01:27:41 +0300 |
commit | 5be9a0f156d904b7724c2c175895835d3337daff (patch) | |
tree | c331d92e02fba662f48051fbc8d15b540dedc7bd | |
parent | a503f98e066fd38ea5cdaf60ffb444728d5fbdf2 (diff) |
[merp] Add an exception type for managed exceptions (#18721)
Addresses https://github.com/mono/mono/issues/18681
Co-authored-by: Alexis Christoforides <alexis@thenull.net>
-rw-r--r-- | mono/metadata/icall.c | 3 | ||||
-rw-r--r-- | mono/utils/mono-merp.c | 8 | ||||
-rw-r--r-- | mono/utils/mono-state.h | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c index e3357c03f7e..6708ff2ea10 100644 --- a/mono/metadata/icall.c +++ b/mono/metadata/icall.c @@ -6524,8 +6524,7 @@ ves_icall_Mono_Runtime_SendMicrosoftTelemetry (const char *payload, guint64 port hashes.offset_free_hash = portable_hash; hashes.offset_rich_hash = unportable_hash; - // Tells mono that we want to send the HANG EXC_TYPE. - const char *signal = "SIGTERM"; + const char *signal = "MANAGED_EXCEPTION"; gboolean success = mono_merp_invoke (crashed_pid, signal, payload, &hashes); if (!success) { diff --git a/mono/utils/mono-merp.c b/mono/utils/mono-merp.c index f12438c03e6..bd40364f77c 100644 --- a/mono/utils/mono-merp.c +++ b/mono/utils/mono-merp.c @@ -144,7 +144,8 @@ typedef enum MERP_EXC_SIGFPE = 7 , MERP_EXC_SIGTRAP = 8, MERP_EXC_SIGKILL = 9, - MERP_EXC_HANG = 10 + MERP_EXC_HANG = 10, + MERP_EXC_MANAGED_EXCEPTION = 11 } MERPExcType; typedef struct { @@ -261,6 +262,8 @@ get_merp_exctype (MERPExcType exc) return "0x04000000"; case MERP_EXC_HANG: return "0x02000000"; + case MERP_EXC_MANAGED_EXCEPTION: + return "0x05000000"; case MERP_EXC_NONE: // Exception type documented as optional, not optional g_assert_not_reached (); @@ -289,6 +292,9 @@ parse_exception_type (const char *signal) if (!strcmp (signal, "SIGTERM")) return MERP_EXC_HANG; + if (!strcmp (signal, "MANAGED_EXCEPTION")) + return MERP_EXC_MANAGED_EXCEPTION; + // FIXME: There are no other such signal // strings passed to mono_handle_native_crash at the // time of writing this diff --git a/mono/utils/mono-state.h b/mono/utils/mono-state.h index 5a736efaf49..e1f87f37b5b 100644 --- a/mono/utils/mono-state.h +++ b/mono/utils/mono-state.h @@ -18,7 +18,7 @@ #include <mono/metadata/threads-types.h> #include <mono/utils/json.h> -#define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.5" +#define MONO_NATIVE_STATE_PROTOCOL_VERSION "0.0.6" typedef enum { MonoSummaryNone = 0, |