diff options
author | Joshua Peterson <joshuap@unity3d.com> | 2022-01-24 17:16:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 17:16:03 +0300 |
commit | 95229aaa2ec642449aea4eba44fc717ca74786ab (patch) | |
tree | de925a953d07b40ad371672cd0592f62c6ce9e81 /mono | |
parent | aa2e05a8d4b9e8cd16a76704a73419bab5dce0c3 (diff) |
Add missing handle function enter/return macros (#21405)
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.
Diffstat (limited to 'mono')
-rw-r--r-- | mono/metadata/object.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mono/metadata/object.c b/mono/metadata/object.c index 4052ce7fa03..fb01a31cb5b 100644 --- a/mono/metadata/object.c +++ b/mono/metadata/object.c @@ -3895,9 +3895,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 (); } /** |