Skip to content

Commit f56ef84

Browse files
committed
Merge remote-tracking branch 'origin/main' into thays_implement_debugger_proxy_attribute
* origin/main: disable token info in traces. (dotnet#56780) [debugger] Fix debugger.break behavior (dotnet#56788) [mono][wasm] Allow setting env variables with '=' characters in the test runner. (dotnet#56802) Ecma edit for `conv.ovf.<to type>.un`. (dotnet#56450) Mark HandleProcessCorruptedStateExceptionsAttribute as obsolete (dotnet#56664) Enable SxS install of previews on Mac OS (dotnet#56797) CoreCLR runtime tests + Mono on the x64 iOS simulator (dotnet#43954) [main] Update dependencies from mono/linker (dotnet#56593) STJ: Fix deserialization of UInt16 properties (dotnet#56793)
2 parents 33652d5 + 55cea64 commit f56ef84

File tree

57 files changed

+2023
-117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2023
-117
lines changed

docs/design/specs/Ecma-335-Augments.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This is a list of additions and edits to be made in ECMA-335 specifications. It
1111
- [Default Interface Methods](#default-interface-methods)
1212
- [Static Interface Methods](#static-interface-methods)
1313
- [Covariant Return Types](#covariant-return-types)
14+
- [Unsigned data conversion with overflow detection](#unsigned-data-conversion-with-overflow-detection)
1415

1516
## Signatures
1617

@@ -907,4 +908,34 @@ For this example, the behavior of calls on objects of various types is presented
907908
| D | B::VirtualFunction() | ERROR | A program containing type D is not valid, as B::VirtualFunction would be implemented by D::VirtualFunction which is not *covariant-return-compatible-with* (§I.8.7.1) B::VirtualFunction |
908909
"
909910
### II.22.27
910-
Edit rule 12 to specify that "The method signature defined by *MethodBody* shall match those defined by *MethodDeclaration* exactly if *MethodDeclaration* defines a method on an interface or be *covariant-return-compatible-with* (§I.8.7.1) if *MethodDeclaration* represents a method on a class."
911+
Edit rule 12 to specify that "The method signature defined by *MethodBody* shall match those defined by *MethodDeclaration* exactly if *MethodDeclaration* defines a method on an interface or be *covariant-return-compatible-with* (§I.8.7.1) if *MethodDeclaration* represents a method on a class."
912+
913+
## Unsigned data conversion with overflow detection
914+
915+
`conv.ovf.<to type>.un` opcode is purposed for converting a value on the stack to an integral value while treating the stack source as unsigned. Ecma does not distinguish signed and unsigned values on the stack so such opcode is needed as a complement for `conv.ovf.<to type>`.
916+
So if the value on the stack is 4-byte size integral created by `Ldc_I4 0xFFFFFFFF` the results of different conversion opcodes will be:
917+
918+
* conv.ovf.i4 -> -1 (0xFFFFFFFF)
919+
* conv.ovf.u4 -> overflow
920+
* conv.ovf.i4.un -> overflow
921+
* conv.ovf.u4.un -> uint.MaxValue (0xFFFFFFFF)
922+
923+
However, the source of these opcodes can be a float value and it was not clear how in such case .un should be treated. The ECMA was saying: "The item on the top of the stack is treated as an unsigned value before the conversion." but there was no definition of "treated" so the result of:
924+
925+
```
926+
ldc.r4 -1
927+
conv.ovf.i4.un
928+
```
929+
was ambiguous, it could treat -1 as 0xFFFFFFFF and return 0xFFFFFFFF or it could throw an overflow exception.
930+
931+
### III.3.19, conv.ovf.to type.un (page 354)
932+
(Edit 1st Description paragraph:)
933+
Convert the value on top of the stack to the type specified in the opcode, and leave that converted
934+
value on the top of the stack. If the value cannot be represented, an exception is thrown.
935+
936+
(Edit 2nd Description paragraph:)
937+
938+
Conversions from floating-point numbers to integral values truncate the number toward zero and used as-is ignoring .un suffix. The integral item
939+
on the top of the stack is reinterpreted as an unsigned value before the conversion.
940+
Note that integer values of less than 4 bytes are extended to int32 (not native int) on the
941+
evaluation stack.

docs/project/list-of-diagnostics.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ The PR that reveals the implementation of the `<IncludeInternalObsoleteAttribute
8686
| __`SYSLIB0029`__ | ProduceLegacyHmacValues is obsolete. Producing legacy HMAC values is no longer supported. |
8787
| __`SYSLIB0030`__ | HMACSHA1 always uses the algorithm implementation provided by the platform. Use a constructor without the useManagedSha1 parameter. |
8888
| __`SYSLIB0031`__ | EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1. |
89+
| __`SYSLIB0032`__ | Recovery from corrupted process state exceptions is not supported; HandleProcessCorruptedStateExceptionsAttribute is ignored. |
8990

9091
## Analyzer Warnings
9192

eng/Version.Details.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
<Uri>https://github.com/dotnet/arcade</Uri>
5151
<Sha>c6a28c81f96d196338b3ea520bc1e6dc7c440ee2</Sha>
5252
</Dependency>
53-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21373.11">
53+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="6.0.0-beta.21403.2">
5454
<Uri>https://github.com/dotnet/arcade</Uri>
55-
<Sha>c6a28c81f96d196338b3ea520bc1e6dc7c440ee2</Sha>
55+
<Sha>35a36a8ec705945b20275a7d63478affb396ff89</Sha>
5656
</Dependency>
5757
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="6.0.0-beta.21373.11">
5858
<Uri>https://github.com/dotnet/arcade</Uri>
@@ -186,9 +186,9 @@
186186
<Uri>https://github.com/dotnet/runtime</Uri>
187187
<Sha>95863758cd16c345d0b8fca067d5db5d6901e498</Sha>
188188
</Dependency>
189-
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21378.1">
189+
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="6.0.100-preview.6.21402.2">
190190
<Uri>https://github.com/mono/linker</Uri>
191-
<Sha>0cb9250a903cfc90cbac602ed79c0cbc588d8d3f</Sha>
191+
<Sha>ae18468b8712503aee67911228dd921601bd423a</Sha>
192192
</Dependency>
193193
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="1.0.0-prerelease.21373.1">
194194
<Uri>https://github.com/dotnet/xharness</Uri>

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.21373.11</MicrosoftDotNetXUnitExtensionsVersion>
6161
<MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.21373.11</MicrosoftDotNetXUnitConsoleRunnerVersion>
6262
<MicrosoftDotNetBuildTasksArchivesVersion>6.0.0-beta.21373.11</MicrosoftDotNetBuildTasksArchivesVersion>
63-
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21373.11</MicrosoftDotNetBuildTasksInstallersVersion>
63+
<MicrosoftDotNetBuildTasksInstallersVersion>6.0.0-beta.21403.2</MicrosoftDotNetBuildTasksInstallersVersion>
6464
<MicrosoftDotNetBuildTasksPackagingVersion>6.0.0-beta.21373.11</MicrosoftDotNetBuildTasksPackagingVersion>
6565
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>6.0.0-beta.21373.11</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
6666
<MicrosoftDotNetRemoteExecutorVersion>6.0.0-beta.21373.11</MicrosoftDotNetRemoteExecutorVersion>
@@ -166,7 +166,7 @@
166166
<!-- Docs -->
167167
<MicrosoftPrivateIntellisenseVersion>5.0.0-preview-20201009.2</MicrosoftPrivateIntellisenseVersion>
168168
<!-- ILLink -->
169-
<MicrosoftNETILLinkTasksVersion>6.0.100-preview.6.21378.1</MicrosoftNETILLinkTasksVersion>
169+
<MicrosoftNETILLinkTasksVersion>6.0.100-preview.6.21402.2</MicrosoftNETILLinkTasksVersion>
170170
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
171171
<!-- ICU -->
172172
<MicrosoftNETCoreRuntimeICUTransportVersion>6.0.0-rc.1.21369.1</MicrosoftNETCoreRuntimeICUTransportVersion>

eng/pipelines/coreclr/templates/helix-queues-setup.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,22 @@ jobs:
2626
runtimeFlavorDisplayName: ${{ parameters.runtimeFlavorDisplayName }}
2727
helixQueues:
2828

29+
# iOS/tvOS simulator x64/x86
30+
- ${{ if in(parameters.platform, 'iOSSimulator_x64', 'tvOSSimulator_x64') }}:
31+
- OSX.1015.Amd64.Open
32+
2933
# Android arm64
3034
- ${{ if in(parameters.platform, 'Android_arm64') }}:
3135
- Windows.10.Amd64.Android.Open
32-
36+
3337
# Android x64
3438
- ${{ if in(parameters.platform, 'Android_x64') }}:
3539
- Ubuntu.1804.Amd64.Android.Open
36-
40+
3741
# Browser wasm
3842
- ${{ if eq(parameters.platform, 'Browser_wasm') }}:
3943
- Ubuntu.1804.Amd64.Open
40-
44+
4145
# Linux arm
4246
- ${{ if eq(parameters.platform, 'Linux_arm') }}:
4347
- ${{ if eq(variables['System.TeamProject'], 'public') }}:

eng/pipelines/runtime-staging.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,48 @@ jobs:
259259
creator: dotnet-bot
260260
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
261261

262+
#
263+
# Build the whole product using Mono and run runtime tests with the JIT.
264+
#
265+
- template: /eng/pipelines/common/platform-matrix.yml
266+
parameters:
267+
jobTemplate: /eng/pipelines/common/global-build-job.yml
268+
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
269+
buildConfig: Release
270+
runtimeFlavor: mono
271+
platforms:
272+
- iOSSimulator_x64
273+
variables:
274+
- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest')) }}:
275+
- name: _HelixSource
276+
value: pr/dotnet/runtime/$(Build.SourceBranch)
277+
- ${{ if and(eq(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
278+
- name: _HelixSource
279+
value: ci/dotnet/runtime/$(Build.SourceBranch)
280+
- name: timeoutPerTestInMinutes
281+
value: 60
282+
- name: timeoutPerTestCollectionInMinutes
283+
value: 180
284+
jobParameters:
285+
testGroup: innerloop
286+
nameSuffix: AllSubsets_Mono_RuntimeTests
287+
buildArgs: -s mono+libs -c $(_BuildConfig)
288+
timeoutInMinutes: 240
289+
condition: >-
290+
or(
291+
eq(dependencies.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
292+
eq(dependencies.evaluate_paths.outputs['SetPathVars_mono.containsChange'], true),
293+
eq(variables['isFullMatrix'], true))
294+
# Test execution is temporarily disabled because test apps no longer launch
295+
# and the test suite times out after two hours, even if xharness cannot
296+
# successfully launch any tests. Re-enable once these issues have been fixed.
297+
#
298+
# extra steps, run tests
299+
# extraStepsTemplate: /eng/pipelines/common/templates/runtimes/android-runtime-and-send-to-helix.yml
300+
# extraStepsParameters:
301+
# creator: dotnet-bot
302+
# testRunNamePrefixSuffix: Mono_$(_BuildConfig)
303+
262304
#
263305
# Build the whole product using Mono for Android and run runtime tests with Android devices
264306
#

eng/testing/linker/SupportFiles/Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<!-- Suppress analyzer and linker warnings as these are tests -->
1818
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
1919
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
20+
<!-- Can be removed when SDK update picks up https://github.com/dotnet/sdk/pull/18655. -->
21+
<NoWarn>$(NoWarn);IL2111</NoWarn>
2022
</PropertyGroup>
2123

2224
<ItemGroup>

eng/testing/tests.mobile.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<PublishTrimmed>true</PublishTrimmed>
1818
<!-- Suppress linker warnings as these are tests -->
1919
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
20+
<!-- Can be removed when SDK update picks up https://github.com/dotnet/sdk/pull/18655. -->
21+
<NoWarn>$(NoWarn);IL2111</NoWarn>
2022
<!-- https://github.com/dotnet/sdk/issues/18581 tracks needing to set 2 properties to disable warnings. -->
2123
<EnableTrimAnalyzer>false</EnableTrimAnalyzer>
2224

src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,10 @@ private sealed class LicenseClassFactory : IClassFactory2
523523
private readonly LicenseInteropProxy _licenseProxy = new LicenseInteropProxy();
524524
private readonly Guid _classId;
525525

526-
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)]
526+
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces | DynamicallyAccessedMemberTypes.PublicConstructors)]
527527
private readonly Type _classType;
528528

529-
public LicenseClassFactory(Guid clsid, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces)] Type classType)
529+
public LicenseClassFactory(Guid clsid, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.Interfaces | DynamicallyAccessedMemberTypes.PublicConstructors)] Type classType)
530530
{
531531
_classId = clsid;
532532
_classType = classType;
@@ -627,6 +627,9 @@ internal sealed class LicenseInteropProxy
627627
private object? _licContext;
628628
private Type? _targetRcwType;
629629

630+
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2111:ReflectionToDynamicallyAccessedMembers",
631+
Justification = "The type parameter to LicenseManager.CreateWithContext method has PublicConstructors annotation. We only invoke this method" +
632+
"from AllocateAndValidateLicense which annotates the value passed in with the same annotation.")]
630633
public LicenseInteropProxy()
631634
{
632635
Type licManager = Type.GetType("System.ComponentModel.LicenseManager, System.ComponentModel.TypeConverter", throwOnError: true)!;
@@ -742,7 +745,7 @@ public string RequestLicKey(Type type)
742745
// If we are being entered because of a call to ICF::CreateInstanceLic(),
743746
// "isDesignTime" will be "false" and "key" will point to a non-null
744747
// license key.
745-
public object AllocateAndValidateLicense(Type type, string? key, bool isDesignTime)
748+
public object AllocateAndValidateLicense([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type type, string? key, bool isDesignTime)
746749
{
747750
object?[] parameters;
748751
object? licContext;

src/libraries/Common/src/System/Obsoletions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,8 @@ internal static class Obsoletions
104104

105105
internal const string CryptoConfigEncodeOIDMessage = "EncodeOID is obsolete. Use the ASN.1 functionality provided in System.Formats.Asn1.";
106106
internal const string CryptoConfigEncodeOIDDiagId = "SYSLIB0031";
107+
108+
internal const string CorruptedStateRecoveryMessage = "Recovery from corrupted process state exceptions is not supported; HandleProcessCorruptedStateExceptionsAttribute is ignored.";
109+
internal const string CorruptedStateRecoveryDiagId = "SYSLIB0032";
107110
}
108111
}

0 commit comments

Comments
 (0)