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:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-01-24 17:16:17 +0300
committerGitHub <noreply@github.com>2022-01-24 17:16:17 +0300
commit9f35bf1b80761622817b09bff121caac35740025 (patch)
tree6eda3011d7ee3411e40f505250efc23fb1705d73
parent45efaa3b6f9bb6aa5e6e2ef82d08ad849a40a34c (diff)
Add missing handle function enter/return macros (#21407)mono-6.12.0.166
The mono_field_static_get_value method uses a handle, but did not set up enter/exit macros properly, so this handle was leaked. Some code in Unity calls this embedding API method pretty often, which can lead to the mark stack overflowing in the GC code. Co-authored-by: Josh Peterson <joshuap@unity3d.com>
-rw-r--r--mono/metadata/object.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mono/metadata/object.c b/mono/metadata/object.c
index a69ff1083a9..4cf7ca47f43 100644
--- a/mono/metadata/object.c
+++ b/mono/metadata/object.c
@@ -3902,9 +3902,13 @@ mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value)
{
MONO_REQ_GC_NEUTRAL_MODE;
+ HANDLE_FUNCTION_ENTER ();
+
ERROR_DECL (error);
mono_field_static_get_value_checked (vt, field, value, MONO_HANDLE_NEW (MonoString, NULL), error);
mono_error_cleanup (error);
+
+ HANDLE_FUNCTION_RETURN ();
}
/**