From 73150b96f20001ac8ae2f22e665b27f912a82e03 Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Mar 28 2019 00:43:09 +0000 Subject: Update to .NET Core Runtime 2.1.9 and SDK 2.1.505 Remove upstreamed patches Add scripts for automating releases --- diff --git a/README.md b/README.md index 4db3077..524e54d 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,12 @@ Please report any issues [here](https://pagure.io/dotnet-sig/packaging-issues/ne the `Source` tag corresponds to the new tarball name, if there is a new tarball. + - If this is a new minor release, you can use `update-release` to + automate the update. + 5. Do local builds, not under a git directory: - - `fedpkg local --builddir ../dotnet-2-1-build` + - `fedpkg local` Fix any errors that come up and rebuild until it works locally. diff --git a/build-dotnet-tarball b/build-dotnet-tarball new file mode 100755 index 0000000..76b47f6 --- /dev/null +++ b/build-dotnet-tarball @@ -0,0 +1,64 @@ +#!/bin/bash + +# Usage: +# build-dotnet-tarball +# +# Creates a source archive from a tag at github.com/dotnet/source-build + +# Source-build is a little strange, we need to clone it, check out the tag, +# build it and then create a tarball from the archive directory it creates. + +set -euo pipefail +IFS=$'\n\t' + +print_usage() { + echo "Usage:" + echo "$0 " + echo + echo "Creates a source archive from a tag at https://github.com/dotnet/source-build" +} + +clean_dotnet_cache() { + rm -rf ~/.aspnet ~/.dotnet/ ~/.nuget/ ~/.local/share/NuGet ~/.templateengine + rm -rf /tmp/NuGet /tmp/NuGetScratch /tmp/.NETCore* /tmp/.NETStandard* /tmp/.dotnet /tmp/clr-debug-pipe* /tmp/Razor-Server /tmp/CoreFxPipe* /tmp/VBCSCompiler /tmp/.NETFramework* +} + +positional_args=() +while [[ "$#" -gt 0 ]]; do + arg="${1}" + case "${arg}" in + -h|--help) + print_usage + exit 0 + ;; + *) + positional_args+=("$1") + shift + ;; + esac +done + + +tag=${positional_args[0]:-} +if [[ -z ${tag} ]]; then + echo "error: missing tag to build" + exit 1 +fi + +set -x + +temp_dir=$(mktemp -d -p "$HOME/temp") +dir_name="dotnet-${tag}" +pushd "${temp_dir}" +git clone https://github.com/dotnet/source-build +pushd source-build +git checkout "${tag}" +git submodule update --init --recursive +clean_dotnet_cache +./build-source-tarball.sh "${dir_name}" +popd +popd + +tar czf "${dir_name}.tar.gz" -C "${temp_dir}/source-build" "${dir_name}" + +rm -rf "${temp_dir}" diff --git a/coreclr-assembly-hex-constants.patch b/coreclr-assembly-hex-constants.patch new file mode 100644 index 0000000..00428fb --- /dev/null +++ b/coreclr-assembly-hex-constants.patch @@ -0,0 +1,584 @@ +diff --git a/src/debug/ee/amd64/dbghelpers.S b/src/debug/ee/amd64/dbghelpers.S +index 85ec80c701..864c4dc943 100644 +--- a/src/debug/ee/amd64/dbghelpers.S ++++ b/src/debug/ee/amd64/dbghelpers.S +@@ -29,7 +29,7 @@ NESTED_ENTRY FuncEvalHijack, _TEXT, UnhandledExceptionHandlerUnix + // + // epilogue + // +- add rsp, 20h ++ add rsp, 0x20 + TAILJMP_RAX + NESTED_END FuncEvalHijack, _TEXT + +@@ -65,14 +65,14 @@ NESTED_ENTRY ExceptionHijack, _TEXT, UnhandledExceptionHandlerUnix + // its arguments on the stack. In x64, it gets its arguments in + // registers (set up for us by DacDbiInterfaceImpl::Hijack), + // and this stack space may be reused. +- mov rax, [rsp + 20h] ++ mov rax, [rsp + 0x20] + mov [rsp], rax +- mov rax, [rsp + 28h] +- mov [rsp + 8h], rax +- mov rax, [rsp + 30h] +- mov [rsp + 10h], rax +- mov rax, [rsp + 38h] +- mov [rsp + 18h], rax ++ mov rax, [rsp + 0x28] ++ mov [rsp + 0x8], rax ++ mov rax, [rsp + 0x30] ++ mov [rsp + 0x10], rax ++ mov rax, [rsp + 0x38] ++ mov [rsp + 0x18], rax + + // DD Hijack primitive already set the stack. So just make the call now. + call C_FUNC(ExceptionHijackWorker) +@@ -93,7 +93,7 @@ NESTED_ENTRY ExceptionHijack, _TEXT, UnhandledExceptionHandlerUnix + // + // epilogue + // +- add rsp, 20h ++ add rsp, 0x20 + TAILJMP_RAX + + // Put a label here to tell the debugger where the end of this function is. +diff --git a/src/pal/inc/unixasmmacros.inc b/src/pal/inc/unixasmmacros.inc +index e7a5eba898..8a74e3f266 100644 +--- a/src/pal/inc/unixasmmacros.inc ++++ b/src/pal/inc/unixasmmacros.inc +@@ -2,7 +2,7 @@ + // The .NET Foundation licenses this file to you under the MIT license. + // See the LICENSE file in the project root for more information. + +-#define INVALIDGCVALUE 0CCCCCCCDh ++#define INVALIDGCVALUE 0xCCCCCCCD + + #if defined(__APPLE__) + #define C_FUNC(name) _##name +diff --git a/src/vm/amd64/JitHelpers_Fast.asm b/src/vm/amd64/JitHelpers_Fast.asm +index 83f7132688..5251387408 100644 +--- a/src/vm/amd64/JitHelpers_Fast.asm ++++ b/src/vm/amd64/JitHelpers_Fast.asm +@@ -40,7 +40,7 @@ EXTERN g_GCShadow:QWORD + EXTERN g_GCShadowEnd:QWORD + endif + +-INVALIDGCVALUE equ 0CCCCCCCDh ++INVALIDGCVALUE equ 0xCCCCCCCD + + ifdef _DEBUG + extern JIT_WriteBarrier_Debug:proc +diff --git a/src/vm/amd64/JitHelpers_Slow.asm b/src/vm/amd64/JitHelpers_Slow.asm +index 0e26ae6dfd..80b7453d4f 100644 +--- a/src/vm/amd64/JitHelpers_Slow.asm ++++ b/src/vm/amd64/JitHelpers_Slow.asm +@@ -48,7 +48,7 @@ g_pStringClass equ ?g_pStringClass@@3PEAVMethodTable@@EA + FramedAllocateString equ ?FramedAllocateString@@YAPEAVStringObject@@K@Z + JIT_NewArr1 equ ?JIT_NewArr1@@YAPEAVObject@@PEAUCORINFO_CLASS_STRUCT_@@_J@Z + +-INVALIDGCVALUE equ 0CCCCCCCDh ++INVALIDGCVALUE equ 0xCCCCCCCD + + extern JIT_NEW:proc + extern CopyValueClassUnchecked:proc +diff --git a/src/vm/amd64/jithelpers_fast.S b/src/vm/amd64/jithelpers_fast.S +index 6f955b0bee..5f68fc0ebf 100644 +--- a/src/vm/amd64/jithelpers_fast.S ++++ b/src/vm/amd64/jithelpers_fast.S +@@ -81,14 +81,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT + // Update the write watch table if necessary + mov rax, rdi + movabs r10, 0xF0F0F0F0F0F0F0F0 +- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift ++ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift + NOP_2_BYTE // padding for alignment of constant + movabs r11, 0xF0F0F0F0F0F0F0F0 + add rax, r10 +- cmp byte ptr [rax], 0h ++ cmp byte ptr [rax], 0x0 + .byte 0x75, 0x06 + // jne CheckCardTable +- mov byte ptr [rax], 0FFh ++ mov byte ptr [rax], 0xFF + + NOP_3_BYTE // padding for alignment of constant + +@@ -112,27 +112,27 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT + + // Touch the card table entry, if not already dirty. + shr rdi, 0x0B +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable + REPRET + + UpdateCardTable: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_2_BYTE // padding for alignment of constant + shr rdi, 0x0A + + movabs rax, 0xF0F0F0F0F0F0F0F0 +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle_WriteWatch_PostGrow64 + REPRET + + UpdateCardBundle_WriteWatch_PostGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -177,14 +177,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT + movabs rax, 0xF0F0F0F0F0F0F0F0 + + // Touch the card table entry, if not already dirty. +- shr rdi, 0Bh +- cmp byte ptr [rdi + rax], 0FFh ++ shr rdi, 0x0B ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable + REPRET + + UpdateCardTable: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0x0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_6_BYTE // padding for alignment of constant +@@ -194,14 +194,14 @@ LEAF_ENTRY JIT_WriteBarrier, _TEXT + // Touch the card bundle, if not already dirty. + // rdi is already shifted by 0xB, so shift by 0xA more + shr rdi, 0x0A +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle + REPRET + + UpdateCardBundle: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -312,15 +312,15 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT + #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP + // Update the write watch table if necessary + PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, rax +- cmp byte ptr [rax], 0h ++ cmp byte ptr [rax], 0x0 + je CheckCardTable_ByRefWriteBarrier + mov rax, rdi +- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift ++ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift + PREPARE_EXTERNAL_VAR g_sw_ww_table, r10 + add rax, qword ptr [r10] +- cmp byte ptr [rax], 0h ++ cmp byte ptr [rax], 0x0 + jne CheckCardTable_ByRefWriteBarrier +- mov byte ptr [rax], 0FFh ++ mov byte ptr [rax], 0xFF + #endif + + CheckCardTable_ByRefWriteBarrier: +@@ -334,8 +334,8 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT + + // move current rdi value into rcx and then increment the pointers + mov rcx, rdi +- add rsi, 8h +- add rdi, 8h ++ add rsi, 0x8 ++ add rdi, 0x8 + + // Check if we need to update the card table + // Calc pCardByte +@@ -345,13 +345,13 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT + mov rax, [rax] + + // Check if this card is dirty +- cmp byte ptr [rcx + rax], 0FFh ++ cmp byte ptr [rcx + rax], 0xFF + + jne UpdateCardTable_ByRefWriteBarrier + REPRET + + UpdateCardTable_ByRefWriteBarrier: +- mov byte ptr [rcx + rax], 0FFh ++ mov byte ptr [rcx + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + // Shift rcx by 0x0A more to get the card bundle byte (we shifted by 0x0B already) +@@ -361,13 +361,13 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT + add rcx, [rax] + + // Check if this bundle byte is dirty +- cmp byte ptr [rcx], 0FFh ++ cmp byte ptr [rcx], 0xFF + + jne UpdateCardBundle_ByRefWriteBarrier + REPRET + + UpdateCardBundle_ByRefWriteBarrier: +- mov byte ptr [rcx], 0FFh ++ mov byte ptr [rcx], 0xFF + #endif + + ret +@@ -383,8 +383,8 @@ LEAF_ENTRY JIT_ByRefWriteBarrier, _TEXT + #endif + Exit_ByRefWriteBarrier: + // Increment the pointers before leaving +- add rdi, 8h +- add rsi, 8h ++ add rdi, 0x8 ++ add rsi, 0x8 + ret + LEAF_END JIT_ByRefWriteBarrier, _TEXT + +diff --git a/src/vm/amd64/jithelpers_fastwritebarriers.S b/src/vm/amd64/jithelpers_fastwritebarriers.S +index 23c1115165..0fe0e57472 100644 +--- a/src/vm/amd64/jithelpers_fastwritebarriers.S ++++ b/src/vm/amd64/jithelpers_fastwritebarriers.S +@@ -38,13 +38,13 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardTable + + // Touch the card table entry, if not already dirty. + shr rdi, 0x0B +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable_PreGrow64 + REPRET + + UpdateCardTable_PreGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_6_BYTE // padding for alignment of constant +@@ -55,14 +55,14 @@ PATCH_LABEL JIT_WriteBarrier_PreGrow64_Patch_Label_CardBundleTable + // Touch the card bundle, if not already dirty. + // rdi is already shifted by 0xB, so shift by 0xA more + shr rdi, 0x0A +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle_PreGrow64 + REPRET + + UpdateCardBundle_PreGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -123,13 +123,13 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardTable + + // Touch the card table entry, if not already dirty. + shr rdi, 0x0B +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable_PostGrow64 + REPRET + + UpdateCardTable_PostGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_6_BYTE // padding for alignment of constant +@@ -140,14 +140,14 @@ PATCH_LABEL JIT_WriteBarrier_PostGrow64_Patch_Label_CardBundleTable + // Touch the card bundle, if not already dirty. + // rdi is already shifted by 0xB, so shift by 0xA more + shr rdi, 0x0A +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle_PostGrow64 + REPRET + + UpdateCardBundle_PostGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -182,13 +182,13 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardTable + + shr rdi, 0x0B + +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable_SVR64 + REPRET + + UpdateCardTable_SVR64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_6_BYTE // padding for alignment of constant +@@ -198,14 +198,14 @@ PATCH_LABEL JIT_WriteBarrier_SVR64_PatchLabel_CardBundleTable + + // Shift the address by 0xA more since already shifted by 0xB + shr rdi, 0x0A +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle_SVR64 + REPRET + + UpdateCardBundle_SVR64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -236,15 +236,15 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_PreGrow64, _TEXT + mov rax, rdi + PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_WriteWatchTable + movabs r10, 0xF0F0F0F0F0F0F0F0 +- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift ++ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift + NOP_2_BYTE // padding for alignment of constant + PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower + movabs r11, 0xF0F0F0F0F0F0F0F0 + add rax, r10 +- cmp byte ptr [rax], 0h ++ cmp byte ptr [rax], 0x0 + .byte 0x75, 0x03 + // jne CheckCardTable_WriteWatch_PreGrow64 +- mov byte ptr [rax], 0FFh ++ mov byte ptr [rax], 0xFF + + CheckCardTable_WriteWatch_PreGrow64: + // Check the lower ephemeral region bound. +@@ -263,13 +263,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_Lower + NOP_2_BYTE // padding for alignment of constant + PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardTable + movabs rax, 0xF0F0F0F0F0F0F0F0 +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable_WriteWatch_PreGrow64 + REPRET + + UpdateCardTable_WriteWatch_PreGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_2_BYTE // padding for alignment of constant +@@ -277,14 +277,14 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PreGrow64_Patch_Label_CardBundleTable + movabs rax, 0xF0F0F0F0F0F0F0F0 + + shr rdi, 0x0A +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle_WriteWatch_PreGrow64 + REPRET + + UpdateCardBundle_WriteWatch_PreGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -314,15 +314,15 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_PostGrow64, _TEXT + mov rax, rdi + PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_WriteWatchTable + movabs r10, 0xF0F0F0F0F0F0F0F0 +- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift ++ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift + NOP_2_BYTE // padding for alignment of constant + PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_Lower + movabs r11, 0xF0F0F0F0F0F0F0F0 + add rax, r10 +- cmp byte ptr [rax], 0h ++ cmp byte ptr [rax], 0x0 + .byte 0x75, 0x06 + // jne CheckCardTable_WriteWatch_PostGrow64 +- mov byte ptr [rax], 0FFh ++ mov byte ptr [rax], 0xFF + + NOP_3_BYTE // padding for alignment of constant + +@@ -358,13 +358,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable + + // Touch the card table entry, if not already dirty. + shr rdi, 0x0B +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable_WriteWatch_PostGrow64 + REPRET + + UpdateCardTable_WriteWatch_PostGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP_2_BYTE // padding for alignment of constant +@@ -372,14 +372,14 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardTable + + PATCH_LABEL JIT_WriteBarrier_WriteWatch_PostGrow64_Patch_Label_CardBundleTable + movabs rax, 0xF0F0F0F0F0F0F0F0 +- cmp byte ptr [rdi + rax], 0FFh ++ cmp byte ptr [rdi + rax], 0xFF + + .byte 0x75, 0x02 + // jne UpdateCardBundle_WriteWatch_PostGrow64 + REPRET + + UpdateCardBundle_WriteWatch_PostGrow64: +- mov byte ptr [rdi + rax], 0FFh ++ mov byte ptr [rdi + rax], 0xFF + #endif + + ret +@@ -417,25 +417,25 @@ LEAF_ENTRY JIT_WriteBarrier_WriteWatch_SVR64, _TEXT + mov rax, rdi + PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_WriteWatchTable + movabs r10, 0xF0F0F0F0F0F0F0F0 +- shr rax, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift ++ shr rax, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift + NOP_2_BYTE // padding for alignment of constant + PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardTable + movabs r11, 0xF0F0F0F0F0F0F0F0 + add rax, r10 +- cmp byte ptr [rax], 0h ++ cmp byte ptr [rax], 0x0 + .byte 0x75, 0x03 + // jne CheckCardTable_WriteWatch_SVR64 +- mov byte ptr [rax], 0FFh ++ mov byte ptr [rax], 0xFF + + CheckCardTable_WriteWatch_SVR64: + shr rdi, 0x0B +- cmp byte ptr [rdi + r11], 0FFh ++ cmp byte ptr [rdi + r11], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardTable_WriteWatch_SVR64 + REPRET + + UpdateCardTable_WriteWatch_SVR64: +- mov byte ptr [rdi + r11], 0FFh ++ mov byte ptr [rdi + r11], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + NOP // padding for alignment of constant +@@ -444,13 +444,13 @@ PATCH_LABEL JIT_WriteBarrier_WriteWatch_SVR64_PatchLabel_CardBundleTable + movabs r11, 0xF0F0F0F0F0F0F0F0 + + shr rdi, 0x0A +- cmp byte ptr [rdi + r11], 0FFh ++ cmp byte ptr [rdi + r11], 0xFF + .byte 0x75, 0x02 + // jne UpdateCardBundle_WriteWatch_SVR64 + REPRET + + UpdateCardBundle_WriteWatch_SVR64: +- mov byte ptr [rdi + r11], 0FFh ++ mov byte ptr [rdi + r11], 0xFF + #endif + + ret +diff --git a/src/vm/amd64/jithelpers_slow.S b/src/vm/amd64/jithelpers_slow.S +index f61b42afc7..aa2e8cc064 100644 +--- a/src/vm/amd64/jithelpers_slow.S ++++ b/src/vm/amd64/jithelpers_slow.S +@@ -71,15 +71,15 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT + #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP + // Update the write watch table if necessary + PREPARE_EXTERNAL_VAR g_sw_ww_enabled_for_gc_heap, r10 +- cmp byte ptr [r10], 0h ++ cmp byte ptr [r10], 0x0 + je CheckCardTable_Debug + mov r10, rdi +- shr r10, 0Ch // SoftwareWriteWatch::AddressToTableByteIndexShift ++ shr r10, 0xC // SoftwareWriteWatch::AddressToTableByteIndexShift + PREPARE_EXTERNAL_VAR g_sw_ww_table, r11 + add r10, qword ptr [r11] +- cmp byte ptr [r10], 0h ++ cmp byte ptr [r10], 0x0 + jne CheckCardTable_Debug +- mov byte ptr [r10], 0FFh ++ mov byte ptr [r10], 0xFF + #endif + + CheckCardTable_Debug: +@@ -99,13 +99,13 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT + mov r10, [r10] + + // Check if this card is dirty +- cmp byte ptr [rdi + r10], 0FFh ++ cmp byte ptr [rdi + r10], 0xFF + + jne UpdateCardTable_Debug + REPRET + + UpdateCardTable_Debug: +- mov byte ptr [rdi + r10], 0FFh ++ mov byte ptr [rdi + r10], 0xFF + + #ifdef FEATURE_MANUALLY_MANAGED_CARD_BUNDLES + // Shift rdi by 0x0A more to get the card bundle byte (we shifted by 0x0B already) +@@ -115,13 +115,13 @@ LEAF_ENTRY JIT_WriteBarrier_Debug, _TEXT + add rdi, [r10] + + // Check if this bundle byte is dirty +- cmp byte ptr [rdi], 0FFh ++ cmp byte ptr [rdi], 0xFF + + jne UpdateCardBundle_Debug + REPRET + + UpdateCardBundle_Debug: +- mov byte ptr [rdi], 0FFh ++ mov byte ptr [rdi], 0xFF + #endif + + ret +diff --git a/src/vm/amd64/virtualcallstubamd64.S b/src/vm/amd64/virtualcallstubamd64.S +index 59b5b77dba..38c33d498e 100644 +--- a/src/vm/amd64/virtualcallstubamd64.S ++++ b/src/vm/amd64/virtualcallstubamd64.S +@@ -59,19 +59,19 @@ LEAF_ENTRY ResolveWorkerChainLookupAsmStub, _TEXT + jnz Fail_RWCLAS // If the BACKPATCH_FLAGS is set we will go directly to the ResolveWorkerAsmStub + + MainLoop_RWCLAS: +- mov rax, [rax+18h] // get the next entry in the chain (don't bother checking the first entry again) ++ mov rax, [rax+0x18] // get the next entry in the chain (don't bother checking the first entry again) + test rax,rax // test if we hit a terminating NULL + jz Fail_RWCLAS + +- cmp rdx, [rax+00h] // compare our MT with the one in the ResolveCacheElem ++ cmp rdx, [rax+0x0] // compare our MT with the one in the ResolveCacheElem + jne MainLoop_RWCLAS +- cmp r10, [rax+08h] // compare our DispatchToken with one in the ResolveCacheElem ++ cmp r10, [rax+0x8] // compare our DispatchToken with one in the ResolveCacheElem + jne MainLoop_RWCLAS + Success_RWCLAS: + PREPARE_EXTERNAL_VAR CHAIN_SUCCESS_COUNTER, rdx + sub qword ptr [rdx],1 // decrement success counter + jl Promote_RWCLAS +- mov rax, [rax+10h] // get the ImplTarget ++ mov rax, [rax+0x10] // get the ImplTarget + pop rdx + jmp rax + diff --git a/dotnet2.1.spec b/dotnet2.1.spec index f13c51b..a79a495 100644 --- a/dotnet2.1.spec +++ b/dotnet2.1.spec @@ -27,9 +27,9 @@ %global simple_name dotnet -%global host_version 2.1.8 -%global sdk_version 2.1.504 -%global runtime_version 2.1.8 +%global host_version 2.1.9 +%global sdk_version 2.1.505 +%global runtime_version 2.1.9 Name: %{simple_name}2.1 Version: %{sdk_version} @@ -49,15 +49,6 @@ Source0: dotnet-v%{runtime_version}.tar.gz Source1: check-debug-symbols.py Source2: dotnet.sh -# This is https://github.com/dotnet/corefx/pull/34443 -Patch1: 0001-NetFX-compatibility-fixes-for-X500DistinguishedName.patch -Patch2: 0002-Drop-pal_asn1_print-in-favor-of-the-managed-code.patch -Patch3: 0003-Add-hybrid-support-for-OpenSSL-1.0-and-1.1.patch -Patch4: 0004-Use-HMAC_CTX_free-instead-of-free-on-a-HMAC_CTX-3422.patch -Patch5: 0005-Prefer-OpenSSL-1.0.x-for-portable-builds.patch -Patch6: 0006-Check-for-the-specific-in-use-version-of-OpenSSL-whe.patch -Patch7: 0007-Relax-the-OpenSSL-error-checking-code.patch - Patch10: corefx-optflags-support.patch Patch11: corefx-32956-alpn.patch Patch12: corefx-rhel-runtime-ids.patch @@ -66,6 +57,7 @@ Patch100: coreclr-build-python3.patch Patch101: coreclr-cmake-python3.patch Patch102: coreclr-mscorlib.patch Patch103: coreclr-pie.patch +Patch104: coreclr-assembly-hex-constants.patch Patch300: core-setup-4510-commit-id.patch Patch301: core-setup-pie.patch @@ -230,14 +222,6 @@ applications and micro-services. sed -i 's|/usr/share/dotnet|%{_libdir}/%{simple_name}|' src/core-setup/src/corehost/common/pal.unix.cpp pushd src/corefx -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 - %patch10 -p1 %patch11 -p1 %patch12 -p1 @@ -248,6 +232,7 @@ pushd src/coreclr %patch101 -p1 %patch102 -p1 %patch103 -p1 +%patch104 -p1 popd pushd src/core-setup @@ -350,6 +335,9 @@ echo "Testing build results for debug symbols..." %{_libdir}/%{simple_name}/sdk/%{sdk_version} %changelog +* Tue Mar 26 2019 Omair Majid - 2.1.505-1 +- Update to .NET Core Runtime 2.1.9 and SDK 2.1.505 + * Tue Feb 19 2019 Omair Majid - 2.1.504-1 - Update to .NET Core Runtime 2.1.8 and SDK 2.1.504 diff --git a/update-release b/update-release new file mode 100755 index 0000000..1959933 --- /dev/null +++ b/update-release @@ -0,0 +1,57 @@ +#!/bin/bash + +# Usage: +# ./update-release runtime-version sdk-version + +set -euo pipefail +IFS=$'\n\t' + +positional_args=() +while [[ "$#" -gt 0 ]]; do + arg="${1}" + case "${arg}" in + -h|--help) + print_usage + exit 0 + ;; + *) + positional_args+=("$1") + shift + ;; + esac +done + +spec_file=dotnet2.1.spec + +runtime_version=${positional_args[0]:-} +if [[ -z ${runtime_version} ]]; then + echo "error: missing runtime version" + exit 1 +fi +host_version="$runtime_version" + +sdk_version=${positional_args[1]:-} +if [[ -z ${sdk_version} ]]; then + echo "error: missing sdk version" + exit 1 +fi + +if [[ ! -f "dotnet-v${runtime_version}.tar.gz" ]]; then + ./build-dotnet-tarball "v${runtime_version}" +fi + +set -x + +sed -i -E "s|^%global host_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]|%global host_version ${host_version}|" "$spec_file" +sed -i -E "s|^%global runtime_version [[:digit:]]\.[[:digit:]]\.[[:digit:]]|%global runtime_version ${runtime_version}|" "$spec_file" +sed -i -E "s|^%global sdk_version [[:digit:]]\.[[:digit:]]\.[[:digit:]][[:digit:]][[:digit:]]|%global sdk_version ${sdk_version}|" "$spec_file" + +comment="Update to .NET Core Runtime ${runtime_version} and SDK ${sdk_version}" + +rpmdev-bumpspec --comment="$comment" $spec_file + +# Reset release to 1 in 'Release' tag +sed -i -E 's|^Release: [[:digit:]]+%|Release: 1%|' $spec_file +# Reset Release in changelog comment +# See https://stackoverflow.com/questions/18620153/find-matching-text-and-replace-next-line +sed -i -E '/^%changelog$/!b;n;s/-[[:digit:]]+$/-1/' $spec_file