Emmanuel André [Wed, 16 Jun 2021 22:41:57 +0000 (00:41 +0200)]
Improve cancellation in StreamPipeReader.ReadAtLeastAsync (#53306)
* Improve cancellation in StreamPipeReader.ReadAtLeastAsync
* Introduce task variable
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix tests
* Expect TaskCanceledException on canceled token
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Jeremy Koritzinsky [Wed, 16 Jun 2021 22:05:54 +0000 (15:05 -0700)]
Follow the same failure behavior for [ComImport] classes on Windows with built-in COM disabled as non-Windows. (#54298)
Alex Perovich [Wed, 16 Jun 2021 21:07:27 +0000 (14:07 -0700)]
Update to latest version of source index package (#54292)
Fan Yang [Wed, 16 Jun 2021 21:02:14 +0000 (17:02 -0400)]
[Mono] Fix memory leak during data registration (#54045)
* Fix memory leak
* Update src/mono/mono/mini/mini-generic-sharing.c
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
* Update src/mono/mono/mini/mini-generic-sharing.c
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
* Fix the return
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Jeremy Koritzinsky [Wed, 16 Jun 2021 20:55:33 +0000 (13:55 -0700)]
Remove the `sealed` blittable layoutclass correctness fix because of backcompat. (#54235)
Ankit Jain [Wed, 16 Jun 2021 20:47:40 +0000 (16:47 -0400)]
[wasm][aot][tests] Enable libraries that have been consistently passing (#54291)
* [wasm][aot][tests] Enable libraries that have been consistently passing
.. on the tracking PR.
- `System.Linq.Tests`
Fixes https://github.com/dotnet/runtime/issues/51722
- `System.Runtime.Extensions.Tests`
- `System.IO.Pipelines.Tests`
- the failing tests have been disabled
* [wasm][aot][tests] Disable more tests that depend on stacktraces
.. in System.Runtime.Tests . The library is still disabled for AOT,
because it hasn't been stable only for the last 7 days.
* Re-enable System.Runtime.Loader.Tests which is passing now.
Ankit Jain [Wed, 16 Jun 2021 19:30:01 +0000 (15:30 -0400)]
[wasm][aot] Disable tests that are failing because they depend on stacktrace API (#54286)
Miha Zupan [Wed, 16 Jun 2021 18:00:47 +0000 (11:00 -0700)]
Don't use a remote server in SendAsync_HttpTracingEnabled_Succeeds (#54240)
Bill Wert [Wed, 16 Jun 2021 17:07:27 +0000 (10:07 -0700)]
Remove crossgen tests (#54252)
Stephen Toub [Wed, 16 Jun 2021 16:56:03 +0000 (12:56 -0400)]
Fix packaging test use of Stream.Read (#54233)
Read returning the number of bytes requested is not guaranteed.
Kevin Jones [Wed, 16 Jun 2021 16:20:33 +0000 (12:20 -0400)]
Remove uses of Rijndael from EncryptedXml where possible (#54238)
Also dispose of AES usages to match behavior of the .NET Framework.
Ankit Jain [Wed, 16 Jun 2021 16:00:12 +0000 (12:00 -0400)]
[wasm] Disable unsupported Stacktrace test, on AOT (#54206)
```
[22:22:31] fail: [FAIL] System.Tests.EnvironmentStackTrace.StackTraceDoesNotStartWithInternalFrame
[22:22:31] info: System.NullReferenceException : Object reference not set to an instance of an object.
[22:22:31] info: at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
```
Issue: https://github.com/dotnet/runtime/issues/51676
GitHubPang [Wed, 16 Jun 2021 15:16:20 +0000 (23:16 +0800)]
Fix typo in comments in ConsoleLifetimeOptions.cs (#54255)
Fan Yang [Wed, 16 Jun 2021 14:34:02 +0000 (10:34 -0400)]
Fix wrong indices for MobileAppHandler (#54275)
Jo Shields [Wed, 16 Jun 2021 10:24:01 +0000 (06:24 -0400)]
Change condition for stripping to per-file (#54224)
Previously, stripping of all produced libraries (libmono-component-*) was based on the file type of libmonosgen. That would fail to do stripping in the corner case of producing a static libmonosgen but dynamic components. This eliminates that problem.
Zoltan Varga [Wed, 16 Jun 2021 09:52:37 +0000 (05:52 -0400)]
[mono][wasm] Fix the usage of function pointers in mixed mode. (#54098)
* [mono][wasm] Fix the usage of function pointers in mixed mode.
The llvm compiled code expects function pointers to be a MonoFtnDesc*, while
the interpreter expects them to be a InterpMethod*. Use a MonoFtnDesc in
both cases.
* Reenable some tests.
* Add caching.
Aleksey Kliger (λgeek) [Wed, 16 Jun 2021 09:51:46 +0000 (05:51 -0400)]
[mono] Search for components using mono_dl_build_path (#54237)
It knows how to try various combinations of prefixes and suffixes on various
platforms. In particular it knows to look for .dylib files on Apple platforms.
Fixes iOS simulator component search
Manish Godse [Wed, 16 Jun 2021 04:08:41 +0000 (21:08 -0700)]
Remove unsigned executable entitlement (#51294)
Anirudh Agnihotry [Tue, 15 Jun 2021 23:25:46 +0000 (16:25 -0700)]
update branding to preview7 (#54243)
Maryam Ariyan [Tue, 15 Jun 2021 22:36:02 +0000 (18:36 -0400)]
Support generating log methods in nested classes (#54180)
Martin Costello [Tue, 15 Jun 2021 21:56:13 +0000 (22:56 +0100)]
Mark logging source generator file as generated (#53275)
Give the output file for the M.E.Logging logging classes a ".g" suffix
so that it is treated as a generated file to prevent it being flagged by
source analyzers for violations the application developer cannot fix
for themselves.
Stephen Toub [Tue, 15 Jun 2021 21:28:45 +0000 (17:28 -0400)]
Add HashCode.AddBytes(ReadOnlySpan<byte>) (#54168)
* Add HashCode.Add(ReadOnlySpan<byte>)
* Address PR feedback
Eric Erhardt [Tue, 15 Jun 2021 21:14:10 +0000 (16:14 -0500)]
Add Type.GetMemberWithSameMetadataDefinitionAs (#53704)
* Add API to find MethodInfo on instantiated generic type from generic type definition
Fix #45771
* Rename to GetMemberWithSameMetadataDefinitionAs
* Fix a bug for NestedType
* Use new method libraries that were working around not having it
* Implement GetMemberWithSameMetadataDefinitionAs in mono
* Revert JavaScript Runtime changes.
* Support inheritance in GetMemberWithSameMetadataDefinitionAs.
Sergey Andreenko [Tue, 15 Jun 2021 21:11:12 +0000 (14:11 -0700)]
lvDoNotEnregister is not set when we are calling this function. (#54199)
Steve Pfister [Tue, 15 Jun 2021 20:38:44 +0000 (16:38 -0400)]
[Android] Fix crash in startup when running below API Level 24 (#54231)
This change fixes a crash when running below API Level 24 due to SNIHostName and SSLParameters.setServerNames not being available. We will now throw a PlatformNotSupportedException to make things a little more apparent.
Fixes #54182
Katelyn Gadd [Tue, 15 Jun 2021 20:38:10 +0000 (13:38 -0700)]
Generalize C#/JS string interning and ensure most bindings code supports interned strings (#54086)
This PR refactors all C# -> JS string decoding to go through a single path that maintains an intern table
Trivalik [Tue, 15 Jun 2021 19:31:51 +0000 (21:31 +0200)]
catch DirectoryOperationException to check Negotiate as for LdapException (#52748)
resolves https://github.com/dotnet/runtime/issues/51222
Co-authored-by: Trivalik <rborchert@live.de>
Katelyn Gadd [Tue, 15 Jun 2021 19:29:51 +0000 (12:29 -0700)]
Fix unboxing datetime instances (#54105)
Unboxing datetime instances is currently broken in some cases due to an incorrect method signature
Ankit Jain [Tue, 15 Jun 2021 19:21:41 +0000 (15:21 -0400)]
Rename wasm/browser-bench sample to match others, so it gets built on CI (#54205)
Co-authored-by: Radek Doulik <radekdoulik@gmail.com>
Theodore Tsirpanis [Tue, 15 Jun 2021 19:21:22 +0000 (22:21 +0300)]
Make System.Net.Http.HPack.IntegerEncoder a struct (#54209)
Adam Sitnik [Tue, 15 Jun 2021 18:59:58 +0000 (20:59 +0200)]
Set of offset-based APIs for thread-safe file IO (#53669)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Aleksey Kliger (λgeek) [Tue, 15 Jun 2021 18:56:58 +0000 (14:56 -0400)]
Don't return null target methods in GetInterfaceMap for abstract classes, or classes using DIMs (#53972)
* Add DIM tests for GetInterfaceMap
Regression tests for https://github.com/dotnet/runtime/issues/53933
* Return null target methods from GetInterfaceMap in fewer cases
If the iterface method is reabstracted, and either the found implementation
method is abstract, or the found implementation method is from another
DIM (meaning neither klass nor any of its ancestor classes implemented the
method), then say the target method is null. Otherwise return the found
implementation method, even if it is abstract, unless we found a reabstracted
method in a non-abstract class
Fixes https://github.com/dotnet/runtime/issues/53933
David Mason [Tue, 15 Jun 2021 18:54:02 +0000 (11:54 -0700)]
Add the concept of "notification profilers" to the runtime (#53122)
Larry Ewing [Tue, 15 Jun 2021 18:44:05 +0000 (13:44 -0500)]
[mono] Split the shared tooling into a separate abstract workload (#53102)
This moves the shared parts of the mono workload to a separate abstract workload to allow the VS packaging tooling to treat it as a component group.
Jan Vorlicek [Tue, 15 Jun 2021 18:37:30 +0000 (20:37 +0200)]
Fix PAL_JitWriteProtect export on Linux (#54190)
* Fix PAL_JitWriteProtect export on Linux
I have not realized that we actually export that symbol on Linux too and
that mscordac then have the dummy function missing.
* Code review feedback
* Disable PAL_JitWriteEnable usage in DBI / DAC
* Fix typo in amd64 version
Co-authored-by: Mike McLaughlin <mikem@microsoft.com>
Egor Chesakov [Tue, 15 Jun 2021 17:59:28 +0000 (10:59 -0700)]
Split 16-byte SIMD store around GC struct fields into two 8-byte SIMD stores (x86)/ two 8-byte mov-s (x64) (#53116)
Fixes #51638 by using
1) Constructing `ASG(OBJ(addr), 0)` for structs that have GC fields and keeping the current IR (i.e. `ASG(BLK(addr), 0)`) for other types. Such bookkeeping would allow the JIT to maintain information about the class layout.
2a) Emitting a sequence of `mov [m64],r64` instead of `movdqu [m128],xmm` when zeroing structs with GC fields that are not guaranteed to be on the stack on win-x64 or linux-x64.
2b) Emitting a sequence of `movq [m64],xmm` when zeroing such structs on win-x86.
Aleksey Kliger (λgeek) [Tue, 15 Jun 2021 17:50:31 +0000 (13:50 -0400)]
[android] Don't print debug messages at startup (#54221)
The JNI_OnLoad method calls GetClassGRef and GetMethod several hundred times
during startup. The debug output is redundant (if any classes or methods are
missing we will assert and print a message and kill the process) and it slows
down startup.
Aleksey Kliger (λgeek) [Tue, 15 Jun 2021 17:49:53 +0000 (13:49 -0400)]
[mono] Build dynamic components for iOS simulator (#54229)
and tvOS simulator
Viktor Hofer [Tue, 15 Jun 2021 17:32:15 +0000 (19:32 +0200)]
Expose missing references which are present in the runtime and in packages in the targeting pack (#54147)
* Expose missing refs from runtime in targeting pack
The platform analyzers warns for usages of APIs which aren't available
on specific platforms. Exposing the missing reference assemblies which
are already part of the runtime pack in the targeting pack.
The big benefit of doing so is that customers don't need to reference
the corresponding packages to target these APIs and that these five
packages can be dead-ended.
For more in-depth reasoning, see the detailed summary:
https://github.com/dotnet/runtime/issues/53892#issuecomment-
858542280
Fixes https://github.com/dotnet/runtime/issues/53892
* Update dependents of dead-ended packages
Update depents by referencing the latest available package. Making sure
that packages are never used on NetCoreAppCurrent by applying
.NETCoreApp version conditions.
* Fixes
* Remove pkg validation suppression file
* Update Windows Compatibility pack
* Fix DirectoryServices pkg references
* Fix netfx Pkcs restore/build
* Fix version conflict
* Packageindex and nits
* nits
Viktor Hofer [Tue, 15 Jun 2021 14:40:46 +0000 (16:40 +0200)]
Add NetCoreAppCurrent config to where it's missing (#54215)
* Add NetCoreAppCurrent config to where it's missing
This is addressing the following scenarios in order:
- When there is a netcoreapp3.1 or net5.0 asset available in the lib,
also add a NetCoreAppCurrent configuration to avoid PackageReferences
to libraries that are inbox in net6.0 but not in previous .NetCoreApp
versions. Examples are M.Win32.Registry which will be inbox soon.
- When there's a NetCoreAppCurrent config in the lib but not in the ref,
add it there as well to always resolve the ref of the current version.
- When there are NetCoreAppCurrent rid specific configuration in the lib
not a non-rid configuration, add one so that P2Ps from rid-less
NetCoreAppCurrent configs in other projects, pick the
NetCoreAppCurrent config from the lib and the ref.
Robin van der Vliet [Tue, 15 Jun 2021 14:01:01 +0000 (16:01 +0200)]
Fix typos (#54216)
Alexander Köplinger [Tue, 15 Jun 2021 12:10:23 +0000 (14:10 +0200)]
Bump Helix workitem timeout for libraries outerloop runs (#49876)
System.IO.Compression.Brotli.Tests takes 870 seconds already which is quite close to the 900s timeout.
Viktor Hofer [Tue, 15 Jun 2021 11:55:33 +0000 (13:55 +0200)]
[main] Update dependencies from dotnet/runtime dotnet/arcade dnceng/internal/dotnet-optimization dotnet/xharness dotnet/hotreload-utils (#54179)
* Update dependencies from https://github.com/dotnet/xharness build
20210610.3
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21307.1 -> To Version 1.0.0-prerelease.21310.3
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20210610.2
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.1-alpha.0.21307.1 -> To Version 1.0.1-alpha.0.21310.2
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210610.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21308.4 -> To Version 1.0.0-prerelease.21310.4
* Update dependencies from https://github.com/dotnet/arcade build
20210611.3
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21304.1 -> To Version 6.0.0-beta.21311.3
* Update dependencies from https://github.com/mono/linker build
20210610.3
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21308.1 -> To Version 6.0.100-preview.6.21310.3
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20210611.1
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.1-alpha.0.21307.1 -> To Version 1.0.1-alpha.0.21311.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210612.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21308.4 -> To Version 1.0.0-prerelease.21312.4
* Update dependencies from https://github.com/dotnet/runtime build
20210614.1
Microsoft.NETCore.DotNetHost , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , Microsoft.NET.Sdk.IL , System.Runtime.CompilerServices.Unsafe , System.Text.Json
From Version 6.0.0-preview.6.21307.1 -> To Version 6.0.0-preview.6.21314.1
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210613.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21308.4 -> To Version 1.0.0-prerelease.21313.4
* Update dependencies from https://github.com/dotnet/xharness build
20210614.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21307.1 -> To Version 1.0.0-prerelease.21314.1
* Suppress false positive package validation errors
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Alexander Köplinger [Tue, 15 Jun 2021 09:46:34 +0000 (11:46 +0200)]
Add NetCoreAppCurrent configuration to three ref projects (#54146)
System.ComponentModel.Composition, System.Diagnostics.PerformanceCounter and System.Runtime.Caching.
Helps with https://github.com/dotnet/runtime/issues/54012
Viktor Hofer [Tue, 15 Jun 2021 09:06:49 +0000 (11:06 +0200)]
Clean-up after SDK 6.0 P4 bump (#54149)
* Delete scripts.csproj
* Update build.proj
Francesco Saltori [Tue, 15 Jun 2021 06:59:45 +0000 (08:59 +0200)]
Implement ServiceController.Stop(bool) overload (#52519)
* Implement ServiceController.Stop(bool) overload with test
* Add basic docs for new ServiceController.Stop overload
* Name boolean parameter
Co-authored-by: Ilya <darpa@yandex.ru>
* Add a test for a valid use of ServiceController.Stop(bool)
* Run tests for the new Stop(bool) overload only on .NETCoreApp
* Add a test for manually stopping a service and its dependents with Stop(false)
* Expose new Stop(bool) overload only for .NET Core 3.1+
* Target netcoreapp3.1
Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
David Fowler [Tue, 15 Jun 2021 06:08:29 +0000 (23:08 -0700)]
Seal nested classes (#54196)
Aaron Robinson [Tue, 15 Jun 2021 04:36:08 +0000 (21:36 -0700)]
Guidance on source generator projects (#54082)
* Guidance on source generator projects
Jo Shields [Tue, 15 Jun 2021 03:00:03 +0000 (23:00 -0400)]
Be more verbose when processes spawned from tasks fail. (#54144)
Right now, when a process fails (e.g. cmake or xcodebuild), all of the STDERR captured during that process run is dumped in the exception.
However, if silent is true, no STDOUT is captured at all, and we lose potentially vital debugging information contained within.
This PR merges the stdout and stderr capture, and instead of not capturing anything when silent is true, it always captures and only returns nothing when silent is true.
This should greatly ease debugging of failed tasks.
Nikola Milosavljevic [Tue, 15 Jun 2021 02:06:06 +0000 (19:06 -0700)]
Remove unintended line wrap (#54151)
Stephen Toub [Tue, 15 Jun 2021 00:15:32 +0000 (20:15 -0400)]
Remove outdated lock from ParseRawHeaderValues (#54130)
This lock existed to protect HttpClient.DefaultRequestHeaders. While headers collections aren't meant to be thread-safe, out of necessity the design of DefaultRequestHeaders required this lock be in place, with multiple concurrent requests all potentially enumerating DefaultRequestHeaders in order to copy its contents into the outgoing request. Such enumeration could trigger parsing, which could trigger the same object to be mutated from multiple threads to store the parsed result. But as of https://github.com/dotnet/runtime/pull/49673, we no longer force parsing of the DefaultRequestHeaders, instead preferring to just transfer everything over as-is. With that, there shouldn't be any concurrent mutation of these objects (and if there is, it's user error doing their own concurrent enumeration of a header collection).
Stephen Toub [Tue, 15 Jun 2021 00:15:17 +0000 (20:15 -0400)]
Fix thread-safety of DiagnosticListener.AllListeners (#54142)
Mitchell Hwang [Mon, 14 Jun 2021 23:29:53 +0000 (19:29 -0400)]
[Tasks][MonoAOTCompiler] Update README.md to include option using UsingTask (#54169)
Though the MonoAOTCompiler Task is included in the SDK in https://github.com/dotnet/runtime/blob/main/src/mono/nuget/Microsoft.NET.Runtime.MonoAOTCompiler.Task/Sdk/Sdk.props and should be accessible when using the NuGet, adding the second option to the MonoAOTCompiler task README allows for greater visibility on how to directly implement one's own UsingTask.
Fixes #47630
Bill Wert [Mon, 14 Jun 2021 21:28:42 +0000 (14:28 -0700)]
Change repository for installing cargo (#53744)
Viktor Hofer [Mon, 14 Jun 2021 20:51:19 +0000 (22:51 +0200)]
Update libraries-packages.proj (#54150)
Viktor Hofer [Mon, 14 Jun 2021 20:44:24 +0000 (22:44 +0200)]
Revert "[main] Update dependencies from mono/linker dotnet/runtime dotnet/arcade dnceng/internal/dotnet-optimization dotnet/xharness dotnet/hotreload-utils (#54060)" (#54177)
This reverts commit
4c0d2f01112a814a8d62494b138859e64a701570.
Juan Hoyos [Mon, 14 Jun 2021 20:35:01 +0000 (13:35 -0700)]
Revert "Add mibc to the PE family of signatures" (#54162)
* Revert "Add mibc to the PE family of signatures (#53048)"
This reverts commit
4147948c1b2a0746b6f11bd2b31c8238cab5a325.
* Fix binlog path
Kunal Pathak [Mon, 14 Jun 2021 20:29:15 +0000 (13:29 -0700)]
Do not mark op2 as delayRegFree if op1==op2 (#53964)
* Do not mark op2 as delayRegFree if op1==op2
* Revert NodesAreEquivalentLeaves change
* Pass rmwNode to `BuildDelayFreeUses()` which does the right thing
* Make similar change in arm64
* remove TODO comment
* review feedback
Tanner Gooding [Mon, 14 Jun 2021 19:53:57 +0000 (12:53 -0700)]
Ensure Vector.Sum uses SSE3, rather than SSSE3, for floating-point (#54123)
* Adding a JIT/SIMD test validating Vector.Sum
* Ensure Vector.Sum uses SSE3, rather than SSSE3, for floating-point
* Ensure we do ISA checks before popping values from the stack
* Applying formatting patch
Pranav K [Mon, 14 Jun 2021 19:44:38 +0000 (12:44 -0700)]
Fixup ArgumentOutOfRangeException (#54161)
Filip Navara [Mon, 14 Jun 2021 15:41:55 +0000 (17:41 +0200)]
Fix NTLM authentication from macOS to Windows machines (#54101)
* Fix NTLM authentication from macOS to Windows machines
The GSSAPI implementation on macOS has partially broken NTLM implementation. It only supports NTLMv2 with the message integrity code (MIC) as specified by the MS-NLMP specification. The MIC is calculated using HMAC-MD5 authentication code over the exchanged NTLM messages with a key named ExportedSessionKey. The proper generation of ExportedSessionKey requires the implementation to negotiate correct capabilities, namely NTLMSSP_NEGOTIATE_KEY_EXCH and at least one of NTLMSSP_NEGOTIATE_SIGN or NTLMSSP_NEGOTIATE_SEAL flags. By default the macOS implementation negotiates NTLMSSP_NEGOTIATE_KEY_EXCH and sends MIC but fails to set one of the additional flags that would make the key exchange valid. This results in violation of the following part of the NTLM specification:
"A session key MUST always exist to generate the MIC (section 3.1.5.1.2) in the authenticate message. NTLMSSP_NEGOTIATE_ALWAYS_SIGN MUST be set in the NEGOTIATE_MESSAGE to the server and the CHALLENGE_MESSAGE to the client."
Adding the GSS_C_INTEG_FLAG flag forces macOS to properly negitiate all the necessary flags (NTLMSSP_NEGOTIATE_ALWAYS_SIGN and NTLMSSP_NEGOTIATE_SIGN) to make the MIC exchange valid. This in turn enables the whole NTLM exchange to be recognized as valid by Windows server side.
The gss-ntlmssp package on Linux interprets the GSS_C_INTEG_FLAG flag as additional negotiation of NTLMSSP_NEGOTIATE_SIGN and NTLMSSP_NEGOTIATE_KEY_EXCH. That should not hurt anything and in fact it may improve security depending on specific configuration. The flag was already specified when NTLM was used by System.Net.Mail.SmtpClient.
* Add temporary test to verify NTLM and Negotiate connections from all platforms
Notably this is expected to fail on Android and tvOS where GSSAPI is not available.
The test machine is single purpose virtual machine running in Azure with clean Windows Server 2019 installation and all the patches. It hosts IIS with single static page behind an NT authentication. The test account and the machine itself is disposable and does NOT contain any sensitive data. Nevertheless I don't expect this test to be merged.
* Use full domain name in test credentials
* Revert "Use full domain name in test credentials"
This reverts commit
ea4dc615824c207845628143addc7d8c774ce702.
* Revert "Add temporary test to verify NTLM and Negotiate connections from all platforms"
This reverts commit
abf44ce1430edf631fe74b15d354eca9073b4c83.
David Fowler [Mon, 14 Jun 2021 15:18:45 +0000 (08:18 -0700)]
Set the async local just before execution (#54133)
* Set the async local just before execution.
- Subscribing to DiagnosticListener.AllListeners replays all created DiagnosticListener instances. Because of this, we need to set the async local just before the execution of the entry point so that we only collect the events that are relevant to the call. Right now, it's also firing with the async local set pre-maturely.
- Wrote a concurrency test to make sure it's safe to instantiate the factory in parallel.
Eric Erhardt [Mon, 14 Jun 2021 15:03:41 +0000 (10:03 -0500)]
Make JsonSerializer work when IsDynamicCodeSupported is false. (#54027)
Use the non-Emit codepath if IsDynamicCodeSupported is false.
Jeff Layton [Mon, 14 Jun 2021 14:48:32 +0000 (10:48 -0400)]
Logging Generator: messaging fix (#54080)
Huo Yaoyuan [Mon, 14 Jun 2021 13:15:06 +0000 (21:15 +0800)]
Cleanup BitVector32 (#54097)
* Cleanup BitVector32
* Cleanup Section.ToString
dotnet-maestro[bot] [Mon, 14 Jun 2021 13:02:05 +0000 (13:02 +0000)]
[main] Update dependencies from mono/linker dotnet/runtime dotnet/arcade dnceng/internal/dotnet-optimization dotnet/xharness dotnet/hotreload-utils (#54060)
[main] Update dependencies from mono/linker dotnet/runtime dotnet/arcade dnceng/internal/dotnet-optimization dotnet/xharness dotnet/hotreload-utils
Takym (たかやま) [Mon, 14 Jun 2021 11:46:13 +0000 (20:46 +0900)]
Change `pThisRef->GetMethodTable()` to `pThisMT`. (#54138)
Radek Doulik [Mon, 14 Jun 2021 11:07:08 +0000 (13:07 +0200)]
[wasm] Clarify which parts are for mac users (#54135)
Mitchell Hwang [Mon, 14 Jun 2021 09:03:30 +0000 (05:03 -0400)]
[MacCatalyst][libraries] Skip Crashing test suites (#53625)
* [MacCatalyst][libraries] Skip Crashing test suites
* Fix typos
* Add System.Linq.Parallel skip AppCrash
* Add Amore arm64 flakes
* Add additional App Launch Failure skip
* Add System.IO.UnmanagedMemoryStream.Tests skip
* Add more tests failing to app launch failures
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
dotnet-maestro[bot] [Mon, 14 Jun 2021 08:57:38 +0000 (10:57 +0200)]
Update dependencies from https://github.com/mono/linker build
20210610.3 (#54061)
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21308.1 -> To Version 6.0.100-preview.6.21310.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Aleksey Kliger (λgeek) [Mon, 14 Jun 2021 08:50:00 +0000 (04:50 -0400)]
Always build with hot reload support (in a component) (#54124)
Get rid of the ENABLE_METADATA_UPDATE ifdef. To disable hot reload,
don't include the component in the runtime
Austin Wise [Mon, 14 Jun 2021 08:10:24 +0000 (01:10 -0700)]
Remove allocation from MsQuicAddressHelpers.IPEndPointToINet (#54095)
Assuming that GetAddressBytes() does not have side effects, this call
should not be needed.
Clean up from dotnet/runtime#53461
Jan Kotas [Mon, 14 Jun 2021 05:37:21 +0000 (22:37 -0700)]
Fix ILVerify dependencies (#54112)
- Update ILVerify to build for NetCoreAppToolCurrent
imhameed [Sun, 13 Jun 2021 22:49:59 +0000 (15:49 -0700)]
[mono] Reenable some amd64 intrinsic tests, enable amd64 ISA extensions when AOTing, several intrinsics fixes (#53752)
Changes:
* Consolidate SSE shuffle constant unrolling
Remove `OP_SSE2_SHUFFLE`, which is unused.
Rename `OP_SSE_SHUFFLE` to `OP_SSE_SHUFPS`, to make this more consistent with
the naming convention used for other SSE shuffles.
Use `immediate_unroll_*` instead of hand-writing branch emission. These
branch tables are huge (in the simplest case, with 256 different constant
values, we can spend over 1KB of code on nothing but `shufps` and `jmp`s, and
the cost gets worse if any tail duplication happens), and are currently
emitted inline. Future work ought to:
1. use a sequence of extractelement/insertelement instructions, which can be
optimized into a constant shuffle when the shuffle control parameter is
constant, and otherwise generates a high-latency but low-code-size fallback
(note that this only works for shuffles); or
2. emit the fallback branch tables out of line and use `llvm.is.constant` to
generate either a constant shuffle or a call to a fallback shuffle branch
table function (the cost isn't too bad: a direct-call/ret pair would add ~4-5
cycles and eat an RSB slot on top of the cost of the branch table).
Fixes `JIT/HardwareIntrinsics/X86/Regression/GitHub_21855/GitHub_21855_r`.
* Fix intrinsification for MathF.Round
`OP_SSE41_ROUNDS` takes two source registers, not one.
TODO: Investigate what happens with `llvm.round` and
`llvm.experimental.constrained.round`.
Fixes `JIT/Intrinsics/MathRoundSingle_r`,
`JIT/Math/Functions/Functions_r`, and
`JIT/Performance/CodeQuality/Math/Functions/Functions`.
* Clean up intrinsic group lookup
Use a dummy never-supported intrinsic group as a default fallback, instead of
adding a special-case "intrinsic group not present" branch
Correctly intrinsify get_IsSupported even when not using LLVM
Fixes spurious `System.PlatformNotSupportedException`s when calling
`get_IsSupported` when the LLVM backend isn't being used.
* The "not" SSE comparions are unordered, so use the appropriate unordered LLVM
IR comparisons
Add labeled constants for the immediate parameter we pass to CMPSS/CMPSD.
Fixes `Regressions.coreclr/GitHub_34094/Test34094`.
* Fix `LoadAndDuplicateToVector128`
`LoadAndDuplicateToVector128` should load exactly one 8-byte value from memory
before broadcasting it into both lanes in a 128-bit result vector.
Fixes `JIT/HardwareIntrinsics/X86/Sse3/LoadAndDuplicateToVector128_r`.
* Implement constant unrolling for `Sse41.DotProduct`
As with shuffles, the fallback jump table should probably be kept out of line
someday; `vdpps` uses 6 bytes of space, so any fallback jump table for the
selection control mask will be at least 1.5kb large.
Fixes `JIT/HardwareIntrinsics/X86/Sse41/DotProduct_r`.
* Implement constant unrolling for `Sse41.Blend`
The usual: big jump blobs should be out of line, possible to use
extract/insertelement.
* Zero is part of the domain of `lzcnt` and shouldn't yield an undef.
Use fully-defined `llvm.ctlz` when implementing `OP_LZCNT32/64`.
Fixes `JIT/HardwareIntrinsics/X86/Regression/GitHub_21666/GitHub_21666_r`
* Unify amd64/arm64 vector extraction handling
Removes `OP_EXTRACT_U1` and `OP_EXTRACT_U2`. Instead, sign/zero extension is
determined via `inst_c1` for `OP_EXTRACT_*` and `OP_XEXTRACT_*` (and
`OP_EXTRACTX_U2`, which doesn't seem to be generated as part of intrinsic
translation), which must be set to a MonoTypeEnum.
Replaces `OP_EXTRACT_VAR_*` with `OP_XEXTRACT_*`.
Fixes `JIT/Regression/JitBlue/GitHub_23159/GitHub_23159` and
`JIT/Regression/JitBlue/GitHub_13568/GitHub_13568`.
* Remove `OP_DPPS`; it is unused
* Disable `JIT/Regression/CLR-x86-JIT/V1.1-M1-Beta1/b143840` when running with mono LLVM AOT
* Disable finalizearray when running with mono LLVM AOT
* Disable Vector256_1/Vector128_1 tests on wasm
* Enable sse4.2, popcnt, lzcnt, bmi, and bmi2 when AOT compiling the runtime
tests.
* Pass the runtime variant to `helixpublishwitharcade.proj`, and forward this
runtime variant to testenvironment.proj.
This is used to selectively enable LLVM JIT on the LLVM AOT lanes. Removes
the hack added to CLRTest.Execute.Bash.targets that did this for arm64 (which
happens to only have an LLVM AOT lane for runtime tests right now).
* Enable `JIT/HardwareIntrinsics/General/Vector128_1/**`,
`JIT/HardwareIntrinsics/General/Vector256/**`,
`JIT/HardwareIntrinsics/General/Vector256_1/**`, and
`JIT/HardwareIntrinsics/X86/General/IsSupported*/**` for LLVM AOT on amd64.
Juan Hoyos [Sun, 13 Jun 2021 20:54:05 +0000 (13:54 -0700)]
Infrastructure: correct dependencies and clean helix agent from stray corerun procs (#54094)
* Add dependency on coreclr in monojit/monointerpreter jobs explicitly to solve pipeline issue #53842
* Use Helix Pre/Post hooks to kill linkering corerun instances to work around ARM64 agent issues
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Peter Sollich [Sun, 13 Jun 2021 15:25:30 +0000 (17:25 +0200)]
Fix profiler\gc\gcbasic test to work with SVR GC on many cores. (#54057)
Problem was that we had a fixed size buffer (32 entries), and we may have way more generation bounds than that, especially with regions.
Fix is to heap allocate the buffer if the size of the buffer on the stack is exceeded.
Tanner Gooding [Sun, 13 Jun 2021 05:25:47 +0000 (22:25 -0700)]
Port IsRedundantMov to xarch (#54075)
* Port IsRedundantMov to xarch
* Applying formatting patch
* Responding to PR feedback
Tomas Weinfurt [Sat, 12 Jun 2021 14:26:08 +0000 (16:26 +0200)]
fix ConnectWithCertificateChain quic test (#54026)
Jan Vorlicek [Sat, 12 Jun 2021 07:54:58 +0000 (09:54 +0200)]
Unify macOS ARM64 write protection holders with W^X ones (#54067)
* Unify macOS ARM64 write protection holders with W^X ones
This change removes the original holders that were added for changing
memory protection for executable code and moves the actual switching to
the recently added W^X holders.
The unixexports files don't support target specific symbols. So I needed
to export a dummy version of the PAL_JitWriteProtect for macOS x64.
David Fowler [Sat, 12 Jun 2021 06:09:46 +0000 (23:09 -0700)]
Scope events to the execution of the entry point (#54090)
* Scope events to the execution of the entry point
- Today we're using the global event source and events that fire in the app domain get captured and this can result in capturing the wrong instances. This fix uses an async local to scope the events for the HostingEventListener to the execution of the application's entry point.
- Removed the RemoteExecutor as a result of this change
- Remove RequirementsMet property
Aleksey Kliger (λgeek) [Sat, 12 Jun 2021 04:32:57 +0000 (00:32 -0400)]
[mono] Componentize hot reload (#52866)
* Move most of the code to hot_reload.c
For the fast path data, we will leave a struct in the runtime with the values
and pass its address to the component to fill in.
* Mark functions used by hot reload with MONO_COMPONENT_API
* Drop the metadata_update_init EE and runtime callbacks
They're unused now
* remove mono_ prefix from some static methods in hot reload
* Always define metadata_update_published runtime callback
* Move metadata update data out of MonoImage, into hot_reload component
Use separate baseline and delta structs for tracking updates
* move slowpath metadata lookup, and cleanup to hot_reload component
Move the delta_image and method_table_update data into BaselineInfo
and DeltaInfo. Keep a single `MonoImage:has_updates` flag to switch
over to the slow path through the component.
* fixup: set has_updates on first update, too
Also setup the BaselineInfo and DeltaInfo earlier before the first
string heap lookup
* fixup after rebase
* ConsoleDelta sample: build on osx-arm64, use hotreload buildtool
instead of hotreload-delta-gen CLI tool
* fix whitespace
* bugfix - get the value of MonoImage:has_updates not its address
* Dynamically query runtime for GetApplyUpdateCapabilities
if the hot reload component is stubbed out, return empty capabilities.
This is a step toward removing FEATURE_METADATA_UPDATE and
ENABLE_METADATA_UPDATE defines and solely using component
infrastrucutre for controlling behavior
* Mark some runtime functions with MONO_COMPONENT_API
* fixup icall declaration
* fix whitespace and indentation
* Return capabilities if hot reload component is available, even if env var isn't set.
Match CoreCLR behavior. Also makes our testsuite actually run the
tests (we check for capabilities before running setting
DOTNET_MODIFIABLE_ASSEMBLIES using the remote executor)
John Salem [Sat, 12 Jun 2021 00:23:58 +0000 (17:23 -0700)]
simplify gh53564 test (#54081)
David Fowler [Fri, 11 Jun 2021 22:11:50 +0000 (15:11 -0700)]
Add support for IServiceProviderIsService (#54047)
* Add support for IServiceProviderIsService
- This optional service lets consumers query to see if a service is resolvable without side effects (not having to explicitly resolve the service).
- Added new spec tests to verify the baseline behavior based on IServiceCollection features.
- Handle built in services as part of IsServce
- Special case built in services as part of the IsService check
- Make the tests part of the core DI tests and enable skipping via a property
Co-authored-by: Travis Illig <tillig@paraesthesia.com>
Ankit Jain [Fri, 11 Jun 2021 22:10:55 +0000 (18:10 -0400)]
[wasm][aot][tests] Disable tests causing crash - System.Text.Encoding… (#53971)
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Steve MacLean [Fri, 11 Jun 2021 21:49:49 +0000 (17:49 -0400)]
Fix 54025 (#54070)
Stephen Toub [Fri, 11 Jun 2021 21:31:15 +0000 (17:31 -0400)]
Fix Deflate/Brotli/CryptoStream handling of partial and zero-byte reads (#53644)
Stream.Read{Async} is supposed to return once at least a byte of data is available, and in particular, if there's any data already available, it shouldn't block. But Read{Async} on DeflateStream (and thus also GZipStream and ZLibStream), BrotliStream, and CryptoStream won't return until either it hits the end of the stream or the caller's buffer is filled. This makes it behave very unexpectedly when used in a context where the app is using a large read buffer but expects to be able to process data as it's available, e.g. in networked streaming scenarios where messages are being sent as part of bidirectional communication.
This fixes that by stopping looping once any data is consumed. Just doing that, though, caused problems for zero-byte reads. Zero-byte reads are typically used by code that's trying to delay-allocate a buffer for the read data until data will be available to read. At present, however, zero-byte reads return immediately regardless of whether data is available to be consumed. I've changed the flow to make it so that zero-byte reads don't return until there's at least some data available as input to the inflater/transform (this, though, doesn't 100% guarantee the inflater/transform will be able to produce output data).
Note that both of these changes have the potential to introduce breaks into an app that erroneously depended on these implementation details:
- If an app passing in a buffer of size N to Read{Async} depended on that call always producing the requested number of bytes (rather than what the Stream contract defines), they might experience behavioral changes.
- If an app passing in a zero-byte buffer expected it to return immediately, it might instead end up waiting until data was actually available.
Huo Yaoyuan [Fri, 11 Jun 2021 21:17:50 +0000 (05:17 +0800)]
Expose RoundUpToPowerOf2 (#53992)
* 32bit
* 64bit
* Expose in public api
* Unit test
* Add more tests
* Use in test
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Jakob Botsch Nielsen [Fri, 11 Jun 2021 21:00:20 +0000 (23:00 +0200)]
Improve dotnet-pgo output and fix null type handles (#53494)
* Improve dotnet-pgo output and fix null type handles
* When comparing .mibc files, find a unique name to print for both files
by repeatedly appending another parent directory on it.
* When comparing .mibc files, print a comparison of type handle
histogram data
* Fix a potential division by zero
* Print some info when producing .mibc that are based on samples/LBR
data
* Fix .mibc read type handles with value 0 to actually return IsNull
* Use different devirt threshold for interfaces and classes
* Add ClassProfileFlags to PgoFormat.cs
Zoltan Varga [Fri, 11 Jun 2021 20:33:32 +0000 (16:33 -0400)]
[mono][llvm] Remove some dead code. (#53920)
Bruce Forstall [Fri, 11 Jun 2021 18:42:33 +0000 (11:42 -0700)]
Fix mismatch between morph and lower (#53911)
For x86 delegate invoke tailcall via helper calls,
Lower expects the `this` pointer in a LCL_VAR. Morph
(`fgMorphTailCallViaJitHelper`) was letting a LCL_FLD go through
instead of inserting a copy of the field to a temp local.
Simply change the condition in morph to match the condition in Lower.
Fixes #53568
Steve MacLean [Fri, 11 Jun 2021 18:11:28 +0000 (14:11 -0400)]
Reenable 48786 (#54028)
Reenable tests disabled for issue 48786
This should be fixed now that we have moved to crossgen2
Tomas Weinfurt [Fri, 11 Jun 2021 18:02:54 +0000 (20:02 +0200)]
make MsQuicStatusCodes platform specific (#54031)
* make MsQuicStatusCodes platform specific
* add missing StreamLimit
Marie Píchová [Fri, 11 Jun 2021 17:57:51 +0000 (19:57 +0200)]
Re-enabled mock tests for H/3. (#53802)
* Re-enabled mock tests for H/3.
* Used IsMockQuicSupported to run the mock tests only on supported platforms.
* Disabling mock test completely.
* Hanging test fix experiment.
* Disabled some mock tests failing in CI.
Thays Grazia [Fri, 11 Jun 2021 16:58:33 +0000 (13:58 -0300)]
Fix assertion on debugger-engine (#54041)
Sync to mono/mono #21100
Viktor Hofer [Fri, 11 Jun 2021 16:55:09 +0000 (18:55 +0200)]
Update dotnet SDK to 6.0 Preview 4 (#53808)
* Update dotnet SDK to 6.0 Preview 4
Update the minimum and target version of the SDK to 6.0 Preview 4.
Part of https://github.com/dotnet/runtime/issues/53411
* Switch to using eng/targetingpacks.targets for redirecting runtime pack location in src/mono/sample
* Fix binder tracing tests
* Set UseMonoRuntime property so the dotnet SDK can pull the mono runtime packs
This is necessary after the changes from https://github.com/dotnet/sdk/pull/16909.
* Move UseMonoRuntimeProperty and set it to false in coreclr
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Ivan Zlatanov [Fri, 11 Jun 2021 16:50:09 +0000 (19:50 +0300)]
Vector.Sum(Vector<T>) API implementation for horizontal add. (#53527)
* Vector.Sum(Vector<T>) API implementation for horizontal add.
* Fixed inccorrect referece to Arm64 AddAccross intrinsic function.
* Added implementation for hardware accelerated Vector<T>.Sum for long, ulong, float, double on ARM64.
* Fixed formatting issue.
* Correctness.
* Fixed compiler error for ARM64.
* Formatting issue.
* More explicit switch statement. Fixed wrong simd size for NI_Vector64_ToScalar.
* Fixed auto formatting issue.
* Use AddPairwiseScalar for double, long and ulong on ARM64 for VectorT128_Sum.
* Forgot ToScalar call after AddPairwiseScalar.
* Fixed wrong return type.
Pranav K [Fri, 11 Jun 2021 16:40:50 +0000 (09:40 -0700)]
Allow UsingBrowserRuntimeWorkload to be disabled from the project file (#52728)
Andy Ayers [Fri, 11 Jun 2021 16:15:43 +0000 (09:15 -0700)]
Increase timeouts for PGO tests (#54030)
Peter Sollich [Fri, 11 Jun 2021 15:57:05 +0000 (17:57 +0200)]
Removed extraneous closing parentheses causing compile errors. (#54064)
David Fowler [Fri, 11 Jun 2021 15:29:39 +0000 (08:29 -0700)]
Follow up on HostFactoryResolver changes (#54052)
- Cleaned up the comments to explain what ResolveHostFactory does.
- Added entry point completed callback to let callers know when the entry point code is done running.
- Added tests for the various callbacks.