platform/upstream/dotnet/runtime.git
3 years agoOptimize vectorized sorting - reduce code size, improve speed for large heaps (#40613)
Peter Sollich [Thu, 13 Aug 2020 10:09:49 +0000 (12:09 +0200)]
Optimize vectorized sorting - reduce code size, improve speed for large heaps (#40613)

* Improved vectorized sort - smaller bitonic sorters, dynamic packing/unpacking.

There are two optimizations in this PR:

- reduction of code size in the bitonic sorters: by limiting the amount of inlining in this code, we can reduce overall code size in coreclr.dll by about 180 kB.

- dynamic packing: during sorting, we can switch to 32-bit sorting as soon as the address range in a partition is less 32 GB. This will only have an impact on large heaps or machines with many processors, because we already have a similar, but static optimization where we use 32-bit sorting if the overall address range in the ephemeral region is less than 32 GB. So this additional optimization will give improvements if the overall address range is greater than 32 GB initially, but becomes less during the sort. In this case, we get about a 1.6x improvement in sorting speed.

3 years agoadd Process.Start(string fileName, IEnumerable<string> arguments) overload (#40661)
Adam Sitnik [Thu, 13 Aug 2020 09:32:09 +0000 (11:32 +0200)]
add Process.Start(string fileName, IEnumerable<string> arguments) overload (#40661)

* add Process.Start(string fileName, IEnumerable<string> arguments) overload, fixes #371

3 years ago[master] Update dependencies from dotnet/arcade mono/linker dotnet/llvm-project dotne...
dotnet-maestro[bot] [Thu, 13 Aug 2020 08:09:50 +0000 (08:09 +0000)]
[master] Update dependencies from dotnet/arcade mono/linker dotnet/llvm-project dotnet/xharness dotnet/icu (#40376)

[master] Update dependencies from dotnet/arcade mono/linker dotnet/llvm-project dotnet/xharness dotnet/icu
- Updates:
  - Microsoft.NET.ILLink.Tasks: from 5.0.0-preview.3.20403.5 to 5.0.0-preview.3.20412.1

- Updates:
  - Microsoft.NETCore.Runtime.ICU.Transport: from 5.0.0-preview.8.20403.1 to 5.0.0-preview.8.20410.1

- Updates:
  - Microsoft.DotNet.XUnitExtensions: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.GenFacades: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.Build.Tasks.Feed: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.Build.Tasks.Packaging: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.CodeAnalysis: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.GenAPI: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.XUnitConsoleRunner: from 2.5.1-beta.20374.1 to 2.5.1-beta.20407.3
  - Microsoft.DotNet.Arcade.Sdk: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.Helix.Sdk: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.RemoteExecutor: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.VersionTools.Tasks: from 5.0.0-beta.20374.1 to 5.0.0-beta.20407.3
  - Microsoft.DotNet.ApiCompat: from 5.0.0-beta.20381.6 to 5.0.0-beta.20407.3

- Updates:
  - runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1
  - runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: from 9.0.1-alpha.1.20403.1 to 9.0.1-alpha.1.20410.1

- Updates:
  - Microsoft.DotNet.XHarness.CLI: from 1.0.0-prerelease.20403.2 to 1.0.0-prerelease.20411.1
  - Microsoft.DotNet.XHarness.TestRunners.Xunit: from 1.0.0-prerelease.20403.2 to 1.0.0-prerelease.20411.1

 - Merge branch 'master' into darc-master-cf92596d-90a4-4e3c-8692-fff33361f7e0

 - Merge branch 'master' into darc-master-cf92596d-90a4-4e3c-8692-fff33361f7e0

3 years agoConfigure ping in HTTP2 (#40257)
Jan Jahoda [Thu, 13 Aug 2020 06:51:29 +0000 (08:51 +0200)]
Configure ping in HTTP2 (#40257)

3 years agoAttempt to fix GC stress bugs caused by provisional gen 2 GCs. (#40719)
Peter Sollich [Thu, 13 Aug 2020 01:19:51 +0000 (03:19 +0200)]
Attempt to fix GC stress bugs caused by provisional gen 2 GCs. (#40719)

3 years agoSync HPackDecoder with ASP.NET Core changes (#40689)
James Newton-King [Thu, 13 Aug 2020 00:34:47 +0000 (12:34 +1200)]
Sync HPackDecoder with ASP.NET Core changes (#40689)

* Sync HPackDecoder with ASP.NET Core changes

3 years ago[aot] Fix an assert which is hit for generic instances with a lot of arguments. ...
monojenkins [Thu, 13 Aug 2020 00:02:36 +0000 (20:02 -0400)]
[aot] Fix an assert which is hit for generic instances with a lot of arguments. (#40736)

The c# compiler generates these for anonymous types.

Fixes https://github.com/xamarin/xamarin-macios/issues/9289.

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years ago[wasm] Remove unnecessary console messages. (#40728)
Thays Grazia [Wed, 12 Aug 2020 23:58:59 +0000 (20:58 -0300)]
[wasm] Remove unnecessary console messages. (#40728)

* Changing some console.log to console.debug to not pollute the console.
Changing printf to DEBUG_PRINTF to follow the debug level chosen by user.
Remove unnecessary console.log.

* Removing one more message.

3 years ago[mono][Browser] Update ICU (#40387)
Egor Bogatov [Wed, 12 Aug 2020 23:20:29 +0000 (02:20 +0300)]
[mono][Browser] Update ICU (#40387)

3 years ago[interp] Rework OBJREF and fix a GC issue (#40710)
Vlad Brezae [Wed, 12 Aug 2020 22:40:09 +0000 (01:40 +0300)]
[interp] Rework OBJREF and fix a GC issue (#40710)

* [interp] Remove unnecessary uses of OBJREF

No checkpoints are possible before the returned object is stored on interp stack.

* [interp] Don't rely on scanning C stack in wasm

In order to keep object references alive we were doing a volatile store to the address of a stack local. This would determine the compiler to store to the C stack, which we can scan on wasm. While I didn't see proof that this is not the case, this mechanism seems rather magical and fragile. This commit replaces this mechanism of keeping C locals alive with an explicit store into a handle that we allocate whenever we enter the interpreter. Since we don't require this too frequently (the interp stack is usually enough to keep required objects alive), a single handle is enough.

The added benefit of this is that we can stop scanning the C stack/registers altogether on desktop interpreter in coop mode. This mode replicates the behavior of wasm, uncovering GC bugs that show up there while using desktop interpreter.

* [interp] Make sure exception object is not collected during EH

Most of the time, the exception object comes from a function call in the runtime so it is not kept alive by interp stack.

3 years agoCorrectly handle a cached CRL with no NextUpdate on Linux
Kevin Jones [Wed, 12 Aug 2020 22:33:24 +0000 (18:33 -0400)]
Correctly handle a cached CRL with no NextUpdate on Linux

Treat a CRL with no nextUpdate as cachable for 3 days, then we'll recheck it.

This only seems to (legitimately) happen when the associated CA is nearing end-of-validity.
Either macOS doesn't really support this, or it's just part of their general downplay of CRL, but the tests are disabled there.

3 years agocard mark stealing fix (#40646)
Maoni Stephens [Wed, 12 Aug 2020 19:57:19 +0000 (12:57 -0700)]
card mark stealing fix (#40646)

When we are doing card mark stealing, different GC threads will be updating n_eph/n_gen
and whichever thread happens to mark the heap last will overwrite previous n_eph/n_gen
with its calculation. We need to accumulate updates from all threads that work on a heap.

3 years agoRemove duplicate System.Private.CoreLib.ni.pdb symbol file from the crossgen2 symbol...
Jeremy Koritzinsky [Wed, 12 Aug 2020 18:56:04 +0000 (11:56 -0700)]
Remove duplicate System.Private.CoreLib.ni.pdb symbol file from the crossgen2 symbol pacakge. (#40726)

3 years ago[wasm] Fix debugger tests source format (#40725)
Thays Grazia [Wed, 12 Aug 2020 18:55:11 +0000 (15:55 -0300)]
[wasm] Fix debugger tests source format (#40725)

* Fix format using dotnet format tool

* Fix wasm debugger source format using dotnet-format tool.

3 years agoAdditional HTTP/3 and QUIC fixes (#40675)
Cory Nelson [Wed, 12 Aug 2020 18:22:47 +0000 (11:22 -0700)]
Additional HTTP/3 and QUIC fixes (#40675)

* Fix Content-Length: 0 handling.
Fix exception wrapping behavior.
Make MsQuic async force async completion to avoid loading timing-sensitive MsQuic thread.

3 years ago[browser] Move the test specific code to the right location (#40722)
Larry Ewing [Wed, 12 Aug 2020 18:13:14 +0000 (13:13 -0500)]
[browser] Move the test specific code to the right location (#40722)

* Split out TestHarness related classes

* Move TestHarness files

3 years ago[mono] Fix configure to actually disable dllmap on non-mobile platforms (#40686)
Ryan Lucia [Wed, 12 Aug 2020 16:35:19 +0000 (12:35 -0400)]
[mono] Fix configure to actually disable dllmap on non-mobile platforms (#40686)

`$enable_monodroid` and `$enable_monotouch` are set to no, not an empty string

3 years agoRevert "FormUrlEncodedContent - make key non Nullable (#40267)" (#40711)
Marie Píchová [Wed, 12 Aug 2020 16:17:10 +0000 (18:17 +0200)]
Revert "FormUrlEncodedContent - make key non Nullable (#40267)" (#40711)

This reverts commit b977407c9ec8cd7f87ea9bbab8fb69ad45a747e1.

Co-authored-by: Jan Jahoda <jajahoda@microsoft.com>
3 years agoEnsure re-used local is initialized (#40694)
Charles Stoner [Wed, 12 Aug 2020 15:24:45 +0000 (08:24 -0700)]
Ensure re-used local is initialized (#40694)

3 years agoExecutionContext.Restore (#40322)
Ben Adams [Wed, 12 Aug 2020 15:05:18 +0000 (16:05 +0100)]
ExecutionContext.Restore (#40322)

Add ExecutionContext.Restore

3 years agoReenable NativeLibrary callback tests (#40669)
Sam Patel [Wed, 12 Aug 2020 14:52:57 +0000 (10:52 -0400)]
Reenable NativeLibrary callback tests (#40669)

* Reenable failing tests

Enable tests from https://github.com/dotnet/runtime/issues/35219 after the fixes went in

* address feedback

3 years ago[coop] Use handles for mono_runtime_try_invoke_array (#40614)
Vlad Brezae [Wed, 12 Aug 2020 14:25:41 +0000 (17:25 +0300)]
[coop] Use handles for mono_runtime_try_invoke_array (#40614)

3 years agoEnsure Process.MainWindowTitle and Process.Responding is refreshed (#38385)
Jeroen Oortwijn [Wed, 12 Aug 2020 13:48:12 +0000 (15:48 +0200)]
Ensure Process.MainWindowTitle and Process.Responding is refreshed (#38385)

* Add test for process.MainWindowTitle refresh bug

See #36768.

* Add test for Process.Responding refresh bug

See dotnet#36768.

* Ensure Process.MainWindowTitle is refreshed

See dotnet#36768.

* Ensure Process.Responding is refreshed

See dotnet#36768.

* Made dummyFilePath const

* Fix glaring bugs

* remove Process.Responding test

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
3 years agoFormUrlEncodedContent - make key non Nullable (#40267)
Jan Jahoda [Wed, 12 Aug 2020 13:35:55 +0000 (15:35 +0200)]
FormUrlEncodedContent - make key non Nullable (#40267)

As described in #38494, it is not easy to use Dictionary to create FormUrlEncodedContent instance.

I revisited the code and it seems to me we shouldn't support nullable keys. Instead of null key we should use empty string.

3 years agoImprove System.Numerics.Matrix3x2 and Matrix4x4 hash codes (#34452)
Roman Marusyk [Wed, 12 Aug 2020 12:45:15 +0000 (15:45 +0300)]
Improve System.Numerics.Matrix3x2 and Matrix4x4 hash codes (#34452)

* Improve System.Numerics.Matrix3x2 and Matrix4x4 hash codes

* Code review fixes

* Code review fixes

3 years agoBroaden checks for BigInteger.Multiply (#1796)
ts2do [Wed, 12 Aug 2020 12:37:56 +0000 (07:37 -0500)]
Broaden checks for BigInteger.Multiply (#1796)

* Broaden checks for BigInteger.Multiply
Multiply methods will call simpler algorithms for additional applicable cases

* Remove duplicated check

* Tuning MultiplyPow10

3 years agoBasic h2c tests (#40702)
Marie Píchová [Wed, 12 Aug 2020 11:16:08 +0000 (13:16 +0200)]
Basic h2c tests (#40702)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoHTTP Version Selection (#39201)
Marie Píchová [Wed, 12 Aug 2020 08:26:34 +0000 (10:26 +0200)]
HTTP Version Selection (#39201)

3 years agoFixing Matrix4x4 to use AdvSimd.Negate (#40684)
Tanner Gooding [Wed, 12 Aug 2020 07:12:59 +0000 (00:12 -0700)]
Fixing Matrix4x4 to use AdvSimd.Negate (#40684)

3 years agoRemove throw OperationCanceledException in Host.StopAsync (#40426)
Roman Marusyk [Wed, 12 Aug 2020 06:20:53 +0000 (09:20 +0300)]
Remove throw OperationCanceledException in Host.StopAsync (#40426)

3 years agoRemove the unused local variable 'length' (#40693)
minju [Wed, 12 Aug 2020 05:58:02 +0000 (14:58 +0900)]
Remove the unused local variable 'length' (#40693)

#30457
In line 292, remove the unused variable 'length'.

Thanks.

3 years agoFix some createdump issues (#40687)
Mike McLaughlin [Wed, 12 Aug 2020 05:23:18 +0000 (22:23 -0700)]
Fix some createdump issues (#40687)

 Fix some createdump issues

Fix still generating dump with COMPlus_DbgEnableMiniDump=0 on Windows

Start adding coredump pattern to dump names.  Supported format characters:

  %%  A single % character.
  %d  PID of dumped process (for backwards createdump compatibility).
  %p  PID of dumped process.
  %P  PID of dumped process.
  %e  The process executable filename.
  %E  The process executable filename.
  %h  Hostname return by gethostname().
  %t  Time of dump, expressed as seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).

3 years agofix error mapping in HttpWebRequest to handle NetworkException (#40666)
Geoff Kizer [Wed, 12 Aug 2020 03:46:18 +0000 (20:46 -0700)]
fix error mapping in HttpWebRequest to handle NetworkException (#40666)

* fix error mapping in HttpWebRequest to handle NetworkException

* add mapping for SocketError.NoData => NetworkError.HostNotFound

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years ago[aot] Avoid dedup-ing non-public instances. (#40643)
monojenkins [Wed, 12 Aug 2020 03:35:24 +0000 (23:35 -0400)]
[aot] Avoid dedup-ing non-public instances. (#40643)

This will decrease the size of the dedup assembly which can get
large with lots of instances.

Hopefully fixes https://github.com/mono/mono/issues/20224.

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoRe-enable tracelogging test for crossgen2 (#40685)
David Wrighton [Wed, 12 Aug 2020 00:50:06 +0000 (17:50 -0700)]
Re-enable tracelogging test for crossgen2 (#40685)

It works now, and appears to have been fixed by a infra fix some time ago

3 years agoadd macOS 11 with arm64 to RID graph (#40644)
Tomas Weinfurt [Wed, 12 Aug 2020 00:04:46 +0000 (17:04 -0700)]
add macOS 11 with arm64 to RID graph (#40644)

3 years ago[VisualBasic] Fix TypeName for COM objects (#40584)
Edison Henrique Andreassy [Tue, 11 Aug 2020 23:34:01 +0000 (20:34 -0300)]
[VisualBasic] Fix TypeName for COM objects (#40584)

* Initial try of TypeName for ComObjects on Windows

* Implemented TypeNameOfCOMObject to use in Versioned.TypeName

* Separated tests of the TypeName for COM objects

* Utils.VBFriendlyName now matches reference source

* Moved TypeName for COM objects tests to VersionedTests

* Added ILLinkTrim.xml as a temporary solution as comented on #35937

* UnsafeNativeMethods are only available on Windows

* Test refactoration

* Skip COM interop test on Mono

* Explicit types in ILLinkTrim.xml

* Call GetTypeFromProgID with throwOnError true

* Disabled TypeName_ComObject test on Windows Nano

3 years agoAdd logger to cache entry to catch exception (#37292)
lindexi [Tue, 11 Aug 2020 22:18:21 +0000 (06:18 +0800)]
Add logger to cache entry to catch exception (#37292)

3 years agoFix handling of collectible thread statics and GC (#40671)
David Wrighton [Tue, 11 Aug 2020 21:54:08 +0000 (14:54 -0700)]
Fix handling of collectible thread statics and GC (#40671)

- NonGc Thread statics helper returns a ByRef, not a pointer for collectible statics
- Add test coverage for collectible statics
- Remove test coverage for converting thread static variable into byref and using that to keep alive the static data as it wasn't fully safe itself

3 years agoRemove unused locals in System.Net.* (#39575)
Matt Kotsenas [Tue, 11 Aug 2020 20:54:08 +0000 (13:54 -0700)]
Remove unused locals in System.Net.* (#39575)

* Remove unused locals in System.Net.HttpListener

* Remove unused local in System.Net.Requests

* Remove unused locals and methods in System.Net.Security

3 years agoFix virtual slot indices in VSD botr example (#40174)
David Wrighton [Tue, 11 Aug 2020 20:44:20 +0000 (13:44 -0700)]
Fix virtual slot indices in VSD botr example (#40174)

3 years agoUpdate README.md
Jan Kotas [Tue, 11 Aug 2020 20:21:02 +0000 (13:21 -0700)]
Update README.md

3 years agomodifies flaky Microsoft.Win32 test (#40673)
Maryam Ariyan [Tue, 11 Aug 2020 19:29:51 +0000 (12:29 -0700)]
modifies flaky Microsoft.Win32 test (#40673)

- TimerElapsedIsRoughlyEquivalentToInterval

3 years agoUpdating Matrix4x4 to accelerate several functions using Arm.AdvSimd (#40054)
Tanner Gooding [Tue, 11 Aug 2020 19:23:13 +0000 (12:23 -0700)]
Updating Matrix4x4 to accelerate several functions using Arm.AdvSimd (#40054)

* Updating Matrix4x4 to accelerate several functions using Arm.AdvSimd

* Fixing Matrix4x4 * Matrix4x4

* Fixing Matrix4x4.Transpose

* Fix a copy paste error with Matrix4x4 != Matrix4x4

3 years agoUpdate Codeowners file (#40662)
Sam Patel [Tue, 11 Aug 2020 19:14:35 +0000 (15:14 -0400)]
Update Codeowners file (#40662)

3 years agomake ConsoleKeyInfo implement IEquatable<ConsoleKeyInfo> (#40660)
Adam Sitnik [Tue, 11 Aug 2020 19:08:27 +0000 (21:08 +0200)]
make ConsoleKeyInfo implement IEquatable<ConsoleKeyInfo> (#40660)

* make ConsoleKeyInfo implement IEquatable<ConsoleKeyInfo>, fixes #2127

* remove unnecessary cast

3 years ago[Wasm] Enable CopyWithData FileSystem test (#40663)
Steve Pfister [Tue, 11 Aug 2020 18:26:30 +0000 (14:26 -0400)]
[Wasm] Enable CopyWithData FileSystem test (#40663)

3 years agoAdded additional LoggerMessage.DefineScope() overloads, with more type parameters...
Jake Meiergerd [Tue, 11 Aug 2020 18:14:52 +0000 (13:14 -0500)]
Added additional LoggerMessage.DefineScope() overloads, with more type parameters (up to 6 like .Define()). (#40568)

3 years agoExtensions.Logging: JsonConsoleFormatter serializes scope and state properties using...
Alessio Franceschelli [Tue, 11 Aug 2020 18:13:47 +0000 (19:13 +0100)]
Extensions.Logging: JsonConsoleFormatter serializes scope and state properties using native json type (#40067)

3 years agoAdd feed for Nodejs 12.x (#40667)
Drew Scoggins [Tue, 11 Aug 2020 17:44:28 +0000 (10:44 -0700)]
Add feed for Nodejs 12.x (#40667)

3 years agoHTTP/2 Continuation test (#40533)
Marie Píchová [Tue, 11 Aug 2020 17:33:44 +0000 (19:33 +0200)]
HTTP/2 Continuation test (#40533)

3 years agoICommand CanExecuteChanged should be nullable (#40648)
Buyaa [Tue, 11 Aug 2020 16:57:28 +0000 (09:57 -0700)]
ICommand CanExecuteChanged should be nullable (#40648)

3 years agoImprove error details on DNS Telemetry test failure (#40665)
Miha Zupan [Tue, 11 Aug 2020 16:47:36 +0000 (18:47 +0200)]
Improve error details on DNS Telemetry test failure (#40665)

3 years agoFix: FileStream.Dispose silently fails on Dispose when disk has run out of space...
Carlos Sanchez [Tue, 11 Aug 2020 16:39:56 +0000 (09:39 -0700)]
Fix: FileStream.Dispose silently fails on Dispose when disk has run out of space (#38742)

* Save last error info in SafeFileHandle.ReleaseHandle and read it in FileStream.Dispose

* Add manual test

* Remove Debug.Fail from SafeFileHandle, automate the drive filling step in the manual test, add suggested comments, make threadstatic field static.

* Address suggestions

* Update src/libraries/System.IO.FileSystem/tests/ManualTests/ManualTests.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoFixed XML docs for ILoggingBuilder AddProvider extension method (#40649)
Alessio Franceschelli [Tue, 11 Aug 2020 16:22:02 +0000 (17:22 +0100)]
Fixed XML docs for ILoggingBuilder AddProvider extension method (#40649)

The description of the parameter was reversed.

3 years agoRemove unused locals in System.Security namespaces
Matt Kotsenas [Tue, 11 Aug 2020 16:02:41 +0000 (09:02 -0700)]
Remove unused locals in System.Security namespaces

3 years agoAdd additional Windows-specific APIs (#40610)
Adam Sitnik [Tue, 11 Aug 2020 14:18:34 +0000 (16:18 +0200)]
Add additional Windows-specific APIs (#40610)

* mark System.Data.OleDb assembly as Windows-specific

* mark System.Windows.Extensions assembly as Windows-specific

* mark System.IO.FileInfo Encrypt and Decrypt methods as Windows-specific

* System.Runtime.InteropServices

* VB

* mark entire ComWrappers type as Windows-specific

* mark CspParameters class as Windows-specific

3 years agoRemove max header length check from WebHeaderCollection (#40529)
Natalia Kondratyeva [Tue, 11 Aug 2020 12:26:25 +0000 (15:26 +0300)]
Remove max header length check from WebHeaderCollection (#40529)

Removed conditional max header length check from
System.Net.WebHeaderCollection as it is redundant and produces
puzzling behavior. Removed unused values of WebHeaderCollectionType
enum.

Contributes to #1486

3 years agoFix versionless UCRT probing path (#40642)
Juan Hoyos [Tue, 11 Aug 2020 06:43:58 +0000 (23:43 -0700)]
Fix versionless UCRT probing path (#40642)

3 years agoFix ref counting in ComWrappers tests (#40636)
Elinor Fung [Tue, 11 Aug 2020 03:26:19 +0000 (20:26 -0700)]
Fix ref counting in ComWrappers tests (#40636)

3 years agoEnsure Http Telemetry correctness (#40338)
Miha Zupan [Tue, 11 Aug 2020 02:41:35 +0000 (04:41 +0200)]
Ensure Http Telemetry correctness (#40338)

* Ensure Http Telemetry correctness

* Remove unnecessary GC.SuppressFinalize call

* Add another Telemetry.IsEnabled() check

* Rename MessageShouldEmitTelemetry to MessageAlreadySent_StopNotYetCalled

* Improve Telemetry tests

* Log Aborted instead of Stopped on Connection Dispose

* Ensure request is canceled after a connection is established

3 years agoSuppress GS cookie checks in method epilogs (#40637)
Jan Kotas [Tue, 11 Aug 2020 01:22:13 +0000 (18:22 -0700)]
Suppress GS cookie checks in method epilogs (#40637)

The information about end of GS cookie scope recorded in GC info is not accurate and it cannot even be made accurate without redesign that is not worth it. Detect end of GS cookie scope by comparing it with current SP instead.

Fixes #13041

3 years agoPath change for ryujit-overview.md (#40611)
symphony [Tue, 11 Aug 2020 01:14:37 +0000 (09:14 +0800)]
Path change for ryujit-overview.md (#40611)

3 years agoadd eventsource doc (#40630)
David Mason [Tue, 11 Aug 2020 01:13:14 +0000 (18:13 -0700)]
add eventsource doc (#40630)

3 years agoFix concurrent collections CA1836 rule violations (#40629)
David Cantu [Tue, 11 Aug 2020 01:12:52 +0000 (18:12 -0700)]
Fix concurrent collections CA1836 rule violations (#40629)

* Fix concurrent collections CA1836 rule violations

* Update dogfood analyzer version

3 years agoInline underlying array into ImmutableArray<T>.IsEmpty (#40635)
David Cantu [Tue, 11 Aug 2020 00:35:30 +0000 (17:35 -0700)]
Inline underlying array into ImmutableArray<T>.IsEmpty (#40635)

3 years agoType.IsAssignableTo (#40326)
Ben Adams [Tue, 11 Aug 2020 00:09:14 +0000 (01:09 +0100)]
Type.IsAssignableTo (#40326)

* IsAssignableTo

* ifdef mono C change

* Add Jit optimization

* Add [Intrinsic] attribute

* Add tests

* More tests

* Add null test

3 years agoRemove unused locals in System.ServiceProcess.ServiceController (#39640)
Matt Kotsenas [Tue, 11 Aug 2020 00:02:26 +0000 (17:02 -0700)]
Remove unused locals in System.ServiceProcess.ServiceController (#39640)

Remove unused locals and private methods in
System.ServiceProcess.ServiceController.

This fixes a part of #30457.

3 years ago[runtime] If the initial pinvoke lookup fails, emit some code inside the managed...
Zoltan Varga [Mon, 10 Aug 2020 23:54:22 +0000 (19:54 -0400)]
[runtime] If the initial pinvoke lookup fails, emit some code inside the managed-to-native wrapper to retry to lookup on every call until it succeeds.  (#40153)

* [runtime] If the initial pinvoke lookup fails, emit some code inside the managed-to-native wrapper to
retry to lookup on every call until it succeeds. Add a cache to prevent further lookups.
This is needed on netcore where pinvoke resolver callbacks can be added any time.

* Fix AOT support.

* Remove debug printf.

* Fix test failures.

* Fix a c++-ism.

3 years agoWiden ascii to utf16 (#39510)
Prashanth Govindarajan [Mon, 10 Aug 2020 23:48:35 +0000 (16:48 -0700)]
Widen ascii to utf16 (#39510)

* WidenAsciiToUtf16

* sq

* Address nits

3 years agoUpdate using-dotnet-cli.md (#40580)
Austin Wise [Mon, 10 Aug 2020 22:55:00 +0000 (15:55 -0700)]
Update using-dotnet-cli.md (#40580)

Fixes "error NU1102: Unable to find package Microsoft.WindowsDesktop.App.Runtime.win-x64 with version (= 5.0.0-dev)"

3 years agoDon't call user operator for null check of HttpMethod value (#40306)
Marek Safar [Mon, 10 Aug 2020 22:34:31 +0000 (00:34 +0200)]
Don't call user operator for null check of HttpMethod value (#40306)

3 years agoFix DelayPromise constructor race condition (#40356)
Ben Adams [Mon, 10 Aug 2020 22:34:07 +0000 (23:34 +0100)]
Fix DelayPromise constructor race condition (#40356)

3 years agoDisable SB test (#40628)
Dan Moseley [Mon, 10 Aug 2020 22:12:58 +0000 (15:12 -0700)]
Disable SB test (#40628)

3 years agoSync Microsoft.Extensions ref assembiles for new linker attributes. (#40621)
Eric Erhardt [Mon, 10 Aug 2020 21:19:13 +0000 (16:19 -0500)]
Sync Microsoft.Extensions ref assembiles for new linker attributes. (#40621)

* Sync Microsoft.Extensions ref assembiles for new linker attributes.

* Suppress two linker warnings in DependencyInjection.

These warnings are safe since they are calling Array.Empty<T> through reflection.

3 years agoFixing debugger hang that would occur when inspecting a field that ha… (#40455)
monojenkins [Mon, 10 Aug 2020 21:18:13 +0000 (17:18 -0400)]
Fixing debugger hang that would occur when inspecting a field that ha… (#40455)

…s a Debugger.Break in it's accessor.

fixes mono/mono#20209

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: UnityAlex <UnityAlex@users.noreply.github.com>
3 years ago[browser][file system] Tests System.IO.FileSystem (#39768)
Kenneth Pouncey [Mon, 10 Aug 2020 20:35:25 +0000 (22:35 +0200)]
[browser][file system] Tests System.IO.FileSystem (#39768)

* [browser][file system] Tests System.IO.FileSystem

* Remove FileSystem from test project exclusions.

* [browser][filesystem] Comment on skipped tests due to IO.Pipes not supported

* [browser][filesystem] Comment on skipped tests due to monitor not supported

* Address review comments

* Address review comments on how to handle monitor PNSE

* Update src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Add ActiveIssue for browser platform

```
        [ActiveIssue("https://github.com/dotnet/runtime/issues/39955", TestPlatforms.Browser)]
        public void NotFoundErrorIsExpected()
```

* Simplify test case with `PlatformDetection.IsSuperUser` as per review comment

* Remove unused variable from tests

* Browser platform volume does not limit each component of the path to a total of 255 characters.

- Remove the test `DirectoryWithComponentLongerThanMaxComponentAsPath_ThrowsException` for Browser platform.
- Add new test `DirectoryWithComponentLongerThanMaxComponentAsPath_BrowserDoesNotThrowsException` for Browser platform in case this check is added in the future.

* Fix windows tests

* Add ActiveIssue to test System.IO.Tests.DirectoryInfo_Name.CurrentDirectory

- System.IO.Tests.DirectoryInfo_Name.CurrentDirectory does not pass because it is using Path.GetFileName on the current directory of "/".
- See issue https://github.com/dotnet/runtime/issues/39998 for more information

* Add active issue for tests that need to support file locking.

* Add active issue for tests that need to support file locking.

* Browser volume does not have a limit on segments

* Remove browser platform test

* Remove active issue for NotFoundErrorIsExpected

* Remove platform specific from SkippingHiddenFiles

* Fix enumeration test errors failing from `HiddenFilesAreReturned`.

- WebAssembly (BROWSER) has dirent d_type but is not identifying correctly but by returning UNKNOWN the managed code properly stats the file to detect if entry is directory or not.

* Fix enumeration test errors failing from `HiddenFilesAreReturned`.

- WebAssembly (BROWSER) has dirent d_type but is not identifying correctly but by returning UNKNOWN the managed code properly stats the file to detect if entry is directory or not.

* Fix build for TARGET_WASM not defined

* Address review comment by add check for IsWindows to IsSuperUser.

* Address review comment by add check for IsWindows to IsSuperUser.

* Platform Specific test for hidden files no longer needed.

* Platform Specific test fno longer needed.

* Use active issue for rename issue

* ActiveIssue no longer needed

- PR https://github.com/dotnet/runtime/pull/40310 works around the issue for now while waiting for fix https://github.com/emscripten-core/emscripten/issues/11804 / https://github.com/emscripten-core/emscripten/pull/11812

* Use ActiveIssue for SettingUpdatesProperties

* Use ActiveIssue for TimesIncludeMillisecondPart

* Use ActiveIssue for ErrorHandlingTests failures

* Use ActiveIssue for SetUptoNanoseconds

* Use ActiveIssue for GetSetTimes test failures

* Use ActiveIssue for tests failing with DirectoryNotFoundException

* Use ActiveIssue for tests failing with UnauthorizedAccessException

* Remove debugging statement from pal_io

* Address type in CreateDirectory method name

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoRemove unused local in System.Configuration.ConfigurationManager (#40583)
wooooooood [Mon, 10 Aug 2020 20:09:20 +0000 (05:09 +0900)]
Remove unused local in System.Configuration.ConfigurationManager (#40583)

3 years agofix certificate ctx on windows and macOS (#39818)
Tomas Weinfurt [Mon, 10 Aug 2020 19:02:08 +0000 (12:02 -0700)]
fix certificate ctx on windows and macOS (#39818)

* fix certificate ctx on windows

* fix linux

* fix osx pal

* feedback from review

* feedback from review

3 years agoFixing an issue with the CPUID check for BMI1/BMI2 (#40615)
Tanner Gooding [Mon, 10 Aug 2020 18:20:34 +0000 (11:20 -0700)]
Fixing an issue with the CPUID check for BMI1/BMI2 (#40615)

3 years agoFix #33948 by decreasing number of tests per group (#40491)
Egor Chesakov [Mon, 10 Aug 2020 18:10:53 +0000 (11:10 -0700)]
Fix #33948 by decreasing number of tests per group (#40491)

3 years agoRun dotnet-format on the debugger source (#40618)
Larry Ewing [Mon, 10 Aug 2020 17:23:50 +0000 (12:23 -0500)]
Run dotnet-format on the debugger source (#40618)

3 years agoUpdate LSRA Doc (#39492)
Carol Eidt [Mon, 10 Aug 2020 17:23:11 +0000 (10:23 -0700)]
Update LSRA Doc (#39492)

* Update LSRA Doc

3 years agoRemove unused variable assignments in CapiHelper
Key Kim [Mon, 10 Aug 2020 16:51:35 +0000 (01:51 +0900)]
Remove unused variable assignments in CapiHelper

3 years agoSystem.Diagnostics Tracing APIs additions (#40534)
Tarek Mahmoud Sayed [Mon, 10 Aug 2020 16:27:24 +0000 (09:27 -0700)]
System.Diagnostics Tracing APIs additions (#40534)

3 years agouse new OperatingSystem APIs in test projects that target NetCoreAppCurrent only...
Adam Sitnik [Mon, 10 Aug 2020 15:50:42 +0000 (17:50 +0200)]
use new OperatingSystem APIs in test projects that target NetCoreAppCurrent only (#40522)

* use new OperatingSystem APIs in test projects that target NetCoreAppCurrent only

* use `||` instead of `|`

3 years agoSupport extra compiler flags during building (#39191)
Omair Majid [Mon, 10 Aug 2020 13:43:39 +0000 (09:43 -0400)]
Support extra compiler flags during building (#39191)

Many Linux distributions like to use an extra set of compiler flags (via
`CFLAGS`, `CXXFLAGS` and `LDFLAGS`) to produce builds that are hardened
against vulnerabilities and exploits. The flags sometimes also enable
extra warnings to inform packagers about potential memory issues.

This pach adds support for that to dotnet/runtime.

The obvious method to make this work is to just export the `CFLAGS`,
`CXXFLAGS`, and `LDFLAGS` directly. This, however, enables those flags
during configure-time (aka `cmake` without `--build` too). That means
several cmake configure tests get executed with unexpected compiler
flags. These configure tests can then report incorrect results.

For example, https://bugzilla.redhat.com/show_bug.cgi?id=1712158
demonstrates an issue where the check for `strerror_r` in the runtime
comes to the wrong conclusion because `-Wall` is enabled and a variable
is unused.

A slightly longer fix is to support another set of environment
variables, and use them to set `CFLAGS`, `CXXFLAGS`, `LDFLAGS`, but only
for the invocation of `cmake --build`/`make`.

See #35727 for the complete details.

Fixes #35727

3 years ago[aot] Fix the handling of r4/r8 parameter types with attributes during generic sharin...
monojenkins [Mon, 10 Aug 2020 12:31:04 +0000 (08:31 -0400)]
[aot] Fix the handling of r4/r8 parameter types with attributes during generic sharing. (#40498)

The attributes need to be ignored as with the other types, otherwise gsharedvt wrappers for signatures with
parameters like double f = default will not be found.

Fixes https://github.com/mono/mono/issues/20195.

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoUse new OS checks in src (#40520)
Adam Sitnik [Mon, 10 Aug 2020 11:05:30 +0000 (13:05 +0200)]
Use new OS checks in src (#40520)

* use new OperatingSystem APIs in System.Net.Ping and remove dependency from System.Runtime.InteropServices.RuntimeInformation

* use new OperatingSystem APIs in System.Security.Cryptography.Algorithms

* use new OperatingSystem APIs in System.ComponentModel.Composition and improve perf..

* use new OperatingSystem APIs in System.Net.Http and remove dependency from System.Runtime.InteropServices.RuntimeInformation

* Apply suggestions from code review

* there is no need to cache the results anymore

3 years agoFix typo in docs/workflow/building/libraries (#40600)
Key Kim [Mon, 10 Aug 2020 03:40:09 +0000 (12:40 +0900)]
Fix typo in docs/workflow/building/libraries (#40600)

build command does not exist, it should be build.cmd

3 years agoRedefine signal for architecture mips (#40513)
SUN Guoyun [Mon, 10 Aug 2020 03:20:04 +0000 (11:20 +0800)]
Redefine signal for architecture mips (#40513)

define SIGSTOP 19 is just ok for architecture x86、arm、s390、powerpc and so on.
but others architecture has different values.

Co-authored-by: Sunguoyun <sunguoyun@loongson.cn>
Co-authored-by: hev <wangrui@loongson.cn>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agocheck for Null returned from Assembly.GetEntryAssembly (#40598)
Manish Godse [Mon, 10 Aug 2020 03:00:59 +0000 (20:00 -0700)]
check for Null returned from Assembly.GetEntryAssembly (#40598)

Fixes 40588

3 years agomake ssl tests more portable (#40303)
Tomas Weinfurt [Mon, 10 Aug 2020 01:46:16 +0000 (18:46 -0700)]
make ssl tests more portable (#40303)

* make ssl tests more portable

* feedback from review

* fix build

* fix http broken by one previous commits

* feedback from review

* fix tests with old ssl versions.S

* more ssl fixes

3 years ago[wasm][debugger] Add support for invoking getters on ValueTypes (#40548)
Ankit Jain [Sun, 9 Aug 2020 16:36:16 +0000 (12:36 -0400)]
[wasm][debugger] Add support for invoking getters on ValueTypes (#40548)

* [wasm][debugger][tests] Fix negative pointer tests

* [wasm][debugger][tests] Fix test to correctly check the valuetype local

test: `CheckUpdatedValueTypeFieldsOnResume`

* [wasm][debugger][tests] Make value checks consistent

- In some places we weren't checking for the `description` property
- and this hid a bug where sometimes that property wasn't added (eg. for
numbers)
- Instead, we were working around that by "fixing it up" later

- Now, we use the same checks for `Check{Number,String,*}` API, and the
`CheckValue/CheckProps` API used with `TNumber` etc.

- So, this commit:
- fixes the checks, and the tests
- and fixes the bug

* [wasm][debugger] Add new `id` types, which have associated properties

- these are of the form `dotnet:${scheme}:{id-args-object}`
- Examples:
    - `dotnet:valuetype:{ containerId: 4 }`
    - `dotnet:valuetype:{ num: 2 }` - the `num` field is
    autogenerated if no id-args are provided. This gets used when
    valuetypes are expanded.

- `this._id_table [id-string]` has associated property objects for every
`id`
    - This might contain, for example, `klass` pointer, and base64
    representation of a valuetype

* [wasm][debugger] Update valuetype code to use the new `id`s

* [wasm][debugger] Simplify array API in `mini-wasm-debugger.c`

.. to use a single function to get details of the full array, and
individual elements.

* [wasm][debugger] library_mono.js: improvements to valuetype code

- Allow `_new_id` to update properties for existing objectIds
- Extract valuetype id assigment code to a separate function

* [wasm][debugger] mini-wasm-debugger.c- extract object id lookup into a function

* [wasm][debugger][tests] Rename method param to be self descriptive

* [wasm][debugger][tests] Rework cfo test for getters

- add some new getters to the test classes
- this will become useful in subsequent commits that add support for
invoking getters on valuetypes

* [wasm][debugger][tests] Improve valuetype locals/method args tests

- this also becomes useful in subsequent commits which enable invoking
getters on valuetypes

* [wasm][debugger] Add support for invoking getters on valuetypes

- keep a copy of the value bytes, and the klass pointer
- this allows being able to invoke getters on such a valuetype, at a
later point
- This allows getters like `DateTime.Date`, which has the type
`DateTime`

* [wasm][debugger] mono.js: fix warnings

.. and replace `var` with `let`, or `const`, where appropriate.

* [wasm][debugger] mono.js: _split_object_id -> _parse_object_id

* [wasm][debugger] Streamline accessing exported debugger.c functions

.. especially the ones that return data in `MONO.var_info`.

To use:

1. `this._register_c_var_fn ('mono_wasm_get_object_properties', 'bool', [ 'number', 'bool' ]);`
2. Now, this function can be called as `this.mono_wasm_get_object_properties_info (.. )`
    - returns `res` which has the contents of `MONO.var_info`, after running
    `_fixup_name_value_objects` on it.

* [wasm][debugger] Return errors from debugger.c's details functions

- functions like those for getting object/vt properties, can fail, for
example, if the objectId is invalid.
- We now return that bool result, and that gets surfaced to the caller

- This will also help to differentiate the case where the result of such
a function was a failure vs just an empty result

* [wasm][debugger] Small checks on inputs, and some negative tests

- These tests don't actually depend on the error message, and we don't
have another to way to differentiate why a command might have failed
with an exception. So, right now, they will pass as long as the commands
fail as expected.

- Future TODO: return `error`, instead of exception details for issues
in `mono.js`, like incorrect input, invalid id etc, and update these
tests accordingly.

* Update src/mono/mono/mini/mini-wasm-debugger.c

Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Remove description checking from TString

Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoUpdate Microsoft.CodeAnalysis.NetAnalyzers to 3.3.0-beta3.20407.4 (#40560)
Stephen Toub [Sun, 9 Aug 2020 09:32:44 +0000 (05:32 -0400)]
Update Microsoft.CodeAnalysis.NetAnalyzers to 3.3.0-beta3.20407.4 (#40560)

3 years agoUpdate linux-requirements.md (#40576)
Key Kim [Sun, 9 Aug 2020 01:56:21 +0000 (10:56 +0900)]
Update linux-requirements.md (#40576)

append -y option and add ``` around command code

3 years agofix flaky test (#40565)
Geoff Kizer [Sat, 8 Aug 2020 18:12:58 +0000 (11:12 -0700)]
fix flaky test (#40565)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoinclude more details in exception if remote certificate validation fails (#40110)
Tomas Weinfurt [Sat, 8 Aug 2020 17:36:52 +0000 (10:36 -0700)]
include more details in exception if remote certificate validation fails (#40110)

* include more details in exception if remote certificate validation fails

* fix unit test linking

* feedback from review

* update exception message

3 years agoMinimal fix for Issue 620 (#40535)
Brian Sullivan [Sat, 8 Aug 2020 16:50:41 +0000 (09:50 -0700)]
Minimal fix for Issue 620 (#40535)

* Minimal fix for Issue 620
Added test case: Runtime_620.cs
Added lvForceLoadNormalize

* Changed conditional to "else if"

3 years agoSuperpmi: adjust relocations (#40563)
Carol Eidt [Sat, 8 Aug 2020 15:08:42 +0000 (08:08 -0700)]
Superpmi: adjust relocations (#40563)

Fix #39908