Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit e9ccdd6

Browse files
authored
Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1
2 parents 68ff240 + 0303386 commit e9ccdd6

File tree

35 files changed

+321
-112
lines changed

35 files changed

+321
-112
lines changed

clrdefinitions.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,3 +241,7 @@ if(WIN32)
241241
add_definitions(-DFEATURE_DATABREAKPOINT)
242242
endif(CLR_CMAKE_TARGET_ARCH_AMD64 OR CLR_CMAKE_TARGET_ARCH_I386)
243243
endif(WIN32)
244+
245+
if(CLR_CMAKE_PLATFORM_DARWIN)
246+
add_definitions(-DFEATURE_WRITEBARRIER_COPY)
247+
endif(CLR_CMAKE_PLATFORM_DARWIN)

dir.common.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@
6565

6666
<PropertyGroup>
6767
<!-- Central place to set the versions of all nuget packages produced in the repo -->
68-
<PackageVersion Condition="'$(PackageVersion)' == ''">3.0.1</PackageVersion>
68+
<PackageVersion Condition="'$(PackageVersion)' == ''">3.1.0</PackageVersion>
6969

7070
<!-- Set the boolean below to true to generate packages with stabilized versions -->
7171
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
7272
<StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
7373

74-
<PreReleaseLabel>servicing</PreReleaseLabel>
74+
<PreReleaseLabel>alpha1</PreReleaseLabel>
7575
</PropertyGroup>
7676

7777
<!-- Set up common target properties that we use to conditionally include sources -->

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
<Uri>https://github.com/dotnet/arcade</Uri>
1919
<Sha>8eb29ba860a3cfcfe68f9a8256caa7efc1f1aaba</Sha>
2020
</Dependency>
21-
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.6.0-rc2.19461.13">
21+
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="4.7.0-preview1.19461.12">
2222
<Uri>https://github.com/dotnet/corefx</Uri>
23-
<Sha>144ebb6ff997bf7a777206a233cdd8c03e13f60c</Sha>
23+
<Sha>57c36a6816a5ac6d0a7956ae1e153c6a770332be</Sha>
2424
</Dependency>
25-
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.0.0-rc2.19461.13">
25+
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.1.0-preview1.19461.12">
2626
<Uri>https://github.com/dotnet/corefx</Uri>
27-
<Sha>144ebb6ff997bf7a777206a233cdd8c03e13f60c</Sha>
27+
<Sha>57c36a6816a5ac6d0a7956ae1e153c6a770332be</Sha>
2828
</Dependency>
29-
<Dependency Name="Microsoft.NETCore.App" Version="3.0.0-rc2-19460-02">
29+
<Dependency Name="Microsoft.NETCore.App" Version="3.1.0-preview1.19459.38">
3030
<Uri>https://github.com/dotnet/core-setup</Uri>
31-
<Sha>4421cfb105df112492038e5c5a70c24bce48e72f</Sha>
31+
<Sha>0d6763312a2754e45d604ebdc69c8ac7e21a2187</Sha>
3232
</Dependency>
3333
<Dependency Name="optimization.IBC.CoreCLR" Version="99.99.99-master-20190912.1">
3434
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>

eng/Versions.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<Project>
33
<PropertyGroup>
44
<!-- The .NET Core product branding version -->
5-
<ProductVersion>3.0.1</ProductVersion>
5+
<ProductVersion>3.1.0</ProductVersion>
66
<!-- File version numbers -->
77
<MajorVersion>4</MajorVersion>
88
<MinorVersion>7</MinorVersion>
99
<!-- Always use shipping version instead of dummy versions -->
1010
<DotNetUseShippingVersions>true</DotNetUseShippingVersions>
11-
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
11+
<PreReleaseVersionLabel>preview1</PreReleaseVersionLabel>
1212
<!-- Opt-in/out repo features -->
1313
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
1414
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
@@ -21,11 +21,11 @@
2121
<!-- roslyn -->
2222
<MicrosoftNetCompilersToolsetVersion>3.3.0-beta2-19367-02</MicrosoftNetCompilersToolsetVersion>
2323
<!-- corefx -->
24-
<MicrosoftPrivateCoreFxNETCoreAppVersion>4.6.0-rc2.19461.13</MicrosoftPrivateCoreFxNETCoreAppVersion>
25-
<MicrosoftNETCorePlatformsVersion>3.0.0-rc2.19461.13</MicrosoftNETCorePlatformsVersion>
24+
<MicrosoftPrivateCoreFxNETCoreAppVersion>4.7.0-preview1.19461.12</MicrosoftPrivateCoreFxNETCoreAppVersion>
25+
<MicrosoftNETCorePlatformsVersion>3.1.0-preview1.19461.12</MicrosoftNETCorePlatformsVersion>
2626
<MicrosoftBclAsyncInterfacesVersion>1.0.0-preview7.19326.2</MicrosoftBclAsyncInterfacesVersion>
2727
<!-- core-setup -->
28-
<MicrosoftNETCoreAppVersion>3.0.0-rc2-19460-02</MicrosoftNETCoreAppVersion>
28+
<MicrosoftNETCoreAppVersion>3.1.0-preview1.19459.38</MicrosoftNETCoreAppVersion>
2929
<!-- dotnet-core-internal-tooling -->
3030
<IbcMergePackageVersion>5.0.6-beta.19203.1</IbcMergePackageVersion>
3131
<!-- dotnet-optimization -->

