From 08b188ff635bc6571b0c42867d43416a1ef477e2 Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Thu, 2 Oct 2025 15:27:29 -0300 Subject: [PATCH 1/2] If we receive an empty update we should just ignore it. --- src/mono/mono/component/hot_reload.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mono/mono/component/hot_reload.c b/src/mono/mono/component/hot_reload.c index 5ce5950556581c..4cf524970d139a 100644 --- a/src/mono/mono/component/hot_reload.c +++ b/src/mono/mono/component/hot_reload.c @@ -2381,9 +2381,11 @@ hot_reload_apply_changes (int origin, MonoImage *image_base, gconstpointer dmeta if (!assembly_update_supported (image_base, error)) { return; } - + if (dmeta_bytes == 0 && dil_bytes_orig == 0) //we may receive empty updates + { + return; + } static int first_origin = -1; - if (first_origin < 0) { first_origin = origin; } From fd94e3f6bbb8c92a180f1d037a974e62aac76ebc Mon Sep 17 00:00:00 2001 From: Thays Grazia Date: Thu, 2 Oct 2025 15:30:36 -0300 Subject: [PATCH 2/2] Update src/mono/mono/component/hot_reload.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/mono/mono/component/hot_reload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mono/mono/component/hot_reload.c b/src/mono/mono/component/hot_reload.c index 4cf524970d139a..e5614bb0788aec 100644 --- a/src/mono/mono/component/hot_reload.c +++ b/src/mono/mono/component/hot_reload.c @@ -2381,7 +2381,7 @@ hot_reload_apply_changes (int origin, MonoImage *image_base, gconstpointer dmeta if (!assembly_update_supported (image_base, error)) { return; } - if (dmeta_bytes == 0 && dil_bytes_orig == 0) //we may receive empty updates + if (dmeta_bytes == 0 && dil_bytes_orig == 0) // we may receive empty updates { return; }