platform/upstream/dotnet/runtime.git
3 years agoFix armel build (#47771)
Gleb Balykov [Fri, 5 Feb 2021 00:05:37 +0000 (03:05 +0300)]
Fix armel build (#47771)

3 years agoRemove the src/mono/netcore directory, move its contents to src/mono. (#47847)
Zoltan Varga [Thu, 4 Feb 2021 23:59:14 +0000 (18:59 -0500)]
Remove the src/mono/netcore directory, move its contents to src/mono. (#47847)

* Remove the src/mono/netcore directory, move its contents to src/mono.

* Fix docs and make targets.

* Remove the netcore dir itself.

* Fix samples.

3 years agoUpdate build-runtime to disable PGO when not building release (#47865)
Elinor Fung [Thu, 4 Feb 2021 23:16:53 +0000 (15:16 -0800)]
Update build-runtime to disable PGO when not building release (#47865)

3 years agomake TestUserCredentialsPropertiesOnWindows stable on Windows Server Core (#47031)
Adam Sitnik [Thu, 4 Feb 2021 22:05:22 +0000 (23:05 +0100)]
make TestUserCredentialsPropertiesOnWindows stable on Windows Server Core (#47031)

* kill the process first, then remove the access and then remove the user

this is to try to make TestUserCredentialsPropertiesOnWindows stable on Windows Server Core

* is UnauthorizedAccessException thrown from finally swallowing a different exception (throw in the catch block)?

* I was right, the first call to SetAccessControl was throwing

What if we don't give the user rigts to execute it at all?

3 years agoResolve ILLink warnings in System.Security.Cryptography.Primitives (#47853)
Eric Erhardt [Thu, 4 Feb 2021 20:47:56 +0000 (14:47 -0600)]
Resolve ILLink warnings in System.Security.Cryptography.Primitives (#47853)

* Resolve ILLink warnings in System.Security.Cryptography.Primitives

Contributes to #45623

3 years ago* Initial arm64e support. (#47819)
Zoltan Varga [Thu, 4 Feb 2021 20:14:43 +0000 (15:14 -0500)]
* Initial arm64e support. (#47819)

* Fix the c++ build.

* Remove some unused prototypes.

3 years ago[mono] Compile runtime with MBR support by default on Android and Browser (#47785)
Aleksey Kliger (λgeek) [Thu, 4 Feb 2021 20:01:17 +0000 (15:01 -0500)]
[mono] Compile runtime with MBR support by default on Android and Browser (#47785)

Contributes to https://github.com/dotnet/runtime/issues/44806

3 years agoAdd missing dlclose on error (#47487)
Omair Majid [Thu, 4 Feb 2021 18:35:49 +0000 (13:35 -0500)]
Add missing dlclose on error (#47487)

If the symbol is not found, close the library before returning false.

Otherwise, the library is not stored anywhere and never cleaned up.

3 years agoFix dynamic pgo (#47790)
David Wrighton [Thu, 4 Feb 2021 18:05:47 +0000 (10:05 -0800)]
Fix dynamic pgo (#47790)

* Fix dynamic pgo schema data copy

3 years agoRemove ENABLE_MINIMAL options which are disabled on netcore already. (#47817)
Zoltan Varga [Thu, 4 Feb 2021 18:03:56 +0000 (13:03 -0500)]
Remove ENABLE_MINIMAL options which are disabled on netcore already. (#47817)

3 years agoRemove unused unicode header inclusion (#47840)
Adeel Mujahid [Thu, 4 Feb 2021 18:01:10 +0000 (20:01 +0200)]
Remove unused unicode header inclusion (#47840)

`unicode/uclean.h` was added in bdc8955 for `u_init()` when the PR was
WIP: https://github.com/dotnet/runtime/pull/37971/commits

By the time PR was merged, `u_init()` was removed, so this header is
not required by any configuration.

3 years agoFix createdump on Apple Silicon (#47835)
Steve MacLean [Thu, 4 Feb 2021 15:51:27 +0000 (10:51 -0500)]
Fix createdump on Apple Silicon (#47835)

3 years agoUpdate CODEOWNERS (#47851)
Karel Zikmund [Thu, 4 Feb 2021 15:10:40 +0000 (16:10 +0100)]
Update CODEOWNERS (#47851)

Removing Ahson as he is not on BCL team anymore

3 years agoFix DISABLE_JIT support on amd64. (#47827)
Zoltan Varga [Thu, 4 Feb 2021 14:51:39 +0000 (09:51 -0500)]
Fix DISABLE_JIT support on amd64. (#47827)

3 years agoDisable Android arm64 runtime tests (#47852)
Alexander Köplinger [Thu, 4 Feb 2021 14:49:48 +0000 (15:49 +0100)]
Disable Android arm64 runtime tests (#47852)

See https://github.com/dotnet/runtime/issues/47850

3 years ago[master] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/arcade...
dotnet-maestro[bot] [Thu, 4 Feb 2021 14:42:19 +0000 (15:42 +0100)]
[master] Update dependencies from dotnet/xharness dotnet/runtime-assets dotnet/arcade (#47797)

* Update dependencies from https://github.com/dotnet/runtime-assets build 20210202.1

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

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

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.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21081.1 -> To Version 6.0.0-beta.21101.7

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21102.1 -> To Version 1.0.0-prerelease.21103.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[master] Update dependencies from mono/linker (#47709)
dotnet-maestro[bot] [Thu, 4 Feb 2021 13:05:26 +0000 (14:05 +0100)]
[master] Update dependencies from mono/linker (#47709)

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

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.21079.1 -> To Version 6.0.0-alpha.1.21101.1

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

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.21079.1 -> To Version 6.0.0-alpha.1.21101.2

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

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.21079.1 -> To Version 6.0.0-alpha.1.21103.1

* Add warnings to baseline

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Mateo Torres Ruiz <matorre@microsoft.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>
3 years agoApple silicon debugger (#47834)
Steve MacLean [Thu, 4 Feb 2021 09:58:08 +0000 (04:58 -0500)]
Apple silicon debugger (#47834)

* Use PAL_JITWriteEnable in debug/ee/controller.cpp

* Fix breakpoint exception handling on macos

* Fix Arm64SingleStepper for osx W^X

* Fix DebuggerHeapExecutableMemoryPage for W^X

* Fix DebuggerEval::DebuggerEval() during W^X

3 years agoHandle NativeLibrary.GetExport/Free on libs not loaded through NativeLibrary.*Load...
Johan Lorensson [Thu, 4 Feb 2021 07:53:32 +0000 (08:53 +0100)]
Handle NativeLibrary.GetExport/Free on libs not loaded through NativeLibrary.*Load* on Mono. (#47705)

Handle NativeLibrary.GetExport on libs loaded with Interop.Kernel32.LoadLibraryEx.

https://github.com/dotnet/runtime/pull/47013 changed how kernel32.dll
and Ws2_32.dll gets loaded on Windows. Instead of loading using
NativeLibrary.Load these system libraries are now loaded directly using
LoadLibraryEx, but symbols are still handled through NativeLibrary.
This short-circuits some logic in Mono that assumes all libraries gets
loaded through NativeLibrary.Load.

Fix adds ability to use passed in HMODULE when not finding a matching
library in our native library cache and use it directly, inline with CoreClr behavior.

* Handle NativeLibrary GetExport/Free using IntPtr library OS handle xplat.

* Disable additional System.Drawing.Common tests due to missing COM support.

3 years agofix #47561 (#47575)
Anton Firszov [Thu, 4 Feb 2021 06:10:40 +0000 (07:10 +0100)]
fix #47561 (#47575)

3 years ago Update the analyzer version in runtime and enable the TFM attributes on browser...
Buyaa [Thu, 4 Feb 2021 05:09:07 +0000 (21:09 -0800)]
 Update the analyzer version in runtime and enable the TFM attributes on browser build (#47789)

* Remove logic for removing TFM target supported attributes for browser build, use latest analyzer

3 years agoFix error message in R2R log (#47811)
Jan Kotas [Thu, 4 Feb 2021 03:08:30 +0000 (19:08 -0800)]
Fix error message in R2R log (#47811)

3 years agoPass opaque method signature handle between JIT/CG2 (#47779)
Simon Nattress [Thu, 4 Feb 2021 00:54:57 +0000 (16:54 -0800)]
Pass opaque method signature handle between JIT/CG2 (#47779)

* Crossgen2 presently abuses the `CORINFO_SIG_INFO` pSig field to pass a handle representing a managed method signature object which the JIT passes back to us later in compilation. This field is for byte arrays and causes problems with SuperPMI which rightly doesn't know how to interpret a zero-length buffer whose pointer is set.
* Introduce a new field ,`methodSignature` where we pass the handle back to the JIT. This pattern saves us from allocating and pinning a byte buffer for signatures, something the native code VM and Crossgen1 don't have to worry about.
* Add strongly typed `ObjectToHandle` and `HandleToObject` methods for `CORINFO_MODULE_STRUCT_` <=> `MethodIL` and `MethodSignatureInfo` <=> `MethodSignature`.
* Add SuperPMI support for CORINFO_SIG_INFO.methodSignature

Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
3 years agoAdd more sources to tasks.proj build semaphore (#47804)
Alexander Köplinger [Wed, 3 Feb 2021 23:27:48 +0000 (00:27 +0100)]
Add more sources to tasks.proj build semaphore (#47804)

* Add more sources to tasks.proj build semaphore

With the Apple/AndroidAppBuilders we now have additional sources besides *.cs so we need to add them to the semaphore,
otherwise changes in these files wouldn't cause a rebuild.

* Review feedback

3 years agoFix weight computation in jit (#47470)
Omair Majid [Wed, 3 Feb 2021 22:01:45 +0000 (17:01 -0500)]
Fix weight computation in jit (#47470)

This appears to be a typo. weight1 is from dsc1 and weight2 is from
dsc2. If we checking whether dsc1 is a register arg, we should be
adjusting weight1, not weight2.

3 years agoAdd missing docs for ConcurrentDictionary.Comparer (#47807)
Eirik Tsarpalis [Wed, 3 Feb 2021 21:07:03 +0000 (21:07 +0000)]
Add missing docs for ConcurrentDictionary.Comparer (#47807)

* add missing docs for ConcurrentDictionary.Comparer

* Update src/libraries/System.Collections.Concurrent/src/System/Collections/Concurrent/ConcurrentDictionary.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoAdd rich nav specific pipeline to enable Rich Navigation (#43374)
Jessica Petty [Wed, 3 Feb 2021 20:20:06 +0000 (12:20 -0800)]
Add rich nav specific pipeline to enable Rich Navigation (#43374)

* Add new Rich Nav specific pipeline, temporarily enable RichNav in CI

* Temporarily fix template issue in arcade to test build

* Fix typo in build-job.yml

* Add Rich Nav package feed

* Thread 'enableRichCodeNavigation' parameter through, respond to PR feedback

* Remove change from templates

* Simplify templating and building after insight from Santiago

* Respond to pull request feedback from Santiago

* Specify environment manually, enable for allConfigurations

* Flow environment parameter through to build script

* HACK HACK HACK: replace normal CI with Rich Nav

* Increase timeout to 4 hours

* Empty commit to force another build

* Push empty commit to re-trigger build

* empty commit to force build

* fix build pipeline - remove script that no longer exists

* Add missing task

* Try changing the platform that is building this

* Update Rich Nav pipeline, revert changes to runtime pipeline

3 years agoAdd Mac Catalyst RIDs (#47645)
Steve Pfister [Wed, 3 Feb 2021 19:36:21 +0000 (14:36 -0500)]
Add Mac Catalyst RIDs (#47645)

First step in being able to build different mac catalyst runtimes

Resolves https://github.com/dotnet/runtime/issues/47518

3 years agoUpdates for conditional expression type breaking change (#47738)
Charles Stoner [Wed, 3 Feb 2021 19:02:41 +0000 (11:02 -0800)]
Updates for conditional expression type breaking change (#47738)

3 years agoBug fix issue 30351 (#46436)
Newell Clark [Wed, 3 Feb 2021 18:35:57 +0000 (13:35 -0500)]
Bug fix issue 30351 (#46436)

Added overrides for async methods on IndentedTextWriter that call the respective async methods on the underlying TextWriter.

3 years agoAdd ability to update the friend assembly set of an assembly with Reflection Emit...
David Wrighton [Wed, 3 Feb 2021 18:20:05 +0000 (10:20 -0800)]
Add ability to update the friend assembly set of an assembly with Reflection Emit (#47784)

- Add routine/lock for updating friend assemblies
- Unify all assembly handling custom attribute updates in the runtime
  - This adjusts the handling of the DebuggableAttribute, which in the past would have worked even if it was applied to anything via the CustomAttributeBuilder apis

Co-authored-by: Krzysztof Wicher <kwicher@microsoft.com>
3 years agoAdded ConcurrentDictionary.Comparer property (#47787)
Sergei Papikian [Wed, 3 Feb 2021 16:56:10 +0000 (19:56 +0300)]
Added ConcurrentDictionary.Comparer property (#47787)

* fix #31350

* fix ref file

* fix getter

* added tests

3 years agoVector.As<TFrom, TTo> (#47150)
Huo Yaoyuan [Wed, 3 Feb 2021 15:21:39 +0000 (23:21 +0800)]
Vector.As<TFrom, TTo> (#47150)

* Implement Vector.As using Unsafe.As.

* Ref source for Vector.As.

* Mark managed impl with intrinsic and aggressive inlining.

* Hwintrinsic definition

* Hwintrinsic impl

* Add missing break.

* Make extension method.

* Add test for unsupported As types.

* Add test for op_explicit and cast.

* Reorder intrinsic checks.

3 years agoFix throw decl for math functions (#47687)
Adeel Mujahid [Wed, 3 Feb 2021 12:59:39 +0000 (14:59 +0200)]
Fix throw decl for math functions (#47687)

3 years ago[AOT] Make native linker name configurable (#47747)
Marek Habersack [Wed, 3 Feb 2021 11:03:59 +0000 (12:03 +0100)]
[AOT] Make native linker name configurable (#47747)

Context: https://github.com/android/ndk/wiki/Changelog-r22#announcements
Context: https://github.com/xamarin/xamarin-android/pull/5475
Context: https://github.com/mono/mono/pull/20814

This commit fixes a problem where the AOT compiler hard-codes the native
linker executable name to a platform-specific value but such an
executable does not exist in the toolchain being used, thus making the
AOT compiler fail to link the final binary.

The specific use case here is the new Android NDK r22 which not only
deprecates GNU binutils, but also removes architecture-prefixed `ld`
binary (e.g. `aarch64-linux-android-ld` no longer exists). Instead, the
NDK provides a non-prefixed `ld` binary and two prefixed ones:
`$arch-ld.gold` and `$arch-ld.bfd`. However, since the AOT compiler
hardcodes `ld` as the linker name on Linux systems, the AOT compilation
fails when attempting to link the final executable. Which, in turn,
breaks some Xamarin.Android AOT tests.

This commit fixes the issue by adding a new `ld-name` option to the AOT
compiler allowing one to specify just the name of the linker binary to
use. The rest of the toolchain mechanics doesn't change.

3 years agoAdd missing logging to gtFoldExpr (#47757)
SingleAccretion [Wed, 3 Feb 2021 07:54:33 +0000 (10:54 +0300)]
Add missing logging to gtFoldExpr (#47757)

* Add missing logging to the folding functions

* Use DISPTREE and JITDUMP in more places

3 years agoFix race condition reloading file configuration (#47503)
Frank Racis [Wed, 3 Feb 2021 07:39:08 +0000 (02:39 -0500)]
Fix race condition reloading file configuration (#47503)

Data was being cleared before file was reloaded, causing gap where
invalid configuration could be read.   Now data is only cleared if
reload fails.

Fix #36244

3 years agoRemove DeviceContext HWND handling (#47081)
Hugh Bellamy [Wed, 3 Feb 2021 07:36:45 +0000 (07:36 +0000)]
Remove DeviceContext HWND handling (#47081)

* Remove DeviceContext HWND handling

* Remove IDeviceContext from DeviceContext

3 years agoFix SuperPMI collection with crossgen2 (#47751)
Bruce Forstall [Wed, 3 Feb 2021 03:48:08 +0000 (17:48 -1000)]
Fix SuperPMI collection with crossgen2 (#47751)

* Fix SuperPMI collection with crossgen2

Crossgen2 abuses the `CORINFO_SIG_INFO.pSig` field by treating
it as an opaque handle/pointer, and not a pointer to an array
of signature bytes. Work around this by detecting this case
and storing/restoring the pointer instead of a signature byte
array.

Also, add and improve some dump functions.

Mostly fixes https://github.com/dotnet/runtime/issues/47540
(Fixes it to about the same level of failures in crossgen1
compilations.)

* Fix clang build break

Add logging variables, but leave them under #if 0

Fix handling of getCallInfo throwing an exception.

3 years agoFix an issue with GTF_CALL_M_EXP_RUNTIME_LOOKUP using gtCallMoreFlags instead of...
Brian Sullivan [Wed, 3 Feb 2021 01:31:05 +0000 (17:31 -0800)]
Fix an issue with GTF_CALL_M_EXP_RUNTIME_LOOKUP using gtCallMoreFlags instead of incorrectly using gtFlags. (#47788)

3 years agoRemove some extra assertion merges (#47375)
nathan-moore [Wed, 3 Feb 2021 01:09:55 +0000 (20:09 -0500)]
Remove some extra assertion merges (#47375)

3 years ago[Wasm] Silence some warnings (#47773)
Larry Ewing [Tue, 2 Feb 2021 23:08:41 +0000 (17:08 -0600)]
[Wasm] Silence some warnings (#47773)

* Silence warning in driver.c

* Clean up more warnings

3 years agounwindLazyState: initialize ContextFlags (#47760)
Tom Deseyn [Tue, 2 Feb 2021 22:29:41 +0000 (23:29 +0100)]
unwindLazyState: initialize ContextFlags (#47760)

3 years agoFix DisableAiaOptionWorks test for macOS and remove ActiveIssue
Kevin Jones [Tue, 2 Feb 2021 21:38:55 +0000 (16:38 -0500)]
Fix DisableAiaOptionWorks test for macOS and remove ActiveIssue

3 years agoBackport docs for System.IO.Compression.Brotli (#46716)
Carlos Sanchez [Tue, 2 Feb 2021 21:27:26 +0000 (13:27 -0800)]
Backport docs for System.IO.Compression.Brotli (#46716)

* Backport docs for System.IO.Compression.Brotli

* Addressed PR suggestions and fixed additional bugs.

* Address feedback.
Enable GenerateDocumentationFile.

* BrotliStream.ReadByte docs.

* BrotliStream.Flush docs.

* BrotliStream.WriteByte docs.

* Replace appname includes to plain text.

Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
3 years agoAdd doc about running host tests (#47744)
Elinor Fung [Tue, 2 Feb 2021 20:27:24 +0000 (12:27 -0800)]
Add doc about running host tests (#47744)

3 years agoChange C# names of P/Invokes of objc_msgSend to be call-site specific. (#47608)
Jeremy Koritzinsky [Tue, 2 Feb 2021 19:58:47 +0000 (11:58 -0800)]
Change C# names of P/Invokes of objc_msgSend to be call-site specific. (#47608)

* Change C# names of P/Invokes of objc_msgSend to be call-site specific.

* Rename to match suggested pattern

* Follow Xamarin convention in all objc_msgSend cases.

* Fix typo

* Rename to match convention.

3 years agoOptimize System.DateTime (#45479)
Pent Ploompuu [Tue, 2 Feb 2021 19:31:43 +0000 (21:31 +0200)]
Optimize System.DateTime (#45479)

3 years ago[master] Update dependencies from dotnet/icu dotnet/arcade dotnet/runtime dotnet...
dotnet-maestro[bot] [Tue, 2 Feb 2021 18:51:31 +0000 (19:51 +0100)]
[master] Update dependencies from dotnet/icu dotnet/arcade dotnet/runtime dotnet/llvm-project dotnet/xharness (#47762)

* Update dependencies from https://github.com/dotnet/icu build 20210118.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-alpha.1.21061.1 -> To Version 6.0.0-alpha.1.21068.1

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , 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.GenAPI , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.21062.10 -> To Version 2.5.1-beta.21068.2

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , 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.GenAPI , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.21068.2 -> To Version 2.5.1-beta.21069.2

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , 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.GenAPI , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.21069.2 -> To Version 2.5.1-beta.21071.2

* Update dependencies from https://github.com/dotnet/runtime build 20210124.3

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.2.21076.5 -> To Version 6.0.0-preview.1.21074.3

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21068.3 -> To Version 1.0.0-prerelease.21075.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21075.1 -> To Version 1.0.0-prerelease.21075.2

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21075.2 -> To Version 1.0.0-prerelease.21076.1

* Update dependencies from https://github.com/dotnet/llvm-project build 20210125.1

runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
 From Version 9.0.1-alpha.1.21068.1 -> To Version 9.0.1-alpha.1.21075.1

* Update dependencies from https://github.com/dotnet/icu build 20210125.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-alpha.1.21068.1 -> To Version 6.0.0-alpha.1.21075.1

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , 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.GenAPI , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.21071.2 -> To Version 2.5.1-beta.21072.6

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21076.1 -> To Version 1.0.0-prerelease.21076.2

* Update dependencies from https://github.com/dotnet/icu build 20210126.3

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-alpha.1.21075.1 -> To Version 6.0.0-preview.2.21076.3

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , 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.GenAPI , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.21072.6 -> To Version 2.5.1-beta.21076.1

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , 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.GenAPI , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.21076.1 -> To Version 2.5.1-beta.21078.12

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21076.2 -> To Version 1.0.0-prerelease.21081.1

* Update dependencies from https://github.com/dotnet/runtime build 20210201.2

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.1.21074.3 -> To Version 6.0.0-preview.2.21101.2

* Update dependencies from https://github.com/dotnet/icu build 20210201.12

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-preview.2.21076.3 -> To Version 6.0.0-preview.2.21101.12

* Update dependencies from https://github.com/dotnet/llvm-project build 20210201.1

runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
 From Version 9.0.1-alpha.1.21075.1 -> To Version 9.0.1-alpha.1.21101.1

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

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.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21078.12 -> To Version 6.0.0-beta.21081.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21068.3 -> To Version 1.0.0-prerelease.21102.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoDelay initialization of SocketsHttpHandler specific HTTP2+ data (#40516)
Marek Safar [Tue, 2 Feb 2021 18:50:57 +0000 (19:50 +0100)]
Delay initialization of SocketsHttpHandler specific HTTP2+ data (#40516)

3 years agoResolve ILLink warnings in System.Linq.Expressions (Round 1) (#47585)
Eric Erhardt [Tue, 2 Feb 2021 16:48:04 +0000 (10:48 -0600)]
Resolve ILLink warnings in System.Linq.Expressions (Round 1) (#47585)

* Resolve ILLink warnings in System.Linq.Expressions (Round 1)

Contributes to #45623

* Address PR feedback

* PR feedback

3 years agoClean up old Makefile-based build system from src/mono (#47758)
Alexander Köplinger [Tue, 2 Feb 2021 16:26:31 +0000 (17:26 +0100)]
Clean up old Makefile-based build system from src/mono (#47758)

* Clean up old Makefile-based build system from src/mono

Everything is using CMake now.

* Fix extraction of MONO_CORLIB_VERSION from configure.ac

Move the version into CMakeLists.txt

3 years agoUpdate dependencies from https://github.com/dotnet/icu build 20210201.12 (#47754)
dotnet-maestro[bot] [Tue, 2 Feb 2021 15:53:25 +0000 (16:53 +0100)]
Update dependencies from https://github.com/dotnet/icu build 20210201.12 (#47754)

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 6.0.0-alpha.1.21061.1 -> To Version 6.0.0-preview.2.21101.12

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoSet GetCurrentManagedThreadId (#47742)
Dong-Heon Jung [Tue, 2 Feb 2021 14:15:21 +0000 (23:15 +0900)]
Set GetCurrentManagedThreadId (#47742)

- Set to 0x112 as in readytorun.h
- Resolve assertion in LoadDynamicInfoEntry vm/jitinterface.cpp

3 years agoRespect offset in Socket.ReceiveMessageFrom(saea) on Windows (#47642)
Anton Firszov [Tue, 2 Feb 2021 12:48:41 +0000 (13:48 +0100)]
Respect offset in Socket.ReceiveMessageFrom(saea) on Windows (#47642)

Fixes #47637, and adds ReceiveSent_UDP_Success test to both ReceiveFrom and ReceiveMessageFrom

3 years agoUpdate dependencies from https://github.com/dotnet/llvm-project build 20210118.1...
dotnet-maestro[bot] [Tue, 2 Feb 2021 12:41:16 +0000 (13:41 +0100)]
Update dependencies from https://github.com/dotnet/llvm-project build 20210118.1 (#47161)

runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
 From Version 9.0.1-alpha.1.21064.1 -> To Version 9.0.1-alpha.1.21068.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[mbr] Update samples to use hotreload-delta-gen (#47740)
Aleksey Kliger (λgeek) [Tue, 2 Feb 2021 12:31:23 +0000 (07:31 -0500)]
[mbr] Update samples to use hotreload-delta-gen (#47740)

Update build and README to use `hotreload-delta-gen` from [hotreload-utils](https://github.com/dotnet/hotreload-utils)

3 years agoReplace MonoPInvokeCallbackAttribute with UnmanagedCallersOnlyAttribute in iOS sample...
Maxim Lipnin [Tue, 2 Feb 2021 11:22:45 +0000 (14:22 +0300)]
Replace MonoPInvokeCallbackAttribute with UnmanagedCallersOnlyAttribute in iOS sample (#47220)

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
3 years ago[mono] Remove MonoListItem from Corelib (#47174)
Ryan Lucia [Tue, 2 Feb 2021 11:21:17 +0000 (06:21 -0500)]
[mono] Remove MonoListItem from Corelib (#47174)

3 years agoFix ReadWriteTimeout_CancelsResponse test (#47737)
Stephen Toub [Tue, 2 Feb 2021 11:20:56 +0000 (06:20 -0500)]
Fix ReadWriteTimeout_CancelsResponse test (#47737)

3 years agoadding span version of ReceiveMessageFrom (#46285)
Ove Bastiansen [Tue, 2 Feb 2021 10:07:29 +0000 (11:07 +0100)]
adding span version of ReceiveMessageFrom (#46285)

* adding span version of ReceiveMessageFrom

fix #43933

* Started using new testsetup for the receivemessagefrom

* removed code duplication in socketpal.windows

* removed unused buffers parameter

* adding non-zero offset to the ReceiveMessageFrom test

* added documentation

* offset fix for EAP tests

* fixing pr comments

3 years agoFix plan phase policy bug with regions (#47622)
Peter Sollich [Tue, 2 Feb 2021 08:51:02 +0000 (09:51 +0100)]
Fix plan phase policy bug with regions (#47622)

This fixes a problem where accidentally too much code was excluded with USE_REGIONS.

This caused the compaction decision to be inconsistent between heaps, with some heaps doing compacting and some heaps doing mark&sweep. This is a problem, because the relocation phase relies on relocation information stored in the free space between used objects, and the free space is being overwritten by the sweep. It's an issue only for object pointers between heaps, but these are very common.

3 years agoMove statics to POH (#47651)
Andrew Au [Tue, 2 Feb 2021 06:33:15 +0000 (22:33 -0800)]
Move statics to POH (#47651)

3 years agoProduce a .version file for Microsoft.NETCore.App in the runtime layout. (#47717)
Jeremy Koritzinsky [Tue, 2 Feb 2021 01:23:13 +0000 (17:23 -0800)]
Produce a .version file for Microsoft.NETCore.App in the runtime layout. (#47717)

* Produce a .version file for Microsoft.NETCore.App in the runtime layout.

* Update src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj

* Update src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.sfxproj

3 years ago[mbr] Add a global has_updates flag (#47716)
Aleksey Kliger (λgeek) [Tue, 2 Feb 2021 01:20:30 +0000 (20:20 -0500)]
[mbr] Add a global has_updates flag (#47716)

Use it to take the slow path in metadata lookups when there's at least one
delta applied.

3 years agoJIT: fix issues with profile incorporation phase (#47723)
Andy Ayers [Tue, 2 Feb 2021 01:14:15 +0000 (17:14 -0800)]
JIT: fix issues with profile incorporation phase (#47723)

Change #47646 did not remove the code in `fgMakeBasicBlocks` that set profile
data. That masked some flaws in `fgIncorporateProfileData`:
* it should process all blocks; nothing has been imported yet
* it must honor a constraint that some handler blocks can't be rare.

This fixes the above, and removes the early profile setting.

3 years agoUpdate clang version for alpine build instructions (#47730)
Chuck Ries [Tue, 2 Feb 2021 00:54:25 +0000 (16:54 -0800)]
Update clang version for alpine build instructions (#47730)

3 years agoPgo phase3 (#47558)
David Wrighton [Tue, 2 Feb 2021 00:21:48 +0000 (16:21 -0800)]
Pgo phase3 (#47558)

- Fix class type probes (the increment of the count wasn't correct)
- Use the 64bit integer encoders for all the pgo data
- New section for R2R PE Files containing instrumentation data
- R2RDump functionality to display all the data embedded in the file
- Enable BBOPT for optimized builds in a more unconditional fashion

Future PGO work will include
- Move Pgo type handle histogram processing into JIT (which will make type guessing work in crossgen2 as well as in the runtime)
- Triggers for controlling Pgo data extraction
- Size control for pgo instrumentation data

With this checkin, the feature is functional from a crossgen2.exe point of view, but its not polished, and it cannot be used from the Crossgen2 sdk integration yet (as the sdk does not have the ability to pass an extra pair of arguments to the compiler.

3 years agoAllow macOS chain building to use network if revocation checking is requested
Kevin Jones [Mon, 1 Feb 2021 23:56:52 +0000 (18:56 -0500)]
Allow macOS chain building to use network if revocation checking is requested

The DisableCertificateDownloads property on the chain policy controls all
network activity when building a chain on macOS, not just AIA fetching. If
set to true, the (default) revocation policy would fail because the network
would be treated as unavailable. On macOS, as a work around, permit the
network activity if revocation checking is explicitly enabled.

3 years agoFix filtering properties in TypeDescriptor (#40287)
Petr Onderka [Mon, 1 Feb 2021 21:56:52 +0000 (22:56 +0100)]
Fix filtering properties in TypeDescriptor (#40287)

3 years agoUse C EventPipe implementation by default (#47665)
John Salem [Mon, 1 Feb 2021 19:39:52 +0000 (11:39 -0800)]
Use C EventPipe implementation by default (#47665)

3 years agoFix assert / ObjectDisposedException in PLINQ handling of AggregateException (#47711)
Stephen Toub [Mon, 1 Feb 2021 19:33:42 +0000 (14:33 -0500)]
Fix assert / ObjectDisposedException in PLINQ handling of AggregateException (#47711)

PLINQ's QueryTaskGroupState handles joining with queued tasks, and handles the exceptions that emerge from waiting on them.  AggregateExceptions are special-cased, and are flattened to eliminate extra levels that may have been added explicitly or implicitly; the code then checks to see whether all of the exceptions contained in the aggregate represent cancellation.  However, it fails to account for the possibility that there are no exceptions it contains, which could happen if the only exceptions thrown are themselves empty AggregateExceptions.  If that happens, the code makes some invalid assumptions that lead to a failed assert and then throwing an ObjectDisposedException.

The fix is just to check whether the flattened AggregateException is empty and to treat that not as cancellation but as a normal exception.

3 years agoAdd support for HttpWebRequest.ReadWriteTimeout (#47648)
Stephen Toub [Mon, 1 Feb 2021 16:48:05 +0000 (11:48 -0500)]
Add support for HttpWebRequest.ReadWriteTimeout (#47648)

Uses the recently added support for SocketsHttpHandler.ConnectCallback to be used for synchronous operations to add support for HttpWebRequest.ReadWriteTimeout.  That value is now used to set the Read/WriteTimeout on the underlying socket, with it then affecting all synchronous reads and writes on that connection.  The ReadWriteTimeout is added to the cache key for whether the cached HttpClient instance can be used, as is whether the request is sync or async because that influences how connections are created from the HttpClient instance.

3 years agoUpdate license headers in new files (#47669)
Adeel Mujahid [Mon, 1 Feb 2021 16:47:50 +0000 (18:47 +0200)]
Update license headers in new files (#47669)

* Update license headers in new files

* Run dotnet-format on changeset

3 years agoAdd support for EventPipe stackwalks and method formatting on Mono. (#47629)
Johan Lorensson [Mon, 1 Feb 2021 16:29:00 +0000 (17:29 +0100)]
Add support for EventPipe stackwalks and method formatting on Mono. (#47629)

* Add support for EventPipe stackwalks and method formatting on Mono.

* Review feedback.

* Explicit gboolean -> bool conversion.

3 years agoAdd test validating against regression in #46469 (#47643)
Eirik Tsarpalis [Mon, 1 Feb 2021 15:41:27 +0000 (15:41 +0000)]
Add test validating against regression in #46469 (#47643)

* Add test validating against regression in #46469

* fix test bug

3 years agoIncrease delay for AIA fetch timeout test.
Kevin Jones [Mon, 1 Feb 2021 15:40:05 +0000 (10:40 -0500)]
Increase delay for AIA fetch timeout test.

3 years agoAdd SZArrayHelper to CoreCLR linker descriptor (#47632)
Marek Safar [Mon, 1 Feb 2021 13:15:26 +0000 (14:15 +0100)]
Add SZArrayHelper to CoreCLR linker descriptor (#47632)

It's strictly speaking not required but the type is handled by
JIT specially and illink would need to recognize this one of case.

3 years agoIssue-20619 early return existing value. (#46481)
LateApexEarlySpeed [Mon, 1 Feb 2021 10:43:34 +0000 (18:43 +0800)]
Issue-20619 early return existing value. (#46481)

* Issue-20619 early return existing value.

* issue-20619 Fix comment: Reuse check inside of SetItem; Also use customer-supplied value comparer for TryUpdate().

* issue-20619 Fix tab-space issue.

* issue-20619 Fix comment: Revert: use customer-supplied value comparer for TryUpdate().

3 years agoDeduplicate Unwind and GC info table (#47542)
Simon Nattress [Sun, 31 Jan 2021 22:36:20 +0000 (14:36 -0800)]
Deduplicate Unwind and GC info table (#47542)

* Remove duplicated unwind and GC info table entries.
* Overall, reduces the framework size with CG2 by 2.4MB (89,835,064 -> 87,439,416 bytes)

3 years ago[mono][debugger] Fixing len as unsigned int and comparing < 0 (#47667)
monojenkins [Sun, 31 Jan 2021 16:55:27 +0000 (11:55 -0500)]
[mono][debugger] Fixing len as unsigned int and comparing < 0 (#47667)

This error was introduced in my last PR about icordebug implementation. Fixing it as @lambdageek told me that it was reported on coverity scan.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
3 years agoInterop.Ssl: capture errno before using it in GetSslError (#47626)
Tom Deseyn [Sat, 30 Jan 2021 19:32:19 +0000 (20:32 +0100)]
Interop.Ssl: capture errno before using it in GetSslError (#47626)

3 years agoJIT: create phase for incorporation of profile data (#47646)
Andy Ayers [Sat, 30 Jan 2021 18:28:36 +0000 (10:28 -0800)]
JIT: create phase for incorporation of profile data (#47646)

Instead of trying to set block weight data when initially building the
flowgraph, do it as a phase just before importation.

The importer looks at block weights, so these must be set before importation.

Note profile incorporation relies only on the IL level view of the method,
and does not depend on the IR.

3 years ago[wasm] Don't use MAP_32BIT, its not needed and newer emscripten versions don't define...
monojenkins [Sat, 30 Jan 2021 17:43:51 +0000 (12:43 -0500)]
[wasm] Don't use MAP_32BIT, its not needed and newer emscripten versions don't define it. (#47677)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoDelete unused mono/benchmark folder (#47633)
Alexander Köplinger [Sat, 30 Jan 2021 15:02:24 +0000 (16:02 +0100)]
Delete unused mono/benchmark folder (#47633)

Fixes https://github.com/dotnet/runtime/issues/47628

3 years agoUpdate dependencies from https://github.com/mono/linker build 20210129.1 (#47660)
dotnet-maestro[bot] [Sat, 30 Jan 2021 11:10:24 +0000 (06:10 -0500)]
Update dependencies from https://github.com/mono/linker build 20210129.1 (#47660)

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.21076.1 -> To Version 6.0.0-alpha.1.21079.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoUse [NotNullWhen(true)] in more places (#47598)
Stephen Toub [Sat, 30 Jan 2021 11:09:28 +0000 (06:09 -0500)]
Use [NotNullWhen(true)] in more places (#47598)

* Use [NotNullWhen(true)] in more places

Did a quick search/audit for methods that returned bool and took nullable object as the first input, and added [NotNullWhen(true)] where it was obviously correct.

* Address PR feedback

3 years agoUpdate the area-owners doc to reflect .NET Libraries area pods (#47673)
Jeff Handley [Sat, 30 Jan 2021 08:58:53 +0000 (00:58 -0800)]
Update the area-owners doc to reflect .NET Libraries area pods (#47673)

3 years agoUpdate Microsoft.DotNet.SharedFramework.Sdk (#47671)
Anton Lapounov [Sat, 30 Jan 2021 08:57:27 +0000 (00:57 -0800)]
Update Microsoft.DotNet.SharedFramework.Sdk (#47671)

3 years agoAdd destructor for ZapWin32ResourceString (#47428)
Omair Majid [Sat, 30 Jan 2021 07:14:03 +0000 (02:14 -0500)]
Add destructor for ZapWin32ResourceString (#47428)

The destructor calls delete[] to free up the memory allocated with
new[] in the constructor.

3 years agoFix copy-paste error in host_context_test.cpp (#47430)
Omair Majid [Sat, 30 Jan 2021 07:09:23 +0000 (02:09 -0500)]
Fix copy-paste error in host_context_test.cpp (#47430)

The code tries to write the status from `rcClose`, but accidentally writes
out the value of `rc` instead.

3 years agoUse memmove instead of memcpy for overlapping copy (#47468)
Omair Majid [Sat, 30 Jan 2021 07:08:32 +0000 (02:08 -0500)]
Use memmove instead of memcpy for overlapping copy (#47468)

memcpy is defined to only work when the source and destination memory
regions do not overlap. In here, they do. So let's use memmove instead.

3 years agoUse NewArrayHolder for array type in genanalysis.cpp (#47354)
Omair Majid [Sat, 30 Jan 2021 07:07:49 +0000 (02:07 -0500)]
Use NewArrayHolder for array type in genanalysis.cpp (#47354)

Using NewHolder results in the data being `delete` d after it's used.
The underlying data is an array, so it should be `delete[]` ed instead.

3 years agoSet some pointers to null after free()ing them (#47415)
Omair Majid [Sat, 30 Jan 2021 07:06:10 +0000 (02:06 -0500)]
Set some pointers to null after free()ing them (#47415)

These free() calls are done in the middle of the method body; it's
possible that a duplicate free() can be called on these at the cleanup
code that runs before the method returns. So set these pointers to null
after free()ing them to avoid free() already free()d memory.

3 years ago[wasm] Add support for building out-of-tree projects, which use a local runtime build...
Ankit Jain [Sat, 30 Jan 2021 04:50:46 +0000 (23:50 -0500)]
[wasm] Add support for building out-of-tree projects, which use a local runtime build (#47555)

* [wasm] Add $( WasmBuildAppAfterThisTarget) to control which target

.. triggers WasmAppBuild. Defaults to `Publish`.

* [wasm] emcc, mono-aot-cross doesn't like relative output paths

eg. `-o foo/bar.js`

.. so convert that to absolute paths.

* [wasm] Check for WasmMainJSPath close to it's use

* [wasm] Add new $(WasmGenerateAppBundle) to allow skipping app bundle

.. generation. This is useful when you want to do all the other steps
for wasm, but handle the packaging/bundle generation yourself. Eg.
Blazor

* [wasm] Ensure that generated dotnet.{js,wasm} get copied to the app dir

This is usually done as part of the bundle generation (NativeAssets).
But in cases when that step is being skipped, we still want to copy over
generated dotnet.{js,wasm} (eg. in case of AOT) to the app dir. This is
the case that blazor uses.

* [wasm] Allow skipping mono-cil-strip step

In some cases, eg. blazor (till we fix it), `mono-cil-strip` can break
the app, because of bugs, or linker issues etc.

Also, do this only in the AOT case.

* [wasm] Add support for building wasm projects outside the tree

.. using local runtime builds.

* [wasm] fix up the support for local build dir

* [wasm] add comments for new properties

* [wasm] LocalBuild.*: add more comments, validation

* [wasm] sample: Use BeforeTargets for Prepare target, as a psuedo test for that

3 years agoFor Reverse P/Invokes, call TraceCall with the entrypoint to the target method. ...
Jeremy Koritzinsky [Sat, 30 Jan 2021 04:24:15 +0000 (20:24 -0800)]
For Reverse P/Invokes, call TraceCall with the entrypoint to the target method. (#47610)

Since we're in an IL stub, we don't need to support breakpoints in the stub itself. The debugger will try to resolve the target method and move the breakpoint there. In actuality, that's the part that's failing. Somewhere in the ReversePInvoke helper call chain, we're touching the secret arg register. As a result, when the debugger tries to move the breakpoint, it crashes. By doing the same work ourselves, the debugger doesn't need to resolve the stub secret arg since it never sees a breakpoint in the stub itself. Use UMEntryThunk::GetManagedTarget like what the old system used.

3 years agoAdd MemoryMarshal.CreateReadOnlySpanFromNullTerminated (#47539)
Stephen Toub [Sat, 30 Jan 2021 03:42:17 +0000 (22:42 -0500)]
Add MemoryMarshal.CreateReadOnlySpanFromNullTerminated (#47539)

3 years agoFix for small bug in the profile statistics writer (#47656)
Tomáš Rylek [Sat, 30 Jan 2021 02:28:47 +0000 (03:28 +0100)]
Fix for small bug in the profile statistics writer (#47656)

During my experimentation with callchain optimizations I noticed
that the profile map only contains meaningful information when
we're generating PDB or PerfMap at the same time - apparently I
had the PDB generation turned on during debugging so I overlooked
this.

Thanks

Tomas

3 years agoRemove OrderedDictionary usage from ReflectTypeDescriptionProvider (#47473)
Stephen Toub [Sat, 30 Jan 2021 01:06:39 +0000 (20:06 -0500)]
Remove OrderedDictionary usage from ReflectTypeDescriptionProvider (#47473)

This is showing up a bit on ASP.NET startup paths, and we can be more efficient in how we handle allocations and work.

3 years agoRe-enable crossgen2 SPMI collection with EnableExtraSuperPmiQueries=1 (#47655)
Bruce Forstall [Sat, 30 Jan 2021 00:35:08 +0000 (14:35 -1000)]
Re-enable crossgen2 SPMI collection with EnableExtraSuperPmiQueries=1 (#47655)

Remove workaround after fixed with #47614