platform/upstream/dotnet/runtime.git
4 years agoapply feedback
Krzysztof Wicher [Tue, 2 Jun 2020 18:18:37 +0000 (11:18 -0700)]
apply feedback

4 years agoNullable: System.Xml, part 3
Krzysztof Wicher [Fri, 29 May 2020 21:07:47 +0000 (14:07 -0700)]
Nullable: System.Xml, part 3

4 years agoRemoved redundant visibility check (#36648)
Yoh Deadfall [Mon, 18 May 2020 16:16:23 +0000 (19:16 +0300)]
Removed redundant visibility check (#36648)

4 years agoFix failing Sockets tests after argument exception changes (#36645)
Stephen Toub [Mon, 18 May 2020 15:58:41 +0000 (11:58 -0400)]
Fix failing Sockets tests after argument exception changes (#36645)

4 years agoDelete OrderBy(...).First{OrDefault}(...) optimization (#36643)
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.

4 years agoSync one more shared crossgen2 file (#36638)
Michal Strehovský [Mon, 18 May 2020 15:38:04 +0000 (17:38 +0200)]
Sync one more shared crossgen2 file (#36638)

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200518.2 (#36647)
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>
4 years ago[mono] Linking statically ICU shim on mono (#35790)
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.

4 years agoFix mono file name on iOS/Browser (#36646)
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.

4 years ago[mono] Fix AssemblyLoadContext.GetRuntimeAssembly() for AssemblyBuilders (#36367)
Alexis Christoforides [Mon, 18 May 2020 12:46:49 +0000 (08:46 -0400)]
[mono] Fix AssemblyLoadContext.GetRuntimeAssembly() for AssemblyBuilders (#36367)

4 years agoAdd iOS x86 build (#36602)
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.

4 years agoNaricc/ci interpreter arm64 (#36258)
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.

4 years agoCMake: Point download URLs directly to https:// (#36615)
Nick Craver [Sun, 17 May 2020 23:27:13 +0000 (19:27 -0400)]
CMake: Point download URLs directly to https:// (#36615)

4 years agoSync crossgen2 shared files (#36610)
Michal Strehovský [Sun, 17 May 2020 19:35:32 +0000 (21:35 +0200)]
Sync crossgen2 shared files (#36610)

4 years agoRemoved left-over NUnit references from comments (#36606)
Alfred Myers [Sun, 17 May 2020 15:37:47 +0000 (12:37 -0300)]
Removed left-over NUnit references from comments (#36606)

4 years ago[master] Update dependencies from mono/linker Microsoft/vstest dotnet/xharness (...
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>
4 years ago[interp] Don't share interp_in signatures for different valuetypes (#36520)
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>
4 years ago[mono] Enable some System.Reflection.Emit tests (#35872)
Alexis Christoforides [Sat, 16 May 2020 17:38:41 +0000 (13:38 -0400)]
[mono] Enable some System.Reflection.Emit tests (#35872)

4 years agoFix StackTraceTests to work with JIT optimization (#36596)
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.

4 years agoupdating area owners (#36467)
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

4 years agoPort changes to shared files Nullable.cs, Enum.cs (#36597)
Michal Strehovský [Sat, 16 May 2020 14:09:54 +0000 (16:09 +0200)]
Port changes to shared files Nullable.cs, Enum.cs (#36597)

4 years ago[mono] Use "dotnet publish" for Android sample with ILLink (#36593)
Egor Bogatov [Sat, 16 May 2020 13:15:56 +0000 (16:15 +0300)]
[mono] Use "dotnet publish" for Android sample with ILLink (#36593)

4 years agoSslStream.AuthenticateAs sync overloads with SslOptions made public (#36221)
Marie Píchová [Sat, 16 May 2020 09:15:05 +0000 (11:15 +0200)]
SslStream.AuthenticateAs sync overloads with SslOptions made public (#36221)

4 years agoFix IL projects build inside visual studio (#36570)
Santiago Fernandez Madero [Sat, 16 May 2020 06:16:48 +0000 (23:16 -0700)]
Fix IL projects build inside visual studio (#36570)

4 years agoProduce DropFromSingleFile annotations in RuntimeList.xml (#36578)
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

4 years agoBuild an apphost with hostfxr and hostpolicy linked in (#36230)
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>
4 years agoDelete DebugThreadTracking from networking code (#36549)
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.

4 years agoMore HTTP/2 performance (and a few functional) improvements (#36246)
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

4 years agoMerge pull request #36153 from krwq/sp_rem_sysnative_dep
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

4 years agoFix argument exception warnings on runtime (#35717)
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

4 years agoNext round of multireg preliminary changes (#36155)
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

4 years agoEnable basic generation of ngen pdb from composite image (#36311)
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.

4 years agoDisable MemoryCacheTest.Trim in arm64 and enable Runtime.Caching tests on Unix (...
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)

4 years ago[master] Update dependencies from mono/linker Microsoft/vstest dotnet/xharness (...
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>
4 years agoAdd comment to NetworkStream's ctor about socket.Blocking check (#36539)
Stephen Toub [Fri, 15 May 2020 19:06:34 +0000 (15:06 -0400)]
Add comment to NetworkStream's ctor about socket.Blocking check (#36539)

4 years agoMove mobile AppBuilder & AOTCompiler projects into tools-local (#36478)
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.

4 years agoMerge pull request #36347 from NikolaMilosavljevic/burn.ui
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

4 years agoConvert Extract(0) to ToScalar() (#36474)
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

4 years agoClean up text in config.yml issue template (#36529)
Stephen Toub [Fri, 15 May 2020 14:48:15 +0000 (10:48 -0400)]
Clean up text in config.yml issue template (#36529)

4 years agoIgnore .github folder changes in CI (#36530)
Viktor Hofer [Fri, 15 May 2020 14:45:36 +0000 (16:45 +0200)]
Ignore .github folder changes in CI (#36530)

4 years agoRename 'Blank' issue template to 'Blank issue' (#36533)
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

4 years agoConsolidate NetCoreAppCurrent properties (#35953)
Viktor Hofer [Fri, 15 May 2020 14:03:20 +0000 (16:03 +0200)]
Consolidate NetCoreAppCurrent properties (#35953)

4 years agoUpdate 02_api_proposal.md
Stephen Toub [Fri, 15 May 2020 13:56:50 +0000 (09:56 -0400)]
Update 02_api_proposal.md

4 years agoUpdate 02_api_proposal.md
Stephen Toub [Fri, 15 May 2020 13:55:59 +0000 (09:55 -0400)]
Update 02_api_proposal.md

4 years agoorder issue template files (#36524)
Eirik Tsarpalis [Fri, 15 May 2020 13:51:05 +0000 (14:51 +0100)]
order issue template files (#36524)

4 years agoUpdate XHarness for latest fixes (#36484)
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.

4 years ago[docs] How to run tests on iOS and Android (#36297)
Egor Bogatov [Fri, 15 May 2020 12:02:05 +0000 (15:02 +0300)]
[docs] How to run tests on iOS and Android (#36297)

4 years ago[mono] Improve Android OpenSSL temp hack (#36463)
Egor Bogatov [Fri, 15 May 2020 11:48:11 +0000 (14:48 +0300)]
[mono] Improve Android OpenSSL temp hack (#36463)

4 years agoImplement get_own_executable_path for SunOS (#36514)
Adeel Mujahid [Fri, 15 May 2020 09:11:39 +0000 (12:11 +0300)]
Implement get_own_executable_path for SunOS (#36514)

4 years agoRefactor `HasMultiRegRetVal` and `impFixupCallStructReturn`. (#36465)
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`.

4 years agoImprove Uri.Equals by removing unsafe code (#36444)
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

4 years agoMerge pull request #36424 from layomia/kvp_policy
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

4 years agoFix DAC layout in checked builds (#35542)
Steve MacLean [Fri, 15 May 2020 02:00:10 +0000 (22:00 -0400)]
Fix DAC layout in checked builds (#35542)

4 years agoAdd dotnet cli to runtime test Helix jobs (#35426)
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.

4 years agoAdding the support of reusing machine-wide credentials in the case where the machine...
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>
4 years agoMerge remote-tracking branch 'upstream/master' into kvp_policy
Layomi Akinrinade [Fri, 15 May 2020 00:45:19 +0000 (17:45 -0700)]
Merge remote-tracking branch 'upstream/master' into kvp_policy

4 years agoAdd options to ignore default values during serialization (#36322)
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

4 years agoMove mobile test runners to libs.pretest instead of P2P (#36473)
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)

4 years agoImplement unwrapping a ComWrappers CCW when dumping a stowed exception. (#36360)
Jeremy Koritzinsky [Thu, 14 May 2020 23:27:35 +0000 (16:27 -0700)]
Implement unwrapping a ComWrappers CCW when dumping a stowed exception. (#36360)

4 years agoAdd issue templates (#36431)
Dan Moseley [Thu, 14 May 2020 23:19:16 +0000 (16:19 -0700)]
Add issue templates (#36431)

* more

* commented

* yml

* Add an issue template for API proposals

* Update .github/ISSUE_TEMPLATE/api-proposal.md

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update .github/ISSUE_TEMPLATE/api-proposal.md

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update .github/ISSUE_TEMPLATE/api-proposal.md

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* comment out template instructions

* apply consistent naming

* feedback

* add blank

* H2 and H3

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoR2RTest - Partial composite images (#36471)
Simon Nattress [Thu, 14 May 2020 23:18:55 +0000 (16:18 -0700)]
R2RTest - Partial composite images (#36471)

Allow compiling composite R2R images which reference assemblies not in the composite. For example, this would allow compiling a set of application assemblies with references to ASP.NET / Framework. Currently R2RTest treats all references as unrooted inputs for the composite image.

4 years agoRemove unnessary guard against switched property names
Layomi Akinrinade [Thu, 14 May 2020 22:31:53 +0000 (15:31 -0700)]
Remove unnessary guard against switched property names

4 years agoIssue 36212: Remove space in parameter name (#36439)
Shimmy [Thu, 14 May 2020 21:53:25 +0000 (00:53 +0300)]
Issue 36212: Remove space in parameter name (#36439)

* Issue 36212: Remove space in parameter name

* Update src/coreclr/src/vm/comutilnative.cpp

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoNext round of Struct Improvements (#36146)
Carol Eidt [Thu, 14 May 2020 21:49:33 +0000 (14:49 -0700)]
Next round of Struct Improvements (#36146)

- Allow accessing a SIMD12 as 16 bytes if it's the single field of a parent struct of 16 bytes.
- On x64/ux don't copy an argument just because it is promoted; the copy would force it to memory anyway.
- Use block init for a promoted struct that's been marked lvDoNotEnregister.
- Allow field-by-field copy of structs with the same fields

4 years agoOptimize ToScalar() and GetElement() to use arm64 intrinsic (#36156)
Kunal Pathak [Thu, 14 May 2020 21:06:45 +0000 (14:06 -0700)]
Optimize ToScalar() and GetElement() to use arm64 intrinsic (#36156)

* ARM64 intrisic for ToScalar() and GetElement()

* Fixed GetElement to just operate on constants

* Fix bug in rationalize for Vector64<long>

* fix NotSupported issue for GetElement and ToScalar

* Reuse the baseType/retType in impSpecialIntrinsic and impBaseIntrinsic

* Update comment

* fix breaks

* add comments

* ran jit-format

* Refactored to move common logic inside isSupportedBaseType

* review comments

* reuse simdSize

* formatting

* one missing formatting

4 years agoReplace System.Native call in Interop.Errors.cs
Krzysztof Wicher [Thu, 14 May 2020 21:00:32 +0000 (14:00 -0700)]
Replace System.Native call in Interop.Errors.cs

4 years agoStartup optimization w.r.t. manifest access in composite mode (#36446)
Tomáš Rylek [Thu, 14 May 2020 20:19:08 +0000 (22:19 +0200)]
Startup optimization w.r.t. manifest access in composite mode (#36446)

During my work on fixing runtime crashes in composite build
with large version bubble enabled I noticed room for startup
perf improvement and a very slight working set optimization:

For component assemblies of a composite image, we can basically
share the cache of those manifest assembly references that
have already been resolved (GetNativeMetadataAssemblyRefFromCache)
within the native image because that is the logical owner
of the manifest metadata.

In the "asymptotic" case of composite images with many
components, the pre-existing behavior was basically
a quadratic O(n^2) algorithm in the number of component
assemblies. This change reduces it to linear in the sense
that all assembly references from the composite image get
resolved only once.

Thanks

Tomas

4 years ago[Mono] Don't set thread name of main thread on Linux (#36116)
Aleksey Kliger (λgeek) [Thu, 14 May 2020 19:57:32 +0000 (15:57 -0400)]
[Mono] Don't set thread name of main thread on Linux (#36116)

* [mono] Record MonoNativeThreadId of the main thread

We would like to know the MonoNativeThreadId (pthread_t on Linux) of the main
thread of the application.  We can identify the main thread (on linux) because
it is the one for which `gettid () == getpid ()`.  (`gettid()` returns a
`pid_t` which is not the same thing as a `pthread_t`, hence this roundabout way
of detecting it.)

A complication arises in embedding scenarios: the main thread is not
necessarily the one that calls `mono_jit_init` or otherwise interacts with the
runtime.  Therefore we do the `gettid() == getpid ()` test at `MonoThreadInfo`
creation time when we call `register_thread`.

If the main thread never interacts with Mono, the main thread is not known to
us.

* [mono] Don't set name of main thread on Linux

Setting the name of the main thread also changes the name of the process.

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

The corresponding fix for CoreCLR is https://github.com/dotnet/runtime/pull/34064

* Re-enable test from https://github.com/dotnet/runtime/pull/34064

4 years agoMake depproj intermediate output paths unique again (#36451)
Viktor Hofer [Thu, 14 May 2020 18:50:17 +0000 (20:50 +0200)]
Make depproj intermediate output paths unique again (#36451)

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

Depprojs depend on IntermediateOutputPath being set in a props file early enough as restore is happening per configuration. Even though it isn't recommended that the TargetFramework property is read before the project is loaded, we currently encode the TargetFramework in the IntermediateOutputPath for depproj files. The long-term fix is to get rid of per configuration restores by getting rid of our depproj files.

4 years agoUpdate Linux docker instructions (#36370)
Simon Nattress [Thu, 14 May 2020 18:12:30 +0000 (11:12 -0700)]
Update Linux docker instructions (#36370)

* Update linux-instructions.md to use root build.sh

4 years ago[mono] Shrink Android APK size (#36437)
Egor Bogatov [Thu, 14 May 2020 16:56:11 +0000 (19:56 +0300)]
[mono] Shrink Android APK size (#36437)

* Shrink Android apk size

* bump xharness cli, use cmake config

4 years agoAdd an atexit handler to bypass calls into ERR_ string routines.
Jeremy Barton [Thu, 14 May 2020 15:29:32 +0000 (08:29 -0700)]
Add an atexit handler to bypass calls into ERR_ string routines.

This works around Ubuntu's apparent lack of NO_ATEXIT support in their
build of OpenSSL.

4 years agoSupport additional friendly names on ECC OIDs
Kevin Jones [Thu, 14 May 2020 15:28:44 +0000 (11:28 -0400)]
Support additional friendly names on ECC OIDs

Expand the name/OID table to support a m:m relationship (secp256r1 and nistP256 are both 1.2.840.10045.3.1.7; 1.3.14.7.2.3.1 and 1.2.840.113549.1.1.4 are both md5RSA) and add in the alternative names for the secp{size}r1 curves (size in 256, 384, 521).

4 years ago[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#36445)
dotnet-maestro[bot] [Thu, 14 May 2020 14:24:31 +0000 (16:24 +0200)]
[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#36445)

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenAPI , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.GenFacades
 From Version 5.0.0-beta.20258.8 -> To Version 5.0.0-beta.20261.9

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

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20262.1 -> To Version 5.0.0-preview.3.20264.1

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

Microsoft.DotNet.XHarness.Tests.Runners
 From Version 1.0.0-prerelease.20263.4 -> To Version 1.0.0-prerelease.20264.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoConsolidate subset projects into ProjectToBuild (#36441)
Viktor Hofer [Thu, 14 May 2020 14:05:38 +0000 (16:05 +0200)]
Consolidate subset projects into ProjectToBuild (#36441)

Consolidating subset projects into a single ProjectToBuild item type to
allow specifying projects to build from different subsets after the
subset was already built.

4 years agoUpdate message for generic type. (#36434)
Aaron Robinson [Thu, 14 May 2020 13:54:10 +0000 (06:54 -0700)]
Update message for generic type. (#36434)

4 years agoRemove duplicate configuration properties (#36442)
Viktor Hofer [Thu, 14 May 2020 13:42:18 +0000 (15:42 +0200)]
Remove duplicate configuration properties (#36442)

4 years agoWork around -no_weak_imports issue with recent Xcode (#36436)
Alexander Köplinger [Thu, 14 May 2020 12:48:51 +0000 (14:48 +0200)]
Work around -no_weak_imports issue with recent Xcode (#36436)

See https://github.com/mono/mono/issues/19393.

We can use the `-Werror=partial-availability` as a good alternative until the Xcode bug is fixed.

4 years ago[debugger] Removing some asserts (#36234)
monojenkins [Thu, 14 May 2020 12:16:41 +0000 (08:16 -0400)]
[debugger] Removing some asserts (#36234)

Removing some asserts and returning err_invalid_argument with an error message when it's possible.

Fixes https://github.com/mono/mono/issues/19651

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoUpdate windows prerequisites to be more specific about SDK (#36438)
Ganbarukamo41 [Thu, 14 May 2020 10:21:02 +0000 (19:21 +0900)]
Update windows prerequisites to be more specific about SDK (#36438)

* Update windows prerequisites to be more specific about SDK

* Global installation of nightly SDK is required to normally browse the solution files in VS, as there is no way to supply SDKs when the solution files are opened through VS.

* Update windows prerequisites

* allow newer versions of VS workloads

4 years agoFix mono runtime build warnings when building iOS config (#36435)
Alexander Köplinger [Thu, 14 May 2020 10:12:56 +0000 (12:12 +0200)]
Fix mono runtime build warnings when building iOS config (#36435)

```
  /Users/alexander/dev/runtime/src/mono/mono/mini/aot-runtime.c:5647:13: warning: unused variable 'image' [-Wunused-variable]

  /Users/alexander/dev/runtime/src/mono/mono/mini/simd-intrinsics-netcore.c:11:1: warning: no previous prototype for function 'mono_simd_intrinsics_init' [-Wmissing-prototypes]

  /Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1230:1: warning: no previous prototype for function 'mono_crash_save_failfast_msg' [-Wmissing-prototypes]
  /Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1236:1: warning: no previous prototype for function 'mono_crash_get_failfast_msg' [-Wmissing-prototypes]
```

4 years agoImplement GetEntrypointExecutableAbsPath on SunOS (#36430)
Adeel Mujahid [Thu, 14 May 2020 09:44:50 +0000 (12:44 +0300)]
Implement GetEntrypointExecutableAbsPath on SunOS (#36430)

* Implement `GetEntrypointExecutableAbsolutePath`.
* Fix a warning from newer gawk (v5.0.1 from 2019):
  > ```sh
  > awk: /runtime/src/coreclr/src/nativeresources/processrc.awk:54:
  > warning: regexp escape sequence `\"' is not a known regexp operator
  > ```

4 years agoRework rejit test to ensure subprocess environment is suitable (#36420)
Andy Ayers [Thu, 14 May 2020 08:09:25 +0000 (01:09 -0700)]
Rework rejit test to ensure subprocess environment is suitable (#36420)

This test is optimization sensitive, but it invokes a subprocess that
will inherit environment variables like `COMPlus_JITMinOpts` that can impact
optimization of code jitted in the subprocess and cause the test to fail.

So, update the parent process code to override `COMPlus_JITMinOpts` and
`COMPlus_JitStress` for the child process.

Closes #35742.

4 years ago[master] Update dependencies from mono/linker dotnet/llvm-project dotnet/xharness...
dotnet-maestro[bot] [Thu, 14 May 2020 08:03:12 +0000 (08:03 +0000)]
[master] Update dependencies from mono/linker dotnet/llvm-project dotnet/xharness (#36336)

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

- Microsoft.NET.ILLink.Tasks: 5.0.0-preview.3.20261.2 -> 5.0.0-preview.3.20262.1

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

- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1

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

- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20261.4 -> 1.0.0-prerelease.20263.4

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoRemove Microsoft.NETCore.Platforms.Future project (#36407)
Alexander Köplinger [Thu, 14 May 2020 07:20:14 +0000 (09:20 +0200)]
Remove Microsoft.NETCore.Platforms.Future project (#36407)

It's no longer used.

4 years agoFix execution of large version bubble composite images (#36373)
Tomáš Rylek [Thu, 14 May 2020 06:24:22 +0000 (08:24 +0200)]
Fix execution of large version bubble composite images (#36373)

Large-bubble composite images are special in having more entries
in the manifest metadata than in the component assembly table:
When the build starts, all component assemblies get hard-injected
into the manifest metadata and subsequently we lazily add those
additional reference assemblies (within the same version bubble)
as we need for encoding signatures.

Thanks

Tomas

4 years agoMove Mobile test runners to libraries/common and use P2P references (#36411)
Santiago Fernandez Madero [Thu, 14 May 2020 03:25:40 +0000 (20:25 -0700)]
Move Mobile test runners to libraries/common and use P2P references (#36411)

* Move Mobile test runners to libraries/common and use P2P references

* PR Feedback

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoImprove Sse41.Multiply compatibility with LLVM 9. (#36369)
imhameed [Thu, 14 May 2020 03:17:07 +0000 (20:17 -0700)]
Improve Sse41.Multiply compatibility with LLVM 9. (#36369)

The llvm.x86.sse41.pmuldq intrinsic is no longer available as of
https://github.com/dotnet/llvm-project/commit/254ed028a4bd4fa81d0049d90e6ab23d704dd366.

This also adds a convenience wrapper for creating constant LLVM IR
vectors, up to 16 elements long, of arbitrary integral type.

Finally, fix a latent bug in init_function_pass_manager;
llvm::StringRef::size returns a value of type size_t, but the printf
precision specifier requires a value of type int.

4 years agoDisable test GitHub_35821 (#36419)
Kunal Pathak [Thu, 14 May 2020 02:18:18 +0000 (19:18 -0700)]
Disable test GitHub_35821 (#36419)

4 years agoFix cross-compiling argument validation for Linux (#36368)
Viktor Hofer [Thu, 14 May 2020 02:17:13 +0000 (04:17 +0200)]
Fix cross-compiling argument validation for Linux (#36368)

* Fix cross-compiling argument validation for Linux

https://github.com/dotnet/runtime/commit/7c66b6fb6fb00dd86d969ec622a9bb2830016375 added a ValidateSet for Windows_NT and Unix even though we don't support building for just "Unix" but for the more concrete OS which is "Linux".

* Update build.ps1

4 years agoHonor PropertyNamingPolicy, PropertyNameCaseInsensitive, & Encoder options when ...
Layomi Akinrinade [Wed, 13 May 2020 23:20:04 +0000 (16:20 -0700)]
Honor PropertyNamingPolicy, PropertyNameCaseInsensitive, & Encoder options when (de)serializing KeyValuePair instances

4 years agoOptimize Vector64 and Vector128.Create methods (#36267)
Tanner Gooding [Wed, 13 May 2020 23:51:20 +0000 (16:51 -0700)]
Optimize Vector64 and Vector128.Create methods  (#36267)

* Updating the Vector64 and Vector128 Create methods to be marked Intrinsic on ARM64

* Updating the JIT to emit constants for Vector64 and Vector128.Create

* Fixing lookupNamedIntrinsic and impIntrinsic to throw PNSE for unsupported mustExpand intrinsics

* Fixing impIntrinsic to directly use gtNewMustThrowException

* Move gtNewMustThrowException to not depend on FEATURE_HW_INTRINSICS

* Applying formatting patch

* Add basic support for GT_CLS_VAR_ADDR to the ARM64 JIT

* Update lookupNamedIntrinsic to handle System.Runtime.Intrinsics for unsupported platforms

* Fixing INS_ldr in emitIns_R_C to use isValidVectorLSDatasize

* Elaborate on why we specially recognize the HWIntrinsics even on platforms that don't support them

4 years agoIncorrect CALLSITE macro usage. (#36357)
Aaron Robinson [Wed, 13 May 2020 23:16:53 +0000 (16:16 -0700)]
Incorrect CALLSITE macro usage. (#36357)

4 years agoAdding sdlConfig file to move policheck out of the build (#36142)
Anirudh Agnihotry [Wed, 13 May 2020 22:37:34 +0000 (15:37 -0700)]
Adding sdlConfig file to move policheck out of the build (#36142)

* sdlfile

* add the variable names

4 years agoAdd configurations for SunOS in installer (#36316)
Adeel Mujahid [Wed, 13 May 2020 21:46:33 +0000 (00:46 +0300)]
Add configurations for SunOS in installer (#36316)

4 years agoDisable System.Diagnostics.Tests.EventLogSourceCreationTests (#36138)
Santiago Fernandez Madero [Wed, 13 May 2020 21:28:55 +0000 (14:28 -0700)]
Disable System.Diagnostics.Tests.EventLogSourceCreationTests (#36138)

* Disable System.Diagnostics.Tests.EventLogSourceCreationTests.CheckSourceExistenceAndDeletion

* Fix trait to skip tests in CI

* Use ActiveIssue instead

4 years agoBundleProbeTest: Enable disabled tests (#36327)
Swaroop Sridhar [Wed, 13 May 2020 21:09:18 +0000 (14:09 -0700)]
BundleProbeTest: Enable disabled tests (#36327)

A few of the bundle probe tests were failing on Linux-musl-x64-release.
This change adjusts the test to circumvent the failure.

Fixes #35755

4 years agoUpdate to v3.0.0 of Microsoft.CodeAnalysis.FxCopAnalyzers (#36318)
Stephen Toub [Wed, 13 May 2020 21:07:11 +0000 (17:07 -0400)]
Update to v3.0.0 of Microsoft.CodeAnalysis.FxCopAnalyzers (#36318)

4 years agoMove serializer KeyValuePair tests to dedicated file
Layomi Akinrinade [Wed, 13 May 2020 20:07:30 +0000 (13:07 -0700)]
Move serializer KeyValuePair tests to dedicated file

4 years agoFix Path.GetPathRoot wrong check in Unix (#35734)
Carlos Sanchez Lopez [Wed, 13 May 2020 19:24:01 +0000 (12:24 -0700)]
Fix Path.GetPathRoot wrong check in Unix (#35734)

* Fix Path.GetPathRoot wrong check in Unix

* Return .Empty instead of null

* Update src/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Address unit test comments

Co-authored-by: Jan Kotas <jkotas@microsoft.com>