Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonojenkins <jo.shields+jenkins@xamarin.com>2020-02-07 00:31:17 +0300
committerGitHub <noreply@github.com>2020-02-07 00:31:17 +0300
commit5ef6ad0ef7279120900f8ef9fc91070ff913f23e (patch)
treecab1f358e8d53d4f018c15c64e62880051198b86
parent36073a0c74afcce48b7eba982c4e60e1549e600d (diff)
[merp] Add an exception type for managed exceptions (#18723)
Addresses https://github.com/mono/mono/issues/18681 Co-authored-by: Alexis Christoforides <alexis@thenull.net>
-rw-r--r--mono/metadata/icall.c3
-rw-r--r--mono/utils/mono-merp.c8
-rw-r--r--mono/utils/mono-state.h2
3 files changed, 9 insertions, 4 deletions
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index f0e40654b12..19001eae024 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -6515,8 +6515,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 bab766dc2a1..8e75680b38c 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,