Zoltan Varga [Tue, 3 Aug 2021 15:24:52 +0000 (11:24 -0400)]
[mono] Remove gdb xdebug and binary writer support, it hasn't worked in a while. (#56759)
* [mono] Remove gdb xdebug support, it hasn't worked in a while.
* [mono] Remove binary writer code, it haven't been used or worked in a while.
* Remove MONO_DEBUG=gdb option.
Chris Ross [Tue, 3 Aug 2021 14:48:59 +0000 (07:48 -0700)]
Update windows-requirements.md (#56476)
Steve Harter [Tue, 3 Aug 2021 14:17:57 +0000 (09:17 -0500)]
Update doc and generic parameter name for JsonValue.GetValue (#56639)
Thays Grazia [Tue, 3 Aug 2021 13:58:00 +0000 (10:58 -0300)]
[wasm][debugger] Inspect static class (#56740)
* Trying to fix 45104
* Implementing getting property and checking failures.
* Fix android compilation
Jan Vorlicek [Tue, 3 Aug 2021 12:43:14 +0000 (14:43 +0200)]
Fix stack overflow handling issue in GC stress (#56733)
This change fixes a problem when in GC stress mode 3, GC started to run
on the thread that hit stack overflow due to the GCX_PREEMP in
DebuggerRCThread::DoFavor that is called from the
EEPolicy::HandleFatalStackOverflow. It was causing failures in the CI.
The issue is GC stress specific, the GCX_PREEMP would not start running
GC on the current thread in regular cases.
The fix is to inhibit GC stress in the HandleFatalStackOverflow.
Maxim Lipnin [Tue, 3 Aug 2021 09:27:15 +0000 (12:27 +0300)]
Use ReflectionOnly as serialization mode in case dynamic code runtime feature is not supported (#56604)
Viktor Hofer [Tue, 3 Aug 2021 08:46:24 +0000 (10:46 +0200)]
Move Windows Compat pack to NuGet pack task (#56686)
* Move Windows Compat pack to NuGet pack task
This is a straight port from pkgproj to csproj and also enables building
the compat pack together with its dependencies.
As usual, if the compat pack alone should be built (i.e. for inner loop
tests), the `--no-dependencies` flag should be used,
i.e. `dotnet build --no-dependencies` or `dotnet pack --no-build`.
* Fix traversal builds and don't overbuild packages
* Update libraries-packages.proj
Santiago Fernandez Madero [Tue, 3 Aug 2021 06:33:41 +0000 (23:33 -0700)]
Fix build error when building some packages (#56767)
* Fix build error when building some packages
* Actually move declaration to Directory.Build.targets as they should be used in other scenarios
Michal Strehovský [Tue, 3 Aug 2021 05:34:45 +0000 (14:34 +0900)]
Simplify JIT shutdown logic in crossgen2 (#56687)
There was unanswered comment about thread safety in https://github.com/dotnet/runtime/pull/56187/files#r675461236 so I just decided to fix it myself.
While on it, I simplified shutdown to use `AppDomain.ProcessExit`.
I'm not sure `AppDomain.UnhandledException` is needed but the original code had this in a `finally`.
The better fix would be to allow JIT to be initialized right before we start a compilation and shut down after, but that would require no process wide state in the JIT. As it stands now, JIT is once-per-process-global.
Juan Hoyos [Tue, 3 Aug 2021 05:25:32 +0000 (22:25 -0700)]
Fix race in crossdac publishing with PGO (#56762)
Sychev Vadim [Tue, 3 Aug 2021 03:30:14 +0000 (06:30 +0300)]
Add DictionaryKeyPolicy support for EnumConverter [#47765] (#54429)
* Add DictionaryKeyPolicy support for EnumConverter [#47765]
* Moved DictionaryKeyPolicy parsing code to WriteWithQuotes [#47765]
* Refactored the bugfix in accordance to the comments (#47765)
* Made few minor corrections (#47765)
Aaron Robinson [Tue, 3 Aug 2021 01:08:45 +0000 (18:08 -0700)]
Use ComWrappers in some Marshal unit-tests and update platform metadata (#56595)
* Remove the SupportedOSPlatform attribute from the ComWrappers API.
* Test the Marshal.QueryInterface, Marshal.AddRef, and Marshal.Release
using ComWrappers.
Santiago Fernandez Madero [Tue, 3 Aug 2021 00:42:37 +0000 (17:42 -0700)]
Set `DisableImplicitNamespaceImports_Dotnet=true` to workaround sdk issue (#56744)
* Set `DisableImplicitNamespaceImports_Dotnet=true` to workaround sdk issue
* Disable just the imports declaration rather than the functionality
Andrew Au [Mon, 2 Aug 2021 23:39:24 +0000 (16:39 -0700)]
Make sure ServerGCHeapDetails is up to date (#56056)
Mitchell Hwang [Mon, 2 Aug 2021 21:28:50 +0000 (17:28 -0400)]
[libraries] Reenable System.Diagnostics.DiagnosticSorce.Switches.Tests on mobile (#56737)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Mateo Torres-Ruiz [Mon, 2 Aug 2021 21:14:38 +0000 (14:14 -0700)]
Disable failing arm64 win10 Graphics.FromHdc tests (#56732)
* Disable arm64-win10 tests preventing clean build
* Use ActiveIssue with conditional
Adeel Mujahid [Mon, 2 Aug 2021 20:06:47 +0000 (23:06 +0300)]
Match xplat event source conditions (#56435)
Maoni Stephens [Mon, 2 Aug 2021 18:58:09 +0000 (11:58 -0700)]
counting the LOH pad objects in the free object space (#56665)
David Fowler [Mon, 2 Aug 2021 18:57:24 +0000 (11:57 -0700)]
Dump the environment variable prefix in ToString (#56685)
* Dump the environment variable prefix in ToString
- This allows tools that dump the providers (like GetDebugView) to see a little more data about the configured providers when debugging.
Viktor Hofer [Mon, 2 Aug 2021 18:53:45 +0000 (20:53 +0200)]
Convert AspNetCore transport pkgproj to Pack task (#56674)
* Convert AspNetCore transport pkgproj to Pack task
Converting the Microsoft.AspNetCore.Internal.Transport package to a proj
file which uses the NuGet Pack task.
Also moving some more packaging related targets into packaging.targets.
* Update Microsoft.AspNetCore.Internal.Transport.proj
Viktor Hofer [Mon, 2 Aug 2021 18:36:53 +0000 (20:36 +0200)]
React to Verify* task PackageTesting change (#56694)
* React to Verify* task PackageTesting change
Depends on https://github.com/dotnet/arcade/pull/7692
Removing the dependency on the Packaging assembly in favor of the
PackageTesting assembly which now contains the VerifyClosure and
VerifyTypes tasks that are required for package testing.
Also removing some obsolete properties and files.
Andy Ayers [Mon, 2 Aug 2021 18:20:23 +0000 (11:20 -0700)]
JIT: don't allow negative edge weights (#56651)
Due to rounding errors or inconsistencies we may end up with unexpected
ratios of profile counts. Fix one place where that was leading to a negative
edge weight.
Fixes #56647.
Drew Scoggins [Mon, 2 Aug 2021 17:54:09 +0000 (10:54 -0700)]
Add new msbuild prop for wasm runtime config path (#56650)
Brian Sullivan [Mon, 2 Aug 2021 17:40:25 +0000 (10:40 -0700)]
Fixes 55107 (#56259)
* Fixes 55107
Add support for the very rare case of a constant byref to Compiler::optAssertionPropGlobal_RelOp
Added test case
* Changed casts as suggested by Jakob
Adam Sitnik [Mon, 2 Aug 2021 17:22:16 +0000 (19:22 +0200)]
see if GetArrayDataReference_NullInput_ThrowsNullRef passes on tvOS now, fixes #36885 (#56724)
Manish Godse [Mon, 2 Aug 2021 17:17:47 +0000 (10:17 -0700)]
removing excludes since 47096 is fixed. (#56727)
iinuwa [Mon, 2 Aug 2021 17:17:23 +0000 (12:17 -0500)]
Fix indentation on Interop directory tree example (#56718)
Jeremy Koritzinsky [Mon, 2 Aug 2021 16:53:48 +0000 (09:53 -0700)]
Build C++/CLI tests as .NET Core C++/CLI (#56502)
* Build IJW assemblies against LKG SDK ref pack.
* Allow building against the live ref assemblies by passing `-cmakeargs -DCPP_CLI_LIVE_REF_ASSEMBLIES=1` to the test build script.
* Add test instructions
* Error handling
* Add support for the stdcall-mangled _CorDllMain entrypoint on x86 since MSVC uses it if it exists.
* Write out ref-pack path.
Huo Yaoyuan [Mon, 2 Aug 2021 16:36:11 +0000 (00:36 +0800)]
Minor cleanups for System.Runtime.Numerics (#53984)
* Replace union with BitConverter
* Replace CombineHash with HashCode
* Replace CbitHighZero with LeadingZeroCount
* Remove another LeadingZeros
* More cleanup in BigInteger
* Cleanup complex
* Apply suggestions from code review
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
* Convert body-less for to while
* Use HashCode.AddBytes
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
John Call [Mon, 2 Aug 2021 16:29:53 +0000 (09:29 -0700)]
Add equality override for KeyValuePairComparer (#56634)
Gleb Balykov [Mon, 2 Aug 2021 14:13:40 +0000 (17:13 +0300)]
Fix behavior of inlined NDirect methods with MulticoreJit (#55185)
* Disable loading of methods from r2r images in MulticoreJit thread, if they have NDirect methods inlined in them
NDirect methods can be inlined in other methods during aot compilation.
If such method is loaded in mcj thread, it results in NDirect method being loaded.
Additionally, there's no way to control inlining during aot from runtime side, because r2r ni.dll might already exist.
In order to fix this, runtime aborts loading if method has NDirect methods inlined in it and this all happens in mcj thread.
* Forbid inlining of pinvoke methods with SuppressGCTransitionAttribute in MulticoreJit thread
dotnet-maestro[bot] [Mon, 2 Aug 2021 12:23:15 +0000 (14:23 +0200)]
[main] Update dependencies from dotnet/runtime dnceng/internal/dotnet-optimization dotnet/arcade dotnet/xharness dotnet/roslyn-analyzers dotnet/emsdk (#56211)
* Update dependencies from https://github.com/dotnet/xharness build
20210722.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21370.1 -> To Version 1.0.0-prerelease.21372.1
* Update dependencies from https://github.com/dotnet/arcade build
20210723.11
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.21370.12 -> To Version 6.0.0-beta.21373.11
* Update dependencies from https://github.com/dotnet/xharness build
20210723.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21370.1 -> To Version 1.0.0-prerelease.21373.1
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20210723.2
Microsoft.CodeAnalysis.NetAnalyzers
From Version 6.0.0-rc1.21366.2 -> To Version 6.0.0-rc1.21373.2
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210724.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.21371.3 -> To Version 1.0.0-prerelease.21374.3
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20210725.2
Microsoft.CodeAnalysis.NetAnalyzers
From Version 6.0.0-rc1.21366.2 -> To Version 6.0.0-rc1.21375.2
* Revert SDK bump
It will be done in https://github.com/dotnet/runtime/pull/56161
* Update dependencies from https://github.com/dotnet/runtime build
20210725.2
Microsoft.NETCore.DotNetHost , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , Microsoft.NET.Sdk.IL , System.Text.Json , System.Runtime.CompilerServices.Unsafe
From Version 6.0.0-rc.1.21369.2 -> To Version 6.0.0-rc.1.21375.2
* Update dependencies from https://github.com/dotnet/arcade build
20210723.11
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.21370.12 -> To Version 6.0.0-beta.21373.11
* Revert SDK bump
* Update dependencies from https://github.com/dotnet/emsdk build
20210726.1
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.0-rc.1.21369.1 -> To Version 6.0.0-rc.1.21376.1
* Update dependencies from https://github.com/dotnet/emsdk build
20210726.4
Microsoft.NET.Workload.Emscripten.Manifest-6.0.100
From Version 6.0.0-rc.1.21369.1 -> To Version 6.0.0-rc.1.21376.4
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Stephen Toub [Mon, 2 Aug 2021 09:03:53 +0000 (05:03 -0400)]
Use UnixFileStream's ReadAsync implementation on Windows as well (#56682)
UnixFileStream's ReadAsync implementation uses a reusable IValueTaskSource implementation to avoid allocating a new work item on every read. We can push that implementation down to OSFileStreamStrategy, and then use it for the Windows implementation of ReadAsync as well when IsAsync==false, rather than delegating to the base Stream implementation.
This PR almost entirely just moves code around. The only change to logic is in RandomAccess.Windows.cs, to only set an offset into the NativeOverlapped if the SafeFileHandle is seekable; otherwise, it fails when used with pipes.
Petr Onderka [Mon, 2 Aug 2021 08:40:30 +0000 (10:40 +0200)]
Corrected terminology in SequencePosition documentation (#56693)
Pavel Savara [Mon, 2 Aug 2021 08:34:05 +0000 (10:34 +0200)]
[wasm] Improve console.log in unit tests (#56616)
Manish Godse [Mon, 2 Aug 2021 07:57:03 +0000 (00:57 -0700)]
[8/21 Infra rollout] update sdk to preview6 (#56161)
* update sdk to preview6
to check whether an arm64 bug is the root cause of NRE on macos.
* Remove invalid Castle.DynamicProxy.Internal.AbstractInvocation from ILLink descriptor files
The type is actually in the `Castle.DynamicProxy` namespace, not the `.Internal` one.
This causes an error with newer linker versions.
The whole `Castle.DynamicProxy` namespace is already preserved so we can remove the entry for AbstractInvocation.
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Jan Kotas [Mon, 2 Aug 2021 07:02:22 +0000 (09:02 +0200)]
Fix comment (#56709)
Noah Falk [Mon, 2 Aug 2021 06:47:20 +0000 (23:47 -0700)]
Instrument MemTracker (#56648)
We are seeing some likely memory corruption in
https://github.com/dotnet/runtime/issues/54469
and these changes hopefully will help better
diagnose it
Jan Kotas [Sun, 1 Aug 2021 19:18:49 +0000 (21:18 +0200)]
Enable ICU trimming for Invariant=true and PredefinedCulturesOnly unspecified (#56667)
* Enable ICU trimming for Invariant=true and PredefinedCulturesOnly unspecified
* Update comments
Mitchell Hwang [Sun, 1 Aug 2021 08:53:22 +0000 (04:53 -0400)]
[libraries][Android] Reenable System.Linq.Expression.Tests for Android (#56646)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
imhameed [Sun, 1 Aug 2021 03:29:41 +0000 (20:29 -0700)]
[mono] Unconditionally enable NEON/AdvSimd for arm64 with LLVM (#56323)
* [mono] Unconditionally enable NEON/AdvSimd for arm64 with LLVM
* Remove `mattr=neon` from the Mono AOT command line arguments for LLVM AOT tests
This is now enabled by default when using LLVM.
Larry Ewing [Sun, 1 Aug 2021 03:17:37 +0000 (22:17 -0500)]
Enable #59244 on wasm (#56675)
Stephen Toub [Sun, 1 Aug 2021 02:49:32 +0000 (22:49 -0400)]
Try again to fix AsyncMethodsDropsStateMachineAndExecutionContextUponCompletion test
Larry Ewing [Sun, 1 Aug 2021 01:39:22 +0000 (20:39 -0500)]
Enable tests marked with https://github.com/dotnet/runtime/issues/51911 (#56673)
Adam Sitnik [Sat, 31 Jul 2021 23:37:23 +0000 (01:37 +0200)]
Update position before ReadAsync starts, but fix it after incomplete read (#56531)
* move CanRead and CanWrite checks to FileStream
* don't check IsClosed twice_(FileHandle.CanSeek already contains a IsClosed check)
* add a failing test
* handle incomplete async reads
* don't try to cache file length when file is opened for writing, as updating file position before performing async write can lead to invalid cached length value
* maybe Win 7 & 8 fix
Stephen Toub [Sat, 31 Jul 2021 16:13:43 +0000 (12:13 -0400)]
Enable trimming TLS arrays in ArrayPool.Shared (#56316)
* Enable trimming TLS arrays in ArrayPool.Shared
Today arrays stored in `ArrayPool<T>.Shared`'s per-core buckets have trimming applied, but arrays stored in the per-thread buckets are only trimmed when there's high memory pressure. This change enables all buffers to be trimmed (eventually). Every time our gen2 callback runs, it ensures any non-timestamped buffers have a timestamp, and also ensures that any timestamped buffers are still timely... if any aren't, they're eligible for trimming. The timestamp is reset for TLS arrays when they're stored, and for per-core buckets when they transition from empty to non-empty; the latter is just a tweak on the current behavior, which incurs the cost of Environment.TickCount upon that transition, whereas now we only pay it as part of the trimming pass.
* Address PR feedback
* Work around bad linker transform
Eric Erhardt [Sat, 31 Jul 2021 14:46:27 +0000 (08:46 -0600)]
Resolve MakeGenericType ILLink warning in DependencyInjection (#55102)
* Resolve MakeGenericType ILLink warning in DependencyInjection
Resolve the ILLink warning in DependencyInjection by adding a runtime check that is behind a new AppContext switch 'Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability'. The runtime check ensures the trimming annotations on the open generic types are compatible between the service and implementation types. The check is enabled by default when PublishTrimmed=true.
* Make VerifyOpenGenericServiceTrimmability a full feature switch
Steve Pfister [Sat, 31 Jul 2021 13:10:17 +0000 (09:10 -0400)]
Enable skipped Runtime.Extensions tests on Android (#56586)
1. AppDomain TestingCreateInstanceFromObjectHandle and TestingCreateInstanceFromObjectHandleFullSignature were failing because the assembly file to load has to be case sensitive and wasn't.
2. AppDomain TargetFrameworkTest was permanently skipped
3. StringComparerTests CreateFromCultureAndOptions, CreateFromCultureAndOptionsStringSort, and CreateWithCulturesTest skips testing the turkish culture as it's problematic on Android
4. Environment.Exit ExitCode_VoidMainAppReturnsSetValue was permanently skipped
Fixes https://github.com/dotnet/runtime/issues/49868
CW2 [Sat, 31 Jul 2021 05:54:03 +0000 (07:54 +0200)]
Added Visual Studio build tools (#55629) (#56234)
* Added Visual Studio build tools (#55629)
Added description of build tools (CMake, Ninja and Python) installation as Visual Studio Individual Components.
Added emphasis (bold) of Visual Studio installer sections and components (replaces previously used different styles of quotes).
* Removed Python 32-bit VS component
Python 64-bit component is enough for building x86 and x64 target architectures.
Co-authored-by: Juan Hoyos <juan.hoyos@microsoft.com>
Maoni Stephens [Sat, 31 Jul 2021 05:28:40 +0000 (22:28 -0700)]
exclusive_sync check should failfast when hitting an error (#56660)
Dan Moseley [Sat, 31 Jul 2021 04:14:51 +0000 (22:14 -0600)]
Stabilize TestToString_OnExitedProcess (#56652)
Jeff Handley [Sat, 31 Jul 2021 03:24:28 +0000 (23:24 -0400)]
Return null from GetManifestResourceInfo and GetManifestResourceStream when the resource is not found (#56602)
Tomas Weinfurt [Sat, 31 Jul 2021 02:26:53 +0000 (19:26 -0700)]
fix deadlock in Quic (#56600)
* fix deadlock in Quic
* feedback from review
Tarek Mahmoud Sayed [Sat, 31 Jul 2021 01:06:08 +0000 (18:06 -0700)]
Fix String.LastIndexOf with string has zero sort weights characters (#56504)
* Fix String.LastIndexOf with string has zero sort weights characters
Andy Ayers [Sat, 31 Jul 2021 00:46:53 +0000 (17:46 -0700)]
JIT: spill exception-causing entries from stack for finalizable newobj (#56636)
Fix a long-standing issue where in some rare cases an object could be finalized
even though its constructor was never called.
The problem was that the jit was allocating the object before evaluating any of
the arguments to the constructor, so that if an argument evaluation threw, a
default-initialized version of the object still lived on the heap.
The fix is to spill any side-effecting stack entry if the jit is going to
create a finalizable object. This improves on previous attempts by only spilling
for the finalizable case.
Closes #4871.
Mike McLaughlin [Fri, 30 Jul 2021 23:56:35 +0000 (16:56 -0700)]
Add test case for deleting custom attributes using ApplyUpdate (#56644)
* Add test case for deleting custom attributes using ApplyUpdate
Issue: https://github.com/dotnet/runtime/issues/54284
* Fix mono failures
Jan Vorlicek [Fri, 30 Jul 2021 21:20:59 +0000 (23:20 +0200)]
Fix Win arm GC barrier stuff (#56585)
My recent change to enable using LLD on Unix inadvertedly broken
Windows ARM GC barriers. This change makes part of that change
Unix specific.
Mitchell Hwang [Fri, 30 Jul 2021 21:17:27 +0000 (17:17 -0400)]
[libraries][Android] Reenable tests failing from feature switches being improperly set (#56635)
Fixes #50576
Fixes #50881
Fixes #50916
Fixes #50917
Fixes #50918
Fixes #50919
Fixes #50927
Fixes #50928
Fixes #50944
Fixes #50945
Fixes #50946
Fixes #50947
Fixes #50948
Fixes #50999
When setting up functional tests for mobile, the feature switches being used for the tests were misplaced in a broader project, affecting the library tests and causing failures. After moving the feature switches to the scope of functional tests as done in #53253, these test suites no longer fail and can be re-enabled.
Andy Gocke [Fri, 30 Jul 2021 20:20:57 +0000 (13:20 -0700)]
Add RequiresAssemblyFiles attribute (#56196)
This PR annotates every API doc'd as having different
behavior in single-file publishing with RequiresAssemblyFiles.
Some APIs might be special-cased by the analyzer to produce
special messages, but RAF is useful for visual inspection
of the APIs. Module.Name and .FullyQualifiedName were also
unannotated.
Adeel Mujahid [Fri, 30 Jul 2021 20:17:43 +0000 (23:17 +0300)]
Fix crossgen2 build on Tizen (#55789)
Mitchell Hwang [Fri, 30 Jul 2021 20:16:35 +0000 (16:16 -0400)]
[libraries][iOS][tvOS] Skip RoundtripEmptyArray on older tvOS iOS ver… (#56583)
* [libraries][iOS][tvOS] Skip RoundtripEmptyArray on older tvOS iOS versions
* Address feedback
* Use OperatingSystem API directly
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Maryam Ariyan [Fri, 30 Jul 2021 19:53:01 +0000 (12:53 -0700)]
Make ParameterDefaultValue.TryGetDefaultValue bitcode compliant (#56324)
* Make ParameterDefaultValue.TryGetDefaultValue bitcode compliant
Fixes #50439
* code cleanup
* enable nullable for netcoreapp
* move to second property group
* Apply PR feedback
* Apply PR feedback
* code cleanup - remove ifdef
* Update src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Aleksey Kliger (λgeek) [Fri, 30 Jul 2021 19:29:30 +0000 (15:29 -0400)]
Turn off DeterministicSourcePaths for hot reload CI tests (#56630)
DeterministicSourcePaths uses a path map to rewrite the source file locations
in the debugger info, which breaks EnC. Related issue
https://github.com/dotnet/roslyn/issues/47194 (roslyn should emit a warning,
but doesn't)
Jan Vorlicek [Fri, 30 Jul 2021 19:15:31 +0000 (21:15 +0200)]
Fix standalone GC critical section reentrancy (#56615)
The standalone GC on Unix uses pthread mutex to implement critical
sections. However, these critical sections are expected to be reentrant
and the current implementation wasn't setting the mutex attribute that
would make it reentrant. The result is a hang during GC.
This change fixes it by adding that attribute. Since allocating that
attribute may fail in low memory cases, the
CLRCriticalSection::Initialize was updated to return success status.
Eric Erhardt [Fri, 30 Jul 2021 19:07:01 +0000 (13:07 -0600)]
Move ILLink.LinkAttributes to shared and support NullabilityInfoContext with trimming nullability attributes (#56475)
* Copy ILLink.LinkAttributes from mono to shared.
* Update ILLink.LinkAttributes that are now shared between mono and coreclr
- Move IntrinsicAttribute to mono only
- Introduce feature switches for NullabilityInfoContext and AggressiveAttributeTrimming
- Minor other cleanup
* Respect the NullabilityInfoContext.IsSupported feature switch in NullabilityInfoContext.
* Document new feature switches
* Add trimming tests for NullabilityInfoContextSupport
* Move NonVersionableAttribute to mono-only
* Fix Linq tests now that the ExtensionAttribute isn't being trimmed all the time on mono WASM
Steve Pfister [Fri, 30 Jul 2021 17:46:23 +0000 (13:46 -0400)]
Enable skipped SSC.Algorithms tests on Andorid (#56573)
DSAKeyGeneration.GenerateSecondMinKey and DSAKeyGeneration.GenerateMinKey no longer fail. Added validation in RSAAndroid.cs to make RSAXml.FromNonsenseXml pass.
Fixes #50580
Fixes #50581
Manish Godse [Fri, 30 Jul 2021 16:57:41 +0000 (09:57 -0700)]
Add gcServer legs to stand-alone (#56575)
* Add gcServer legs to stand-alone
* only run innerloop for gc-standalone
* fix the testenvironment
Steve Pfister [Fri, 30 Jul 2021 16:39:45 +0000 (12:39 -0400)]
Shorten the workload manifest name for MSI generation (#56446)
Bit by Windows MAX_PATH, so add the manifest name to the ShortNames Item. This the resulting msi acceptable to VS.
Fan Yang [Fri, 30 Jul 2021 16:38:19 +0000 (12:38 -0400)]
Do not set CrossBuild to true when building runtime tests for Android (#55641)
* Fix _packageRID
* Hack to enable arm64 run for PR
* Dealing with the case when both PortableBuild and CrossBuild were set to true
* Do not set CrossBuild to true when building for Android
* Update src/tests/build.sh
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Revert qualification hack
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
John Salem [Fri, 30 Jul 2021 16:20:29 +0000 (09:20 -0700)]
Handle ambient activities in EventSource test (#56442)
Eric Erhardt [Fri, 30 Jul 2021 15:20:49 +0000 (09:20 -0600)]
Remove unused AssemblyMetadataAttribute and TargetFrameworkAttribute defines (#56591)
Aleksey Kliger (λgeek) [Fri, 30 Jul 2021 15:19:40 +0000 (11:19 -0400)]
[icall] If Stream:BeginWrite/EndWrite are linked out, they're not overridden (#56559)
Add the same logic that we already have for BeginRead/EndRead - if we can't
find a vtable slot that has the method in the base class, it must have been
linked out, so a subclass can't possibly override it.
Fixes https://github.com/dotnet/runtime/issues/56315
Tomas Weinfurt [Fri, 30 Jul 2021 14:59:05 +0000 (07:59 -0700)]
pull client certificate fixes from MsQuic (#56588)
Tomas Weinfurt [Fri, 30 Jul 2021 14:12:33 +0000 (07:12 -0700)]
disable test parallelization for http3 (#56413)
Alexander Köplinger [Fri, 30 Jul 2021 14:12:26 +0000 (16:12 +0200)]
Fix evaluate-changed-paths.sh script (#56617)
https://github.com/dotnet/runtime/pull/56479 uncovered a bug in the script where it didn't append the full `tmp` array to `include_paths` and `exclude_paths` but just the first element.
Shellcheck actually complained about this with "SC2128: Expanding an array without an index only gives the first element."
The old bash in macOS has a quirk where this doesn't happen so we didn't see it before https://github.com/dotnet/runtime/pull/56479.
Mitchell Hwang [Fri, 30 Jul 2021 14:00:31 +0000 (10:00 -0400)]
[libraries][Android] Move System.Text.RegularExpressions edge case tests to separate issue (#56410)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Pent Ploompuu [Fri, 30 Jul 2021 13:55:56 +0000 (16:55 +0300)]
Fix bad inlining in DateTime (#56466)
Jan Vorlicek [Fri, 30 Jul 2021 13:54:55 +0000 (15:54 +0200)]
Revert recent update of a docker image in eng/common (#56540)
This change (if it was really needed) should be made in the arcade repo as this
file is regularly updated from there. However, I can see that the change I am
reverting was not really needed as the docker image is meant for managed stuff
only and so it doesn't need to be updated to the new version that added the
LLD linker.
Elinor Fung [Fri, 30 Jul 2021 13:52:29 +0000 (06:52 -0700)]
Remove redundant assembly loader tests (#56505)
Miha Zupan [Fri, 30 Jul 2021 13:26:44 +0000 (06:26 -0700)]
Fix BufferedStream outerloop test (#56618)
Natalia Kondratyeva [Fri, 30 Jul 2021 12:58:13 +0000 (14:58 +0200)]
Fix QUIC stream handle leak (#56550)
Miha Zupan [Fri, 30 Jul 2021 12:52:48 +0000 (05:52 -0700)]
Account for AddressFamily pairs in NameResolution telemetry (#56614)
Alexander Nikolaev [Fri, 30 Jul 2021 12:21:00 +0000 (14:21 +0200)]
Check _abortException before checking _shutdown flag (#56552)
In case of an error aborting the connection, there is a race between a thread creating new `Http2Stream` to send a request and the thread looping in `ProcessIncomingFrames` that sets _shutdown flag and `_abortException`. If the request thread first sees `_shutdown == true`, then it won't see the `_abortException` even if it's set, so the request will be retried when it shouldn't.
This PR adds `_abortException` check just before the `_shutdown == true` check to make sure an abort exception is observed.
Fixes #1581
Fixes #56138
Fixes #56026
Anton Firszov [Fri, 30 Jul 2021 12:15:09 +0000 (14:15 +0200)]
Enable BeginAcceptV4BoundToAnyV4_Success with better timeout handling (#56406)
Anton Firszov [Fri, 30 Jul 2021 12:11:24 +0000 (14:11 +0200)]
Make LocalEndPointTest and some Connect tests non-parallel (#56399)
Karel Zikmund [Fri, 30 Jul 2021 12:08:57 +0000 (14:08 +0200)]
Disable Alpn_H3_Success (#56610)
Test: System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http3_MsQuic.Alpn_H3_Success
Disabled test tracked by #56609
Steve Pfister [Fri, 30 Jul 2021 12:01:57 +0000 (08:01 -0400)]
Enable and tweak ThreadTests on Android (#56578)
Many ThreadTests should be working on Android, so they were enabled. ApartmentState_AttributePresent was changed to skip permanently on Android.
Fixes https://github.com/dotnet/runtime/issues/50577
Steve Pfister [Fri, 30 Jul 2021 11:59:52 +0000 (07:59 -0400)]
Enable skipped CodeDom tests on Android (#56581)
Some C# and VB code generation tests were being skipped due to UseSystemResourceKeys being enabled. It no longer is.
Fixes #50879
Aleksey Kliger (λgeek) [Fri, 30 Jul 2021 11:36:45 +0000 (07:36 -0400)]
[loader] Call managed resolving events for the default ALC (#56398)
* [loader] Call managed resolving events for the default ALC
Refine the work in
https://github.com/dotnet/runtime/commit/
f70b5b7aef21a70478e9b86dba7d996a57a9add9
The issue is that even if we know that the ALC gchandle points to null in
native, we can't automatically skip the call to the managed resolving
event (for native library, for example) because the native event is indirectly
responsible for creating the default ALC managed object.
Instead, check in native if the gchandle is equal to the default ALC's
gchandle (which is initially allocated with a null target) and if so pass
IntPtr.Zero to the managed code, which will call
`AssemblyLoadContext.GEtAssemblyLoadContext (IntPtr gch)` which in turn will
construct the managed object for the default ALC.
Fixes https://github.com/dotnet/runtime/issues/55921
* remove one more early exit
* make a helper function
Stephen Toub [Fri, 30 Jul 2021 10:58:47 +0000 (06:58 -0400)]
Fix divide-by-zero in RuntimeEventSourceHelper.GetCpuUsage on Windows (#56547)
Elinor Fung [Fri, 30 Jul 2021 10:38:23 +0000 (03:38 -0700)]
Remove IIDToInterfaceTemplateCache (#56596)
Neale Ferguson [Fri, 30 Jul 2021 10:32:36 +0000 (20:32 +1000)]
s390x: Additional float32 fixes (#56360)
- Add rmove specification in cpu-s390x.md
- OP_RMOVE implementation in mini-s390x.c
- Correct float instruction lengths
- Disable debug code
- Correct RCONV_TO_I4/RCONV_TO_U4
Tomas Weinfurt [Fri, 30 Jul 2021 09:56:18 +0000 (02:56 -0700)]
Enable disabled QUIC tests (#56590)
With update updated MsQuic on Linux in place (PR #56429) we should pass few more disabled tests.
I did ~200 local runs and I did not see any problems
Fixes #55242
Fixes #55746
Karel Zikmund [Fri, 30 Jul 2021 09:23:15 +0000 (11:23 +0200)]
Disable test SendMoreThanStreamLimitRequests_Succeeds for all QUIC (#56566)
Disable the test also for MsQuic, not just Mock.
Test types:
- System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http3_MsQuic
- System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http3_Mock
Disabled test tracked by #55957
Alexander Köplinger [Fri, 30 Jul 2021 09:06:25 +0000 (11:06 +0200)]
Fix System.Configuration.ConfigurationManager.Tests on Android and reenable on non-Windows platforms (#56558)
The test assembly got changed to `$(NetCoreAppCurrent)-windows` in https://github.com/dotnet/runtime/commit/
809a06f45161ae686a06b9e9ccc2f45097b91657#diff-4d639cb37fe53cdeae4262c1f5be7936cdd81e3b4f256f9c59ad02ec69b300d9R7 but when talking to Viktor we're not sure why, probably a mistake.
Target `$(NetCoreAppCurrent)` instead so it runs on all platforms and fix a test issue that occurs on Android due to BaseDirectory not having a trailing slash. Fixes https://github.com/dotnet/runtime/issues/37071
Incidentally, that's likely also the reason why the .csproj set `TestDisableAppDomain` so we can remove that as well.
Also replace `TestDisableParallelization` with the assembly attribute equivalent which is what we use everywhere else.
Peter Sollich [Fri, 30 Jul 2021 07:07:03 +0000 (09:07 +0200)]
Move the logic to grow the mark list outside of #ifdef GC_CONFIG_DRIVEN. (#56451)
I put it there by mistake, and didn't notice because for coreclr.dll, GC_CONFIG_DRIVEN is enabled. For clrgc.dll it is not, and when I did perf experiments with regions, I noticed that sometimes we would take very long in plan_phase.
Peter Sollich [Fri, 30 Jul 2021 07:05:34 +0000 (09:05 +0200)]
Optimize region count (#56471)
We have a couple of arrays with an entry per region - instead of iterating over all the regions that we have reserved address space for, iterate just over the regions actually in use.
Arrays affected by this are mark_list_piece_start, mark_list_piece_end, survived_per_region and old_card_survived per_region.
To avoid having inconsistent counts, we get the count of regions actually in use at the start of mark_phase. Any regions added during GC should not matter, because they shouldn't contain any marked objects.
While the region allocator has provisions to allocate regions from the highest addresses down, we don't use that facility now. If we do, the code to iterate through the used regions will need to get more sophisticated. I put an assert that would fire in this case.
Pavel Savara [Fri, 30 Jul 2021 05:56:22 +0000 (07:56 +0200)]
fail fast if the delegate was collected prematurely (#56523)
Bruce Forstall [Fri, 30 Jul 2021 04:50:22 +0000 (21:50 -0700)]
Work around a Linux arm32 unaligned data issue in SuperPMI (#56517)
* Work around a Linux arm32 unaligned data issue in SuperPMI
impImportStaticReadOnlyField reads the data at the address returned by
getFieldAddress. SuperPMI saves and replays this data, but it doesn't
store it at a naturally aligned address. For int64/double (at least),
this is a problem on Linux arm32, which raises a SIGBUS exception on
such unaligned access.
This works around the problem by copying the potentially unaligned data
to a known aligned spot before reading it. This is only done under DEBUG
and when we know we are replaying under SuperPMI.
A proper fix would be to teach SuperPMI about alignment, but that would be
a large and risky change, compared to this small and isolated workaround.
The fixes the non-determinism of #56156.
* Only add alignment adjustment when required
Ankit Jain [Fri, 30 Jul 2021 03:24:48 +0000 (23:24 -0400)]
Wasm.Build.Tests: `RunProcess` - wait for all async handlers to complete (#56520)