dotnet-bot [Wed, 15 Sep 2021 21:56:48 +0000 (21:56 +0000)]
Merge in 'release/6.0' changes
Matt Mitchell [Wed, 15 Sep 2021 21:53:54 +0000 (14:53 -0700)]
Set the publishing infra version to 3 (#59166)
Before this was not important because runtime was calling its own publishing tasks with the property explicitly set, but since the introduction of arcade powered source build this property is needed to avoid ArPow from defaulting to v2.
dotnet-bot [Wed, 15 Sep 2021 18:08:43 +0000 (18:08 +0000)]
Merge in 'release/6.0' changes
dotnet-bot [Wed, 15 Sep 2021 18:07:05 +0000 (18:07 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Wed, 15 Sep 2021 18:05:47 +0000 (11:05 -0700)]
Add SetLastError to GdiPlus methods (#59151)
System.Drawing uses the last Win32 error in CheckErrorStatus to try to
guess at why a GdiPlus draw method failed and ignore some failures.
This was broken in .NETCore when SetLastError was removed from PINvokes.
Bring back SetLastError for all PInvokes that use CheckErrorStatus.
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Omair Majid [Wed, 15 Sep 2021 18:05:20 +0000 (14:05 -0400)]
Don't force using the system libunwind for source-build (#58911)
Instead, use the runtime's normal detection logic to decide what to do.
Backport of https://github.com/dotnet/runtime/pull/58641 to release/6.0.
See: https://github.com/dotnet/source-build/issues/2408
github-actions[bot] [Wed, 15 Sep 2021 18:03:59 +0000 (11:03 -0700)]
[release/6.0] fix TLS 1.3 in WinHttpHandler (#59159)
* add W11 test queue
* move to release config
* move to x66
* fix tls13 detection
* disable failing EventLog tests
* Remove WIndows 11 from CI matrix
Co-authored-by: wfurt <tweinfurt@yahoo.com>
Co-authored-by: Jan Jahoda <jajahoda@microsoft.com>
dotnet-bot [Wed, 15 Sep 2021 17:49:57 +0000 (17:49 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Wed, 15 Sep 2021 17:45:55 +0000 (10:45 -0700)]
[release/6.0] fix SendAsync from impersonificated context with default credentials (#59155)
* fix SendAsync from inpersonificated context and default credentials
* add missing file
* remove dead code
* feedback from review
* name cleanup
Co-authored-by: wfurt <tweinfurt@yahoo.com>
dotnet-bot [Wed, 15 Sep 2021 17:29:07 +0000 (17:29 +0000)]
Merge in 'release/6.0' changes
Viktor Hofer [Wed, 15 Sep 2021 17:26:08 +0000 (19:26 +0200)]
Avoid unnecessary deps in M.E.Logging.Abstractions (#59162)
Fixes https://github.com/dotnet/runtime/issues/59161
The System.Buffers and System.Memory packages are
dependencies of the net6.0 M.E.Logging.Abstractions
library even though these libraries are part of the
.NETCoreApp shared framework.
It's undesirable to have the dependencies in the graph
as these aren't built live anymore and are only serviced
on demand.
dotnet-bot [Wed, 15 Sep 2021 14:24:54 +0000 (14:24 +0000)]
Merge in 'release/6.0' changes
Eric Erhardt [Wed, 15 Sep 2021 14:20:07 +0000 (08:20 -0600)]
Multi-target Json and Logger Source Generators between Roslyn v3.11 and v4.0 (#58446) (#59074)
* Multi-target LoggerMessageGenerator between Roslyn v3.11 and v4.0
* Include a .targets file in NuGet packages which will select the correct analyzer assembly depending on which Roslyn version will be used to compile.
* Multi-target JsonSourceGenerator between Roslyn v3.11 and v4.0
* Fix restore
* Update NuGet package MSBuild logic to detect when SupportsRoslynComponentVersioning is not available, and use the lowest analyzer available.
* Handle non-SDK projects by running after ResolveNuGetPackageAssets
* Respond to PR feedback
- Name .cs and .csproj files with Roslyn in the name
- Upgrade to Roslyn 3.11 so IsExplicitlyNamedTupleElement API is available
- Fix some references to the test projects
- Fix incremental pack of the analyzer targets
dotnet-bot [Wed, 15 Sep 2021 14:14:31 +0000 (14:14 +0000)]
Merge in 'release/6.0' changes
Koundinya Veluri [Wed, 15 Sep 2021 14:08:56 +0000 (07:08 -0700)]
Harden native gate thread against affinity mask growth (#59132)
Hardened ThreadpoolMgr::GateThreadStart against the possibility that the observed group-local affinity mask contains set bits at positions higher than the total group-local CPU count that was captured during earlier initialization.
This fixes customer-reported crashes which have occurred on multi-group machines with heterogenous CPU counts across groups (but the same crash can probably also occur on single-group VMs if CPUs are hot-added and are then manually added to the process affinity mask).
dotnet-bot [Wed, 15 Sep 2021 13:26:20 +0000 (13:26 +0000)]
Merge in 'release/6.0' changes
dotnet-bot [Wed, 15 Sep 2021 13:25:06 +0000 (13:25 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Wed, 15 Sep 2021 13:23:31 +0000 (15:23 +0200)]
[release/6.0] [mono] Update attribute name used for controlling frame pointer elimination (#59091)
Co-authored-by: Imran Hameed <imhameed@microsoft.com>
Ankit Jain [Wed, 15 Sep 2021 13:21:47 +0000 (13:21 +0000)]
[release/6.0] WasmAppBuilder: publish only once per target framework instead of invoking publish explicitly. (#59136)
dotnet-bot [Wed, 15 Sep 2021 13:19:43 +0000 (13:19 +0000)]
Merge in 'release/6.0' changes
Ankit Jain [Wed, 15 Sep 2021 13:16:48 +0000 (13:16 +0000)]
[release/6.0][wasm] Add support for native relinking after Build, and AOT after publish (#58913)
dotnet-maestro[bot] [Wed, 15 Sep 2021 13:16:06 +0000 (15:16 +0200)]
[release/6.0] Update dependencies from dotnet/emsdk dotnet/arcade (#59081)
* Update dependencies from https://github.com/dotnet/arcade build
20210910.7
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.21460.7
* Update dependencies from https://github.com/dotnet/emsdk build
20210914.2
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.0-rc.2.21451.1 -> To Version 6.0.0-rtm.21464.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-bot [Wed, 15 Sep 2021 09:07:54 +0000 (09:07 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Wed, 15 Sep 2021 09:03:23 +0000 (02:03 -0700)]
[Tell-mode][release/6.0] Use arcade power source build infra (#59108)
* add yml files
* add file version and condition package reference on source build
* to avoid copying the file from the cache
Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
dotnet-bot [Wed, 15 Sep 2021 06:33:26 +0000 (06:33 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Wed, 15 Sep 2021 06:29:51 +0000 (08:29 +0200)]
[release/6.0] Use caching ConsoleStream for both iOS and Android (#59088)
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
dotnet-bot [Wed, 15 Sep 2021 06:15:41 +0000 (06:15 +0000)]
Merge in 'release/6.0' changes
imhameed [Wed, 15 Sep 2021 06:12:27 +0000 (02:12 -0400)]
[release/6.0] [mono] Use SROA-friendly struct type declarations (#59060)
github-actions[bot] [Wed, 15 Sep 2021 02:27:03 +0000 (20:27 -0600)]
Remove SupportedOSPlatforms windows on Hosting WindowsServices (#59064)
Fix #59037
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
dotnet-bot [Wed, 15 Sep 2021 00:35:44 +0000 (00:35 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Wed, 15 Sep 2021 00:33:02 +0000 (17:33 -0700)]
[release/6.0] Increment source generator assembly versions with every build (#58919)
* increment source generator assembly versions with every build
* use isGenerator Project property
* add comment
* Replacement tokens in logging test baseline files (#58220)
* Replacement tokens in logging test baseline files
Instead of using a hardcoded version of the assembly version
on the logging generated baseline files used by tests we use
replacement tokens and at runtime we replace them.
fixes #58175
Co-authored-by: Anirudh Agnihotry <anagniho@microsoft.com>
Co-authored-by: Allan Targino <13934447+allantargino@users.noreply.github.com>
dotnet-bot [Tue, 14 Sep 2021 23:36:16 +0000 (23:36 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Tue, 14 Sep 2021 23:32:23 +0000 (16:32 -0700)]
[release/6.0] Remove benign assert (#59044)
* Remove benign assert
It is perfectly possible for us to replace a promoted struct by its only
field where that field is marked do-not-enregister. Since this path does
handle the proper retyping when normalization is required this assertion
is benign.
Fix #58972
* Fix test
Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
dotnet-bot [Tue, 14 Sep 2021 22:25:38 +0000 (22:25 +0000)]
Merge in 'release/6.0' changes
github-actions[bot] [Tue, 14 Sep 2021 22:21:17 +0000 (15:21 -0700)]
Fix sample profiler resolution on Windows. (#59056)
If sample profiler was initially created before sampling has been
enabled, happens when setting up sessions during startup,
sample_profiler_load_dependecies won't get called, meaning we won't
setup timeBeginPeriod/timeEndPeriod on Windows, and won't adjust
default scheduling resolution to 1ms staying on default 16ms.
There is a ref count check in current sample_profiler_enable checking
if we should call sample_profiler_load_dependecies (_ref_count == 0),
but in case where we can't start profiling _can_start_sampling == false,
we won't call sample_profiler_enable but always increase _ref_count
that in turn will prevent calls to sample_profiler_load_dependecies when
enabling sample profiler and that in turn won't call timeBeginPeriod
staying on default scheduling resolution.
Fix is to always call sample_profiler_load_dependecies making sure we
will setup needed dependencies when _ref_count == 0.
Co-authored-by: lateralusX <lateralusx.github@gmail.com>
Jose Perez Rodriguez [Tue, 14 Sep 2021 17:44:55 +0000 (17:44 +0000)]
Merged PR 17575: [Release 6.0] Fix StartTLS in DirectoryService.Protocols in 6.0 and backport changes from 5.0 release.
Supersedes https://dev.azure.com/dnceng/internal/_git/dotnet-runtime/pullrequest/17428 for release/6.0 branch.
github-actions[bot] [Tue, 14 Sep 2021 16:26:29 +0000 (10:26 -0600)]
[release/6.0] Support JsonExtensionData in STJ source-gen (#59047)
* Support JsonExtensionData in STJ source-gen
* Address review feedback
Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
github-actions[bot] [Tue, 14 Sep 2021 16:03:43 +0000 (10:03 -0600)]
[release/6.0] Change PKCS12 password to assist with credscan (#59080)
* Change PKCS12 password to assist with credscan
* Use placeholder for password
Co-authored-by: Kevin Jones <kevin@vcsjones.com>
github-actions[bot] [Tue, 14 Sep 2021 07:49:59 +0000 (09:49 +0200)]
[wasm] Fix circular dependency in WasmAppBuilder (#58905)
Fixes https://github.com/dotnet/runtime/issues/58816
Co-authored-by: Ankit Jain <radical@gmail.com>
github-actions[bot] [Tue, 14 Sep 2021 07:48:34 +0000 (09:48 +0200)]
[release/6.0] [wasm][debugger] Fix pause on exception behavior (#58895)
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Thays <thaystg@gmail.com>
github-actions[bot] [Tue, 14 Sep 2021 07:48:00 +0000 (09:48 +0200)]
[release/6.0] [tvOS] Be less eager in creating the non-existent special folders (#59024)
Co-authored-by: Filip Navara <navara@emclient.com>
github-actions[bot] [Tue, 14 Sep 2021 06:52:58 +0000 (23:52 -0700)]
[release/6.0] Set generic type arguments nullability for value types (#58390)
* Set generic type arguments nullability for value types
* Skip test on mono
* Apply commment
* Separate var name parts with _
* Reflection nullability API: improve test coverage, fix bug found (#58479)
* Add/remove some tests, fix generics indexing bug
Co-authored-by: Buyaa Namnan <bunamnan@microsoft.com>
Bill Wert [Mon, 13 Sep 2021 23:32:33 +0000 (16:32 -0700)]
Fix variables names in perf automation (#59046)
github-actions[bot] [Mon, 13 Sep 2021 17:35:30 +0000 (13:35 -0400)]
[release/6.0] [wasm][debugger] Clear cache after don't stop in a conditional breakpoint (#58910)
Backport of #58908 to release/6.0
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1390250?src=WorkItemMention&src-action=artifact_link
github-actions[bot] [Mon, 13 Sep 2021 17:27:16 +0000 (11:27 -0600)]
[release/6.0] Throw on unsupported types in src gen (#58983)
* Throw on unsupported types in src gen
* Misc non-functional changes and feedback
* Fix typo
* Change disallowed terminology to unsupported
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
github-actions[bot] [Mon, 13 Sep 2021 16:52:13 +0000 (09:52 -0700)]
Deadlock during rundown using interpreter. (#59023)
Identified deadlock between finalizer thread and rundown enumerating
all interpreter method. Since rundown will query for method name
in callback when iterating interpreter methods, interp_jit_info_foreach,
that might lead to additional loader activity. The hash map in
interpreter keeping the methods is locked with default JIT memory manager,
but since the callback might end up in mono_class_create_from_typedef
that will take loader lock, we get the following lock order on that
code path, memory manager->loader lock. Finalizer thread invokes
OnThreadExiting using interpreter and that might end up with a reverse
lock order, loader lock->memory manager on that code path, so these
two have a potential to deadlock. This is not a problem under JIT
or AOT since the JIT hash table is lock free therefore not causing
any deadlocks due to lock order between memory manager and loader lock.
Could be fixed by changing into a lock free hash table in interpreters
for interp_code_hash might be to risky at this point. A more safe fix
is to take a copy of the pointers while holding lock and then iterate
using local copy (simple array of pointers). Since this method is
only called during rundown, only when using interpreter, and only
include the pointers (InterpMethod *) we use with the callback,
it will have some temporary memory impact (allocating an array
of pointers), but will mitigate the deadlock since we can safely
call iterator callback without holding the lock. It will also
improve interpreter performance in situations where we run session
rundown, since lock will be held a much shorter amount of time.
Co-authored-by: lateralusX <lateralusx.github@gmail.com>
github-actions[bot] [Mon, 13 Sep 2021 16:52:00 +0000 (09:52 -0700)]
[release/6.0] [mini] Use alloca for runtime_invoke retval buffer (#59006)
* [mini] Use alloca for runtime_invoke retval buffer
Fixes https://github.com/dotnet/runtime/issues/58957
Related to https://github.com/dotnet/runtime/pull/58215 which was attempting to
fix https://github.com/dotnet/runtime/issues/58190
* Set initial return buffer size to TARGET_SIZEOF_VOID_P
In the common case we use the return buffer just to hold a pointer to
the return value
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
Co-authored-by: Aleksey Kliger <aleksey@lambdageek.org>
David Cantú [Mon, 13 Sep 2021 16:44:10 +0000 (09:44 -0700)]
Address Windows recommendations for Link APIs (#58592) (#58926)
* NT prefix shall not be treated as a relative path
* Remove file-folder-match validation
* Use SubstituteName instead of PrintName since the latter is just for display and can be misleading
* Fix MS.IO.Redist
* Fix whitespace in Strings.resx
* Address suggestions
github-actions[bot] [Mon, 13 Sep 2021 16:43:51 +0000 (09:43 -0700)]
[release/6.0] [tasks] [net472] Add ProjectReferences to JsonToItemsTaskFactory (#58917)
* [tasks] [net472] Add ProjectReferences to JsonToItemsTaskFactory
Reference the same versions of System.Threding.Tasks.Extensions and
System.Text.Json that MSBuild in Visual Studio 2022 uses.
Fixes build errors on maui-ios (and possibly blazorwasm) targets on Windows
like:
```
System.MissingMethodException: Method not found: 'System.Threading.Tasks.ValueTask`1<!!0> System.Text.Json.JsonSerializer.DeserializeAsync(System.IO.Stream, System.Text.Json.JsonSerializerOptions, System.Threading.CancellationToken)'.
at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.<GetJsonAsync>d__24.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.GetJsonAsync(String jsonFilePath, FileStream file)
at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.TryGetJson(String jsonFilePath, JsonModelRoot& json)
at JsonToItemsTaskFactory.JsonToItemsTaskFactory.JsonToItemsTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at
Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
```
from `C:\Program
Files\dotnet\packs\Microsoft.NET.Runtime.MonoTargets.Sdk\6.0.0-rc.1.21451.13\Sdk\RuntimeComponentManifest.targets`
* assembly version is 4.2.0.1, but nuget version is 4.5.4, apparently
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
Mitchell Hwang [Mon, 13 Sep 2021 14:46:42 +0000 (10:46 -0400)]
[release/6.0] Skip test suites crashing on CI for iOS/tvOS/MacCatalyst and test fixes for Android (#58841)
Manual backport of #57208, #58519, #58562, #58210, #57732, #58428, #58586, #58745, #57687 to release/6.0
Numerous test suites have been failing for iOS/tvOS/MacCatalyst consistently on CI without useful logs as to why. Moreover, some of these suites pass locally.
This PR looks to reduce the failures on CI by skipping the problematic suites
Skips test suites logged in #53624
ActiveIssues
#58440
#58418
#58367
#58584
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Jo Shields <directhex@apebox.org>
github-actions[bot] [Mon, 13 Sep 2021 14:41:06 +0000 (07:41 -0700)]
Fix SIMD temp register interference (#58990)
On Windows/x86, if a call returns a SIMD8 in two registers
(eax, edx), and needs to be assembled and stored into a single
SIMD register, AND we don't have the SSE41 ABI available (because
the hardware doesn't support it, or we specifically disable it),
then we need a temporary register. In the failure case, the target
register and temporary register were the same, and then interfered
with each other. The fix is to force the temporary register to
be different from the target register.
Fixes #58899
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
dotnet-maestro[bot] [Sat, 11 Sep 2021 10:12:26 +0000 (12:12 +0200)]
Update dependencies from https://github.com/dotnet/runtime-assets build
20210910.2 (#58936)
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 6.0.0-beta.21457.5 -> To Version 6.0.0-beta.21460.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Alicia Li [Fri, 10 Sep 2021 20:54:44 +0000 (13:54 -0700)]
Add crossgen2 runs for x86 (#58053) (#58892)
* Add crossgen2 runs for x86 and Arm64
* Remove Arm64 for now
Co-authored-by: Drew Scoggins <anscoggi@microsoft.com>
github-actions[bot] [Fri, 10 Sep 2021 18:09:33 +0000 (11:09 -0700)]
[release/6.0] Use separate VNs for DBL2INT_OVF helpers (#58931)
* Use separate VNs for DBL2INT_OVF helpers
* Update Runtime_58832.cs
Co-authored-by: EgorBo <egorbo@gmail.com>
github-actions[bot] [Fri, 10 Sep 2021 18:08:53 +0000 (11:08 -0700)]
[release/6.0] Consider finally that jumps to itself as non-empty (#58881)
* decrement the reference of unreachable finally
* Proper fix
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
github-actions[bot] [Fri, 10 Sep 2021 18:07:30 +0000 (11:07 -0700)]
[release/6.0] Add cast when replacing promoted struct with field in lowering (#58951)
* Add cast when replacing promoted struct with field in lowering
We may need to sign/zero-extend when we do this replacement very late.
Normally this cast would be inserted in morph.
Fix #58373
* Add test
* Fix formatting
* Fix test cases
* Type returned-struct-as-primitive correctly for normalization
Retyping it to the type of the ret node is not right when reinterpreting
small structs as a type that needs to be normalized.
* Fix assertion
* Run jit-format
Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
dotnet-maestro[bot] [Fri, 10 Sep 2021 16:02:51 +0000 (18:02 +0200)]
Update dependencies from https://github.com/mono/linker build
20210909.1 (#58888)
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.6.21424.4 -> To Version 6.0.100-1.21459.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
github-actions[bot] [Fri, 10 Sep 2021 16:01:39 +0000 (18:01 +0200)]
Report correct DLL name when P/Invoke lookup fails (#58863)
Without this PR when a P/Invoke lookup fails we'll return an exception message that refers to `libcoreclr` instead of the real native library name since we have logic to retry the lookup using libcoreclr. This is very confusing for customers as can be seen in https://github.com/dotnet/runtime/issues/58185.
Co-authored-by: Filip Navara <navara@emclient.com>
Alexander Köplinger [Fri, 10 Sep 2021 15:36:11 +0000 (17:36 +0200)]
[release/6.0] Fix an issue with ILStripping mscorlib.dll (#58935)
We considered mscorlib.dll as the "core" assembly instead of System.Private.CoreLib.dll which meant Cecil hit an issue while resolving types in it.
This only happened when the IL Linker was not being used since it'd have removed the mscorlib.dll facade.
Brings in https://github.com/dotnet/runtime-assets/pull/176
Koundinya Veluri [Fri, 10 Sep 2021 13:44:15 +0000 (06:44 -0700)]
Add info about .NET 6 compatibility with Intel CET shadow stacks and how to try it (#58891)
github-actions[bot] [Fri, 10 Sep 2021 13:42:20 +0000 (06:42 -0700)]
[release/6.0] Fix publishing symbols for `dotnet` and `hostpolicy` (#58902)
* Fix symbol package output path for host pkgproj
* Update src/installer/pkg/projects/Directory.Build.targets
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Juan Hoyos [Fri, 10 Sep 2021 13:40:17 +0000 (06:40 -0700)]
Enhance CrossGen2 to emit PerfMap debug directory entry (#58929)
This is used to correlate PE's with their corresponding PerfMaps. For example the header in the perfmap could be:
```
FFFFFFFF 00
026D4D21B3EE3D93843FF7A964235822
FFFFFFFE 00 1
FFFFFFFD 00 1
FFFFFFFC 00 3
FFFFFFFB 00 1
```
And the PE will have the corresponding entries in the PE as:
```
PerfMap (Type 21):
System.Private.CoreLib.ni.r2rmap, Signature =
026d4d21b3ee3d93843ff7a964235822, Version = 1
```
github-actions[bot] [Fri, 10 Sep 2021 04:01:15 +0000 (22:01 -0600)]
Ignore the DuplicateExtension status from macOS 12. (#58889)
MacOS 12 introduces a new X.509 chain status, DuplicateExtension. As we do not report this in Windows and nor do we have a flag to map it to, we ignore it from macOS.
Co-authored-by: Kevin Jones <kevin@vcsjones.com>
github-actions[bot] [Thu, 9 Sep 2021 18:18:26 +0000 (11:18 -0700)]
[release/6.0] Fix incorrect SIMD temp allocation for Vector256 with AVX2 disabled (#58850)
* Fix incorrect SIMD temp allocation for Vector256 with AVX2 disabled
The NI_Vector256_GetElement intrinsic, in some situations, requires
a stack temporary. With AVX2 disabled, this temporary was getting
allocated as a TYP_SIMD16 instead of a TYP_SIMD32, leading to overwriting
the local variable.
Add a type argument to the temp variable allocation, and allocate the
temp as the largest sized type required by any use.
Fixes #58295
* Code review change: improve arm64 SIMD temp creation type
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Andy Gocke [Thu, 9 Sep 2021 17:50:27 +0000 (10:50 -0700)]
Add linker flags to add fixup data to PDBs (#58417)
Fixup data can assist native debugging tools in providing more accurate data
Alicia Li [Thu, 9 Sep 2021 16:34:21 +0000 (09:34 -0700)]
Port fixes for perf pipeline from main branch (#58843)
* fix merge conflict
* Fix ios build (#57776)
* add deployandrun to ios
* build with DEPLOY_AND_RUN=false for ios
Co-authored-by: Bill Wert <billwert@microsoft.com>
github-actions[bot] [Thu, 9 Sep 2021 15:00:11 +0000 (09:00 -0600)]
[release/6.0] Fix Windows 8 detection in Pbkdf2 (#58823)
* Fix Windows 8 detection.
Windows 8's actual version is 6.2, not 8. The test would succeed only on Windows 10+.
* Explain that Windows 8's version is 6.2.
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Theodore Tsirpanis <12659251+teo-tsirpanis@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
github-actions[bot] [Thu, 9 Sep 2021 14:58:51 +0000 (08:58 -0600)]
[release/6.0] Add explicit APIs to Double/Single/Half/TimeOnly (#58845)
* Add explicit APIs to Double/Single/Half/TimeOnly
* sq
* Fix get accessor in ref
Co-authored-by: Prashanth Govindarajan <prgovi@microsoft.com>
github-actions[bot] [Thu, 9 Sep 2021 13:13:38 +0000 (15:13 +0200)]
Use non-deprecated Android Helix queue (#58862)
Ubuntu.1804.Amd64.Android.Open was redirected to Ubuntu.1804.Amd64.Android.29.Open, use that in the .yml
Fixes https://github.com/dotnet/core-eng/issues/13179
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
github-actions[bot] [Wed, 8 Sep 2021 21:18:53 +0000 (15:18 -0600)]
[release/6.0] Support duplicated type names with src gen (#58766)
* Support duplicated type names with src gen
* Move helpers to common location
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
dotnet-maestro[bot] [Wed, 8 Sep 2021 17:39:49 +0000 (10:39 -0700)]
Update dependencies from https://github.com/dotnet/runtime-assets build
20210907.5 (#58797)
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 6.0.0-beta.21430.1 -> To Version 6.0.0-beta.21457.5
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
github-actions[bot] [Wed, 8 Sep 2021 17:39:13 +0000 (10:39 -0700)]
[release/6.0] Always write sample events in EventPipe based on sample frequency. (#58761)
* Always write sample events in EventPipe based on sample frequency.
If no managed frames (including helper frames) are located on stack,
sample was dropped and not emitted into EventPipe. This cause issues
in tooling that try to do thread time calculations based on sample,
especially in cases where embedded threads returned to native
code during several samples before calling back into runtime. In such
scenarios the last sampled event would be prolonged, giving false
information that that stackframe lasted much longer than it really did.
Always writing samples into EventPipe will also visualize time an attached
thread spend outside of runtime, not running managed code.
* Adjust included profiler samples.
Only include external samples still on top fram (no callstack) or
managed/external samples includig a callstack.
Co-authored-by: lateralusX <lateralusx.github@gmail.com>
github-actions[bot] [Wed, 8 Sep 2021 17:38:57 +0000 (10:38 -0700)]
Make sure EventPipe streaming thread won't write session->streaming_thread after session free. (#58710)
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.
Co-authored-by: lateralusX <lateralusx.github@gmail.com>
Alexander Köplinger [Wed, 8 Sep 2021 07:32:11 +0000 (09:32 +0200)]
Change namespace of embedded Cecil in ILStrip task (#58763)
We hit a case where the ILStrip task assembly is IL-merged with a few other task assemblies on the Xamarin side which causes a clash because of trying to merge different Mono.Cecil versions.
Rename the Mono.Cecil used here to avoid that clash. Brings in https://github.com/dotnet/runtime-assets/pull/169
github-actions[bot] [Wed, 8 Sep 2021 07:15:46 +0000 (09:15 +0200)]
[release/6.0] Add System.Net.Http ServerCertificateCustomValidationCallback ILLink Suppression (#58508)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
github-actions[bot] [Wed, 8 Sep 2021 04:45:29 +0000 (22:45 -0600)]
[release/6.0] Fix detection of unsupported links (#58399)
* Fix detection of unsupported links
* Add Directory.Exists check
* Fix CI issue caused by local testing code
Co-authored-by: David Cantu <dacantu@microsoft.com>
github-actions[bot] [Wed, 8 Sep 2021 04:43:25 +0000 (22:43 -0600)]
Stop using ERR_GET_FUNC, since it has been removed in OSSL3 Beta2. (#57879)
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
github-actions[bot] [Wed, 8 Sep 2021 01:50:45 +0000 (19:50 -0600)]
fix ValueTuple source generation support (#58723)
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
github-actions[bot] [Wed, 8 Sep 2021 01:49:28 +0000 (19:49 -0600)]
[release/6.0] Increase some of the DnsEndPointTest timeouts (#58617)
* Increase some of the DnsEndPointTest timeouts
* remove accidental comment
* PassingTestTimeout -> PassingTestShortTimeout & PassingTestLongTimeout
* undo renaming PassingTestTimeout
* remove whitespaces VS inserted
* whitespaces
* whitespaces
Co-authored-by: Anton Firszov <antonfir@gmail.com>
github-actions[bot] [Wed, 8 Sep 2021 01:40:01 +0000 (19:40 -0600)]
[release/6.0] The signal enum in the native library should match the managed code. (#58682)
* The signal enum in the native library should match the managed code.
* PosixSignalRegistrationTests.Unix: validate signal pal mapping (#58711)
* PosixSignalRegistrationTests.Unix: validate signal pal mapping
* Use InvariantCulture for pid ToString
* Invoke kill through shell.
* Remove InvariantCulture
Co-authored-by: James Truher <jimtru@microsoft.com>
Co-authored-by: Tom Deseyn <tom.deseyn@gmail.com>
github-actions[bot] [Tue, 7 Sep 2021 23:30:26 +0000 (16:30 -0700)]
[release/6.0] Skip allocation for ZeroInit writeThru intervals (#58767)
* Do not allocate register if ZeroInit/EHWriteThru
* Update the comments about zero-init heuristics
* jit format
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
github-actions[bot] [Tue, 7 Sep 2021 18:18:08 +0000 (11:18 -0700)]
[release/6.0] Support JsonConverterFactory with src-gen (#58652)
* Support JsonConverterFactory with src-gen
* Support property factory converters
* Fixup merge ordering; add tests
* Ensure context helper methods properly generated for implicit context types
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
github-actions[bot] [Tue, 7 Sep 2021 17:46:01 +0000 (11:46 -0600)]
[release/6.0] add TLS 1.3 support to WinHttp (#58718)
* add TLS 1.3 support to WinHttp
* remove extra line
* fix comment
* add check if WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3 is supported
Co-authored-by: wfurt <tweinfurt@yahoo.com>
github-actions[bot] [Tue, 7 Sep 2021 17:37:46 +0000 (10:37 -0700)]
[release/6.0] Undo struct promotion on "RetInd" code path (#58602)
* 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
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
github-actions[bot] [Tue, 7 Sep 2021 17:36:54 +0000 (10:36 -0700)]
Add support for variance to IDIC (#58670)
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
github-actions[bot] [Tue, 7 Sep 2021 17:35:56 +0000 (10:35 -0700)]
[release/6.0] [mini] Don't add unbox tramopline on generic DIM calls (#58585)
* [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
Co-authored-by: Aleksey Kliger <alklig@microsoft.com>
github-actions[bot] [Tue, 7 Sep 2021 17:27:24 +0000 (10:27 -0700)]
Disable offending H/3 op causing server errors (#58541)
Co-authored-by: ManickaP <mapichov@microsoft.com>
github-actions[bot] [Tue, 7 Sep 2021 15:30:43 +0000 (17:30 +0200)]
[release/6.0] [mono] win32 implementation of g_get_current_dir (#58555)
Co-authored-by: Radek Doulik <radekdoulik@gmail.com>
Viktor Hofer [Sat, 4 Sep 2021 08:42:06 +0000 (10:42 +0200)]
Replace S.S.Permissions ref with AccessControl in S.S.C.Xml (#58666)
56894f09aaac6e635136dec68dfc174159911796 brought the
System.Security.AccessControl library and package back but
in the change, the reference in System.Security.Cryptography.Xml
to System.Security.Permissions wasn't replaced with the reference
to System.Security.AccessControl.
github-actions[bot] [Fri, 3 Sep 2021 18:59:45 +0000 (12:59 -0600)]
Disable fast path serialization for types with properties using custom converters. (#58571)
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
github-actions[bot] [Fri, 3 Sep 2021 18:30:37 +0000 (11:30 -0700)]
[release/6.0] Fix crossgen2 calli GC hole by unifying MethodDesc/MethodSignature IsMarshallingRequired logic (#58609)
* Unify MethodDesc/MethodSignature IsMarshallingRequired logic
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
* Add a simple regression test
* Fix test build
Co-authored-by: Jakob Botsch Nielsen <jakob.botsch.nielsen@gmail.com>
github-actions[bot] [Fri, 3 Sep 2021 17:27:28 +0000 (10:27 -0700)]
run System.IO.Tests .NET 5 compat tests on every OS (#58613)
Co-authored-by: Adam Sitnik <adam.sitnik@microsoft.com>
github-actions[bot] [Fri, 3 Sep 2021 14:59:27 +0000 (16:59 +0200)]
Fix source-build on the s390x platform (#58618)
* Do not disable Mono in source-build if it is the primary runtime
Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Maxim Lipnin [Fri, 3 Sep 2021 11:46:00 +0000 (14:46 +0300)]
Fix Console.Write on iOS (#56713) (#58559)
Backport of https://github.com/dotnet/runtime/pull/56713
github-actions[bot] [Fri, 3 Sep 2021 00:13:52 +0000 (18:13 -0600)]
Pass a null getter\setter with [JsonIgnore] and src gen (#58572)
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
github-actions[bot] [Thu, 2 Sep 2021 23:19:14 +0000 (16:19 -0700)]
[release/6.0] Cleaned up version of earlier PR #48601. (#58544)
* Cleaned up version of earlier PR #48601.
* Address code review feedback.
* Take out changes in dt_high_frag_p - probably no longer necessary.
Remove changes for the heap_hard_limit case - we'll do those later.
Fixed another place where I had called generation_sizes instead of generation_size.
* Fixed parameter for call to generation_size.
* Update comment to the more explicit version in .NET Framework.
* Added parentheses around an expression to address code review feedback.
Co-authored-by: Peter Sollich <petersol@microsoft.com>
github-actions[bot] [Thu, 2 Sep 2021 20:43:20 +0000 (13:43 -0700)]
[release/6.0] In reset_memory, check settings.entry_memory_load ... (#58543)
* In reset_memory, check settings.entry_memory_load in addition to g_low_memory_status - it looks like the latter won't be set on Linux.
* Factor out common logic for detecting high memory load.
* Make high_memory_load_p a member function of gc_heap and rename to dt_high_memory_load_p.
Co-authored-by: Peter Sollich <petersol@microsoft.com>
github-actions[bot] [Thu, 2 Sep 2021 20:43:02 +0000 (13:43 -0700)]
Fix trim_youngest_desired for the case of high memory load and huge main memory - the return value should never be larger than total_new_allocation. (#58538)
Co-authored-by: Peter Sollich <petersol@microsoft.com>
github-actions[bot] [Thu, 2 Sep 2021 18:57:34 +0000 (12:57 -0600)]
[release/6.0] [HTTP/3] Fix content stream read hang (#58460)
* Fix HTTP/3 content stream read hang
* Fix hang if full data frame is not available
Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
Michael Simons [Thu, 2 Sep 2021 18:23:57 +0000 (13:23 -0500)]
Conditionally pack symbols based on keepNativeSymbols (#58565)
* Conditionally pack symbols based on keepNativeSymbols
* Fix casing issue
* Add clarifing comment