platform/upstream/dotnet/runtime.git
4 years agoUse ProjectReference to build against System.Private.CoreLib (#38196)
Viktor Hofer [Mon, 22 Jun 2020 17:53:00 +0000 (19:53 +0200)]
Use ProjectReference to build against System.Private.CoreLib (#38196)

* Use ProjectReference to build against CoreLib

4 years ago[wasm][bindings] Clean up the static binding registration logic (#38175)
Larry Ewing [Mon, 22 Jun 2020 15:44:39 +0000 (10:44 -0500)]
[wasm][bindings] Clean up the static binding registration logic (#38175)

4 years agoAdd threadpool support for webassembly. (#38029)
Zoltan Varga [Mon, 22 Jun 2020 15:27:24 +0000 (11:27 -0400)]
Add threadpool support for webassembly. (#38029)

4 years agoEnable mono cross-build on SunOS-like OS (#37560)
Adeel Mujahid [Mon, 22 Jun 2020 13:42:25 +0000 (16:42 +0300)]
Enable mono cross-build on SunOS-like OS (#37560)

4 years agoFix non-portable build (#38095)
Gleb Balykov [Mon, 22 Jun 2020 12:28:33 +0000 (15:28 +0300)]
Fix non-portable build (#38095)

4 years agoAdd more trimming annotations to Mono CoreLib (#38148)
Michal Strehovský [Mon, 22 Jun 2020 08:20:25 +0000 (10:20 +0200)]
Add more trimming annotations to Mono CoreLib (#38148)

I've also annotated CoreCLR's `Type.GetType` in the same spot as Mono. Mono's implementation was triggering warnings, which is what promted me to add it there, but we should annotate this nonetheless because absent intrinsic treatment in Linker, this would be unsafe.

4 years ago[interp] Rework frame data storage (#38085)
monojenkins [Sun, 21 Jun 2020 17:00:00 +0000 (13:00 -0400)]
[interp] Rework frame data storage (#38085)

This PR has 2 objectives. First it makes the interp stack allocated in a single contiguous area of memory. This will enable us to do fast pointer bumping when switching between frames and not have to worry about scattered memory fragments. Second, it makes the stack space used by a frame (locals + execution stack) a compile time constant. This could prove useful for future optimizations, because we can tell at compile time at which stack offset every instruction outputs its result. In order to achieve this, localloc memory has been kicked out of the normal stack space into its own allocator, which is almost identical to the old stack fragment allocator.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoUpdate TargetFramework for Mono's SPC (#35408)
Marek Safar [Sun, 21 Jun 2020 09:17:26 +0000 (11:17 +0200)]
Update TargetFramework for Mono's SPC (#35408)

* Update TargetFramework for Mono's SPC

* Update TargetFramework for CoreCLR SPC as well

4 years agoAdd test for inlined P/Invokes into an UnmanagedCallersOnly callback. (#38195)
Aaron Robinson [Sat, 20 Jun 2020 22:27:14 +0000 (15:27 -0700)]
Add test for inlined P/Invokes into an UnmanagedCallersOnly callback. (#38195)

4 years agoExclude failing JIT/Methodical/xxobj/sizeof tests. (#38186)
Sergey Andreenko [Sat, 20 Jun 2020 19:05:40 +0000 (12:05 -0700)]
Exclude failing JIT/Methodical/xxobj/sizeof tests. (#38186)

4 years agoMake IHttpHeadersHandler args in HPackDecoder non-nullable (#38187)
Stephen Toub [Sat, 20 Jun 2020 18:27:44 +0000 (14:27 -0400)]
Make IHttpHeadersHandler args in HPackDecoder non-nullable (#38187)

4 years agoUpdate dependencies from https://github.com/dotnet/runtime-assets build 20200619...
dotnet-maestro[bot] [Sat, 20 Jun 2020 18:24:54 +0000 (14:24 -0400)]
Update dependencies from https://github.com/dotnet/runtime-assets build 20200619.2 (#38190)

System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
 From Version 5.0.0-beta.20312.1 -> To Version 5.0.0-beta.20319.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoUpdate confusing comment (#38191)
Miha Zupan [Sat, 20 Jun 2020 18:24:41 +0000 (20:24 +0200)]
Update confusing comment (#38191)

4 years agoAdding Trimming tests for StackFrameHelper and AppDomain (#38050)
Jose Perez Rodriguez [Sat, 20 Jun 2020 17:32:30 +0000 (10:32 -0700)]
Adding Trimming tests for StackFrameHelper and AppDomain (#38050)

* Adding Trimming tests for StackFrameHelper and AppDomain

* Address PR feedback

* Adding PR Feedback

* More PR feedback

* Adding check for principal type to AppDomain tests

4 years agoFix SOS test failures on latest runtime (#38181)
Mike McLaughlin [Sat, 20 Jun 2020 16:43:45 +0000 (09:43 -0700)]
Fix SOS test failures on latest runtime (#38181)

/cc: @dotnet/dotnet-diag

4 years ago[interp] Fix some warnings that show up on wasm (#38157)
monojenkins [Sat, 20 Jun 2020 11:10:44 +0000 (07:10 -0400)]
[interp] Fix some warnings that show up on wasm (#38157)

Do overflow checks the same way we do it in the jit.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years ago[interp] Add unaligned version for ldfld.vt opcodes (#38173)
monojenkins [Sat, 20 Jun 2020 11:09:52 +0000 (07:09 -0400)]
[interp] Add unaligned version for ldfld.vt opcodes (#38173)

Regressed recently with the addition of specialized ldfld.vt opcodes

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoSynchronize CI trigger exclusion paths between runtime-linker-tests.yml and runtime...
Alexander Köplinger [Sat, 20 Jun 2020 10:39:54 +0000 (12:39 +0200)]
Synchronize CI trigger exclusion paths between runtime-linker-tests.yml and runtime.yml (#38150)

* Synchronize CI trigger exclusion paths between runtime-linker-tests.yml and runtime.yml

The linker-tests pipeline didn't have path exclusions set up like the main pipeline so it was triggered even for documentation-only PRs like https://github.com/dotnet/runtime/pull/38149.

* PR feedback

4 years agoHPackDecoder performance (#38145)
James Newton-King [Sat, 20 Jun 2020 09:40:09 +0000 (21:40 +1200)]
HPackDecoder performance (#38145)

4 years agoExtract HttpListener.Windows queue handles into a separate class (#37515)
Miha Zupan [Sat, 20 Jun 2020 08:26:26 +0000 (10:26 +0200)]
Extract HttpListener.Windows queue handles into a separate class (#37515)

* Extract HttpListener queue handles into a separate class

* Move CreateRequestQueueHandle logic to HttpListenerSession ctor

* Move HttpListenerSession to a separate file

* Expand HttpListener restart test for BeginGetContext

4 years agoImprove error reporting when Crossgen2 crashes on Managed C++ (#38113)
Tomáš Rylek [Sat, 20 Jun 2020 07:50:37 +0000 (09:50 +0200)]
Improve error reporting when Crossgen2 crashes on Managed C++ (#38113)

* Improve error reporting when Crossgen2 crashes on Managed C++

Based on Manish's feedback from another PR I investigated options
to improve Crossgen2 diagnostics in the presence of Managed C++
that currently crashes the metadata reader in several places.
This is the barebones version of such support, centralizing detection
and reporting of the failures. Right now we don't have any pretty
way of reporting localized strings from this low-level code, I'll
welcome any suggestions how to polish the change in that direction.

Thanks

Tomas

* Make Managed C++ scanning upfront per JanK's PR feedback

* Fix Managed C++ check based on JanK's advice; Simon's feedback

I have changed the check to use the CorFlags.ILOnly / ILLibrary
combination (both bits must be zero for an assembly to be MC++).
Per Simon's suggestion I have moved the check outside of the
Run method. As part of that I have changed typeSystemContext
to a field on the Program class as a first step in breaking Run
into several smaller methods.

Thanks

Tomas

4 years agoMove COM ILLink.Descriptors entries to CoreCLR (#38172)
Eric Erhardt [Sat, 20 Jun 2020 03:54:16 +0000 (22:54 -0500)]
Move COM ILLink.Descriptors entries to CoreCLR (#38172)

These types only exist in CoreCLR, they don't exist in Mono.

Contributes to #36659

4 years agoFix code analysis warnings in Microsoft.Extensions.* (and stop suppressing warnings...
Stephen Toub [Sat, 20 Jun 2020 02:19:21 +0000 (22:19 -0400)]
Fix code analysis warnings in Microsoft.Extensions.* (and stop suppressing warnings) (#38090)

* Fix SA1001

* Fix IDE0008

* Fix SA1121

* Fix CA1200

* Fix SA1028

* Fix CA2007

* Fix SA1000

* Fix CA1810

* Fix CA1802

* Fix CA1825

* Fix CA1200

* Fix CA1507

* Fix SA1026

* Fix SA1129

* Fix SA1206

* Fix CA1018

* Fix SA1648

* Remove warnings suppression from Directory.Build.props

* Delete "Unmerged change" comments

4 years agoPublish PDB for libnethost static library. (#38054)
Aaron Robinson [Sat, 20 Jun 2020 00:38:10 +0000 (17:38 -0700)]
Publish PDB for libnethost static library. (#38054)

* Publish PDB for libnethost static library.

4 years agoCrossgen method bodies having ARM64 intrinsic (#38060)
Kunal Pathak [Sat, 20 Jun 2020 00:30:23 +0000 (17:30 -0700)]
Crossgen method bodies having ARM64 intrinsic (#38060)

* enable methods containing arm64 intrinsic to crossgen

* Unconditionally set ArmBase/AdvSimd

* added a comment

* added the missing #endif

* Move ArmBase/AdvSimd setting inside host_arm64

* review comments

4 years ago[jit] Fix the Activator.CreateInstance () intrinsic for primitive types. (#38130)
monojenkins [Sat, 20 Jun 2020 00:00:53 +0000 (20:00 -0400)]
[jit] Fix the Activator.CreateInstance () intrinsic for primitive types. (#38130)

Fixes https://github.com/xamarin/xamarin-android/issues/4817.

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years ago[libraries] Properly skip thread failing WASM tests (#38089)
Mitchell Hwang [Fri, 19 Jun 2020 23:49:29 +0000 (19:49 -0400)]
[libraries] Properly skip thread failing WASM tests (#38089)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoDisable Environment.UserName tests in wasm (#38166)
Santiago Fernandez Madero [Fri, 19 Jun 2020 23:46:26 +0000 (16:46 -0700)]
Disable Environment.UserName tests in wasm (#38166)

4 years ago[Arm64] ASIMD Miscellaneous (#38110)
Egor Chesakov [Fri, 19 Jun 2020 21:36:11 +0000 (14:36 -0700)]
[Arm64] ASIMD Miscellaneous (#38110)

* AbsSaturate and AbsSaturateScalar

* AddAcrossWidening

* AddSaturate and AddSaturateScalar (suqadd and usqadd)

* Ceiling and CeilingScalar

* ConvertToDoubleScalar

* ConvertToDoubleUpper

* ConvertToInt32RoundAwayFromZero and ConvertToInt32RoundAwayFromZeroScalar

* ConvertToInt32RoundToEven and ConvertToInt32RoundToEvenScalar

* ConvertToInt32RoundToNegativeInfinity and ConvertToInt32RoundToNegativeInfinityScalar

* ConvertToInt32RoundToPositiveInfinity and ConvertToInt32RoundToPositiveInfinityScalar

* ConvertToInt32RoundToZero and ConvertToInt32RoundToZeroScalar

* ConvertToInt64RoundAwayFromZero and ConvertToInt64RoundAwayFromZeroScalar

* ConvertToInt64RoundToEven and ConvertToInt64RoundToEvenScalar

* ConvertToInt64RoundToNegativeInfinity and ConvertToInt64RoundToNegativeInfinityScalar

* ConvertToInt64RoundToPositiveInfinity and ConvertToInt64RoundToPositiveInfinityScalar

* ConvertToInt64RoundToZero and ConvertToInt64RoundToZeroScalar

* ConvertToSingle and ConvertToSingleScalar

* ConvertToUInt32RoundAwayFromZero and ConvertToUInt32RoundAwayFromZeroScalar

* ConvertToUInt32RoundToEven and ConvertToUInt32RoundToEvenScalar

* ConvertToUInt32RoundToNegativeInfinity and ConvertToUInt32RoundToNegativeInfinityScalar

* ConvertToUInt32RoundToPositiveInfinity and ConvertToUInt32RoundToPositiveInfinityScalar

* ConvertToUInt32RoundToZero and ConvertToUInt32RoundToZeroScalar

* ConvertToUInt64RoundAwayFromZero and ConvertToUInt64RoundAwayFromZeroScalar

* ConvertToUInt64RoundToEven and ConvertToUInt64RoundToEvenScalar

* ConvertToUInt64RoundToNegativeInfinity and ConvertToUInt64RoundToNegativeInfinityScalar

* ConvertToUInt64RoundToPositiveInfinity and ConvertToUInt64RoundToPositiveInfinityScalar

* ConvertToUInt64RoundToZero and ConvertToUInt64RoundToZeroScalar

* Floor and FloorScalar

* NegateSaturate and NegateSaturateScalar

* RoundAwayFromZero and RoundAwayFromZeroScalar

* RoundToNearest and RoundToNearestScalar

* RoundToNegativeInfinity and RoundToNegativeInfinityScalar

* RoundToPositiveInfinity and RoundToPositiveInfinityScalar

* RoundToZero and RoundToZeroScalar

4 years agoDisable native varargs for Windows arm (#38147)
Kunal Pathak [Fri, 19 Jun 2020 21:26:14 +0000 (14:26 -0700)]
Disable native varargs for Windows arm (#38147)

* Make native args disabled for Windows ARM
* Re-enable the ArgIteratorTests for Windows ARM
* Update the comment to be more specific
* flip the #ifdef condition
* make #ifdef consistent
* formatting

4 years agoUnix: improve SocketError.SocketError Exception Message (#38073)
Tom Deseyn [Fri, 19 Jun 2020 18:46:19 +0000 (20:46 +0200)]
Unix: improve SocketError.SocketError Exception Message (#38073)

* Unix: improve SocketError.SocketError Exception Message

This introduces a fake errno for SocketError.SocketError, which
maps to an error message of "Unknown socket error".

* PR feedback

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoFix dependency on mono runtime libs in wasm Makefile (#38153)
Alexander Köplinger [Fri, 19 Jun 2020 18:16:01 +0000 (20:16 +0200)]
Fix dependency on mono runtime libs in wasm Makefile (#38153)

Without it we weren't rebuilding the dotnet.wasm when the Mono runtime was changed.

4 years agoUpdate MicrosoftPrivateIntellisensePackage and XmlDocFileRoot (#38109)
Carlos Sanchez Lopez [Fri, 19 Jun 2020 17:45:14 +0000 (10:45 -0700)]
Update MicrosoftPrivateIntellisensePackage and XmlDocFileRoot (#38109)

* Update MicrosoftPrivateIntellisensePackage and XmlDocFileRoot

* Update eng/Versions.props

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* Update eng/Versions.props

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoFeedback from 38072 (#38155)
Aaron Robinson [Fri, 19 Jun 2020 17:42:01 +0000 (10:42 -0700)]
Feedback from 38072 (#38155)

4 years agoJitStress Fixes (#38103)
Carol Eidt [Fri, 19 Jun 2020 16:21:27 +0000 (09:21 -0700)]
JitStress Fixes (#38103)

Initialize method info early so that jitStress can use that information to determine when to enable stress.

Fix #8889

4 years agoFix Diagnostics.Tracing ILLinkTrim entries (#38125)
Eric Erhardt [Fri, 19 Jun 2020 14:52:36 +0000 (09:52 -0500)]
Fix Diagnostics.Tracing ILLinkTrim entries (#38125)

* Fix Diagnostics.Tracing ILLinkTrim entries

- PropertyValue/ReferenceTypeHelper's pattern is recognized by the ILLinker. Protected it with a new trimming test.
- RuntimeEventSource doesn't need to be rooted. This class is used by IL and doesn't get trimmed.
- EventPipe* and NativeRuntimeEventSource only need to be rooted in CoreCLR, since they aren't used in Mono. So they are moved to just CoreCLR's ILLinkTrim file.

Contributes to #35199

4 years ago[mono] Add QCalls to the Runtime (#37670)
Thays Grazia [Fri, 19 Jun 2020 14:43:33 +0000 (11:43 -0300)]
[mono] Add QCalls to the Runtime (#37670)

* First version of QCalls implementation, using QCalls on ICU Globalization.

4 years agoFix Managed C++ check based on JanK's advice; Simon's feedback
Tomas [Fri, 19 Jun 2020 14:23:11 +0000 (16:23 +0200)]
Fix Managed C++ check based on JanK's advice; Simon's feedback

I have changed the check to use the CorFlags.ILOnly / ILLibrary
combination (both bits must be zero for an assembly to be MC++).
Per Simon's suggestion I have moved the check outside of the
Run method. As part of that I have changed typeSystemContext
to a field on the Program class as a first step in breaking Run
into several smaller methods.

Thanks

Tomas

4 years agoStop ignoring CS1573 in multiple projects (#38094)
Stephen Toub [Fri, 19 Jun 2020 13:43:21 +0000 (09:43 -0400)]
Stop ignoring CS1573 in multiple projects (#38094)

* Stop ignoring CS1573 in multiple projects

* Fix interop.process.cs

* Update ZipFileExtensions.ZipArchive.Create.cs

Co-authored-by: Dan Moseley <danmose@microsoft.com>
4 years agoAdd support for illumos cross-compilation (#37753)
Adeel Mujahid [Fri, 19 Jun 2020 12:50:20 +0000 (15:50 +0300)]
Add support for illumos cross-compilation (#37753)

4 years agoMove epoll event handling to a non-inlined method (#37138)
Anton Firszov [Fri, 19 Jun 2020 12:20:59 +0000 (14:20 +0200)]
Move epoll event handling to a non-inlined method (#37138)

4 years agoDisable IJW tests on Crossgen2 (#38099)
Tomáš Rylek [Fri, 19 Jun 2020 12:17:08 +0000 (14:17 +0200)]
Disable IJW tests on Crossgen2 (#38099)

IJW tests using a managed C++ component (TestLibrary) fail building
on Crossgen2 as the MSIL uses a special form of PInvoke without
specification of the target library (PInvoke into the unmanaged code
within the module itself) and that is currently unsupported in the
Crossgen2 metadata reader.

Thanks

Tomas

4 years agoUpdate webassembly instructions to reflect some recent changes (#38149)
Kenneth Pouncey [Fri, 19 Jun 2020 12:04:13 +0000 (14:04 +0200)]
Update webassembly instructions to reflect some recent changes (#38149)

4 years agoFix IL interpreter to run on Hello World (#37825)
Yuchong Pan [Fri, 19 Jun 2020 11:59:23 +0000 (04:59 -0700)]
Fix IL interpreter to run on Hello World (#37825)

* Fixed type cast compilation errors

* Temporary changes to trigger the IL interpreter

* Added lock holder when invoking JIT from interpreter

* Added get_IsSupported as an intrinsic

* Fixed widening of narrow integral types

* Added COMPlus_InterpreterDebuggable flag to trigger the IL interpreter in the Debug/Checked configurations

* Added more accurate description of InterpreterJITThreshold

* Fixed assertion failure in AsyncPromoteToTier1

* Renamed env var to ForceInterpreterTier0

* Fixed a bug in AsyncPromoteToTier1

* Fixed the correct semantics of the env var ForceInterpreterTier0

* Added env var ForceInterpreterAlways

* Turned off FEATURE_INTERPRETER

* Moved CodeVersionManager::LockHolder to minimize scope

* Removed redundant check for ForceInterpreterAlways

* Renamed COMPlus_ env vars to ForceJitOptimization and ForceInterpreter

* Fixed a pre-existing bug for async promotion to tier 1

* Removed redundant annotations on CLR config values

* Modified handling of get_IsSupported as a JIT intrinsic

* This does not seems a correct fix for the pre-existing promotion bug

* Added call to ScheduleBackgroundWork after AsyncPromoteToTier1

* Added more precise check for hardware intrinsics in interpreter

* Converted C-style type casts to static_cast<...>

* Renamed ForceJitOptimization to EnableJitOptimization

* Added COMPlus environment variable to force get_IsSupported to return false for HW intrinsics

* Update src/coreclr/src/vm/interpreter.cpp

Co-authored-by: John Salem <josalem@microsoft.com>
* Removed #ifdef PAL_STDCPP_COMPAT when including 'type_traits'

* Removed EnableJitOptimization variable

Co-authored-by: John Salem <josalem@microsoft.com>
4 years agoImprove R2RDump disassembly output for ARM64 (#37869)
Anton Lapounov [Fri, 19 Jun 2020 11:18:58 +0000 (04:18 -0700)]
Improve R2RDump disassembly output for ARM64 (#37869)

* Improve R2RDump output for ARM64.
Resolve targets of ADRP+ADD instruction pairs and BL instructions.
Also fix occasional \r\r\n in output for x86/x64.

* Handle other PC-relative instructions: ADR, B, CBZ, CBNZ, TBZ, TBNZ

4 years ago[browser][wasm] Remove global treatment in object registration (#37947)
Kenneth Pouncey [Fri, 19 Jun 2020 10:48:29 +0000 (12:48 +0200)]
[browser][wasm] Remove global treatment in object registration (#37947)

* [browser][wasm] Add reference for those object that are created with ownsHandle false.

* Remove unnecessary special treatment for Global as it is no longer need.

4 years agoDisable TermInfo library tests on WASM (#38092)
Maxim Lipnin [Fri, 19 Jun 2020 10:21:30 +0000 (13:21 +0300)]
Disable TermInfo library tests on WASM (#38092)

We disable TermInfo library tests because the respective functionality doesn't make sense on WASM.

4 years agoEnhance DAC to allow getting AssemblyLoadContext for objects (#37901)
Jan Vorlicek [Fri, 19 Jun 2020 09:07:56 +0000 (11:07 +0200)]
Enhance DAC to allow getting AssemblyLoadContext for objects (#37901)

* Enhance DAC to allow getting AssemblyLoadContext for objects

This change adds support to DAC for getting AssemblyLoadContext
for a MethodTable. The returned AsseblyLoadContext is the context
into which the related type was loaded.

4 years agoDelete FEATURE_APPX (#38112)
Jan Kotas [Fri, 19 Jun 2020 06:29:56 +0000 (23:29 -0700)]
Delete FEATURE_APPX (#38112)

4 years agoMerge FEATURE_CLASSIC_COMINTEROP into FEATURE_COMINTEROP (#38107)
Jan Kotas [Fri, 19 Jun 2020 05:09:19 +0000 (22:09 -0700)]
Merge FEATURE_CLASSIC_COMINTEROP into FEATURE_COMINTEROP (#38107)

Also deleted some dead code

4 years agoChange Activity Default IdFormat to W3C (#37686)
Tarek Mahmoud Sayed [Fri, 19 Jun 2020 02:32:36 +0000 (19:32 -0700)]
Change Activity Default IdFormat to W3C (#37686)

* Change Activity Default IdFormat to W3C

* Remove the prefix from the switch and fix a test

* address some of the feedback

* Scope the breaking change to .NET 5

* Fix running the test on NetFX

* Changed the define NET5 to W3C_DEFAULT_ID_FORMAT

* Add net5 and remove netstandard2.0 configuration in the package

* Return back netstandard 2.0 targetting

When removing it, caused a  CI source build failure

4 years agoAdd backup owners for Microsoft.Extensions (#38122)
Eric StJohn [Fri, 19 Jun 2020 00:46:03 +0000 (17:46 -0700)]
Add backup owners for Microsoft.Extensions (#38122)

4 years agoTweak XML comments on new GCMemoryInfo APIs (#38114)
Stephen Toub [Fri, 19 Jun 2020 00:16:05 +0000 (20:16 -0400)]
Tweak XML comments on new GCMemoryInfo APIs (#38114)

* Tweak XML comments on new GCMemoryInfo APIs

Various enum members and some new methods were missing doc comments.

* Update src/libraries/System.Private.CoreLib/src/System/GCMemoryInfo.cs

4 years ago[Arm64] Implement fcvtxn, fcvtxn2, sqabs, sqneg, suqadd, usqadd (#38010)
Egor Chesakov [Thu, 18 Jun 2020 23:38:06 +0000 (16:38 -0700)]
[Arm64] Implement fcvtxn, fcvtxn2, sqabs, sqneg, suqadd, usqadd (#38010)

4 years agoFix and cleanup dead indirections (#37991)
Carol Eidt [Thu, 18 Jun 2020 23:19:36 +0000 (16:19 -0700)]
Fix and cleanup dead indirections (#37991)

* Fix and cleanup dead indirections

The backend doesn't support a dead `TYP_STRUCT` indirection. Also, if a target register is needed, a `GT_IND` is better.

Fix #36237

4 years agoFix signing by moving ItemsToSign evaluation to be inside a target (#38104)
Santiago Fernandez Madero [Thu, 18 Jun 2020 22:51:14 +0000 (15:51 -0700)]
Fix signing by moving ItemsToSign evaluation to be inside a target (#38104)

4 years agoMake Managed C++ scanning upfront per JanK's PR feedback
Tomas [Thu, 18 Jun 2020 22:30:47 +0000 (00:30 +0200)]
Make Managed C++ scanning upfront per JanK's PR feedback

4 years agoAdd more WASM Substitutions (#37744)
Marek Safar [Thu, 18 Jun 2020 22:21:32 +0000 (00:21 +0200)]
Add more WASM Substitutions (#37744)

* Add more WASM Substitutions

* Remove internal method

4 years agoFix comment in XmlStreamConfigurationProvider (#38084)
lindexi [Thu, 18 Jun 2020 21:42:10 +0000 (05:42 +0800)]
Fix comment in XmlStreamConfigurationProvider (#38084)

4 years agoFix multi-reg temporary copy (#38052)
Carol Eidt [Thu, 18 Jun 2020 21:38:57 +0000 (14:38 -0700)]
Fix multi-reg temporary copy (#38052)

If we need to insert a COPY node to signify a temporary copy of field of a multi-reg lclVar, we need to set the appropriate last use bit.

Fix #37830

4 years agoOptimize memory allocations in ActivitySource (#38064)
Tarek Mahmoud Sayed [Thu, 18 Jun 2020 21:16:05 +0000 (14:16 -0700)]
Optimize memory allocations in ActivitySource (#38064)

* Optimize memory allocations in ActivitySource

* revert back  using anonymous methods

* remove empty line

* Address the feedback

4 years agoAlign some Console properties on iOS/Android/WASM with other Unix implementations...
Maxim Lipnin [Thu, 18 Jun 2020 20:54:46 +0000 (23:54 +0300)]
Align some Console properties on iOS/Android/WASM with other Unix implementations (#38088)

4 years agoMerge pull request #37976 from steveharter/TechEmPower
Steve Harter [Thu, 18 Jun 2020 20:52:00 +0000 (15:52 -0500)]
Merge pull request #37976 from steveharter/TechEmPower

Perf improvements mostly for small or value-type POCOs

4 years agoFix infinite loop for UOH allocations with hardlimit in Server GC (#38071)
Maoni Stephens [Thu, 18 Jun 2020 20:50:58 +0000 (13:50 -0700)]
Fix infinite loop for UOH allocations with hardlimit in Server GC (#38071)

In Server GC when we allocate UOH objects and decide whether we should retry
when hardlimit is in effect we have an inconsistency between should_retry_other_heap
and virtual_commit. The former uses current_total_committed - current_total_committed_bookkeeping while the latter uses current_total_committed.
This causes us to be in a situation where we may have an infinite loop
since the allocate_uoh says to retry but virtual_commit fails.

4 years agoMoving StandardOleMarshalObject type down to corelib (#38072)
Anirudh Agnihotry [Thu, 18 Jun 2020 20:43:29 +0000 (13:43 -0700)]
Moving StandardOleMarshalObject type down to corelib (#38072)

* moving coMarshal type down

* add unix implementation

* setting default value for out params in unix

* remove unsafe

4 years agoImprove error reporting when Crossgen2 crashes on Managed C++
Tomas [Thu, 18 Jun 2020 19:52:22 +0000 (21:52 +0200)]
Improve error reporting when Crossgen2 crashes on Managed C++

Based on Manish's feedback from another PR I investigated options
to improve Crossgen2 diagnostics in the presence of Managed C++
that currently crashes the metadata reader in several places.
This is the barebones version of such support, centralizing detection
and reporting of the failures. Right now we don't have any pretty
way of reporting localized strings from this low-level code, I'll
welcome any suggestions how to polish the change in that direction.

Thanks

Tomas

4 years agonew GetGCMemoryInfo API (#37879)
Maoni Stephens [Thu, 18 Jun 2020 19:50:49 +0000 (12:50 -0700)]
new GetGCMemoryInfo API (#37879)

* new GetGCMemoryInfo API

This implements the new GetGCMemoryInfo API that provides much more info than the one we shipped in 3.0. Also added an overload to query GCs by kind - ephemeral, full blocking or BGC, to facilitate not having to keep a really small sampling interval but can still get the kinds of GCs that happen very infrequently.

Most of the changes inside GC are the following -

All the info is updated at the end of a GC with the exception of BGC which needs special care. We maintain 2 BGC info data structures and one could be in the process of getting updated and if the user requests either BGC info or the last GC info which is also a BGC, we would return the one that's complete. See comments in code for a more detailed explanation.

Fill in the after size data for all generations instead of just the affected generations.

Timing info recording -

+ Changed the GC time recording from ms to us. Previously we did the timing analysis with events which also carry their own high res timestamps so in GC using ms is good enough. But now since we are returning the timing info we want to record it in us instead of ms.
+ Consolidated when we get end_gc_time. It was not including all of the GC work before (eg, decommit eph seg). And moving it to do_post_gc makes it easier for getting the GC info.
+ Not including the EE restart time for blocking GCs - the reason being restart takes very little time and by the time we get to the actual RestartEE the GC settings could be changed and it's not worth the effort to wait till RestartEE at which point we have to spend more effort to figure out which GC to attribute it to.
+ Maintain the running % Pause time in GC info.

4 years ago[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#38082)
dotnet-maestro[bot] [Thu, 18 Jun 2020 18:55:16 +0000 (11:55 -0700)]
[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#38082)

* Update dependencies from https://github.com/dotnet/arcade build 20200616.1

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.XUnitConsoleRunner
 From Version 5.0.0-beta.20309.1 -> To Version 5.0.0-beta.20316.1

* Update dependencies from https://github.com/mono/linker build 20200617.2

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20317.1 -> To Version 5.0.0-preview.3.20317.2

* Update dependencies from https://github.com/dotnet/xharness build 20200618.2

Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20315.3 -> To Version 1.0.0-prerelease.20318.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoAdd a test and other misc feedback
Steve Harter [Thu, 18 Jun 2020 18:27:34 +0000 (13:27 -0500)]
Add a test and other misc feedback

4 years agoAdd hostfxr.h and coreclr_delegates.h to Microsoft.NETCore.DotNetAppHost (#38062)
Sean Hall [Thu, 18 Jun 2020 17:52:05 +0000 (03:52 +1000)]
Add hostfxr.h and coreclr_delegates.h to Microsoft.NETCore.DotNetAppHost (#38062)

4 years agoAdd trimming tests for System.Private.Xml changes (#38068)
Layomi Akinrinade [Thu, 18 Jun 2020 17:45:26 +0000 (10:45 -0700)]
Add trimming tests for System.Private.Xml changes (#38068)

* Add trimming tests for System.Private.Xml changes

* Address review feedback

4 years agoDelegate cmake version check to cmake when possible (#37447)
Adeel Mujahid [Thu, 18 Jun 2020 16:47:34 +0000 (19:47 +0300)]
Delegate cmake version check to cmake when possible (#37447)

* Delegate cmake version check to cmake when possible
There are two kinds of old cmake versions:
* <ins>v3.13.0 onwards that support `-B` command-line option:</ins>
  cmake will print the error message based on `cmake_minimum_required`
  specified.
* <ins>< v3.13.0, which do not have `-B` option:</ins> cmake will fail
  before the version check with an obscure message, quite implicitly
  indicating that it doesn't understand `-B`. For that we have an
  up-front check just for `-B` option, covering the existence of cmake
  as well.

* Update eng/native/build-commons.sh

Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
4 years agoUse Array.Empty in CompositeFileProvider (#38086)
lindexi [Thu, 18 Jun 2020 14:55:03 +0000 (22:55 +0800)]
Use Array.Empty in CompositeFileProvider (#38086)

4 years agoEnable the multifolder test on ARM64 (#38081)
Tomáš Rylek [Thu, 18 Jun 2020 14:25:53 +0000 (16:25 +0200)]
Enable the multifolder test on ARM64 (#38081)

The PE issues that were causing issues in the multifolder test
on ARM64 have been fixed with

https://github.com/dotnet/runtime/pull/37518

so I'm reenabling the temporarily disabled test.

4 years agoFix HTTP/2 race condition with concurrent window update (#38065)
Stephen Toub [Thu, 18 Jun 2020 13:13:53 +0000 (09:13 -0400)]
Fix HTTP/2 race condition with concurrent window update (#38065)

If a window update is received from the server between the time when we were creating an Http2Stream (initializing its available credit with the current initial window size) and when we stored the stream into the  streams dictionary, we might miss out on updating the stream's window size, which could in turn lead to stalls.

4 years agoOptimize reset_memory to only kick in for low memory situations. (#37894)
Peter Sollich [Thu, 18 Jun 2020 12:29:19 +0000 (14:29 +0200)]
Optimize reset_memory to only kick in for low memory situations. (#37894)

This will save time both in VirtualReset and later in page faults.

4 years ago[mono] Don't contribute to inline_const if ctor has AggressiveInlining (#37544)
Egor Bogatov [Thu, 18 Jun 2020 12:24:36 +0000 (15:24 +0300)]
[mono] Don't contribute to inline_const if ctor has AggressiveInlining (#37544)

* don't contribute to inline_const if ctor has [MethodImpl(MethodImplOptions.AggressiveInlining)]

* reformat

* inverse condition

4 years agoAdd linker annotations to System.Runtime (#38021)
Michal Strehovský [Thu, 18 Jun 2020 11:59:38 +0000 (13:59 +0200)]
Add linker annotations to System.Runtime (#38021)

4 years agoNetworking stress tests moved out of Hosted pool (#35011)
Alexander Nikolaev [Thu, 18 Jun 2020 11:50:09 +0000 (13:50 +0200)]
Networking stress tests moved out of Hosted pool (#35011)

HttpStress and SslStress tests moved off hosted pool to different queues.

Note: HttpStress runs are failing but it's actual test code or prod code issue which will be investigated. Infrastructure-wise everything looks good now.

Fixes #34780

4 years ago[wasm] Disable some existing System.Console library tests throwing PNSE (#37975)
Maxim Lipnin [Thu, 18 Jun 2020 11:41:38 +0000 (14:41 +0300)]
[wasm] Disable some existing System.Console library tests throwing PNSE (#37975)

* [wasm] Disable existing System.Console library tests which fail on WASM with PlatformNotSupportedException; add several tests to reflect WASM PNSE-behavior

* Address feedback

4 years agoCG2 ARM64 composite run; PE fixes for Windows ARM64 (#37518)
Tomáš Rylek [Thu, 18 Jun 2020 11:14:05 +0000 (13:14 +0200)]
CG2 ARM64 composite run; PE fixes for Windows ARM64 (#37518)

(*) OS loader apparently doesn't like zero-length relocation sections;

(*) The executable doesn't run without the NxCompatible
DllCharacteristics flag.

Thanks

Tomas

4 years agoFix typo (#38074)
Maxim Lipnin [Thu, 18 Jun 2020 10:26:44 +0000 (13:26 +0300)]
Fix typo (#38074)

4 years agoAddress CborReader/Writer API review feedback (#37956)
Eirik Tsarpalis [Thu, 18 Jun 2020 08:38:56 +0000 (09:38 +0100)]
Address CborReader/Writer API review feedback (#37956)

* fix documentation issues

* simplify checks in PeekStateCore

* fix naming issue in CborReader

* apply dirty tricks

* rename CborConformanceLevel to CborConformanceMode

* change default conformance mode to strict

* add cls compliance attributes to offending members

* add CborWriter.Encode(Span<byte>) method

* make CborWriter.WriteStartArray/WriteStartMap methods accept nullable definiteLength parameters

* add WriteTextString(string?) and WriteByteString(byte[]?) methods

* address feedback

* s/None/Undefined/

* replace CborReader.HasData/BytesRead with CborReader.BytesRemaining

* rename Read/WriteCborNegativeIntegerEncoding to Read/WriteCborNegativeIntegerRepresentation

* add a disableConformanceModeChecks parameters to ReadEncodedValue

* make CborReader.PeekState() throw and remove format error enum values.

* move CborReader.SkipValue() implementation to a dedicated source file

* add ReadDefiniteLength(Byte|Text)String() methods

* split string tests into separate source files for each type

* implement CborContentException and use instead of FormatException

* address feedback

4 years agoAdd support to map test support files to wasm vfs in WasmAppBuilder (#37938)
Santiago Fernandez Madero [Thu, 18 Jun 2020 08:28:07 +0000 (01:28 -0700)]
Add support to map test support files to wasm vfs in WasmAppBuilder (#37938)

* Add support to map test support files to wasm vfs in WasmAppBuilder

* PR Feedback

* Remove workaround for System.Reflection.Metadata.Tests

* Add BCL and BuildReference assets to VFS

* PR Feedback and fix more test projects

* Avoid potential null ref

4 years agoRemove indexer from ref (#37949)
Jan Jahoda [Thu, 18 Jun 2020 07:51:46 +0000 (09:51 +0200)]
Remove indexer from ref (#37949)

Co-authored-by: Jan Jahoda <jajahoda@.microsoft.com>
4 years agoDac changes for pinned object heap (#37853)
David Mason [Thu, 18 Jun 2020 05:30:06 +0000 (22:30 -0700)]
Dac changes for pinned object heap (#37853)

* Dac changes for pinned object heap

* code review feedback

* code review feedback

* remove whitespace changes in gc.cpp

* comments

* Update src/coreclr/src/gc/gcinterface.dac.h

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
* add checks to see if gc structures exist

Co-authored-by: Noah Falk <noahfalk@users.noreply.github.com>
4 years agoRename src\coreclr\src\tools\crossgen2 to src\coreclr\src\tools\aot (#38038)
Jan Kotas [Thu, 18 Jun 2020 05:29:29 +0000 (22:29 -0700)]
Rename src\coreclr\src\tools\crossgen2 to src\coreclr\src\tools\aot (#38038)

4 years agoShare portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file (#37996)
Eric Erhardt [Thu, 18 Jun 2020 04:43:31 +0000 (23:43 -0500)]
Share portions of CoreCLR and Mono CoreLib's ILLinkTrim.xml file (#37996)

This reduces the duplication between these libraries, and allows for easier maintenance going forward.

Fix #37255

4 years agoMerge pull request #38067 from lewing/standard
Larry Ewing [Thu, 18 Jun 2020 04:17:38 +0000 (23:17 -0500)]
Merge pull request #38067 from lewing/standard

Fix typo

4 years agoAdd libunwind to cross DAC (#37521)
Steve MacLean [Thu, 18 Jun 2020 03:43:50 +0000 (23:43 -0400)]
Add libunwind to cross DAC (#37521)

* Libunwind v1.5-rc1-28-g9165d2a1

Pull upstream libunwind which supports building on Windows

* Alignas and typos libunwind/libunwind#186
* Update libunwind-version.txt

* Add libunwind to cross DAC

* Colocate Unix/Windows compiler config
* Unify Windows/Unix configure.cmake

4 years agoObsolete PrincipalPermissionAttribute ctor as error (#37536)
Levi Broderick [Thu, 18 Jun 2020 01:57:32 +0000 (18:57 -0700)]
Obsolete PrincipalPermissionAttribute ctor as error (#37536)

4 years agoMove hostfxr API comments into header file. (#38019)
Sean Hall [Thu, 18 Jun 2020 01:44:35 +0000 (11:44 +1000)]
Move hostfxr API comments into header file. (#38019)

4 years agoBinder tracing tests: print more info on missing start event (#38048)
Elinor Fung [Thu, 18 Jun 2020 01:41:05 +0000 (18:41 -0700)]
Binder tracing tests: print more info on missing start event (#38048)

4 years agoEnable source link for Microsoft.Extensions.HostFactoryResolver (#38009)
Eric StJohn [Thu, 18 Jun 2020 01:00:54 +0000 (18:00 -0700)]
Enable source link for Microsoft.Extensions.HostFactoryResolver (#38009)

4 years agoFix typo
Larry Ewing [Wed, 17 Jun 2020 22:49:53 +0000 (17:49 -0500)]
Fix typo

4 years agoSupport for multi-folder composite builds (#37130)
Tomáš Rylek [Wed, 17 Jun 2020 22:32:04 +0000 (00:32 +0200)]
Support for multi-folder composite builds (#37130)

This change adds support for Crossgen2 input files residing in a
directory structure; the same directory structure gets created
under the output path and the output composite image sits at its
root. The component R2R headers store the file name of the
composite image.

For unification and prevention of double loading we use a
dictionary keyed off simple names of the composite assemblies.
We can also use this mechanism for AssemblyLoadContext checking.
When we load a component assembly into two different ALC's, for the
second ALC (along the execution timeline) we cannot reuse the
composite image that got loaded into the first ALC and we cannot
load it a second time so we just pretend there's no image.

Thanks

Tomas

4 years agoSkip Bundle_can_be_renamed() installer test (#38014)
Swaroop Sridhar [Wed, 17 Jun 2020 22:03:54 +0000 (15:03 -0700)]
Skip Bundle_can_be_renamed() installer test (#38014)

This test is randomly failing in the lab: #35068
Therefore skip this test until the underlying problem is resolved.
Enabling the test is tracked by #38013

Fixes #35068.

4 years agoRemove alpine old distros from test matrix and just run on alpne 3.12 (#38042)
Santiago Fernandez Madero [Wed, 17 Jun 2020 21:44:59 +0000 (14:44 -0700)]
Remove alpine old distros from test matrix and just run on alpne 3.12 (#38042)

4 years agoUpdate IL SDK and ILasm (#37994)
Santiago Fernandez Madero [Wed, 17 Jun 2020 21:42:52 +0000 (14:42 -0700)]
Update IL SDK and ILasm (#37994)

* Update IL SDK and ILasm

* PR Feedback

4 years agoRestore solution when using vs switch (#38024)
Viktor Hofer [Wed, 17 Jun 2020 21:42:25 +0000 (23:42 +0200)]
Restore solution when using vs switch (#38024)

* Restore solution when using vs switch

Restore the solution up-front when using the vs switch until https://github.com/NuGet/Home/issues/5154 is fixed.