#7 Update to .NET Core Runtime 2.2.4 and SDK 2.2.106
Merged 5 years ago by rhea. Opened 5 years ago by omajid.
dotnet-sig/ omajid/dotnet-2-2 master  into  master

@@ -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_MARKED 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

+          

@@ -20,9 +20,9 @@ 

   

  +

  +set (PREVIOUS_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

- +set (CMAKE_CXX_FLAGS "")

+ +set (CMAKE_CXX_FLAGS "-D_GNU_SOURCE")

  +set (PREVIOUS_CMAKE_C_FLAGS ${CMAKE_C_FLAGS})

- +set (CMAKE_C_FLAGS "")

+ +set (CMAKE_C_FLAGS "-D_GNU_SOURCE")

  +

   # We compile with -Werror, so we need to make sure these code fragments compile without warnings.

   # Older CMake versions (3.8) do not assign the result of their tests, causing unused-value errors

@@ -1,206 +0,0 @@ 

- diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json

- index 7272b5de10..99fd8de923 100644

- --- a/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json

- +++ b/pkg/Microsoft.NETCore.Platforms/runtime.compatibility.json

- @@ -4923,6 +4923,123 @@

-      "any",

-      "base"

-    ],

- +  "rhel.8": [

- +    "rhel.8",

- +    "rhel",

- +    "linux",

- +    "unix",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8-corert": [

- +    "rhel.8-corert",

- +    "rhel.8",

- +    "rhel-corert",

- +    "rhel",

- +    "linux-corert",

- +    "linux",

- +    "unix-corert",

- +    "unix",

- +    "corert",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8-x64": [

- +    "rhel.8-x64",

- +    "rhel.8",

- +    "rhel-x64",

- +    "rhel",

- +    "linux-x64",

- +    "linux",

- +    "unix-x64",

- +    "unix",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8-x64-corert": [

- +    "rhel.8-x64-corert",

- +    "rhel.8-corert",

- +    "rhel.8-x64",

- +    "rhel.8",

- +    "rhel-x64-corert",

- +    "rhel-corert",

- +    "rhel-x64",

- +    "rhel",

- +    "linux-x64-corert",

- +    "linux-corert",

- +    "linux-x64",

- +    "linux",

- +    "unix-x64-corert",

- +    "unix-corert",

- +    "unix-x64",

- +    "unix",

- +    "corert",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8.0": [

- +    "rhel.8.0",

- +    "rhel.8",

- +    "rhel",

- +    "linux",

- +    "unix",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8.0-corert": [

- +    "rhel.8.0-corert",

- +    "rhel.8.0",

- +    "rhel.8-corert",

- +    "rhel.8",

- +    "rhel-corert",

- +    "rhel",

- +    "linux-corert",

- +    "linux",

- +    "unix-corert",

- +    "unix",

- +    "corert",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8.0-x64": [

- +    "rhel.8.0-x64",

- +    "rhel.8.0",

- +    "rhel.8-x64",

- +    "rhel.8",

- +    "rhel-x64",

- +    "rhel",

- +    "linux-x64",

- +    "linux",

- +    "unix-x64",

- +    "unix",

- +    "any",

- +    "base"

- +  ],

- +  "rhel.8.0-x64-corert": [

- +    "rhel.8.0-x64-corert",

- +    "rhel.8.0-corert",

- +    "rhel.8.0-x64",

- +    "rhel.8.0",

- +    "rhel.8-x64-corert",

- +    "rhel.8-corert",

- +    "rhel.8-x64",

- +    "rhel.8",

- +    "rhel-x64-corert",

- +    "rhel-corert",

- +    "rhel-x64",

- +    "rhel",

- +    "linux-x64-corert",

- +    "linux-corert",

- +    "linux-x64",

- +    "linux",

- +    "unix-x64-corert",

- +    "unix-corert",

- +    "unix-x64",

- +    "unix",

- +    "corert",

- +    "any",

- +    "base"

- +  ],

-    "sles": [

-      "sles",

-      "linux",

- diff --git a/pkg/Microsoft.NETCore.Platforms/runtime.json b/pkg/Microsoft.NETCore.Platforms/runtime.json

- index e57332c62c..fc56341c7e 100644

- --- a/pkg/Microsoft.NETCore.Platforms/runtime.json

- +++ b/pkg/Microsoft.NETCore.Platforms/runtime.json

- @@ -1800,6 +1800,56 @@

-          "rhel.7.5-x64-corert"

-        ]

-      },

- +    "rhel.8": {

- +      "#import": [

- +        "rhel"

- +      ]

- +    },

- +    "rhel.8-corert": {

- +      "#import": [

- +        "rhel.8",

- +        "rhel-corert"

- +      ]

- +    },

- +    "rhel.8-x64": {

- +      "#import": [

- +        "rhel.8",

- +        "rhel-x64"

- +      ]

- +    },