eng/pipelines/internal.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ trigger:
33
branches:
44
include:
55
- release/3.0
6+
- release/3.1
67

78
pr: none
89

eng/pipelines/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pr:
55
- release/2.1
66
- release/2.2
77
- release/3.0
8+
- release/3.1
89

910
jobs:
1011
#

src/System.Private.CoreLib/shared/Interop/Windows/Kernel32/Interop.Globalization.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ internal static unsafe partial class Kernel32
2424
internal const uint LOCALE_RETURN_NUMBER = 0x20000000;
2525
internal const uint LOCALE_NOUSEROVERRIDE = 0x80000000;
2626

27+
internal const uint LCMAP_SORTHANDLE = 0x20000000;
28+
internal const uint LCMAP_HASH = 0x00040000;
29+
2730
internal const int COMPARE_STRING = 0x0001;
2831

2932
internal const uint TIME_NOSECONDS = 0x00000002;
@@ -115,7 +118,7 @@ internal static extern unsafe bool IsNLSDefinedString(
115118

116119
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
117120
internal static extern bool EnumTimeFormatsEx(EnumTimeFormatsProcEx lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, void* lParam);
118-
121+
119122
internal delegate BOOL EnumTimeFormatsProcEx(char* lpTimeFormatString, void* lParam);
120123

121124
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
@@ -126,7 +129,7 @@ internal static extern unsafe bool IsNLSDefinedString(
126129

127130
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
128131
internal static extern bool EnumCalendarInfoExEx(EnumCalendarInfoProcExEx pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string? lpReserved, uint CalType, void* lParam);
129-
132+
130133
internal delegate BOOL EnumCalendarInfoProcExEx(char* lpCalendarInfoString, uint Calendar, IntPtr lpReserved, void* lParam);
131134

132135
[StructLayout(LayoutKind.Sequential)]
@@ -138,7 +141,7 @@ internal struct NlsVersionInfoEx
138141
internal int dwEffectiveId;
139142
internal Guid guidCustomVersion;
140143
}
141-
144+
142145
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
143146
internal static extern unsafe bool GetNLSVersionEx(int function, string localeName, NlsVersionInfoEx* lpVersionInformation);
144147
}

src/System.Private.CoreLib/shared/System/Globalization/CompareInfo.Windows.cs

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,36 @@ namespace System.Globalization
1212
{
1313
public partial class CompareInfo
1414
{
15-
private unsafe void InitSort(CultureInfo culture)
15+
internal static unsafe IntPtr GetSortHandle(string cultureName)
1616
{
17-
_sortName = culture.SortName;
18-
1917
if (GlobalizationMode.Invariant)
2018
{
21-
_sortHandle = IntPtr.Zero;
19+
return IntPtr.Zero;
2220
}
23-
else
24-
{
25-
const uint LCMAP_SORTHANDLE = 0x20000000;
2621

27-
IntPtr handle;
28-
int ret = Interop.Kernel32.LCMapStringEx(_sortName, LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero);
29-
_sortHandle = ret > 0 ? handle : IntPtr.Zero;
22+
IntPtr handle;
23+
int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero);
24+
if (ret > 0)
25+
{
26+
// Even if we can get the sort handle, it is not guaranteed to work when Windows compatibility shim is applied
27+
// e.g. Windows 7 compatibility mode. We need to ensure it is working before using it.
28+
// otherwise the whole framework app will not start.
29+
int hashValue = 0;
30+
char a = 'a';
31+
ret = Interop.Kernel32.LCMapStringEx(null, Interop.Kernel32.LCMAP_HASH, &a, 1, &hashValue, sizeof(int), null, null, handle);
32+
if (ret > 1)
33+
{
34+
return handle;
35+
}
3036
}
37+
38+
return IntPtr.Zero;
39+
}
40+
41+
private void InitSort(CultureInfo culture)
42+
{
43+
_sortName = culture.SortName;
44+
_sortHandle = GetSortHandle(_sortName);
3145
}
3246

3347
private static unsafe int FindStringOrdinal(

src/System.Private.CoreLib/shared/System/Globalization/TextInfo.Windows.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,7 @@ public partial class TextInfo
1010
{
1111
private unsafe void FinishInitialization()
1212
{
13-
if (GlobalizationMode.Invariant)
14-
{
15-
_sortHandle = IntPtr.Zero;
16-
return;
17-
}
18-
19-
const uint LCMAP_SORTHANDLE = 0x20000000;
20-
21-
IntPtr handle;
22-
int ret = Interop.Kernel32.LCMapStringEx(_textInfoName, LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero);
23-
_sortHandle = ret > 0 ? handle : IntPtr.Zero;
13+
_sortHandle = CompareInfo.GetSortHandle(_textInfoName);
2414
}
2515

2616
private unsafe void ChangeCase(char* pSource, int pSourceLen, char* pResult, int pResultLen, bool toUpper)

src/classlibnative/bcltype/system.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,6 @@ INT32 QCALLTYPE SystemNative::GetProcessorCount()
352352
processorCount = systemInfo.dwNumberOfProcessors;
353353
}
354354

355-
#ifdef FEATURE_PAL
356-
uint32_t cpuLimit;
357-
358-
if (PAL_GetCpuLimit(&cpuLimit) && cpuLimit < (uint32_t)processorCount)
359-
processorCount = cpuLimit;
360-
#endif
361-
362355
END_QCALL;
363356

364357
return processorCount;

0 commit comments

Comments
 (0)