Alexis Christoforides [Wed, 20 May 2020 22:59:29 +0000 (18:59 -0400)]
[mono] Implement AsAny marshalling for simple arrays (#35686)
* [mono] Implement AsAny marshalling for simple arrays
Simple here means of rank 1, and with a blittable value type as element type.
* Also implement char arrays
* Do not allow in-params to be marshalled this way, as the callee would have write-ability that is not allowed by in-params
Sergey Andreenko [Wed, 20 May 2020 22:52:13 +0000 (15:52 -0700)]
Support !JitDoOldStructRetyping on other platforms. (#35943)
* Add more test cases.
* Initialize `ReturnTypeDesc` when we keep struct types.
* Add a few const modifiers.
* Additional checks in `LowerRet`
* Support `return double(cnst int)`.
* Optimize `LowerRetStruct`: no need for bitcast when read from memory.
* Prepare `LowerNode` for store local and local field to multireg.
* Compile the new methods with FEATURE_MULTIREG_RET.
* Improve `LowerRetStructLclVar`.
Don't use bitcast if the source is in memory or has the same type.
* Extract `LowerStoreLocCommon`.
* Support 3, 5. 6, 7 bytes structs in `LowerCallStruct`.
Move call handling to the users.
* Disable `JitDoOldStructRetyping` for x86 and x64.
Windows x64 was supported in a previous PR, this adds x86 (Windows and Linux) and x64 Unix.
* Fix suggestions.
* Disable by default for the merge.
dotnet-maestro[bot] [Wed, 20 May 2020 22:51:11 +0000 (00:51 +0200)]
[master] Update dependencies from mono/linker dotnet/llvm-project dotnet/xharness (#36764)
* Update dependencies from https://github.com/dotnet/llvm-project build
20200518.2
runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
From Version 9.0.1-alpha.1.20262.1 -> To Version 9.0.1-alpha.1.20268.2
* Update dependencies from https://github.com/mono/linker build
20200519.1
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20268.5 -> To Version 5.0.0-preview.3.20269.1
* Update dependencies from https://github.com/dotnet/xharness build
20200520.1
Microsoft.DotNet.XHarness.Tests.Runners
From Version 1.0.0-prerelease.20265.8 -> To Version 1.0.0-prerelease.20270.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
monojenkins [Wed, 20 May 2020 21:35:59 +0000 (17:35 -0400)]
[interp] Add separate opcode for pop vt (#36760)
Before this change, pop-ing a vt from the stack was done in 2 opcodes, a MINT_POP (decrementing the stack) and the weird MINT_VTRESULT (decrementing the vtstack). However, optimizations could have removed both the initial loading of the value type on the stack as well as the MINT_POP, leaving MINT_VTRESULT underflowing the vtstack. Fix this and cleanup the code by pop-ing a value type from the stack in a single instruction.
Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
Miha Zupan [Wed, 20 May 2020 18:47:28 +0000 (20:47 +0200)]
Cache Uri.IdnHost and Uri.PathAndQuery (#36460)
* Cache Uri.IdnHost and Uri.PathAndQuery
* Continue caching DnsSafeHost
* Move PathAndQuery cache from MoreInfo to UriInfo
* Move DnsSafeHost and IdnHost logic to IdnHost getter
* Add more Host tests
Alexander Köplinger [Wed, 20 May 2020 18:46:24 +0000 (20:46 +0200)]
Remove overwriting RuntimeIdentifier in runtime.depproj for wasm/ios/android (#36757)
It shouldn't be needed anymore since we have real assets for these targets now.
David Mason [Wed, 20 May 2020 18:17:06 +0000 (11:17 -0700)]
Add managed array type support for EventPipe (#36242)
Add support for emitting an event with an arbitrary number of arguments over EventPipe.
Egor Bogatov [Wed, 20 May 2020 17:55:37 +0000 (20:55 +0300)]
Add FullAOT mode for Simulator to AppleAppBuilder (#36759)
Kunal Pathak [Wed, 20 May 2020 16:15:28 +0000 (09:15 -0700)]
Optimize call indirect for R2R, Arm and Arm64 scenarios (#35675)
* Use a different approach to optimize the indirect calls for R2R
During lowering, don't create a controlExpr for indirect call. Instead use
temp register for such calls and during codegen, load the indirect from x11
into that temp register before calling the address in that temp register.
Jose Perez Rodriguez [Wed, 20 May 2020 16:09:15 +0000 (09:09 -0700)]
Adding OSX support for System.DirectoryServices.Protocols (#36669)
* Adding OSX support for System.DirectoryServices.Protocols
* Addressing PR Feedback
* Fixing issue in netfx builds where local member is assigned but never used
Alexander Köplinger [Wed, 20 May 2020 15:57:57 +0000 (17:57 +0200)]
Use a Brewfile for installing brew packages (#36747)
This means we won't be upgrading existing packages on the system that we don't need for the build.
Marks install-native-dependencies.sh as executable (+x) so we don't need to start it with `sh` in the build .yml
Fixes https://github.com/dotnet/runtime/issues/36727
monojenkins [Wed, 20 May 2020 15:20:06 +0000 (11:20 -0400)]
[interp] Fix interp entry for methods with lots of arguments in llvmonly+interp mode. (#36678)
Fixes https://github.com/mono/mono/issues/19801.
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
monojenkins [Wed, 20 May 2020 10:52:01 +0000 (06:52 -0400)]
[interp] Small cleanups (#36706)
Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
Egor Bogatov [Wed, 20 May 2020 10:47:22 +0000 (13:47 +0300)]
[mono] Fix iOS sample and use `dotnet publish` (#36745)
Use `dotnet publish` with linker just like for Android.
Levi Broderick [Wed, 20 May 2020 07:24:53 +0000 (00:24 -0700)]
Use latest compiler toolset from Arcade (#36741)
Yoh Deadfall [Wed, 20 May 2020 06:46:25 +0000 (09:46 +0300)]
Code sharing between generic methods in member accessor (#36710)
* Code sharing between generic methods in member accessor
* Removed redudant value type check
Santiago Fernandez Madero [Wed, 20 May 2020 06:08:44 +0000 (23:08 -0700)]
Remove Fedora29 from test matrix and add Fedora32 (#36716)
Andy Ayers [Wed, 20 May 2020 01:22:13 +0000 (18:22 -0700)]
JIT: fix no return call accounting (#36719)
The jit tracks the number of no return calls to determine if it should run
throw helper merging and to decide if no return calls should tail called.
The accounting is currently done when the calls are initially imported,
so if code is duplicated (by say finally cloning the count may end up being
an under-estimate. While not a correctness issue, it is better for the count
to be accurate (or an over-estimate).
So, update the count when cloning a no-return call.
Closes #36584.
Santiago Fernandez Madero [Tue, 19 May 2020 23:18:41 +0000 (16:18 -0700)]
Add build information to libraries helix jobs (#36713)
* Add build information to libraries helix jobs
* Remove BUILD_URI
David Cantu [Tue, 19 May 2020 22:54:13 +0000 (15:54 -0700)]
Remove duplicated tests from System.Text.Json.Tests (#36483)
Ben Adams [Tue, 19 May 2020 22:00:47 +0000 (23:00 +0100)]
Remove TheadPool initialization volatile (#36697)
* Remove TheadPool initialization volatile
* Better ThreadPoolGlobals setup for Mono
* Feedback
* Move back to lambda
Anirudh Agnihotry [Tue, 19 May 2020 21:44:01 +0000 (14:44 -0700)]
Adding a ci leg for Source build (#36141)
* successfullsource build
* adding a new source build leg.
* remove yy
* add default vlaue
* addressing feedback
* use boolean value
* addind comment and other feedback
* adding colon and removing unintentional change
* adding default value of isSourceBUild
Carol Eidt [Tue, 19 May 2020 21:38:28 +0000 (14:38 -0700)]
Contain non-candidate regOptional lclVars (#36601)
Nathan Ricci [Tue, 19 May 2020 21:28:54 +0000 (17:28 -0400)]
Removed extra slash. (#36722)
Remove extra / from path on runtimetests.
Tomas Weinfurt [Tue, 19 May 2020 20:42:11 +0000 (13:42 -0700)]
fix handling of Ssl2 and enable disabled tests (#36098)
* attempt to fix ssl2
* adjust length calculation
* enable tests
* fix ReadAsyncInternal
* use PlatformDetection.SupportsSsl2
* feedback from review
Co-authored-by: Tomas Weinfurt <furt@Shining.local>
Tom Deseyn [Tue, 19 May 2020 18:43:24 +0000 (20:43 +0200)]
Try using socket syscalls that accepts a single buffer to improve performance (#36371)
* Try using socket syscalls that accepts a single buffer to improve performance
* Remove ref from Receive calls
* Prefix Pal methods invoking methods with Sys
* Also use single-buffer syscalls for sync Socket Receive methods
* Improve comment
* PR feedback
* Assert SocketAddress null instead of checking
AraHaan [Tue, 19 May 2020 18:35:01 +0000 (14:35 -0400)]
Fixed Incorrectly named function arguments in TryGetPlatformSocketOption. (#36694)
Fixes #36686.
David Wrighton [Tue, 19 May 2020 18:12:20 +0000 (11:12 -0700)]
Improve sort function in crossgen2 (#36676)
- Increase memory locality substantially in composite images
- Sort non-generic methods with module together
- Sort generic methods near other generic methods with similar instantiations
Json benchmark showed improvement from 237,827 RPS to 270,306 RPS, and reduced working set by about 10MB
Anton Lapounov [Tue, 19 May 2020 17:09:08 +0000 (10:09 -0700)]
Revert unintentional alignment change for Vector256<T> (#36673)
Addresses https://github.com/dotnet/runtime/pull/35864#issuecomment-
629803015. In an earlier change I also added the `type.Instantiation[0].IsPrimitive` condition to the `IsVectorType` predicate. Revert that part as well and allow only primitive numeric types for HFA/HVA purpose. The same list of 10 types is recognized in `MethodTable::GetVectorSize` and `Compiler::getBaseTypeAndSizeOfSIMDType`.
Eric Erhardt [Tue, 19 May 2020 15:29:15 +0000 (10:29 -0500)]
Add RequiresUnreferencedCodeAttribute (#36674)
This attribute is used by the linker to know which methods are unsafe to use when an application is trimmed.
Fix #33862
Marek Safar [Tue, 19 May 2020 14:26:01 +0000 (16:26 +0200)]
Remove duplicated code from SR.cs (#36277)
dotnet-maestro[bot] [Tue, 19 May 2020 14:09:05 +0000 (14:09 +0000)]
[master] Update dependencies from mono/linker Microsoft/vstest (#36692)
* Update dependencies from https://github.com/mono/linker build
20200518.5
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20268.2 -> To Version 5.0.0-preview.3.20268.5
* Update dependencies from https://github.com/microsoft/vstest build
20200518-01
Microsoft.NET.Test.Sdk
From Version 16.7.0-preview-
20200515-03 -> To Version 16.7.0-preview-
20200518-01
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Alexander Köplinger [Tue, 19 May 2020 13:57:20 +0000 (15:57 +0200)]
Fix RuntimeInformation.IsOSPlatform for Browser/WASM (#36665)
The native code was still using the previous `WEBASSEMBLY` name instead of `BROWSER` as decided in https://github.com/dotnet/runtime/issues/33328.
Youssef Victor [Tue, 19 May 2020 13:39:51 +0000 (15:39 +0200)]
Checking strings against length seem to have better perf (#36443)
* Chckecing strings against length seem to have better perf
* Apply suggestions from code review
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
* Apply suggestions from code review
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
* Update src/libraries/System.Drawing.Common/src/System/Drawing/BitmapSelector.cs
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
* Apply suggestions from code review
* Update src/libraries/System.Private.CoreLib/src/System/Reflection/AssemblyNameFormatter.cs
* fix build error
* Update SmtpClient.cs
* Update AssemblyNameFormatter.cs
* Update LoggingEventSource.cs
* Fix build error
* Apply suggestions from code review
* Update src/libraries/System.ServiceModel.Syndication/src/System/ServiceModel/Syndication/SyndicationContent.cs
* Fix build error
* Apply suggestions from code review
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
Steve MacLean [Tue, 19 May 2020 11:46:16 +0000 (07:46 -0400)]
Libunwind1.5rc2 (#36027)
* Add libunwind 1.5rc2 source
Rename unused autoconfig dir aux -> aux_ consistent with
original checkin
* Delete files added by 1.3-rc1
* Update libunwind version in CMake
* Add libunwind-version.txt
* Add changes for SunOS from @am11
* Revert change to oop
* Remove obsolete add_definition
* Fix musl build
* Fix comment
* Be consistent and use HOST
* Fix error in unw_sigcontext libunwind/libunwind#179
Introduced by libunwind/libunwind#71
__reseverved needs to be big enough to store a unw_fpsimd_context_t
Which includes 32 128-bit registers, stored as 64 64-bit half registers.
Fix off by 2 issue
* Arm64 support !UNWIND_CONTEXT_IS_UCONTEXT_T
Co-authored-by: Adeel <adeelbm@outlook.com>
Stephen Toub [Tue, 19 May 2020 11:42:06 +0000 (07:42 -0400)]
Rewrite NegotiateStream.XxAsync operations with async/await (#36583)
* Rewrite NegotiateStream.Read/Write* operations with async/await
Gets rid of a bunch of IAsyncResult cruft and makes the XxAsync APIs cancelable.
* Combine NegoState into NegotiateStream
* Rewrite AuthenticateAs* with async/await
* Add more NegotiateStream tests
Including for cancellation and a product fix to enable cancellation.
* Update ref with overrides
* Remove custom IAsyncResults from System.Net.Security
* Fix UnitTests project
Egor Bogatov [Tue, 19 May 2020 11:08:03 +0000 (14:08 +0300)]
[mono] Enable System.Runtime.Tests on Android (#36655)
Zoltan Varga [Tue, 19 May 2020 01:11:09 +0000 (21:11 -0400)]
WASM app builder changes. (#36422)
* Add an ExtraAssemblies parameter to the WasmAppBuilder task.
* Pass more assemblies to the pinvoke table generator.
* Improve the wasm sample.
* Move WasmAppBuilder to tools-local.
Roman Marusyk [Mon, 18 May 2020 23:52:45 +0000 (02:52 +0300)]
Prefix protected fields with underscore for the internal XmlRawWriter (#35759)
* Prefix protected fields with underscore for the internal XmlRawWriter and its descendant classes
Anirudh Agnihotry [Mon, 18 May 2020 21:49:44 +0000 (14:49 -0700)]
Remove BuildOS (#36667)
Jan Vorlicek [Mon, 18 May 2020 21:37:29 +0000 (23:37 +0200)]
Fix R2RTest parsing of the issues.targets (#36650)
The format of the file has changed a bit some time ago, but the R2RTest
wasn't updated accordingly, so test exclusion stopped working. This
change fixes it.
Jo Shields [Mon, 18 May 2020 21:35:38 +0000 (17:35 -0400)]
Produce Mono+LLVM runtime packs on desktop platforms (#35841)
* Add LLVM Mono runtime build
* Switch from 'llvm' boolean to 'runtimeVariant' freeform string in yaml
This makes it easier to add oddball variant builds, without a big pile of booleans for every possible variant
* Add an LLVM suffix to installer nupkgs
* Add runtimeVariant to CoreCLR artifact names
* Add installer run for LLVM JIT Mono
* Actually specify LLVM or not to installer build
* Unique name for LLVM installer run
* Ensure log uploads are disambiguated
* Fix dependency in full matrix
* Add LLVMAOT variant, which bundles llc/opt for current arch
* Make sure we don't use Mono.LLVM package names on CoreCLR or Mobile
* Fix perf runs to deal with runtimeVariant
* Try to reconcile perf test artifact names
* Make bundling llc/opt the default when LLVM enabled on Mono
Eric Erhardt [Mon, 18 May 2020 19:33:42 +0000 (14:33 -0500)]
Remove PreserveDependency on non-existing type (#36657)
The DefaultArrayConverter type was been refactored away causing the linker to warn about it.
Stephen Toub [Mon, 18 May 2020 17:47:04 +0000 (13:47 -0400)]
Remove unnecessary initialization from Utf8JsonWriter ctors (#36651)
Yoh Deadfall [Mon, 18 May 2020 16:16:23 +0000 (19:16 +0300)]
Removed redundant visibility check (#36648)
Stephen Toub [Mon, 18 May 2020 15:58:41 +0000 (11:58 -0400)]
Fix failing Sockets tests after argument exception changes (#36645)
Stephen Toub [Mon, 18 May 2020 15:58:11 +0000 (11:58 -0400)]
Delete OrderBy(...).First{OrDefault}(...) optimization (#36643)
The optimization removes the O(n log n) cost of the OrderBy. But it can result in executing the predicate passed to First{OrDefault} more than in .NET Framework; it would always execute it n times, whereas previously it would execute it <= n times. Developers have expressed concern about the change, in particular when using a relatively expensive predicate on a relatively short list, or when unadvisedly relying on side-effecting predicates.
Michal Strehovský [Mon, 18 May 2020 15:38:04 +0000 (17:38 +0200)]
Sync one more shared crossgen2 file (#36638)
dotnet-maestro[bot] [Mon, 18 May 2020 14:18:48 +0000 (14:18 +0000)]
Update dependencies from https://github.com/mono/linker build
20200518.2 (#36647)
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20265.2 -> To Version 5.0.0-preview.3.20268.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Thays Grazia [Mon, 18 May 2020 14:02:32 +0000 (11:02 -0300)]
[mono] Linking statically ICU shim on mono (#35790)
Linking statically ICU shim on mono for windows, linux, macOs and android.
Alexander Köplinger [Mon, 18 May 2020 13:49:35 +0000 (15:49 +0200)]
Fix mono file name on iOS/Browser (#36646)
We initially intended to just use libmono.so/dylib as the name to simplify and follow the libcoreclr.dylib pattern and we did that by just copying to a different name after the build.
However that didn't work on Android since the name gets embedded inside the binary and Android checks that these match, so we'd either have to change the (auto)make to use the correct library name (and possibly creates complex conditionals in the Makefile for netcore) or go back to using `libmonosgen-2.0` on iOS.
We decided to do the latter.
Alexis Christoforides [Mon, 18 May 2020 12:46:49 +0000 (08:46 -0400)]
[mono] Fix AssemblyLoadContext.GetRuntimeAssembly() for AssemblyBuilders (#36367)
Alexander Köplinger [Mon, 18 May 2020 09:27:21 +0000 (11:27 +0200)]
Add iOS x86 build (#36602)
Needed for the iOS Simulator for 32bit iOS devices.
Nathan Ricci [Sun, 17 May 2020 23:51:37 +0000 (19:51 -0400)]
Naricc/ci interpreter arm64 (#36258)
Change mono interpreter runs to be a scenario instead of a seperate leg. Also enable arm64 interpreter runs, and add test exclusions.
Nick Craver [Sun, 17 May 2020 23:27:13 +0000 (19:27 -0400)]
CMake: Point download URLs directly to https:// (#36615)
Michal Strehovský [Sun, 17 May 2020 19:35:32 +0000 (21:35 +0200)]
Sync crossgen2 shared files (#36610)
Alfred Myers [Sun, 17 May 2020 15:37:47 +0000 (12:37 -0300)]
Removed left-over NUnit references from comments (#36606)
dotnet-maestro[bot] [Sun, 17 May 2020 14:18:20 +0000 (14:18 +0000)]
[master] Update dependencies from mono/linker Microsoft/vstest dotnet/xharness (#36598)
* Update dependencies from https://github.com/mono/linker build
20200515.2
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20265.1 -> To Version 5.0.0-preview.3.20265.2
* Update dependencies from https://github.com/microsoft/vstest build
20200515-03
Microsoft.NET.Test.Sdk
From Version 16.7.0-preview-
20200515-01 -> To Version 16.7.0-preview-
20200515-03
* Update dependencies from https://github.com/dotnet/xharness build
20200515.8
Microsoft.DotNet.XHarness.Tests.Runners
From Version 1.0.0-prerelease.20265.1 -> To Version 1.0.0-prerelease.20265.8
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
monojenkins [Sat, 16 May 2020 20:47:39 +0000 (16:47 -0400)]
[interp] Don't share interp_in signatures for different valuetypes (#36520)
We share interp_in wrappers for different types of signatures if the corresponding params are equivalent. This was added in https://github.com/mono/mono/commit/
5cbe93884798684efbb81abd79e0e2a170544b75. This was reusing some sharing mechanism used by gsharedvt. Those wrappers are shared with regard to managed->managed transitions so it takes additional freedoms, converting all valuetypes to ValueTuples instances. These can end up being marshalled differently from the initial struct so we can't use this valuetype sharing infrastructure in the interp_in_wrappers which can operate on native structs.
Fixes test_0_marshal_struct_delegate from pinvoke3.cs
Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
Alexis Christoforides [Sat, 16 May 2020 17:38:41 +0000 (13:38 -0400)]
[mono] Enable some System.Reflection.Emit tests (#35872)
Bruce Forstall [Sat, 16 May 2020 17:01:15 +0000 (10:01 -0700)]
Fix StackTraceTests to work with JIT optimization (#36596)
Disable optimization/inlining on methods that are expected to
remain on the stack.
Manish Godse [Sat, 16 May 2020 15:53:28 +0000 (08:53 -0700)]
updating area owners (#36467)
* updating area owners
* adding cross-gen contrib as owner
Michal Strehovský [Sat, 16 May 2020 14:09:54 +0000 (16:09 +0200)]
Port changes to shared files Nullable.cs, Enum.cs (#36597)
Egor Bogatov [Sat, 16 May 2020 13:15:56 +0000 (16:15 +0300)]
[mono] Use "dotnet publish" for Android sample with ILLink (#36593)
Marie Píchová [Sat, 16 May 2020 09:15:05 +0000 (11:15 +0200)]
SslStream.AuthenticateAs sync overloads with SslOptions made public (#36221)
Santiago Fernandez Madero [Sat, 16 May 2020 06:16:48 +0000 (23:16 -0700)]
Fix IL projects build inside visual studio (#36570)
Vladimir Sadov [Fri, 15 May 2020 23:01:16 +0000 (16:01 -0700)]
Produce DropFromSingleFile annotations in RuntimeList.xml (#36578)
* SingleFileHostInclude
* style fixes
* PR feedback
Vladimir Sadov [Fri, 15 May 2020 22:01:32 +0000 (15:01 -0700)]
Build an apphost with hostfxr and hostpolicy linked in (#36230)
* hostfxr: Build most of hostfxr as a static library
This is part of the work to create an apphost that bundles both hostfxr
and hostpolicy. The main distinction between the static and shared
versions of hostfxr is that the static version contains a hostpolicy
resolver that references the hostpolicy symbols directly rather than
loading them from a DLL.
* hostpolicy: Build as a static library
This change is part of the work to enable an apphost that bundles both
hostfxr and hostpolicy. There's no distinction between hostpolicy
that's built as a shared library and as a static library: the shared
library is built by linking an empty object file with the static
library.
* corehost: Allow linking of hostfxr and hostpolicy with apphost
Provide a hostfxr_iface class, that abstracts how the hostfxr functions called
by the early stage in the hosting layer is resolved.
* dotnet: Teach the muxer binary about hostfxr_iface
* apphost: Teach apphost about hostfxr_iface
This provides two implementations of hostfxr_iface: one for the static
apphost, which bundles hostfxr and hostpolicy, and another for the
conventional apphost, which loads them dynamically on startup.
* Add exports for hostfxr and policy
* Exports for unix
* EXPORTS_LINKER_OPTION
* use generateversionscript.awk from ENG
* Move fxr files out of static
* Fixes for Linux
* Fix for win-x86
* move HEADERS next to SOURCES similarly to other files.
* PR feedback (simplifying hostpolicy_resolver::try_get_dir for static host)
* Publish static_apphost to Microsoft.NETCore.App.Host
* bind to entry points without probing, when in a static host.
* Add a test case
* renamed hostfxr_iface --> hostfxr_resolver_t
* renamed shared --> standalone
* rename static_apphost --> singlefilehost
* Signing exclusions for singlefilehost
* switched StaticHost tst to a different asset (mostly a copy of StandaloneApp)
* get_method_module_path
Co-authored-by: Leandro Pereira <leandro.pereira@microsoft.com>
Co-authored-by: Swaroop Sridhar <swaroop.sridhar@microsoft.com>
Stephen Toub [Fri, 15 May 2020 21:47:15 +0000 (17:47 -0400)]
Delete DebugThreadTracking from networking code (#36549)
The System.Net.* libs in dotnet/runtime inherited this from .NET Framework. To my knowledge it's not once helped flag any issues in dotnet/runtime, it's only built into debug builds, it's become very inconsistent as the code base has evolved, and it's just cluttering stuff up. So, goodbye.
Stephen Toub [Fri, 15 May 2020 21:30:17 +0000 (17:30 -0400)]
More HTTP/2 performance (and a few functional) improvements (#36246)
* Use span instead of array for StatusHeaderName
* Fix potential leak into CancellationToken
We need to dispose of the linked token source we create.
Also cleaned up some unnecessarily complicated code nearby.
* Fix HttpConnectionBase.LogExceptions
My previous changes here were flawed for the sync-completing case, and also accidentally introduced a closure.
* Clean up protocol state if/else cascades into switches
* Consolidate a bunch of exception throws into helpers
* Fix cancellation handling of WaitFor100ContinueAsync
* Change AsyncMutex's linked list to be circular
* Remove linked token sources
Rather than creating temporary linked token sources with the request body source and the supplied cancellation token, we can instead just register with the supplied token to cancel the request body source. This is valid because canceling any part of sending a request cancels any further sending of that request, not just that one constituent operation.
* Avoid registering for linked cancellation until absolutely necessary
We can avoid registering with the cancellation token until after we know that our send is completing asynchronously.
* Remove closure/delegate allocation from WaitForDataAsync
`this` was being closed over accidentally. I can't wait for static lambdas.
* Avoid a temporary list for storing trailers
Since it only exists to be defensive but we don't expect response.TrailingHeaders to be accessed until after the whole response has been received, we can store the headers into an HttpResponseHeaders instance and swap that instance in at the end. Best and common case, we avoid the list. Worst and uncommon case, we pay the overhead of the extra HttpResponseHeaders instead of the List.
* Delete dead AcquireWriteLockAsync method
* Reduce header frame overhead
Minor optimizations to improve the asm
* Remove unnecessary throws with GetShutdownException
* Avoid extra lock in SendHeadersAsync
* Move Http2Stream construction out of lock
Makes a significant impact on reducing lock contention.
* Streamline RemoveStream
Including moving credit adjustment out of the lock
* Move response message allocation to ctor
Remove it from within the lock
* Reorder interfaces on Http2Stream
IHttpTrace doesn't need to be prioritized.
* Address PR feedback
Krzysztof Wicher [Fri, 15 May 2020 21:21:20 +0000 (14:21 -0700)]
Merge pull request #36153 from krwq/sp_rem_sysnative_dep
Remove dependency on System.Native from System.IO.Ports
buyaa-n [Fri, 15 May 2020 20:55:30 +0000 (13:55 -0700)]
Fix argument exception warnings on runtime (#35717)
* Fix argument exception warnings on runtime
* Apply feedback
* Addressing feedback and test fix
* Fix test failures
* Fix tests for NetFx run
* Fix suppressed warning for socket.SendAsyn(e) and fix corresponding tests
* Applied feedback
Carol Eidt [Fri, 15 May 2020 20:04:26 +0000 (13:04 -0700)]
Next round of multireg preliminary changes (#36155)
This is a zero-diff set of mostly refactoring changes in preparation for supporting multireg locals:
- Move `genRegCopy()` and `genStructReturn()` to codegencommon.cpp, making a new method for `genSIMDSplitReturn` which is target-specific.
- Factor out a new `genUnspillLocal` method from `genUnspillRegIfNeeded()`.
- Similarly factor out `genSpillLocal()`
- Rename `genMultiRegCallStoreToLocal()` and more generally support multireg local stores.
- Fix a bug in the order and shift amount for last-use bits on `GenTreeLclVar`
- Some additional cleanup and preparatory changes
David Wrighton [Fri, 15 May 2020 19:31:27 +0000 (12:31 -0700)]
Enable basic generation of ngen pdb from composite image (#36311)
* Enable basic generation of ngen pdb from composite image
- Port non-line number handling portion of ngen pdb from crossgen to r2rdump
- This pdb generation logic may be used for both composite and non-composite R2R images
- Only pdb generation is supported. Perfmap generation for unix is not supported
- pdb generation is only supported on Windows x86 and amd64 platforms. Diasymreader is not supported on other systems
- Pdb generation does not generation symbols with the same names as crossgen. Instead it uses the name generator from r2rdump. For current needs this should be sufficient
- Update composite file format so that pdb generation process will work. Major difference is that a CorHeader is always produced for composite images now. This CorHeader is not used by the runtime, but is required for DiaSymReader to generate an ngen pdb.
Santiago Fernandez Madero [Fri, 15 May 2020 19:26:51 +0000 (12:26 -0700)]
Disable MemoryCacheTest.Trim in arm64 and enable Runtime.Caching tests on Unix (#36494)
dotnet-maestro[bot] [Fri, 15 May 2020 19:12:55 +0000 (19:12 +0000)]
[master] Update dependencies from mono/linker Microsoft/vstest dotnet/xharness (#36525)
* Update dependencies from https://github.com/mono/linker build
20200515.1
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20264.1 -> To Version 5.0.0-preview.3.20265.1
* Update dependencies from https://github.com/microsoft/vstest build
20200515-01
Microsoft.NET.Test.Sdk
From Version 16.7.0-preview-
20200429-01 -> To Version 16.7.0-preview-
20200515-01
* Update dependencies from https://github.com/dotnet/xharness build
20200515.1
Microsoft.DotNet.XHarness.Tests.Runners
From Version 1.0.0-prerelease.20264.9 -> To Version 1.0.0-prerelease.20265.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Stephen Toub [Fri, 15 May 2020 19:06:34 +0000 (15:06 -0400)]
Add comment to NetworkStream's ctor about socket.Blocking check (#36539)
Steve Pfister [Fri, 15 May 2020 17:36:11 +0000 (13:36 -0400)]
Move mobile AppBuilder & AOTCompiler projects into tools-local (#36478)
Moving the projects will make sure their artifacts are always available to the different CI legs.
Nikola Milosavljevic [Fri, 15 May 2020 15:55:28 +0000 (08:55 -0700)]
Merge pull request #36347 from NikolaMilosavljevic/burn.ui
UI changes for .NET 5
Kunal Pathak [Fri, 15 May 2020 15:48:59 +0000 (08:48 -0700)]
Convert Extract(0) to ToScalar() (#36474)
* Convert Extract(0) to ToScalar()
* Update the shim
Stephen Toub [Fri, 15 May 2020 14:48:15 +0000 (10:48 -0400)]
Clean up text in config.yml issue template (#36529)
Viktor Hofer [Fri, 15 May 2020 14:45:36 +0000 (16:45 +0200)]
Ignore .github folder changes in CI (#36530)
Eirik Tsarpalis [Fri, 15 May 2020 14:29:56 +0000 (15:29 +0100)]
Rename 'Blank' issue template to 'Blank issue' (#36533)
* Update and rename 04_blank.md to 04_blank_issue.md
* Use consistent casing
Viktor Hofer [Fri, 15 May 2020 14:03:20 +0000 (16:03 +0200)]
Consolidate NetCoreAppCurrent properties (#35953)
Stephen Toub [Fri, 15 May 2020 13:56:50 +0000 (09:56 -0400)]
Update 02_api_proposal.md
Stephen Toub [Fri, 15 May 2020 13:55:59 +0000 (09:55 -0400)]
Update 02_api_proposal.md
Eirik Tsarpalis [Fri, 15 May 2020 13:51:05 +0000 (14:51 +0100)]
order issue template files (#36524)
Santiago Fernandez Madero [Fri, 15 May 2020 13:00:19 +0000 (06:00 -0700)]
Update XHarness for latest fixes (#36484)
This includes a couple of fixes in xharness.
Egor Bogatov [Fri, 15 May 2020 12:02:05 +0000 (15:02 +0300)]
[docs] How to run tests on iOS and Android (#36297)
Egor Bogatov [Fri, 15 May 2020 11:48:11 +0000 (14:48 +0300)]
[mono] Improve Android OpenSSL temp hack (#36463)
Adeel Mujahid [Fri, 15 May 2020 09:11:39 +0000 (12:11 +0300)]
Implement get_own_executable_path for SunOS (#36514)
Sergey Andreenko [Fri, 15 May 2020 09:10:56 +0000 (02:10 -0700)]
Refactor `HasMultiRegRetVal` and `impFixupCallStructReturn`. (#36465)
* Fix target definitions.
They were used in asserts only, no changes.
* Fix failures after a recent HW changes.
* Add a const getter for `ReturnTypeDesc` from a call.
Used to make some new methods const as well.
* Refactor `HasMultiRegRetVal` and `impFixupCallStructReturn`.
Delete an unnecessary nested condition and make checks more straightforward.
* Delete an extra `.` in some dumps.
* Add an additional check that `ReturnTypeDesc` is initialized.
* Remove old `const_cast` around `GetReturnTypeDesc`.
* Replace non-const `GetReturnTypeDesc` with other methods.
* Fix uninitialized `gtSpillFlags, gtOtherRegs, gtReturnTypeDesc` in `fgMorphIntoHelperCall`.
Miha Zupan [Fri, 15 May 2020 05:22:09 +0000 (07:22 +0200)]
Improve Uri.Equals by removing unsafe code (#36444)
* Improve Uri.Equals
* Remove not useful and duplicated comments
Layomi Akinrinade [Fri, 15 May 2020 04:12:23 +0000 (00:12 -0400)]
Merge pull request #36424 from layomia/kvp_policy
Honor PropertyNamingPolicy, PropertyNameCaseInsensitive, & Encoder options when (de)serializing KeyValuePair instances
Steve MacLean [Fri, 15 May 2020 02:00:10 +0000 (22:00 -0400)]
Fix DAC layout in checked builds (#35542)
Simon Nattress [Fri, 15 May 2020 01:39:37 +0000 (18:39 -0700)]
Add dotnet cli to runtime test Helix jobs (#35426)
* Currently managed tools such as crossgen2 and XUnit are run against the built runtime which is slow on Debug builds, and can obscure errors when the XUnit test harness fails due to an introduced runtime bug.
* Add `xunit.console.runtimeconfig.dev.json` which allows `xunit.console` to use the repo-local dotnet.cmd on dev boxes and the same version installed on the path in Helix.
* When running crossgen2 during test execution, support both local dev and Helix scenario when deciding which dotnet to run. On Helix, simply use `dotnet` which assumes a compatible dotnet runtime is in the path. Locally, tests are run with `runtest.cmd|sh` which sets `__TestDotNetCmd` to the repo-local dotnet script. This preserves the characteristic that no machine-wide 5.0 dotnet runtime must be installed for the runtime tests.
* Update batch scripting to also use `dotnet.cmd|sh` when running Crossgen2 replacing corerun.exe.
* crossgen2's `runtimes` folder is not getting copied to `CORE_ROOT` which causes the runtime host to abort the launch on the Unix CI VMs since crossgen.deps.json refers to files in that subfolder. Adjust the `CORE_ROOT` pruning in `Directory.Build.targets` to include subfolders for the two tools that need it.
* Improve XUnit test boilerplate. Printing `Exception.Message` doesn't include stack trace. Use `ToString()` instead.
* Import notargets sdk in `helixpublicwitharcade.proj`. It doesn't use the official sdk so `BundledNETCoreAppPackageVersion` wasn't set. Import the `Microsoft.Build.NoTargets` sdk so we can find the bundled runtime package version.
Jose Perez Rodriguez [Fri, 15 May 2020 01:02:11 +0000 (18:02 -0700)]
Adding the support of reusing machine-wide credentials in the case where the machine is already domain-joined to the LDAP Server. (#36405)
* Adding the support of reusing machine-wide credentials in the case where
the machine is already domain-joined to the LDAP Server.
Co-authored-by: Alexander Chermyanin <flamencist@mail.ru>
* Addressing feedback and adding ldap4net to TPN
Co-authored-by: Alexander Chermyanin <flamencist@mail.ru>
Layomi Akinrinade [Fri, 15 May 2020 00:45:19 +0000 (17:45 -0700)]
Merge remote-tracking branch 'upstream/master' into kvp_policy
Layomi Akinrinade [Fri, 15 May 2020 00:39:08 +0000 (20:39 -0400)]
Add options to ignore default values during serialization (#36322)
* Add options to ignore default values during serialization
* Address review feedback
* Fix typo in test
Santiago Fernandez Madero [Thu, 14 May 2020 23:51:48 +0000 (16:51 -0700)]
Move mobile test runners to libs.pretest instead of P2P (#36473)