From bc1e95a215592eb691c5c5a0164601200085f738 Mon Sep 17 00:00:00 2001 From: Timotheus Pokorra Date: Feb 22 2021 21:41:37 +0000 Subject: backport patch: fix early return in Process.Start (#1839410) --- diff --git a/mono-6.12.0-fix-process-start.patch b/mono-6.12.0-fix-process-start.patch new file mode 100644 index 0000000..4b9e02c --- /dev/null +++ b/mono-6.12.0-fix-process-start.patch @@ -0,0 +1,42 @@ +From 325577feffad1f87b07d92710c0d37c79c5f50a1 Mon Sep 17 00:00:00 2001 +From: Ryan Lucia +Date: Thu, 4 Feb 2021 08:55:48 -0500 +Subject: [PATCH] Fix early return in Process.Start + +--- + mono/metadata/w32process-unix.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/mono/metadata/w32process-unix.c b/mono/metadata/w32process-unix.c +index 663cc6ff5111..d030101aede6 100644 +--- a/mono/metadata/w32process-unix.c ++++ b/mono/metadata/w32process-unix.c +@@ -2032,6 +2032,9 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar + + static char *handler; + static gunichar2 *handler_utf16; ++#ifndef HOST_DARWIN ++ gboolean finished = FALSE; ++#endif + + if (handler_utf16 == (gunichar2 *)-1) { + ret = FALSE; +@@ -2057,6 +2060,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar + if (handler == NULL){ + handler_utf16 = (gunichar2 *) -1; + ret = FALSE; ++ finished = TRUE; + } else { + /* kfmclient needs exec argument */ + char *old = handler; +@@ -2067,9 +2071,8 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar + } + } + MONO_EXIT_GC_SAFE; +- if (ret == FALSE){ ++ if (finished) + goto done; +- } + #endif + handler_utf16 = g_utf8_to_utf16 (handler, -1, NULL, NULL, NULL); + g_free (handler); diff --git a/mono.spec b/mono.spec index c256c5e..dfcdb06 100644 --- a/mono.spec +++ b/mono.spec @@ -23,7 +23,7 @@ %global xamarinrelease 123 Name: mono Version: 6.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Cross-platform, Open Source, .NET development framework License: MIT @@ -56,6 +56,9 @@ Patch10: 0001-DocumentationEnumerator.cs-Declare-iface-and-ifaceMe.patch Patch11: 0001-Replace-new-Csharp-features-with-old-ones.patch # Reenable mdoc build. To be upstreamed after Patch 10 and 11 Patch12: 0001-Reenable-mdoc.exe-build.patch +# fix issue with process start (#1839410) +Patch14: mono-6.12.0-fix-process-start.patch + BuildRequires: bison BuildRequires: python%{python3_pkgversion} @@ -348,6 +351,7 @@ pushd external/api-doc-tools %patch11 -p1 popd %patch12 -p1 +%patch14 -p1 # don't build mono-helix-client which requires the helix-binaries to build sed -i 's|mono-helix-client||g' mcs/tools/Makefile @@ -932,6 +936,9 @@ cert-sync /etc/pki/tls/certs/ca-bundle.crt %files complete %changelog +* Mon Feb 22 2021 Timotheus Pokorra - 6.8.0-2 +- backport patch: fix early return in Process.Start (#1839410) + * Sat Jul 18 2020 Timotheus Pokorra - 6.8.0-1 - Non-Bootstrap build for Mono 6.8 for Epel 7