- +    "rhel.8-x64-corert": {

- +      "#import": [

- +        "rhel.8-corert",

- +        "rhel.8-x64",

- +        "rhel.8",

- +        "rhel-x64-corert"

- +      ]

- +    },

- +    "rhel.8.0": {

- +      "#import": [

- +        "rhel.8"

- +      ]

- +    },

- +    "rhel.8.0-corert": {

- +      "#import": [

- +        "rhel.8.0",

- +        "rhel.8-corert"

- +      ]

- +    },

- +    "rhel.8.0-x64": {

- +      "#import": [

- +        "rhel.8.0",

- +        "rhel.8-x64"

- +      ]

- +    },

- +    "rhel.8.0-x64-corert": {

- +      "#import": [

- +        "rhel.8.0-corert",

- +        "rhel.8.0-x64",

- +        "rhel.8.0",

- +        "rhel.8-x64-corert"

- +      ]

- +    },

-      "sles": {

-        "#import": [

-          "linux"

- diff --git a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props

- index cc93f8bf91..21f6109824 100644

- --- a/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props

- +++ b/pkg/Microsoft.NETCore.Platforms/runtimeGroups.props

- @@ -103,6 +103,12 @@

-        <Versions>7;7.0;7.1;7.2;7.3;7.4;7.5;7.6</Versions>

-      </RuntimeGroup>

-  

- +    <RuntimeGroup Include="rhel">

- +      <Parent>linux</Parent>

- +      <Architectures>x64</Architectures>

- +      <Versions>8;8.0</Versions>

- +    </RuntimeGroup>

- +

-      <RuntimeGroup Include="sles">

-        <Parent>linux</Parent>

-        <Architectures>x64</Architectures>

file modified
+33 -33
@@ -14,7 +14,7 @@ 

  

  # Filter flags not supported by clang/dotnet:

  #  -fcf-protection is not supported by clang

- #  -fstack-clask-protection is not supported by clang

+ #  -fstack-clash-protection is not supported by clang

  #  -specs= is not supported by clang

  %global dotnet_cflags %(echo %optflags | sed -e 's/-fcf-protection//' | sed -e 's/-fstack-clash-protection//' | sed -re 's/-specs=[^ ]*//g')

  %global dotnet_ldflags %(echo %{__global_ldflags} | sed -re 's/-specs=[^ ]*//g')
@@ -27,9 +27,9 @@ 

  

  %global simple_name dotnet

  

- %global host_version 2.2.3

- %global sdk_version 2.2.105

- %global runtime_version 2.2.3

+ %global host_version 2.2.4

+ %global sdk_version 2.2.106

+ %global runtime_version 2.2.4

  

  Name:           %{simple_name}2.2

  Version:        %{sdk_version}
@@ -38,25 +38,20 @@ 

  License:        MIT and ASL 2.0 and BSD

  URL:            https://github.com/dotnet/

  

- # The source is generated on a Fedora box via:

- # - git clone https://github.com/dotnet/source-build

- # - git checkout v%%{runtime_version}

- # - (optional: set environment variables + tweak sources to build)

- # - ./build-source-tarball.sh dotnet-%%{sdk_version}

- # - tar cvzf dotnet-%%{runtime_version}.tar.gz dotnet-%%{runtime_version}

- 

+ # The source tarball is generated on a Fedora box via:

+ # ./build-dotnet-tarball dotnet-v%%{runtime_version}

  Source0:        dotnet-v%{runtime_version}.tar.gz

  Source1:        check-debug-symbols.py

  Source2:        dotnet.sh

  

- Patch10:        corefx-optflags-support.patch

- Patch11:        corefx-32956-alpn.patch

- Patch12:        corefx-rhel-runtime-ids.patch

+ Patch100:       corefx-32956-alpn.patch

+ Patch101:       corefx-optflags-support.patch

  

- Patch100:       coreclr-build-python3.patch

- Patch101:       coreclr-cmake-python3.patch

- Patch102:       coreclr-mscorlib.patch

- Patch103:       coreclr-pie.patch

+ Patch200:       coreclr-build-python3.patch

+ Patch201:       coreclr-cmake-python3.patch

+ Patch202:       coreclr-mscorlib.patch

+ Patch203:       coreclr-pie.patch

+ Patch204:       coreclr-assembly-hex-constants.patch

  

  Patch300:       core-setup-4510-commit-id.patch

  Patch301:       core-setup-pie.patch
@@ -206,17 +201,25 @@ 

  # Fix bad hardcoded path in build

  sed -i 's|/usr/share/dotnet|%{_libdir}/%{simple_name}|' src/core-setup/src/corehost/common/pal.unix.cpp

  

+ %if %{use_bundled_libunwind}

+ # Use bundled libunwind

+ sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj

+ %endif

+ 

+ # Disable warnings

+ sed -i 's|skiptests|skiptests ignorewarnings|' repos/coreclr.proj

+ 

  pushd src/corefx

- %patch10 -p1

- %patch11 -p1

- %patch12 -p1

+ %patch100 -p1

+ %patch101 -p1

  popd

  

  pushd src/coreclr

- %patch100 -p1

- %patch101 -p1

- %patch102 -p1

- %patch103 -p1

+ %patch200 -p1

+ %patch201 -p1

+ %patch202 -p1

+ %patch203 -p1

+ %patch204 -p1

  popd

  

  pushd src/core-setup
@@ -227,13 +230,6 @@ 

  %patch400 -p1

  popd

  

- %if %{use_bundled_libunwind}

- # Use bundled libunwind

- sed -i 's|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=TRUE|-DCLR_CMAKE_USE_SYSTEM_LIBUNWIND=FALSE|' repos/coreclr.proj

- %endif

- 

- # disable -Werror

- sed -i '/add_compile_options(-Werror)/d' src/coreclr/compileoptions.cmake

  

  %build

  export CFLAGS="%{dotnet_cflags}"
@@ -244,7 +240,8 @@ 

    /v:n \

    /p:LogVerbosity=n \

    /p:MinimalConsoleLogOutput=false \

-   /p:ContinueOnPrebuiltBaselineError=true

+   /p:ContinueOnPrebuiltBaselineError=true \

+ 

  

  %install

  install -d -m 0755 %{buildroot}%{_libdir}/%{simple_name}/
@@ -315,6 +312,9 @@ 

  %{_libdir}/%{simple_name}/sdk/%{sdk_version}

  

  %changelog

+ * Fri Apr 12 2019 Omair Majid <omajid@redhat.com> - 2.2.106-1

+ - Update to .NET Core Runtime 2.2.4 and SDK 2.2.106

+ 

  * Fri Mar 22 2019 Omair Majid <omajid@redhat.com> - 2.2.105-1

  - Update to .NET Core Runtime 2.2.3 and SDK 2.2.105

  

file added
+49
@@ -0,0 +1,49 @@ 

+ #!/bin/bash

+ 

+ # Usage:

+ #     ./update-release original-name.tar.gz new-name.tar.gz

+ 

+ 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

+ 

+ original_name=${positional_args[0]:-}

+ if [[ -z ${original_name} ]]; then

+     echo "error: missing original tarball name"

+     exit 1

+ fi

+ 

+ new_name=${positional_args[1]:-}

+ if [[ -z ${new_name} ]]; then

+     echo "error: missing new tarball name"

+     exit 1

+ fi

+ 

+ original_name=${original_name/%.tar.gz}

+ new_name=${new_name/.tar.gz}

+ 

+ echo "Original: ${original_name}.tar.gz"

+ echo "New name: ${new_name}.tar.gz"

+ 

+ mkdir "temp-${new_name}"

+ pushd "temp-${new_name}"

+ tar xf "../${original_name}.tar.gz"

+ mv "${original_name}" "${new_name}"

+ tar czf ../"${new_name}.tar.gz" "${new_name}"

+ rm -rf "${new_name}"

+ popd

+ rmdir "temp-${new_name}"

file modified
+9
@@ -6,6 +6,11 @@ 

  set -euo pipefail

  IFS=$'\n\t'

  

+ print_usage() {

+     echo " Usage:"

+     echo "     ./update-release runtime-version sdk-version"

+ }

+ 

  positional_args=()

  while [[ "$#" -gt 0 ]]; do

      arg="${1}"
@@ -36,6 +41,10 @@ 

      exit 1

  fi

  

+ if [[ ! -f "dotnet-v${runtime_version}.tar.gz" ]] && [[ -f "dotnet-${runtime_version}.tar.gz" ]]; then

+     ./rename-tarball "dotnet-${runtime_version}.tar.gz" "dotnet-v${runtime_version}.tar.gz"

+ fi

+ 

  if [[ ! -f "dotnet-v${runtime_version}.tar.gz" ]]; then

      ./build-dotnet-tarball "v${runtime_version}"

  fi

  • Also update optflags patch to pass -D_GNU_SOURCE to make sure our
    build-time flags match the configure-time flags. Otherwise some
    functions like strerror_r() get different definitions.

  • Add a new patch to fix builds against newer versions of clang. Recent
    versions of clang refuse to compile assembly code that use hex constants
    with 0..h prefix + suffix to mean a hex char. This syntax is also
    rejected by newer versions of GCC. Use plain 0x.. instead.

  • Renumber patches to make a little more sense: corefx is 100-series,
    coreclr is 200-series, core-setup is 300-series and cli is 400-series.

  • Add some scripts to automate the update-to-a-new-upstream-release
    process.

  • Sync spec file with other releases.

Build: https://copr.fedorainfracloud.org/coprs/g/dotnet-sig/dotnet/build/882655/

Pull-Request has been merged by rhea

5 years ago