diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 7553884106c90f..f6c30fd2ff808e 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "microsoft.dotnet.xharness.cli": { - "version": "8.0.0-prerelease.25207.2", + "version": "8.0.0-prerelease.25255.2", "commands": [ "xharness" ] diff --git a/NuGet.config b/NuGet.config index dc91f8b941028d..bf140690b22d67 100644 --- a/NuGet.config +++ b/NuGet.config @@ -9,7 +9,7 @@ - + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index eb015ec454d2e0..862e386a6a756c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -90,18 +90,18 @@ 45dd3a73dd5b64b010c4251303b3664bb30df029 - + https://github.com/dotnet/emsdk - 2b0cca8ad3a88e02fe0878139009ffffde071f1f + 976b101e5539557c20e2ac39885ac879531bcf82 - + https://github.com/dotnet/emsdk - 2b0cca8ad3a88e02fe0878139009ffffde071f1f + 976b101e5539557c20e2ac39885ac879531bcf82 - + https://github.com/dotnet/source-build-reference-packages - d73fc552386797322e84fa9b2ef5eaa5369de83c + 6ae07097c0f03eb59c8a581faaedcc3f2e4cc42c @@ -111,9 +111,9 @@ - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 @@ -121,121 +121,121 @@ 73f0850939d96131c28cf6ea6ee5aacb4da0083a - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f https://github.com/dotnet/llvm-project @@ -322,21 +322,21 @@ https://github.com/dotnet/runtime edbd5c769a19798b6955050baccf99e6797d3208 - + https://github.com/dotnet/xharness - 6dbf15dc48cde2bde6f62811ba73241b067b3683 + 5429dfdddde318dd8355c661173da7f2f285ebce - + https://github.com/dotnet/xharness - 6dbf15dc48cde2bde6f62811ba73241b067b3683 + 5429dfdddde318dd8355c661173da7f2f285ebce - + https://github.com/dotnet/xharness - 6dbf15dc48cde2bde6f62811ba73241b067b3683 + 5429dfdddde318dd8355c661173da7f2f285ebce - + https://github.com/dotnet/arcade - c487e860d456cda2580600ad81fd425d3bba21f7 + 20ab70a74d52b68f4271bd946884e24049b14f83 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization @@ -354,13 +354,13 @@ https://dev.azure.com/dnceng/internal/_git/dotnet-optimization 67613417f5e1af250e6ddfba79f8f2885d8e90fb - + https://github.com/dotnet/hotreload-utils - 2dd1cedb9d30de03b034d3856c33a2cdf5f42b6c + 6907eb448c5b24e402a45086171ab6c7e2269056 - + https://github.com/dotnet/runtime-assets - 611d6c8595694c9755c9f0cc36ae6018c4c15143 + f223eaeaa143e11a248ee81611819e3803883e6f https://github.com/dotnet/roslyn diff --git a/eng/Versions.props b/eng/Versions.props index 7238cc0a4196c5..454b6acef5fe32 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -1,11 +1,11 @@ - 8.0.17 + 8.0.18 8 0 - 17 + 18 8.0.100 7.0.20 6.0.36 @@ -87,21 +87,21 @@ 8.0.100 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 2.5.1-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 - 8.0.0-beta.25214.7 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 2.5.1-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 + 8.0.0-beta.25263.4 6.0.0-preview.1.102 @@ -153,20 +153,20 @@ 4.5.0 8.0.0-rc.1.23406.6 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 - 8.0.0-beta.25211.2 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 + 8.0.0-beta.25266.1 1.0.0-prerelease.23566.3 1.0.0-prerelease.23566.3 @@ -195,10 +195,10 @@ 1.1.0 17.4.0-preview-20220707-01 - 8.0.0-prerelease.25207.2 - 8.0.0-prerelease.25207.2 - 8.0.0-prerelease.25207.2 - 8.0.0-alpha.0.25214.2 + 8.0.0-prerelease.25255.2 + 8.0.0-prerelease.25255.2 + 8.0.0-prerelease.25255.2 + 8.0.0-alpha.0.25265.1 2.4.2 1.0.0 2.4.5 @@ -252,7 +252,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100_Transport --> - 8.0.17 + 8.0.18 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100Version) 1.1.87-gba258badda @@ -269,7 +269,7 @@ 3.1.7 1.0.406601 - 8.0.115 + 8.0.116 $(MicrosoftDotnetSdkInternalVersion) diff --git a/eng/common/templates-official/job/source-build.yml b/eng/common/templates-official/job/source-build.yml index f983033bb028aa..4217d6d8b1481e 100644 --- a/eng/common/templates-official/job/source-build.yml +++ b/eng/common/templates-official/job/source-build.yml @@ -54,7 +54,7 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] diff --git a/eng/common/templates-official/job/source-index-stage1.yml b/eng/common/templates-official/job/source-index-stage1.yml index 60dfb6b2d1c08f..fb632b71a250b8 100644 --- a/eng/common/templates-official/job/source-index-stage1.yml +++ b/eng/common/templates-official/job/source-index-stage1.yml @@ -1,7 +1,7 @@ parameters: runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20240502.12 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20240129.2 + sourceIndexUploadPackageVersion: 2.0.0-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] diff --git a/eng/common/templates-official/jobs/source-build.yml b/eng/common/templates-official/jobs/source-build.yml index 5cf6a269c0b62a..b9247be1547b73 100644 --- a/eng/common/templates-official/jobs/source-build.yml +++ b/eng/common/templates-official/jobs/source-build.yml @@ -14,7 +14,7 @@ parameters: # This is the default platform provided by Arcade, intended for use by a managed-only repo. defaultManagedPlatform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-9-amd64' # Defines the platforms on which to run build jobs. One job is created for each platform, and the # object in this array is sent to the job template as 'platform'. If no platforms are specified, diff --git a/eng/common/templates/job/source-build.yml b/eng/common/templates/job/source-build.yml index c0ff472b697b18..c48f95d93d916e 100644 --- a/eng/common/templates/job/source-build.yml +++ b/eng/common/templates/job/source-build.yml @@ -54,11 +54,11 @@ jobs: pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore-Svc-Public' ), False, 'NetCore-Public')] - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: $[replace(replace(eq(contains(coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranch'], 'refs/heads/main'), 'release'), 'true'), True, 'NetCore1ESPool-Svc-Internal'), False, 'NetCore1ESPool-Internal')] - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 + demands: ImageOverride -equals Build.Ubuntu.2204.Amd64 ${{ if ne(parameters.platform.pool, '') }}: pool: ${{ parameters.platform.pool }} diff --git a/eng/common/templates/job/source-index-stage1.yml b/eng/common/templates/job/source-index-stage1.yml index 0b6bb89dc78a7d..8538f44bab28b7 100644 --- a/eng/common/templates/job/source-index-stage1.yml +++ b/eng/common/templates/job/source-index-stage1.yml @@ -1,7 +1,7 @@ parameters: runAsPublic: false - sourceIndexUploadPackageVersion: 2.0.0-20240502.12 - sourceIndexProcessBinlogPackageVersion: 1.0.1-20240129.2 + sourceIndexUploadPackageVersion: 2.0.0-20250425.2 + sourceIndexProcessBinlogPackageVersion: 1.0.1-20250425.2 sourceIndexPackageSource: https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json sourceIndexBuildCommand: powershell -NoLogo -NoProfile -ExecutionPolicy Bypass -Command "eng/common/build.ps1 -restore -build -binarylog -ci" preSteps: [] diff --git a/eng/common/templates/jobs/source-build.yml b/eng/common/templates/jobs/source-build.yml index 5f46bfa895c184..3ec997108107bc 100644 --- a/eng/common/templates/jobs/source-build.yml +++ b/eng/common/templates/jobs/source-build.yml @@ -14,7 +14,7 @@ parameters: # This is the default platform provided by Arcade, intended for use by a managed-only repo. defaultManagedPlatform: name: 'Managed' - container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8' + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-9-amd64' # Defines the platforms on which to run build jobs. One job is created for each platform, and the # object in this array is sent to the job template as 'platform'. If no platforms are specified, diff --git a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml index 75eee98aeb5db6..0122c2a8dae179 100644 --- a/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml +++ b/eng/pipelines/coreclr/templates/sign-diagnostic-files.yml @@ -69,7 +69,7 @@ steps: } if ($signingCert.Subject -ne "CN=.NET DAC, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" ` - -or $signingCert.Issuer -ne "CN=Microsoft Code Signing PCA 2010, O=Microsoft Corporation, L=Redmond, S=Washington, C=US") + -or $signingCert.Issuer -ne "CN=Microsoft Windows Code Signing PCA 2024, O=Microsoft Corporation, C=US") { throw "File $file not in expected trust chain." } diff --git a/global.json b/global.json index b6edc662fa2322..a55368f8197457 100644 --- a/global.json +++ b/global.json @@ -1,16 +1,16 @@ { "sdk": { - "version": "8.0.115", + "version": "8.0.116", "allowPrerelease": true, "rollForward": "major" }, "tools": { - "dotnet": "8.0.115" + "dotnet": "8.0.116" }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25214.7", - "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25214.7", - "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.25214.7", + "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.25263.4", + "Microsoft.DotNet.Helix.Sdk": "8.0.0-beta.25263.4", + "Microsoft.DotNet.SharedFramework.Sdk": "8.0.0-beta.25263.4", "Microsoft.Build.NoTargets": "3.7.0", "Microsoft.Build.Traversal": "3.4.0", "Microsoft.NET.Sdk.IL": "8.0.0-rc.1.23406.6" diff --git a/src/coreclr/gc/gc.cpp b/src/coreclr/gc/gc.cpp index cc562b592112c5..b96b5917358ba5 100644 --- a/src/coreclr/gc/gc.cpp +++ b/src/coreclr/gc/gc.cpp @@ -10687,6 +10687,14 @@ size_t gc_heap::sort_mark_list() size_t region_index = get_basic_region_index_for_address (heap_segment_mem (region)); uint8_t* region_limit = heap_segment_allocated (region); + // Due to GC holes, x can point to something in a region that already got freed. And that region's + // allocated would be 0 and cause an infinite loop which is much harder to handle on production than + // simply throwing an exception. + if (region_limit == 0) + { + FATAL_GC_ERROR(); + } + uint8_t*** mark_list_piece_start_ptr = &mark_list_piece_start[region_index]; uint8_t*** mark_list_piece_end_ptr = &mark_list_piece_end[region_index]; #else // USE_REGIONS diff --git a/src/coreclr/jit/codegenxarch.cpp b/src/coreclr/jit/codegenxarch.cpp index 12764affdd92e4..8f397d04ea6a74 100644 --- a/src/coreclr/jit/codegenxarch.cpp +++ b/src/coreclr/jit/codegenxarch.cpp @@ -6173,6 +6173,18 @@ void CodeGen::genCallInstruction(GenTreeCall* call X86_ARG(target_ssize_t stackA { retSize = emitTypeSize(retTypeDesc->GetReturnRegType(0)); secondRetSize = emitTypeSize(retTypeDesc->GetReturnRegType(1)); + + if (retTypeDesc->GetABIReturnReg(1) == REG_INTRET) + { + // If the second return register is REG_INTRET, then the first + // return is expected to be in a SIMD register. + // The emitter has hardcoded belief that retSize corresponds to + // REG_INTRET and secondRetSize to REG_INTRET_1, so fix up the + // situation here. + assert(!EA_IS_GCREF_OR_BYREF(retSize)); + retSize = secondRetSize; + secondRetSize = EA_UNKNOWN; + } } else { diff --git a/src/coreclr/jit/forwardsub.cpp b/src/coreclr/jit/forwardsub.cpp index 7c1b0316153dfc..75f8b62911abdd 100644 --- a/src/coreclr/jit/forwardsub.cpp +++ b/src/coreclr/jit/forwardsub.cpp @@ -221,7 +221,7 @@ class ForwardSubVisitor final : public GenTreeVisitor // fgGetStubAddrArg cannot handle complex trees (it calls gtClone) // bool isCallTarget = false; - if (parent->IsCall()) + if ((parent != nullptr) && parent->IsCall()) { GenTreeCall* const parentCall = parent->AsCall(); isCallTarget = (parentCall->gtCallType == CT_INDIRECT) && (parentCall->gtCallAddr == node); @@ -319,7 +319,7 @@ class ForwardSubVisitor final : public GenTreeVisitor bool IsCallArg() const { - return m_parentNode->IsCall(); + return (m_parentNode != nullptr) && m_parentNode->IsCall(); } unsigned GetComplexity() const @@ -749,7 +749,7 @@ bool Compiler::fgForwardSubStatement(Statement* stmt) if (fsv.IsCallArg() && fsv.GetNode()->TypeIs(TYP_STRUCT) && !fwdSubNode->OperIs(GT_BLK, GT_LCL_VAR, GT_LCL_FLD, GT_MKREFANY)) { - JITDUMP(" use is a struct arg; fwd sub node is not OBJ/LCL_VAR/LCL_FLD/MKREFANY\n"); + JITDUMP(" use is a struct arg; fwd sub node is not BLK/LCL_VAR/LCL_FLD/MKREFANY\n"); return false; } @@ -772,7 +772,7 @@ bool Compiler::fgForwardSubStatement(Statement* stmt) { GenTree* const parentNode = fsv.GetParentNode(); - if (!parentNode->OperIs(GT_STORE_LCL_VAR)) + if ((parentNode == nullptr) || !parentNode->OperIs(GT_STORE_LCL_VAR)) { JITDUMP(" multi-reg struct node, parent not STORE_LCL_VAR\n"); return false; @@ -794,7 +794,8 @@ bool Compiler::fgForwardSubStatement(Statement* stmt) // for them on all 32 bit targets is a CQ regression due to some bad // interaction between decomposition and RA. // - if (compMethodReturnsMultiRegRetType() && fsv.GetParentNode()->OperIs(GT_RETURN)) + if (compMethodReturnsMultiRegRetType() && (fsv.GetParentNode() != nullptr) && + fsv.GetParentNode()->OperIs(GT_RETURN)) { #if defined(TARGET_X86) if (fwdSubNode->TypeGet() == TYP_LONG) diff --git a/src/coreclr/jit/gcencode.cpp b/src/coreclr/jit/gcencode.cpp index 96409d4ce904f9..33a81931fb16dd 100644 --- a/src/coreclr/jit/gcencode.cpp +++ b/src/coreclr/jit/gcencode.cpp @@ -49,8 +49,21 @@ ReturnKind GCInfo::getReturnKind() case 1: return VarTypeToReturnKind(retTypeDesc.GetReturnRegType(0)); case 2: - return GetStructReturnKind(VarTypeToReturnKind(retTypeDesc.GetReturnRegType(0)), - VarTypeToReturnKind(retTypeDesc.GetReturnRegType(1))); + { + var_types first = retTypeDesc.GetReturnRegType(0); + var_types second = retTypeDesc.GetReturnRegType(1); +#ifdef UNIX_AMD64_ABI + if (varTypeUsesFloatReg(first)) + { + // first does not consume an int register in this case so an obj/ref + // in the second ReturnKind would actually be found in the first int reg. + first = second; + second = TYP_UNDEF; + } +#endif // UNIX_AMD64_ABI + return GetStructReturnKind(VarTypeToReturnKind(first), + VarTypeToReturnKind(second)); + } default: #ifdef DEBUG for (unsigned i = 0; i < regCount; i++) diff --git a/src/coreclr/vm/ceemain.cpp b/src/coreclr/vm/ceemain.cpp index c5dff66b823a44..b23d544ec73760 100644 --- a/src/coreclr/vm/ceemain.cpp +++ b/src/coreclr/vm/ceemain.cpp @@ -554,7 +554,11 @@ void EESocketCleanupHelper(bool isExecutingOnAltStack) if (isExecutingOnAltStack) { - GetThread()->SetExecutingOnAltStack(); + Thread *pThread = GetThreadNULLOk(); + if (pThread) + { + pThread->SetExecutingOnAltStack(); + } } // Close the debugger transport socket first diff --git a/src/coreclr/vm/method.cpp b/src/coreclr/vm/method.cpp index 29910d6cb4c1c3..0b55537c3f9215 100644 --- a/src/coreclr/vm/method.cpp +++ b/src/coreclr/vm/method.cpp @@ -1168,6 +1168,15 @@ ReturnKind MethodDesc::ParseReturnKindFromSig(INDEBUG(bool supportStringConstruc regKinds[i] = RT_Scalar; } } + + if (eeClass->GetEightByteClassification(0) == SystemVClassificationTypeSSE) + { + // Skip over SSE types since they do not consume integer registers. + // An obj/byref in the 2nd eight bytes will be in the first integer register. + regKinds[0] = regKinds[1]; + regKinds[1] = RT_Scalar; + } + ReturnKind structReturnKind = GetStructReturnKind(regKinds[0], regKinds[1]); return structReturnKind; } @@ -3789,10 +3798,14 @@ MethodDesc::EnumMemoryRegions(CLRDataEnumMemoryFlags flags) ILCodeVersion ilVersion = pCodeVersionManager->GetActiveILCodeVersion(dac_cast(this)); if (!ilVersion.IsNull()) { - ilVersion.GetActiveNativeCodeVersion(dac_cast(this)); - ilVersion.GetVersionId(); - ilVersion.GetRejitState(); - ilVersion.GetIL(); + EX_TRY + { + ilVersion.GetActiveNativeCodeVersion(dac_cast(this)); + ilVersion.GetVersionId(); + ilVersion.GetRejitState(); + ilVersion.GetIL(); + } + EX_CATCH_RETHROW_ONLY_COR_E_OPERATIONCANCELLED } #endif diff --git a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs index 0848ca5ed21bc4..8ec4cb8521e94a 100644 --- a/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs +++ b/src/libraries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.Ssl.cs @@ -117,7 +117,14 @@ internal static unsafe ReadOnlySpan SslGetAlpnSelected(SafeSslHandle ssl) internal static partial IntPtr SslGetPeerCertificate(SafeSslHandle ssl); [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerCertChain")] - internal static partial SafeSharedX509StackHandle SslGetPeerCertChain(SafeSslHandle ssl); + private static partial SafeSharedX509StackHandle SslGetPeerCertChain_private(SafeSslHandle ssl); + + internal static SafeSharedX509StackHandle SslGetPeerCertChain(SafeSslHandle ssl) + { + return SafeInteriorHandle.OpenInteriorHandle( + SslGetPeerCertChain_private, + ssl); + } [LibraryImport(Libraries.CryptoNative, EntryPoint = "CryptoNative_SslGetPeerFinished")] internal static partial int SslGetPeerFinished(SafeSslHandle ssl, IntPtr buf, int count); diff --git a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj index eba2fe5b83252c..1abbdcedebe8d8 100644 --- a/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj +++ b/src/libraries/System.DirectoryServices.Protocols/src/System.DirectoryServices.Protocols.csproj @@ -4,7 +4,7 @@ true true true - true + false 2 true true diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs index 40bd09bd89ceb4..e6263872a31a3f 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Unix.cs @@ -139,10 +139,7 @@ internal override void DisposeCore(bool disposing) if (disposing) { - if (State != PipeState.Closed) - { - _internalTokenSource.Cancel(); - } + _internalTokenSource.Cancel(); } } diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs index c0f066da805214..b986a7342538ba 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/NamedPipeServerStream.Windows.cs @@ -62,7 +62,11 @@ internal override void TryToReuse(PipeValueTaskSource source) { if (Interlocked.CompareExchange(ref _reusableConnectionValueTaskSource, connectionSource, null) is not null) { - source._preallocatedOverlapped.Dispose(); + source.Dispose(); + } + else if (State == PipeState.Closed) + { + Interlocked.Exchange(ref _reusableConnectionValueTaskSource, null)?.Dispose(); } } } diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs index 453fe1153bd4be..ddff733119a7a8 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.Windows.cs @@ -255,9 +255,25 @@ internal virtual void TryToReuse(PipeValueTaskSource source) if (source is ReadWriteValueTaskSource readWriteSource) { ref ReadWriteValueTaskSource? field = ref readWriteSource._isWrite ? ref _reusableWriteValueTaskSource : ref _reusableReadValueTaskSource; + + // Try to return the instance. If there's already something in the field, then there had been concurrent + // operations and someone else already returned their instance, so just dispose of this one (the "pool" has + // a size of 1). If there's not something there and we're successful in storing our instance, the 99% case is + // this is normal operation, there wasn't a concurrent operation, and we just successfully returned the rented + // instance. However, it could also be because the stream has been disposed, in which case the disposal process + // would have nulled out the field, and since this instance wasn't present when disposal happened, it won't have + // been disposed. Further, disposal won't happen again, so just leaving the instance there will result in its + // resources being leaked. Instead, _after_ returning the instance we then check whether the stream is now + // disposed, and if it is, we then try to re-rent the instance and dispose of it. It's fine if the disposal happens + // after we've stored the instance back and before we check the stream's state, as then this code will be racing + // with disposal and only one of the two will succeed in exchanging out the instance. if (Interlocked.CompareExchange(ref field, readWriteSource, null) is not null) { - source._preallocatedOverlapped.Dispose(); + source.Dispose(); + } + else if (State == PipeState.Closed) + { + Interlocked.Exchange(ref field, null)?.Dispose(); } } } diff --git a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs index 8e7790d463a314..b9dcc4feb5b744 100644 --- a/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs +++ b/src/libraries/System.IO.Pipes/src/System/IO/Pipes/PipeStream.cs @@ -144,6 +144,11 @@ public override Task FlushAsync(CancellationToken cancellationToken) protected override void Dispose(bool disposing) { + // Mark the pipe as closed before calling DisposeCore. That way, other threads that might + // be synchronizing on shared resources disposed of in DisposeCore will be guaranteed to + // see the closed state after that synchronization. + _state = PipeState.Closed; + try { // Nothing will be done differently based on whether we are @@ -159,8 +164,6 @@ protected override void Dispose(bool disposing) { base.Dispose(disposing); } - - _state = PipeState.Closed; } // ********************** Public Properties *********************** // diff --git a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj index 65ec45bc444f7c..1dd7b656fe5c2d 100644 --- a/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj +++ b/src/libraries/System.Net.Http.WinHttpHandler/src/System.Net.Http.WinHttpHandler.csproj @@ -4,7 +4,7 @@ true true true - true + false 3 Provides a message handler for HttpClient based on the WinHTTP interface of Windows. While similar to HttpClientHandler, it provides developers more granular control over the application's HTTP communication than the HttpClientHandler. diff --git a/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs b/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs index d088a30d6f7445..633d3eddcd465c 100644 --- a/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs +++ b/src/libraries/System.Net.NameResolution/src/System/Net/NameResolutionPal.Windows.cs @@ -437,6 +437,11 @@ public void RegisterForCancellation(CancellationToken cancellationToken) NetEventSource.Info(@this, $"GetAddrInfoExCancel returned error {cancelResult}"); } } + catch (ObjectDisposedException) + { + // There is a race between checking @this._completed and @this.DangerousAddRef and disposing from another thread. + // We lost the race. No further action needed. + } finally { if (needRelease) diff --git a/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Protocol.cs b/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Protocol.cs index 38274fd85acd8d..bc7fae0b4b0ee2 100644 --- a/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Protocol.cs +++ b/src/libraries/System.Net.Security/src/System/Net/Security/SslStream.Protocol.cs @@ -1029,8 +1029,9 @@ internal bool VerifyRemoteCertificate(RemoteCertificateValidationCallback? remot return true; } - _remoteCertificate = certificate; - if (_remoteCertificate == null) + // don't assign to _remoteCertificate yet, this prevents weird exceptions if SslStream is disposed in parallel with X509Chain building + + if (certificate == null) { if (NetEventSource.Log.IsEnabled() && RemoteCertRequired) NetEventSource.Error(this, $"Remote certificate required, but no remote certificate received"); sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNotAvailable; @@ -1072,15 +1073,17 @@ internal bool VerifyRemoteCertificate(RemoteCertificateValidationCallback? remot sslPolicyErrors |= CertificateValidationPal.VerifyCertificateProperties( _securityContext!, chain, - _remoteCertificate, + certificate, _sslAuthenticationOptions.CheckCertName, _sslAuthenticationOptions.IsServer, TargetHostNameHelper.NormalizeHostName(_sslAuthenticationOptions.TargetHost)); } + _remoteCertificate = certificate; + if (remoteCertValidationCallback != null) { - success = remoteCertValidationCallback(this, _remoteCertificate, chain, sslPolicyErrors); + success = remoteCertValidationCallback(this, certificate, chain, sslPolicyErrors); } else { diff --git a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamDisposeTest.cs b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamDisposeTest.cs index de7aa502933b02..9864029c7a0b34 100644 --- a/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamDisposeTest.cs +++ b/src/libraries/System.Net.Security/tests/FunctionalTests/SslStreamDisposeTest.cs @@ -4,6 +4,7 @@ using System.IO; using System.Security.Cryptography.X509Certificates; using System.Threading; +using System.Security.Authentication; using System.Threading.Tasks; using Xunit; @@ -59,6 +60,7 @@ public async Task Dispose_PendingReadAsync_ThrowsODE(bool bufferedRead) using CancellationTokenSource cts = new CancellationTokenSource(); cts.CancelAfter(TestConfiguration.PassingTestTimeout); + (SslStream client, SslStream server) = TestHelper.GetConnectedSslStreams(leaveInnerStreamOpen: true); using (client) using (server) @@ -102,5 +104,65 @@ await TestConfiguration.WhenAllOrAnyFailedWithTimeout( await Assert.ThrowsAnyAsync(() => client.ReadAsync(readBuffer, cts.Token).AsTask()); } } + + [Fact] + [OuterLoop("Computationally expensive")] + public async Task Dispose_ParallelWithHandshake_ThrowsODE() + { + using CancellationTokenSource cts = new CancellationTokenSource(); + cts.CancelAfter(TestConfiguration.PassingTestTimeout); + + await Parallel.ForEachAsync(System.Linq.Enumerable.Range(0, 10000), cts.Token, async (i, token) => + { + (Stream clientStream, Stream serverStream) = TestHelper.GetConnectedStreams(); + + using SslStream client = new SslStream(clientStream); + using SslStream server = new SslStream(serverStream); + using X509Certificate2 serverCertificate = Configuration.Certificates.GetServerCertificate(); + using X509Certificate2 clientCertificate = Configuration.Certificates.GetClientCertificate(); + + SslClientAuthenticationOptions clientOptions = new SslClientAuthenticationOptions() + { + TargetHost = Guid.NewGuid().ToString("N"), + RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true, + }; + + SslServerAuthenticationOptions serverOptions = new SslServerAuthenticationOptions() + { + ServerCertificate = serverCertificate, + }; + + var clientTask = Task.Run(() => client.AuthenticateAsClientAsync(clientOptions, cts.Token)); + var serverTask = Task.Run(() => server.AuthenticateAsServerAsync(serverOptions, cts.Token)); + + // Dispose the instances while the handshake is in progress. + client.Dispose(); + server.Dispose(); + + await ValidateExceptionAsync(clientTask); + await ValidateExceptionAsync(serverTask); + }); + + static async Task ValidateExceptionAsync(Task task) + { + try + { + await task; + } + catch (InvalidOperationException ex) when (ex.StackTrace?.Contains("System.IO.StreamBuffer.WriteAsync") ?? true) + { + // Writing to a disposed ConnectedStream (test only, does not happen with NetworkStream) + return; + } + catch (Exception ex) when (ex + is ObjectDisposedException // disposed locally + or IOException // disposed remotely (received unexpected EOF) + or AuthenticationException) // disposed wrapped in AuthenticationException or error from platform library + { + // expected + return; + } + } + } } } diff --git a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.OverlappedValueTaskSource.Windows.cs b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.OverlappedValueTaskSource.Windows.cs index c2eab851bd60e2..f8a075cc61c76f 100644 --- a/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.OverlappedValueTaskSource.Windows.cs +++ b/src/libraries/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeFileHandle.OverlappedValueTaskSource.Windows.cs @@ -35,7 +35,11 @@ private void TryToReuse(OverlappedValueTaskSource source) if (Interlocked.CompareExchange(ref _reusableOverlappedValueTaskSource, source, null) is not null) { - source._preallocatedOverlapped.Dispose(); + source.Dispose(); + } + else if (IsClosed) + { + Interlocked.Exchange(ref _reusableOverlappedValueTaskSource, null)?.Dispose(); } } diff --git a/src/libraries/System.Text.Json/src/System.Text.Json.csproj b/src/libraries/System.Text.Json/src/System.Text.Json.csproj index fb8f4321a63b92..72aa247909efd2 100644 --- a/src/libraries/System.Text.Json/src/System.Text.Json.csproj +++ b/src/libraries/System.Text.Json/src/System.Text.Json.csproj @@ -8,8 +8,8 @@ CS8969 true true - false - 5 + true + 6 Provides high-performance and low-allocating types that serialize objects to JavaScript Object Notation (JSON) text and deserialize JSON text to objects, with UTF-8 support built-in. Also provides types to read and write JSON text encoded as UTF-8, and to create an in-memory document object model (DOM), that is read-only, for random access of the JSON elements within a structured view of the data. The System.Text.Json library is built-in as part of the shared framework in .NET Runtime. The package can be installed when you need to use it in other target frameworks. diff --git a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/FSharpCoreReflectionProxy.cs b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/FSharpCoreReflectionProxy.cs index e0bd83a0c1c9bf..835da6e002f905 100644 --- a/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/FSharpCoreReflectionProxy.cs +++ b/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/FSharpCoreReflectionProxy.cs @@ -204,7 +204,10 @@ public Func>, TFSharpMap> CreateFSharpMapConstru } private Attribute? GetFSharpCompilationMappingAttribute(Type type) - => type.GetCustomAttribute(_compilationMappingAttributeType, inherit: true); + { + object[] attributes = type.GetCustomAttributes(_compilationMappingAttributeType, inherit: false); + return attributes.Length == 0 ? null : (Attribute)attributes[0]; + } private SourceConstructFlags GetSourceConstructFlags(Attribute compilationMappingAttribute) => _sourceConstructFlagsGetter is null ? SourceConstructFlags.None : (SourceConstructFlags)_sourceConstructFlagsGetter.Invoke(compilationMappingAttribute, null)!; @@ -212,7 +215,7 @@ private SourceConstructFlags GetSourceConstructFlags(Attribute compilationMappin // If the provided type is generated by the F# compiler, returns the runtime FSharp.Core assembly. private static Assembly? GetFSharpCoreAssembly(Type type) { - foreach (Attribute attr in type.GetCustomAttributes(inherit: true)) + foreach (Attribute attr in type.GetCustomAttributes(inherit: false)) { Type attributeType = attr.GetType(); if (attributeType.FullName == CompilationMappingAttributeTypeName) diff --git a/src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/RecordTests.fs b/src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/RecordTests.fs index d9ac41cbd2b41d..6044b692904ef4 100644 --- a/src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/RecordTests.fs +++ b/src/libraries/System.Text.Json/tests/System.Text.Json.FSharp.Tests/RecordTests.fs @@ -76,3 +76,22 @@ let ``Recursive struct records are supported``() = Assert.Equal("""{"Next":[{"Next":[null]}]}""", json) let deserializedValue = JsonSerializer.Deserialize(json) Assert.Equal(value, deserializedValue) + + +[, "derived")>] +type BaseClass(x : int) = + member _.X = x + +and DerivedClass(x : int, y : bool) = + inherit BaseClass(x) + member _.Y = y + +[] +let ``Support F# class hierarchies`` () = + let value = DerivedClass(42, true) :> BaseClass + let json = JsonSerializer.Serialize(value) + Assert.Equal("""{"$type":"derived","Y":true,"X":42}""", json) + let deserializedValue = JsonSerializer.Deserialize(json) + let derived = Assert.IsType(deserializedValue) + Assert.Equal(42, deserializedValue.X) + Assert.Equal(true, derived.Y) diff --git a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c index 043bf9f9d1edab..fad0b23e45c781 100644 --- a/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c +++ b/src/native/libs/System.Security.Cryptography.Native/pal_evp_pkey_rsa.c @@ -206,6 +206,15 @@ int32_t CryptoNative_RsaEncrypt(EVP_PKEY* pkey, static bool ConfigureSignature(EVP_PKEY_CTX* ctx, RsaPaddingMode padding, const EVP_MD* digest) { + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-qual" + if (EVP_PKEY_CTX_set_signature_md(ctx, digest) <= 0) +#pragma clang diagnostic pop + { + return false; + } + if (padding == RsaPaddingPkcs1) { if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0) @@ -224,14 +233,6 @@ static bool ConfigureSignature(EVP_PKEY_CTX* ctx, RsaPaddingMode padding, const } } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wcast-qual" - if (EVP_PKEY_CTX_set_signature_md(ctx, digest) <= 0) -#pragma clang diagnostic pop - { - return false; - } - return true; } diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_115815/Runtime_115815.cs b/src/tests/JIT/Regression/JitBlue/Runtime_115815/Runtime_115815.cs new file mode 100644 index 00000000000000..77f42fe7d49453 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_115815/Runtime_115815.cs @@ -0,0 +1,42 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System.Threading; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using Xunit; + +public class Runtime_115815 +{ + [Fact] + public static void TestEntryPoint() + { + var destination = new KeyValuePair[1_000]; + + // loop to make this method fully interruptible + to get into OSR version + for (int i = 0; i < destination.Length * 1000; i++) + { + destination[i / 1000] = default; + } + + for (int i = 0; i < 5; i++) + { + for (int j = 0; j < destination.Length; j++) + { + destination[j] = GetValue(j); + } + + Thread.Sleep(10); + } + } + + [MethodImpl(MethodImplOptions.NoInlining)] + private static KeyValuePair GetValue(int i) + => KeyValuePair.Create(new Container(i.ToString()), (double)i); + + private struct Container + { + public string Name; + public Container(string name) { this.Name = name; } + } +} diff --git a/src/tests/JIT/Regression/JitBlue/Runtime_115815/Runtime_115815.csproj b/src/tests/JIT/Regression/JitBlue/Runtime_115815/Runtime_115815.csproj new file mode 100644 index 00000000000000..de6d5e08882e86 --- /dev/null +++ b/src/tests/JIT/Regression/JitBlue/Runtime_115815/Runtime_115815.csproj @@ -0,0 +1,8 @@ + + + True + + + + +