platform/upstream/dotnet/runtime.git
3 years agoUpdate both TPN files with missing notices (#57300)
Adeel Mujahid [Wed, 8 Sep 2021 06:30:59 +0000 (09:30 +0300)]
Update both TPN files with missing notices (#57300)

3 years agoFix JitDump crash (#58778)
Bruce Forstall [Wed, 8 Sep 2021 04:52:43 +0000 (21:52 -0700)]
Fix JitDump crash (#58778)

The `idFlags` field was uninitialized, so garbage could be
incorrectly considered a handle flag. I was seeing crashes
generating JitDump on Linux/Mac.

Also, `emitDispCommentForHandle` already masks with `GTF_ICON_HDL_MASK`,
so the caller doesn't need to do that.

3 years agoRetarget DOTNETHOME when installing x64 on ARM64 (#58669)
Eric StJohn [Wed, 8 Sep 2021 04:33:00 +0000 (21:33 -0700)]
Retarget DOTNETHOME when installing x64 on ARM64 (#58669)

3 years agoClean up tests under src/tests/reflection (#58673)
Elinor Fung [Tue, 7 Sep 2021 22:13:17 +0000 (15:13 -0700)]
Clean up tests under src/tests/reflection (#58673)

3 years agoSwitch weights to doubles to mitigate rounding inaccuracies and use epsilon when...
Jakob Botsch Nielsen [Tue, 7 Sep 2021 21:29:43 +0000 (23:29 +0200)]
Switch weights to doubles to mitigate rounding inaccuracies and use epsilon when sorting locals (#58630)

Mitigate issues where the compiler might evaluate intermediate
computations with higher precisions due to optimizations, causing
different results between x86 windows checked/release.

Fix #58063

3 years agoFix PerfScore inconcistencies (#56812)
Pent Ploompuu [Tue, 7 Sep 2021 20:40:25 +0000 (23:40 +0300)]
Fix PerfScore inconcistencies (#56812)

3 years agoRemove unused test libraries under classloader (#58596)
Elinor Fung [Tue, 7 Sep 2021 20:32:05 +0000 (13:32 -0700)]
Remove unused test libraries under classloader (#58596)

3 years agoSkip allocation for ZeroInit writeThru intervals (#58677)
Kunal Pathak [Tue, 7 Sep 2021 20:31:38 +0000 (13:31 -0700)]
Skip allocation for ZeroInit writeThru intervals (#58677)

* Do not allocate register if ZeroInit/EHWriteThru

* Update the comments about zero-init heuristics

* jit format

3 years agoSupport duplicated type names with src gen (#58448)
Steve Harter [Tue, 7 Sep 2021 19:59:39 +0000 (14:59 -0500)]
Support duplicated type names with src gen (#58448)

3 years agoAdd support for variance to IDIC (#58646)
Aaron Robinson [Tue, 7 Sep 2021 17:13:25 +0000 (10:13 -0700)]
Add support for variance to IDIC (#58646)

3 years agoAvoid S.S.Permissions dependency in S.S.Crypto.Xml (#58731)
Viktor Hofer [Tue, 7 Sep 2021 15:49:37 +0000 (17:49 +0200)]
Avoid S.S.Permissions dependency in S.S.Crypto.Xml (#58731)

Avoid the S.S.Permissions dependency by referencing the
latest available System.Security.AccessControl package
which contans the Evidence types in all tfms in the
System.Security.Cryptography.Xml project.

Add suppression file for Permissions

3 years agoRevert "Fix HAVE_PTHREAD_CONDATTR_SETCLOCK detection on Android (#58701)" (#58755)
Viktor Hofer [Tue, 7 Sep 2021 15:33:15 +0000 (17:33 +0200)]
Revert "Fix HAVE_PTHREAD_CONDATTR_SETCLOCK detection on Android (#58701)" (#58755)

This reverts commit a6d9e63dc472ac57edea2a2c407c75f9ec33066f.

3 years agoAdd threading test for Regex (#58595)
Stephen Toub [Tue, 7 Sep 2021 14:56:20 +0000 (10:56 -0400)]
Add threading test for Regex (#58595)

3 years agoPosixSignalRegistrationTests.Unix: validate signal pal mapping (#58711)
Tom Deseyn [Tue, 7 Sep 2021 14:06:32 +0000 (16:06 +0200)]
PosixSignalRegistrationTests.Unix: validate signal pal mapping (#58711)

* PosixSignalRegistrationTests.Unix: validate signal pal mapping

* Use InvariantCulture for pid ToString

* Invoke kill through shell.

* Remove InvariantCulture

3 years agoDisable failing test (#58634)
Fan Yang [Tue, 7 Sep 2021 13:16:18 +0000 (09:16 -0400)]
Disable failing test (#58634)

3 years ago[mono] Disable tests relying on precise GC (#58719)
Vlad Brezae [Tue, 7 Sep 2021 12:57:39 +0000 (15:57 +0300)]
[mono] Disable tests relying on precise GC (#58719)

From GC/Scenarios and GC/Features/Finalizer

3 years agoFixed paths above repo root level (#55628) (#56239)
CW2 [Tue, 7 Sep 2021 12:16:47 +0000 (14:16 +0200)]
Fixed paths above repo root level (#55628) (#56239)

`__RootBinDir` and `DotNetCli` paths based on `__RepoRootDir` as suggested in https://github.com/dotnet/runtime/issues/55628#issuecomment-884569242, updated `REVIEW` comment to help future cleanup (if any).

3 years agoRemove Reflection.Emit packages from the Windows Compatibility Pack on frameworks...
Theodore Tsirpanis [Tue, 7 Sep 2021 10:33:08 +0000 (13:33 +0300)]
Remove Reflection.Emit packages from the Windows Compatibility Pack on frameworks greater than .NET Standard 2.0. (#56973)

3 years agoRemove conditional compilation conditions that are no longer possible. (#58377)
Kevin Jones [Tue, 7 Sep 2021 08:16:57 +0000 (04:16 -0400)]
Remove conditional compilation conditions that are no longer possible. (#58377)

Since the Cng and OpenSsl packages have been dead-ended, some of the conditional
compilation is no longer applicable.

3 years ago[main] Update dependencies from dotnet/runtime dnceng/internal/dotnet-optimization...
dotnet-maestro[bot] [Tue, 7 Sep 2021 07:35:34 +0000 (09:35 +0200)]
[main] Update dependencies from dotnet/runtime dnceng/internal/dotnet-optimization dotnet/arcade dotnet/hotreload-utils dotnet/sdk (#58681)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210903.6

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21452.5 -> To Version 1.0.0-prerelease.21453.6

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 7.0.0-beta.21452.4 -> To Version 7.0.0-beta.21453.2

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210903.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21452.1 -> To Version 1.0.2-alpha.0.21453.1

* Update dependencies from https://github.com/dotnet/sdk build 20210903.86

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21453.1 -> To Version 1.0.0-rc.1.21453.86

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210904.6

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21452.5 -> To Version 1.0.0-prerelease.21454.6

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210904.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21452.1 -> To Version 1.0.2-alpha.0.21454.1

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

Microsoft.NETCore.ILAsm , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.App.Runtime.win-x64 , runtime.native.System.IO.Ports , Microsoft.NET.Sdk.IL , System.Text.Json , System.Runtime.CompilerServices.Unsafe
 From Version 7.0.0-alpha.1.21430.3 -> To Version 7.0.0-alpha.1.21456.1

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210905.2

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21452.5 -> To Version 1.0.0-prerelease.21455.2

* Update dependencies from https://github.com/dotnet/sdk build 20210905.4

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21453.1 -> To Version 1.0.0-rc.1.21455.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoAdd test for implicit time zone conversion for mobile platforms (#58717)
Filip Navara [Tue, 7 Sep 2021 07:07:35 +0000 (09:07 +0200)]
Add test for implicit time zone conversion for mobile platforms (#58717)

3 years agoFix HAVE_PTHREAD_CONDATTR_SETCLOCK detection on Android (#58701)
Michal Strehovský [Mon, 6 Sep 2021 23:53:35 +0000 (08:53 +0900)]
Fix HAVE_PTHREAD_CONDATTR_SETCLOCK detection on Android (#58701)

Android puts pthread stuff into libc. Because this wasn't detected, we are using some iOS fallbacks in System.Native. I'm propagating how pthreads are detected in the CoreCLR PAL (that was fixed up for Android in the CoreCLR PAL a couple years ago).

Failure to properly detect it here was causing build breaks in CoreCLR on Android (that's how I found this).

3 years agoAllow instrumentation for methods with explicit tail calls (#58632)
Egor Bogatov [Mon, 6 Sep 2021 12:14:11 +0000 (15:14 +0300)]
Allow instrumentation for methods with explicit tail calls (#58632)

3 years agofix ValueTuple source generation support (#58644)
Eirik Tsarpalis [Mon, 6 Sep 2021 11:57:45 +0000 (12:57 +0100)]
fix ValueTuple source generation support (#58644)

3 years agoRemove redundant zeroing for small stackallocs with SkipLocalsInit (#55004)
Egor Bogatov [Mon, 6 Sep 2021 11:44:40 +0000 (14:44 +0300)]
Remove redundant zeroing for small stackallocs with SkipLocalsInit (#55004)

3 years agoJIT: Skip covariant store checks when jit sees exact Array's type (#58696)
Egor Bogatov [Mon, 6 Sep 2021 11:44:04 +0000 (14:44 +0300)]
JIT: Skip covariant store checks when jit sees exact Array's type (#58696)

3 years ago[Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS (#58562)
Mitchell Hwang [Mon, 6 Sep 2021 09:06:38 +0000 (05:06 -0400)]
[Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS (#58562)

* [Libraries] Fix TimeZoneInfoTests IsIanaIdTest for iOS/MacCatalyst/tvOS

* [Libraries] Fix IsIanaIdTest to assert throw for iOS/MacCatalyst/tvOS

* Readd new line

* [Mobile][Libraries] System.Runtime.Tests TimeZoneInfoTests remove mobile from iana conversion support

* [libraries] System.Runtime.Tests revert IsIanaIdTest iOS tvOS special casing

* Remove active issue added in recently merged PR

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years ago[libraries] Restrict ILLink Suppression xml to mobile platforms (#58519)
Mitchell Hwang [Mon, 6 Sep 2021 09:04:22 +0000 (05:04 -0400)]
[libraries] Restrict ILLink Suppression xml to mobile platforms (#58519)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoFix ConfigurationManager when BaseDirectory starts with \\?" (#58627)
Krzysztof Wicher [Mon, 6 Sep 2021 08:04:52 +0000 (10:04 +0200)]
Fix ConfigurationManager when BaseDirectory starts with \\?" (#58627)

3 years agoMake sure EventPipe streaming thread won't write session->streaming_thread after...
Johan Lorensson [Mon, 6 Sep 2021 06:33:23 +0000 (08:33 +0200)]
Make sure EventPipe streaming thread won't write session->streaming_thread after session free. (#58615)

In case where ep_disable is called by a different thread (close IPC command) there was a race between streaming threads setting session->streaming_thread to NULL and IPC command triggering a call to disable_holding_lock and freeing session.

Resetting the streaming_thread in streaming thread must happens before it signals its shutdown event to prevent the race.

3 years agoJIT: relax assert in lvaSetDoNotEnregister (#58597)
Andy Ayers [Sun, 5 Sep 2021 17:27:21 +0000 (10:27 -0700)]
JIT: relax assert in lvaSetDoNotEnregister (#58597)

If user code reinterprets a non-struct local as a struct (say via `Unsafe.As`)
at a call site, then we may see `DNER_IsStructArg` ussed for that local. Remove
an assert and update the descriptive text.

Fixes #58515.

3 years agoThe signal enum in the native library should match the managed code. (#58658)
James Truher [MSFT] [Sat, 4 Sep 2021 13:02:20 +0000 (06:02 -0700)]
The signal enum in the native library should match the managed code. (#58658)

3 years agoDo Contain analysis after inserting node in block range (#58605)
Kunal Pathak [Sat, 4 Sep 2021 04:18:05 +0000 (21:18 -0700)]
Do Contain analysis after inserting node in block range (#58605)

3 years agoadd TLS 1.3 support to WinHttp (#58590)
Tomas Weinfurt [Sat, 4 Sep 2021 02:23:23 +0000 (19:23 -0700)]
add TLS 1.3 support to WinHttp (#58590)

* add TLS 1.3 support to WinHttp

* remove extra line

* fix comment

* add check if WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3 is supported

3 years agoFix Native Digit Reading (#58598)
Tarek Mahmoud Sayed [Sat, 4 Sep 2021 00:01:50 +0000 (17:01 -0700)]
Fix Native Digit Reading (#58598)

3 years ago[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade...
dotnet-maestro[bot] [Sat, 4 Sep 2021 00:00:19 +0000 (17:00 -0700)]
[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade dotnet/roslyn-analyzers dotnet/hotreload-utils dotnet/sdk (#58621)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210902.5

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21451.4 -> To Version 1.0.0-prerelease.21452.5

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21451.3 -> To Version 7.0.0-beta.21452.4

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20210902.7

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 6.0.0-rc1.21413.4 -> To Version 7.0.0-preview1.21452.7

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210902.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21451.1 -> To Version 1.0.2-alpha.0.21452.1

* Update dependencies from https://github.com/dotnet/sdk build 20210903.1

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21426.26 -> To Version 1.0.0-rc.1.21453.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoUpdate solution files for correct ordering of elements (#58655)
Viktor Hofer [Fri, 3 Sep 2021 22:16:15 +0000 (00:16 +0200)]
Update solution files for correct ordering of elements (#58655)

With the newest udpate of slngen, the order of elements (configuration, folders, etc.) is in sync with how Visual Studio arranges them.
Also the order is now deterministic.

Based on that, updating all solution files to have the correct ordering of elements. This change also unblocks adding CI protection for
making sure that solution files are up-to-date in regards to their dependencies as slngen is now generating the files deterministically.

3 years agoTls resume PoC (server stateless) (#57079)
Tomas Weinfurt [Fri, 3 Sep 2021 22:03:02 +0000 (15:03 -0700)]
Tls resume PoC (server stateless)  (#57079)

* tls resume

* fix alpn

* fix build with old openssl

* remove handling of empty ALPN

* more OpenSSL1.0 fixes

* fix android

* feedback from review

* dispose innerContext if we don't cache

* disable TLS resume with CipherSuitePolicy

* partial feedback from review

* fix build

* feedback from review

* refactor protocol selection to helper function

3 years agoRun minimal set of iOS / tvOS device tests (#58444)
Steve Pfister [Fri, 3 Sep 2021 22:01:58 +0000 (18:01 -0400)]
Run minimal set of iOS / tvOS device tests (#58444)

With each test suite app taking up ~100MB in space, it's not practical to build the tests on the build machine. Only enable a few now as an interim step.

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years agoSupport JsonConverterFactory with src-gen (#58398)
Steve Harter [Fri, 3 Sep 2021 19:48:54 +0000 (14:48 -0500)]
Support JsonConverterFactory with src-gen (#58398)

3 years ago[main] Conditionally pack symbols based on keepNativeSymbols (#58577)
github-actions[bot] [Fri, 3 Sep 2021 18:11:03 +0000 (11:11 -0700)]
[main] Conditionally pack symbols based on keepNativeSymbols (#58577)

* Conditionally pack symbols based on keepNativeSymbols

* Fix casing issue

* Add clarifing comment

Co-authored-by: Michael Simons <msimons@microsoft.com>
3 years ago[libraries] Skip test suites crashing on CI for iOS/tvOS/MacCatalyst (#57208)
Mitchell Hwang [Fri, 3 Sep 2021 17:22:20 +0000 (13:22 -0400)]
[libraries] Skip test suites crashing on CI for iOS/tvOS/MacCatalyst (#57208)

* [MacCatalyst][Libraries] Reenable MacCatalyst x64 crashing test suites

* [MacCatalyst][Libraries] Reenable MacCatalyst arm64 crashing test suites

* Temporarily enable MacCatalyst arm64 lane

* Readd consistently crashing suites to iOS tvOS MacCatalyst skips

* Address crashes and PNSE failures on iOS MacCatalyst

* Temporarily bump timeout for tvOS

* fix typo

* Skip more crashed suites

* Undo temporary changes and Add ActiveIssue

* Skip more crashing suites

* Skip iOS.Simulator.Aot.Test flake on MacCatalyst CI

* Add a couple crashing suites

* Remove sample skip in tests.proj as it doesnt do anything

* Add another flakey crashed test for MacCatalyst

* Skip System.Xml.Xsl.XslCompiledTransformApi on MacCatalyst

* Temporarily remove test suite skips and enable arm64 lanes and bump lane timeout to evaluate crashes

* Reenable a test that was fixed

* Update Microsoft.DotNet.Helix.Sdk

Fixes an issue with mismatched dotnet SDK versions we're hitting in runtime-staging on mobile platforms (see https://github.com/dotnet/arcade/pull/7788)

* [iOS] Skip ValidAccessLevelCombinations ReadWriteExecute for iOSSimulator arm64

* Skip failing test suites

* Extend trampoline bump to iOS tvOS MacCatalyst

* Fixup typo

* Fix MonoAOTCompiler typo

* Bump trampolines for osxlike lanes

* Add active issues for failing tests

* Remove ActiveIssue that was fixed

* Add IsIanaIdTest skip

* Bump trampolines even higher

* Address feedback

* Fix typo

* Undo runtime-staging temporary changes and cleanup test skips

* Fix path typo

* Skip iOS sample

* Add new activeIssue and skip flakey Android test crash

* Skip functional tests crashing with exit code 0

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
3 years agoJIT: adjust assert in optUnmarkCSE (#58600)
Andy Ayers [Fri, 3 Sep 2021 15:53:19 +0000 (08:53 -0700)]
JIT: adjust assert in optUnmarkCSE (#58600)

Modify the assert we use to check that someone forgot to set `optCSEweight`,
so that it works if we have blocks with max weight.

Fixes #58371.

3 years agoFix Android device issues related to filesystem/IO (#58586)
Alexander Köplinger [Fri, 3 Sep 2021 14:07:55 +0000 (16:07 +0200)]
Fix Android device issues related to filesystem/IO (#58586)

- Use F_SETLK64 for fcntl to fix an issue where 32bit arm Android apps would get the wrong flag
- Add numerical magic numbers for missing file systems to Interop.UnixFileSystemTypes so they are correctly recognized
- Make ping test a bit more forgiving if the process returns a few milliseconds _before_ the timeout

3 years ago[mini] Don't add unbox tramopline on generic DIM calls (#58521)
Aleksey Kliger (λgeek) [Fri, 3 Sep 2021 13:31:25 +0000 (09:31 -0400)]
[mini] Don't add unbox tramopline on generic DIM calls (#58521)

* [mini] Don't add unbox tramopline on generic DIM calls

Don't unbox a valuetype `this` if the generic method is a DIM

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

* Add regression test

3 years agorun System.IO.Tests .NET 5 compat tests on every OS (#58611)
Adam Sitnik [Fri, 3 Sep 2021 11:03:34 +0000 (13:03 +0200)]
run System.IO.Tests .NET 5 compat tests on every OS (#58611)

3 years agoFix source-build on the s390x platform (#58553)
Ulrich Weigand [Fri, 3 Sep 2021 10:39:06 +0000 (12:39 +0200)]
Fix source-build on the s390x platform (#58553)

* Do not disable Mono in source-build if it is the primary runtime

This fixes a build failure when building runtime via the source-build method on s390x:  with source-build, the Mono runtime is currently not supported -- but this doesn't make sense on s390x where Mono is the *primary* (only) supported runtime.

3 years agoRemove unnecessary unsafe keyword (#58606)
Maxim Lipnin [Fri, 3 Sep 2021 10:34:10 +0000 (13:34 +0300)]
Remove unnecessary unsafe keyword (#58606)

A small cleanup after https://github.com/dotnet/runtime/pull/56713.

3 years agoIncrease some of the DnsEndPointTest timeouts (#58129)
Anton Firszov [Fri, 3 Sep 2021 10:24:28 +0000 (12:24 +0200)]
Increase some of the DnsEndPointTest timeouts (#58129)

Long story short:
I have spent several hours trying to get a test run on SLES in order to repro #57929, no success so far, and it may take days to make progress, since I'm unfamiliar with SLES.

I recommend to bump the timeout values for now, and see if it helps with the issue. If not, we may invest into another round of investigation.

(hopefully) fixes #57929

3 years ago[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade...
dotnet-maestro[bot] [Fri, 3 Sep 2021 08:48:46 +0000 (10:48 +0200)]
[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade dotnet/xharness dotnet/hotreload-utils (#58551)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210901.4

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21431.4 -> To Version 1.0.0-prerelease.21451.4

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21430.1 -> To Version 6.0.0-beta.21451.3

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21431.1 -> To Version 1.0.0-prerelease.21451.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210901.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21431.1 -> To Version 1.0.2-alpha.0.21451.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoAdd support for build.cmd -vs corehost.sln (#58520)
Mateo Torres-Ruiz [Fri, 3 Sep 2021 08:45:59 +0000 (01:45 -0700)]
Add support for build.cmd -vs corehost.sln (#58520)

* Add support for -vs corehost.sln

* Avoid variable dup

3 years agoEnsure proper memory ordering when background_ephemeral_sweep copies over the free...
Peter Sollich [Fri, 3 Sep 2021 08:33:13 +0000 (10:33 +0200)]
Ensure proper memory ordering when background_ephemeral_sweep copies over the free list data that it found for gen 0. (#58564)

The method allocator::copy_with_no_repair is called at the end of background_ephemeral_sweep to copy over the free list data that it found for gen 0. There is no synchronization, but we are careful to copy items in a sequence that makes sure things work correctly for x86 and x64. However, on other platforms, we need a memory barrier.

This is a tentative fix for issue #57956 - it seems possible that the issue is caused by the lack of synchronization in copy_with_no_repair, but there is no proof yet.

3 years agoFix crossgen2 calli GC hole by unifying MethodDesc/MethodSignature IsMarshallingRequi...
Jakob Botsch Nielsen [Fri, 3 Sep 2021 08:30:38 +0000 (10:30 +0200)]
Fix crossgen2 calli GC hole by unifying MethodDesc/MethodSignature IsMarshallingRequired logic (#58430)

For unmanaged calli crossgen2 was not properly checking all necessary
conditions for a pinvoke being required. In particular it did not check
for managed byrefs. Unify the MethodDesc/MethodSignature logic to get
all the checks.

Fix #58259

3 years agofix spelling (#58593)
Tomas Weinfurt [Fri, 3 Sep 2021 08:01:43 +0000 (01:01 -0700)]
fix spelling (#58593)

3 years agoUndo struct promotion on "RetInd" code path (#58582)
Kunal Pathak [Fri, 3 Sep 2021 05:16:02 +0000 (22:16 -0700)]
Undo struct promotion on "RetInd" code path (#58582)

* TOREVERT: small repro case

* Fix the undone struct promotion for return

* Display lclVar number

* Revert "TOREVERT: small repro case"

This reverts commit 9ef80ba45d52257f0b2b33404206ecda3823c92c.

* Add test case

* jit format

* Combine the condition

* Add an assert to catch the missing places

* Remove unneeded variable setting from csproj

3 years agoImplement support for passing a .env file to corerun to easily set environment variab...
Jeremy Koritzinsky [Fri, 3 Sep 2021 02:18:59 +0000 (19:18 -0700)]
Implement support for passing a .env file to corerun to easily set environment variables for stress testing. (#58222)

* Implement support for passing a .env file to corerun to easily set environment variables for stress testing.

* Load the parsed dotenv into the process.

* Implement support for # comments

* Clean up code

* Avoid copy

* PR feedback

* Update docs and bash/batch scripts to support the dotenv files.

* Use what clang recommends to not copy

* Apply suggestions from code review

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
3 years agoImport `KEEPALIVE(BOX)` as `KEEPALIVE(ADDR(TEMP))` (#54412)
SingleAccretion [Fri, 3 Sep 2021 01:10:34 +0000 (04:10 +0300)]
Import `KEEPALIVE(BOX)` as `KEEPALIVE(ADDR(TEMP))` (#54412)

* Prototype removing boxes from GC.KeepAlive

Instead, import KEEPALIVE(BOX) as a sequence of
KEEPALIVE for object fields (flattened).

* Clean things up

Move the importation to its own method.
Add debug output.
Rename a few things.

* Add a test

Basic verification of the new optimization.

* Fix formatting

* Disable the test on Mono

It relies on a precise GC.

* Add a class field scenario to the test

* Fix a test

Running diffs for win-x64, there was exactly one result,
in this test. GC.KeepAlive here is used as a generic
"make sure that there is a use for the variable
beyond an assigment" function. The new optimization
eliminates this use as the struct in question has
no GC fields. Fix the test by using an actual generic
"use me" function.

Will be broken by advanced interprocediral analysis
that is apparently not as far away as one would expect,
but will do for now.

* Use advanced DEBUG features for even nicer dumps

* Add two simple EH scenarios to the test

* Fix the test

It is possible for a GC to occur just after
the KeepAlive calls and for CheckSuccess to
wrongly conclude the objects weren't kept alive.

* Only elide copies for GT_LCL_VARs

If the source is a GT_LCL_FLD, then we would only want
too keep alive the fields it encloses (or, since TYP_STRUCT
local fields are currently not supported, nothing).

* Use the address of the whole struct for KEEPALIVE

The field-by-field approach results in the struct getting
address-exposed anyway, so there is no good reason to bloat
the IR. Just have the address escape directly.

Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
3 years agoJIT: fix jump threading to keep track of preds instead of reanalyzing (#58579)
Andy Ayers [Fri, 3 Sep 2021 00:53:15 +0000 (17:53 -0700)]
JIT: fix jump threading to keep track of preds instead of reanalyzing (#58579)

In #58368 we see an issue where a previously ambiguous pred becomes a true pred
once other pred flow is redirected. While this may be a missed opportunity, we
are better off just keeping with our initial assessment for now.

So during the initial pred walk, track which preds are ambiguous and true (and
by implication, false) and then use that classification during the second walk.

Fixes #58368.

3 years agodocs: add missing xml document's comments (#57329)
Maledong [Thu, 2 Sep 2021 22:25:53 +0000 (06:25 +0800)]
docs: add missing xml document's comments (#57329)

3 years agoConvert test from using XUnitBase to typical CoreCLR test pattern so (#58573)
Aaron Robinson [Thu, 2 Sep 2021 20:46:24 +0000 (13:46 -0700)]
Convert test from using XUnitBase to typical CoreCLR test pattern so (#58573)

test can be run under GCStress.

3 years agoClean up tests under CoreMangLib/system/runtime/interopservices/safehandle (#58528)
Elinor Fung [Thu, 2 Sep 2021 19:13:30 +0000 (12:13 -0700)]
Clean up tests under CoreMangLib/system/runtime/interopservices/safehandle  (#58528)

* Delete redundant SafeHandle tests

* Move DangerousGetHandle and SetHandleAsInvalid tests to libraries

Remove IsClosed and SetHandle tests - covered by existing/new checks in
libraries tests.

3 years agoJIT: fix some issues in fgIsThrowHlpBlk (#58510)
Andy Ayers [Thu, 2 Sep 2021 18:53:09 +0000 (11:53 -0700)]
JIT: fix some issues in fgIsThrowHlpBlk (#58510)

We may see no return calls that are not the roots of their trees, so don't
assert that the last node must be a call.

Update the list of helpers we check for to reflect current practice.

Remove the unused SCK_PAUSE_EXEC.

Fixes #58372.

3 years agoDelete redundant AssemblyName test (#58477)
Elinor Fung [Thu, 2 Sep 2021 18:07:35 +0000 (11:07 -0700)]
Delete redundant AssemblyName test (#58477)

3 years agoNotify Reference Tracker runtime of disconnect at the right time (#58472)
Aaron Robinson [Thu, 2 Sep 2021 18:02:47 +0000 (11:02 -0700)]
Notify Reference Tracker runtime of disconnect at the right time (#58472)

* Notify Reference Tracker runtime of disconnect at the right time

Based on misunderstanding of SyncBlock clean-up modes the indication of
when an Native Object Wrapper was being collected was being done after
the wrapper's Finalizer was run. However, this information must be conveyed
prior to wrapper finalization and synchronously during the GC.

3 years agoChange compile time dependency of ICU API ucol_setMaxVariable to be runtime instead...
Tarek Mahmoud Sayed [Thu, 2 Sep 2021 17:19:29 +0000 (10:19 -0700)]
Change compile time dependency of ICU API ucol_setMaxVariable to be runtime instead. (#58485)

* Change compile time dependency of ICU API ucol_setMaxVariable to be runtime instead.

* Fix Android Build Break

3 years agoPass a null getter\setter with [JsonIgnore] and src gen (#58405)
Steve Harter [Thu, 2 Sep 2021 16:52:49 +0000 (11:52 -0500)]
Pass a null getter\setter with [JsonIgnore] and src gen (#58405)

3 years agoDisable fast path serialization for types with properties using custom converters...
Eirik Tsarpalis [Thu, 2 Sep 2021 16:45:25 +0000 (17:45 +0100)]
Disable fast path serialization for types with properties using custom converters. (#58291)

3 years agoReenable a few OperatingSystem tests on MacCatalyst (#58428)
Alexander Köplinger [Thu, 2 Sep 2021 16:18:44 +0000 (18:18 +0200)]
Reenable a few OperatingSystem tests on MacCatalyst (#58428)

https://github.com/dotnet/runtime/issues/56084 was fixed.

3 years ago[mono] win32 implementation of g_get_current_dir (#58523)
Radek Doulik [Thu, 2 Sep 2021 15:33:08 +0000 (17:33 +0200)]
[mono] win32 implementation of g_get_current_dir (#58523)

Fix https://github.com/dotnet/runtime/issues/56163

The getcwd call is returning the string encoded in system character
encoding instead of utf-8.

Use native GetCurrentDirectoryW call instead and convert to utf-8.

3 years ago[Group 1] Enable nullable annotations for `Microsoft.Extensions.DependencyModel`...
Maksym Koshovyi [Thu, 2 Sep 2021 14:17:30 +0000 (17:17 +0300)]
[Group 1] Enable nullable annotations for `Microsoft.Extensions.DependencyModel` (#57445)

* Annotate src

* Annotate ref

* Update ref csproj

* runtimeSignature can be null

* reader.GetString() can be null

* CodeBase is obsolete

* Update ref for HashCodeCombiner

* Annotate RuntimeAssetGroup

* Null check resolvers

* Update ReferenceAssemblyPathResolver's constructor

* DisableImplicitAssemblyReferences

* Use ProjectReference in ref

* PR feedback and fix build

* Fix unit tests -

* Don't throw for null assemblies in TryResolveAssemblyPaths
* Fix up ref source
* Fix RuntimeLibrary constructor overloads

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
3 years agoFix Console.Write on iOS (#56713)
Maxim Lipnin [Thu, 2 Sep 2021 13:53:31 +0000 (16:53 +0300)]
Fix Console.Write on iOS (#56713)

3 years agoFix netfx assets referencing netstandard ones (#58499)
Viktor Hofer [Thu, 2 Sep 2021 12:25:38 +0000 (14:25 +0200)]
Fix netfx assets referencing netstandard ones (#58499)

From 56894f09aaac6e635136dec68dfc174159911796.
A few projects didn't reference the .NETFramework assets in dependencies
and instead the .NETStandard ones.

Also a few assets specific a "-windows" RID even though they don't need
them. A .NETFramework "-windows" RID is only required when:
1. A netstandard2.0-windows tfm is present in the same project or
2. If a dependency is windows RID specific.

3 years ago[Main] Don't always build source build with ci flag (#58497)
Michael Simons [Thu, 2 Sep 2021 11:53:05 +0000 (06:53 -0500)]
[Main] Don't always build source build with ci flag  (#58497)

3 years agoEnable runtime tests with closed issues (#57720)
Egor Bogatov [Thu, 2 Sep 2021 11:29:13 +0000 (14:29 +0300)]
Enable runtime tests with closed issues (#57720)

* Enable tests with closed issues

3 years agoRun runtime tests marked as JitOptimizationSensitive on Mono. (#58106)
Johan Lorensson [Thu, 2 Sep 2021 08:02:06 +0000 (10:02 +0200)]
Run runtime tests marked as JitOptimizationSensitive on Mono. (#58106)

3 years agoFix dump generation segfault in DAC (#58530)
Mike McLaughlin [Thu, 2 Sep 2021 04:01:01 +0000 (21:01 -0700)]
Fix dump generation segfault in DAC (#58530)

Issue: https://github.com/dotnet/runtime/issues/58525

3 years agoMove the implementation of Win32Exception into System.Private.CoreLib (#58529)
Jeremy Koritzinsky [Thu, 2 Sep 2021 02:43:49 +0000 (19:43 -0700)]
Move the implementation of Win32Exception into System.Private.CoreLib (#58529)

Required for #57610

3 years agoConvert the check for stdatomic.h into a compile step as opposed (#58532)
Aaron Robinson [Thu, 2 Sep 2021 02:16:40 +0000 (19:16 -0700)]
Convert the check for stdatomic.h into a compile step as opposed (#58532)

to an existance check. This is done because MSVC's STL provides
 the file as compilable for C++23 but not currently for C11/C17.

3 years agoRename NGenHashTable to DacEnumerableHashTable to describe its unique feature and...
Jeremy Koritzinsky [Thu, 2 Sep 2021 01:48:00 +0000 (18:48 -0700)]
Rename NGenHashTable to DacEnumerableHashTable to describe its unique feature and remove dead code (#58080)

* Remove hot/warm/cold concept from ngenhash since hot/cold were already removed.

* Rename NgenHashTable to DacEnumerableHashTable since its last remaining defining feature is the fact that it has built-in DAC memory enumeration support.

Move the DAC memory enumeration customization to use the detection pattern so hash tables that don't need to use any custom entry enumeration don't have to provide a no-op method.

* Removed extraneous friend class statements.

* Clean up some more unused fields.

* Spelling fix

* Rename template macros

* Fix typo

* Apply suggestions from code review

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Update comment to remove all mentions of "persisted" as that was an NGEN-only concept.

* Remove unused includes.

* Remove mentions of "warm" and "ngen"

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
3 years agoUpdate native COM server tests to execute directly instead of using the Exe launcher...
Jeremy Koritzinsky [Thu, 2 Sep 2021 01:04:18 +0000 (18:04 -0700)]
Update native COM server tests to execute directly instead of using the Exe launcher program. (#58302)

* Update native COM server tests to execute directly instead of using the Exe launcher program.

* PR feedback.

* Fix typo

3 years agoDelete shutdown special handling in a few CoreCLR PAL methods (#58513)
Jan Kotas [Thu, 2 Sep 2021 00:07:45 +0000 (17:07 -0700)]
Delete shutdown special handling in a few CoreCLR PAL methods (#58513)

We have stopped suspending threads during shutdown quite a while ago. We have missed cleanup in this place for some reason.

Fixes #58466

3 years agoUpdate CompatibilitySuppressions after updating APICompat that uses references (...
Jose Perez Rodriguez [Wed, 1 Sep 2021 23:44:44 +0000 (16:44 -0700)]
Update CompatibilitySuppressions after updating APICompat that uses references (#58208)

3 years agoDelete unused loader test libraries (#58488)
Elinor Fung [Wed, 1 Sep 2021 22:54:14 +0000 (15:54 -0700)]
Delete unused loader test libraries (#58488)

Delete unused libraries under Loader/classloader/
  - **/regressions/
  - MethodTable/
  - Statics/
  - v1/Stress/Beta1/CLStressA/

3 years agoUse temporary ni.dll.tmp files with crossgen2 pipeline mode in order to not interfere...
Gleb Balykov [Wed, 1 Sep 2021 22:08:02 +0000 (01:08 +0300)]
Use temporary ni.dll.tmp files with crossgen2 pipeline mode in order to not interfere with crossgen2 itself (#57341)

* Use temporary ni.dll.tmp files with crossgen2 pipeline mode in order to not interfere with crossgen2 itself

* Add check that --single-file-compilation mode of crossgen2 is always used with --out-near-input

3 years ago[main] Update dependencies from 8 repositories (#58435)
dotnet-maestro[bot] [Wed, 1 Sep 2021 21:28:55 +0000 (23:28 +0200)]
[main] Update dependencies from 8 repositories (#58435)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210830.3

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21429.2 -> To Version 1.0.0-prerelease.21430.3

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 6.0.0-beta.21427.6 -> To Version 6.0.0-beta.21430.1

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 7.0.0-alpha.1.21423.1 -> To Version 7.0.0-alpha.1.21430.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21427.1 -> To Version 1.0.0-prerelease.21431.1

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

Microsoft.DotNet.CilStrip.Sources , 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.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
 From Version 7.0.0-beta.21423.2 -> To Version 7.0.0-beta.21430.2

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210830.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21427.1 -> To Version 1.0.2-alpha.0.21430.1

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

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.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 11.1.0-alpha.1.21423.1 -> To Version 11.1.0-alpha.1.21430.1

* Update dependencies from https://github.com/dotnet/sdk build 20210830.73

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21426.17 -> To Version 1.0.0-rc.1.21430.73

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210831.4

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21429.2 -> To Version 1.0.0-prerelease.21431.4

* Update Version.Details.xml

* Update Versions.props

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210831.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21427.1 -> To Version 1.0.2-alpha.0.21431.1

* Update dependencies from https://github.com/dotnet/sdk build 20210901.15

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21426.17 -> To Version 1.0.0-rc.1.21451.15

* Update Version.Details.xml

* Update Versions.props

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
3 years agoAdd RemoteInvokeOptions to EtwManifestGeneration test (#58478)
John Salem [Wed, 1 Sep 2021 21:03:55 +0000 (14:03 -0700)]
Add RemoteInvokeOptions to EtwManifestGeneration test (#58478)

* increase test timeout

* reduce timeout and add local copy to prevent need for marshalling

3 years agoAdd `Zero` property to `Quaternion`. (#58406)
Takym (たかやま) [Wed, 1 Sep 2021 20:03:25 +0000 (05:03 +0900)]
Add `Zero` property to `Quaternion`. (#58406)

* Add `Zero` and `IsZero` properties to `Quaternion`.

* Added test codes for Quaternion.Zero and IsZero.

* Update the reference assembly for Quaternion.

* Remove the `Quaternion.IsZero` property.

* Quaternion.Zero, change `default` to `new()`

* Update src/libraries/System.Private.CoreLib/src/System/Numerics/Quaternion.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update QuaternionTests.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoInitial document for JIT and GC stress usage (#58147)
Aaron Robinson [Wed, 1 Sep 2021 18:07:45 +0000 (11:07 -0700)]
Initial document for JIT and GC stress usage (#58147)

* Initial document for JIT and GC stress.

3 years agoJIT: Fix preheader weight computation (#58454)
Andy Ayers [Wed, 1 Sep 2021 18:05:53 +0000 (11:05 -0700)]
JIT: Fix preheader weight computation (#58454)

In some cases (currently only seen under pgo stress) we may have
edge count data that indicates a loop is not entered, and block count
data that indicates the loop is entered. Trust the block count data.

Fixes #58735.

3 years agoFix calculation of code size for AOT assemblies mixing JIT and LLVM (#58491)
Filip Navara [Wed, 1 Sep 2021 17:16:54 +0000 (19:16 +0200)]
Fix calculation of code size for AOT assemblies mixing JIT and LLVM (#58491)

Fixes #56100

Here's a little bit of background on the problem. When multiple AOT modules got linked into the same executable for iOS/MacCatalyst the LLVM and JIT code sections of different modules got interleaved. The resulting AOT module info looks something like this:

```
JIT start: 0x101002100 JIT end: 0x1010035e0
LLVM start: 0x104c027c8 LLVM end: 0x104c603e8
Sorted methods:
  0x101002250
  0x101002390
  0x101002470
  0x104c027c8
  0x104c027e0
  ...
```

The previous code incorrectly assumed that the third method had a code size `0x104c027c8 - 0x101002470`. When inserted into lookup table any of the AOT code inside the range `0x1010035e0 (JIT code end) - 0x104c027c8 (LLVM code start)` would incorrectly end up being mapped to the last JIT method.

(Note: The JIT name here is misleading.)

3 years agoIn reset_memory, check settings.entry_memory_load ... (#58350)
Peter Sollich [Wed, 1 Sep 2021 15:58:42 +0000 (17:58 +0200)]
In reset_memory, check settings.entry_memory_load ... (#58350)

in addition to g_low_memory_status - it looks like the latter is only set in response to low memory notifications from the OS - looks like this won't happen on Linux. This may also impact issue #52592 depending on actual memory load.

3 years ago[debugger] Avoid calling debugger_agent_single_step_from_context when thread is not...
Thays Grazia [Wed, 1 Sep 2021 15:41:35 +0000 (12:41 -0300)]
[debugger] Avoid calling debugger_agent_single_step_from_context when thread is not attached yet (#58467)

* Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1383962

* Fix {

3 years ago[Android] Add System.Net.Http ServerCertificateCustomValidationCallback ILLink Suppre...
Mitchell Hwang [Wed, 1 Sep 2021 15:35:35 +0000 (11:35 -0400)]
[Android] Add System.Net.Http ServerCertificateCustomValidationCallback ILLink Suppression (#58456)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoConditionally build allconfigurations (#58122) (#58493)
Dan Seefeldt [Wed, 1 Sep 2021 15:35:06 +0000 (10:35 -0500)]
Conditionally build allconfigurations (#58122) (#58493)

When building portable, only a subset of runtime needs to be
built.  allconfigurations is only needed in a non-portable build.

3 years agoRe-enable Vector3DistanceTest (#57077)
Tanner Gooding [Wed, 1 Sep 2021 13:58:38 +0000 (06:58 -0700)]
Re-enable Vector3DistanceTest (#57077)

3 years agoFix X509ChainElementCollection_CopyTo_NonZeroLowerBound_ThrowsIndexOutOfRangeExceptio...
Alexander Köplinger [Wed, 1 Sep 2021 08:39:48 +0000 (10:39 +0200)]
Fix X509ChainElementCollection_CopyTo_NonZeroLowerBound_ThrowsIndexOutOfRangeException test on Android (#58441)

It started to fail because the validity of the MicrosoftDotComSslCertBytes expired on 2021-08-29 22:17:02Z.
Since this test doesn't need to validate a specific expiration time we can just set the VerificationTime on the chain like we do in other tests.

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

3 years agoDelete `TruncateOrSignExtend32` (#56904)
SingleAccretion [Wed, 1 Sep 2021 08:05:18 +0000 (11:05 +0300)]
Delete `TruncateOrSignExtend32` (#56904)

* Introduce SetValueTruncating

As a less error-prone replacement of TruncateOrSignExtend32.
Add a comment header explaining its intended use case.

* Case $1

The code truncated, for unclear reasons (likely a copy & paste mistake),
the wrong node.

* Case $2

* Case $3

The old code was checking for the type of the shift node,
which is what we want. So that SetValueTruncating sees this
type, set it before setting the value itself.

* Delete TruncateOrSignExtend32

Constant integer nodes never have GTF_UNSIGNED set on them.
Additionally, zero-extending a TYP_INT const is incorrect.

3 years ago[QUIC] Add QuicStream.WaitForWriteCompletionAsync (#58236)
James Newton-King [Tue, 31 Aug 2021 23:43:11 +0000 (11:43 +1200)]
[QUIC] Add QuicStream.WaitForWriteCompletionAsync (#58236)

* Add QuicStream.WaitForWriteCompletionAsync

* Fix flakey mock stream tests

3 years agoRemove dead code in coreclr (#58420)
Elinor Fung [Tue, 31 Aug 2021 22:16:17 +0000 (15:16 -0700)]
Remove dead code in coreclr (#58420)

3 years agoAdd documentation to Microsoft.Extensions.Http (#57719)
resistr [Tue, 31 Aug 2021 20:28:06 +0000 (15:28 -0500)]
Add documentation to Microsoft.Extensions.Http (#57719)

Items Addressed:

- M:Microsoft.Extensions.Http.HttpMessageHandlerBuilder.CreateHandlerPipeline
    (System.Net.Http.HttpMessageHandler,System.Collections.Generic.IEnumerable{System.Net.Http.DelegatingHandler})
- M:Microsoft.Extensions.Http.IHttpMessageHandlerBuilderFilter.Configure
    (System.Action{Microsoft.Extensions.Http.HttpMessageHandlerBuilder})

Microsoft.Extensions.Http.Logging:
- M:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.#ctor(Microsoft.Extensions.Logging.ILogger)
- M:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.#ctor
    (Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Http.HttpClientFactoryOptions)
- M:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync
    (System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)
- M:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.#ctor(Microsoft.Extensions.Logging.ILogger)
- M:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.#ctor
    (Microsoft.Extensions.Logging.ILogger,Microsoft.Extensions.Http.HttpClientFactoryOptions)
- M:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync
    (System.Net.Http.HttpRequestMessage,System.Threading.CancellationToken)
- T:Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler
- T:Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler

Contributes to #43916