Fix issues found in CI

- Add patches to fix mono and arm64 issues
- Include libmono-*.a files in the SDK
- Fix CI configuration

Related: RHEL-4074
This commit is contained in:
Omair Majid 2023-09-18 18:00:12 -04:00
parent ba53ac656e
commit 63573e2cc8
4 changed files with 81 additions and 6 deletions

View File

@ -54,7 +54,7 @@
Name: dotnet%{dotnetver}
Version: %{sdk_rpm_version}
Release: 0.1%{?dist}
Release: 0.2%{?dist}
Summary: .NET Runtime and SDK
License: 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
@ -92,6 +92,10 @@ Patch1: roslyn-analyzers-ppc64le-apphost.patch
Patch2: vstest-intent-net8.0.patch
# https://github.com/dotnet/source-build/issues/3571
Patch3: fix-mono-typeloadexception.patch
# https://github.com/dotnet/runtime/pull/91008
Patch4: runtime-91008-mono-var-opcode-OP_REGOFFSET.patch
# https://github.com/dotnet/runtime/pull/91865
Patch5: runtime-91865-arm64-page-size.patch
%if 0%{?fedora} || 0%{?rhel} >= 8
ExclusiveArch: aarch64 ppc64le s390x x86_64
@ -538,14 +542,10 @@ fi
# Install managed symbols
tar xf artifacts/%{runtime_arch}/Release/dotnet-runtime-symbols-%{runtime_id}-%{runtime_version}.tar.gz \
-C %{buildroot}/%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Remove static files
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'libmono-*.a' -exec rm {} \;
-C %{buildroot}%{_libdir}/dotnet/shared/Microsoft.NETCore.App/%{runtime_version}/
# Fix executable permissions on files
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'apphost' -exec chmod +x {} \;
#find %{buildroot}%{_libdir}/dotnet/ -type f -name 'containerize' -exec chmod +x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'singlefilehost' -exec chmod +x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name 'lib*so' -exec chmod +x {} \;
find %{buildroot}%{_libdir}/dotnet/ -type f -name '*.a' -exec chmod -x {} \;
@ -664,6 +664,12 @@ export COMPlus_LTTng=0
%changelog
* Mon Sep 18 2023 Omair Majid <omajid@redhat.com> - 8.0.100~rc.1-0.2
- Add patches to fix mono and arm64 issues
- Include libmono-*.a files in the SDK
- Fix CI configuration
- Related: RHEL-4074
* Fri Sep 15 2023 Omair Majid <omajid@redhat.com> - 8.0.100~rc.1-0.1
- Update to .NET SDK 8.0.100 RC 1 and Runtime 8.0.0 RC 1
- Resolves: RHEL-4074

View File

@ -0,0 +1,29 @@
From a73b8bacfcc5819926bc05173ab2f7850eb00da3 Mon Sep 17 00:00:00 2001
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Date: Wed, 23 Aug 2023 21:11:37 +0200
Subject: [PATCH] [mono] Handle enum return type when inlining CreateInstance
Use underlying base type when deciding how to inline a
CreateInstance invocation in mini_emit_inst_for_method.
Fixes https://github.com/dotnet/runtime/issues/90292
(Mono abort causing .NET 8 msbuild regression).
---
src/mono/mono/mini/intrinsics.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/runtime/src/mono/mono/mini/intrinsics.c b/src/runtime/src/mono/mono/mini/intrinsics.c
index b1e5e76723147..ef77b7dc89f2e 100644
--- a/src/runtime/src/mono/mono/mini/intrinsics.c
+++ b//src/runtimesrc/mono/mono/mini/intrinsics.c
@@ -2079,7 +2079,9 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
MonoType *t = method_context->method_inst->type_argv [0];
MonoClass *arg0 = mono_class_from_mono_type_internal (t);
if (m_class_is_valuetype (arg0) && !mono_class_has_default_constructor (arg0, FALSE)) {
- if (m_class_is_primitive (arg0)) {
+ if (m_class_is_primitive (arg0) || m_class_is_enumtype (arg0)) {
+ if (m_class_is_enumtype (arg0))
+ t = mono_class_enum_basetype_internal (arg0);
int dreg = alloc_dreg (cfg, mini_type_to_stack_type (cfg, t));
mini_emit_init_rvar (cfg, dreg, t);
ins = cfg->cbb->last_ins;

View File

@ -0,0 +1,39 @@
From 7d3b041c09aa1d6cf532e64d24b75a7e5bd4d106 Mon Sep 17 00:00:00 2001
From: Tom Deseyn <tom.deseyn@gmail.com>
Date: Tue, 12 Sep 2023 07:43:45 +0200
Subject: [PATCH] Limit special diagnostics size region to 4KiB.
This fixes out-of-bounds access when trying to write the
diagnostics info on platforms where the PAGE_SIZE is larger
than the DumpWriter's 16KiB m_tempBuffer.
---
src/coreclr/debug/createdump/crashinfo.cpp | 2 +-
src/coreclr/debug/createdump/specialdiaginfo.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
index ef903767ba027..8af6ec4a54f5b 100644
--- a/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
+++ b/src/runtime/src/coreclr/debug/createdump/crashinfo.cpp
@@ -195,7 +195,7 @@ CrashInfo::GatherCrashInfo(DumpType dumpType)
return false;
}
// Add the special (fake) memory region for the special diagnostics info
- MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + PAGE_SIZE);
+ MemoryRegion special(PF_R, SpecialDiagInfoAddress, SpecialDiagInfoAddress + SpecialDiagInfoSize);
m_memoryRegions.insert(special);
#ifdef __APPLE__
InitializeOtherMappings();
diff --git a/src/runtime/src/coreclr/debug/createdump/specialdiaginfo.h b/src/runtime/src/coreclr/debug/createdump/specialdiaginfo.h
index 3a04a9f551e6d..a857129c9c91f 100644
--- a/src/runtime/src/coreclr/debug/createdump/specialdiaginfo.h
+++ b/src/runtime/src/coreclr/debug/createdump/specialdiaginfo.h
@@ -24,6 +24,8 @@ const uint64_t SpecialDiagInfoAddress = 0x7fff1000;
#endif
#endif
+const uint64_t SpecialDiagInfoSize = 0x1000;
+
struct SpecialDiagInfoHeader
{
char Signature[16];

View File

@ -20,6 +20,7 @@ prepare:
- jq
- libstdc++-devel
- lldb
- lttng-ust
- npm
- postgresql-odbc
- postgresql-server