From 98054ea87ce70247bb09ceafd2ad1a0b36d2fef4 Mon Sep 17 00:00:00 2001 Patch-Source: https://github.com/dotnet/runtime/issues/82269 From: Antoine Martin Date: Sat, 1 Oct 2022 09:21:58 -0400 Subject: [PATCH] Undefine fortify-source on mono-thread-coop When _FORTIFY_SOURCE=2, there is a bug relating to memcpy that expresses itself. which makes mono-flavored runtime dump its core. This patch offers a workaround by undefining _FORTIFY_SOURCE in the problematic file. See: https://github.com/dotnet/runtime/issues/82269 --- diff --git a/src/runtime/src/mono/mono/utils/mono-threads-coop.c b/src/runtime/src/mono/mono/utils/mono-threads-coop.c index 4ed659d6605..34bb5785fba 100644 --- a/src/runtime/src/mono/mono/utils/mono-threads-coop.c +++ b/src/runtime/src/mono/mono/utils/mono-threads-coop.c @@ -15,6 +15,7 @@ #ifdef TARGET_MACH #define _DARWIN_C_SOURCE #endif +#undef _FORTIFY_SOURCE #include #include