diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c
index fc7e492778430..0c69d67bf6376 100644
--- a/src/mono/mono/mini/interp/interp.c
+++ b/src/mono/mono/mini/interp/interp.c
@@ -7127,10 +7127,15 @@ MINT_IN_CASE(MINT_BRTRUE_I8_SP) ZEROP_SP(gint64, !=); MINT_IN_BREAK;
MINT_IN_CASE(MINT_LOCALLOC) {
int len = LOCAL_VAR (ip [2], gint32);
- gpointer mem = frame_data_allocator_alloc (&context->data_stack, frame, ALIGN_TO (len, MINT_VT_ALIGNMENT));
+ gpointer mem;
+ if (len > 0) {
+ mem = frame_data_allocator_alloc (&context->data_stack, frame, ALIGN_TO (len, MINT_VT_ALIGNMENT));
- if (frame->imethod->init_locals)
- memset (mem, 0, len);
+ if (frame->imethod->init_locals)
+ memset (mem, 0, len);
+ } else {
+ mem = NULL;
+ }
LOCAL_VAR (ip [1], gpointer) = mem;
ip += 3;
MINT_IN_BREAK;
diff --git a/src/tests/issues.targets b/src/tests/issues.targets
index a720de9c70abc..e5c85bcf43f37 100644
--- a/src/tests/issues.targets
+++ b/src/tests/issues.targets
@@ -2510,9 +2510,6 @@
https://github.com/dotnet/runtime/issues/54393
-
- https://github.com/dotnet/runtime/issues/54359
-
needs triage
@@ -2630,9 +2627,6 @@
needs triage
-
- https://github.com/dotnet/runtime/issues/54359
-
needs triage
@@ -2648,15 +2642,6 @@
https://github.com/dotnet/runtime/issues/54399
-
- https://github.com/dotnet/runtime/issues/54359
-
-
- https://github.com/dotnet/runtime/issues/54359
-
-
- https://github.com/dotnet/runtime/issues/54359
-
https://github.com/dotnet/runtime/issues/54393