platform/upstream/dotnet/runtime.git
4 years agoDelete broken sync.sh script from coreclr (#562)
Viktor Hofer [Thu, 5 Dec 2019 14:51:17 +0000 (15:51 +0100)]
Delete broken sync.sh script from coreclr (#562)

4 years agoDelete unused dotnet-download.ps1 file in coreclr (#561)
Viktor Hofer [Thu, 5 Dec 2019 14:50:45 +0000 (15:50 +0100)]
Delete unused dotnet-download.ps1 file in coreclr (#561)

4 years agoFix xml doc comment on FlushResult.IsCompleted (#491)
Andrew Arnott [Thu, 5 Dec 2019 13:52:29 +0000 (06:52 -0700)]
Fix xml doc comment on FlushResult.IsCompleted (#491)

4 years agoFix crossgen2 ArgIterator for SystemV Amd64 Unix ABI (#499)
Jan Vorlicek [Thu, 5 Dec 2019 10:40:22 +0000 (11:40 +0100)]
Fix crossgen2 ArgIterator for SystemV Amd64 Unix ABI (#499)

* Fix crossgen2 ArgIterator for amd64 Unix ABI

The ArgIterator was missing proper handling of the SystemV struct classification.
There were also several minor issues.

* Remove the SystemV struct classification cache

Running without the cache showed no difference in the total build time of
all the coreclr pri1 tests and all the runtime assemblies, so I am removing
the cache.

4 years agoFix linux musl arm64 testing (#523)
Jarret Shook [Thu, 5 Dec 2019 06:17:53 +0000 (22:17 -0800)]
Fix linux musl arm64 testing (#523)

* Fix linux musl arm64 testing

1. Increase crossgen-comparion job to 2 hour timeout
2. modify .gitignore to include .devcontainer -> vscode hidden folder

* Update comment

4 years agoDocument FPU options (#546)
Sinan Kaya [Thu, 5 Dec 2019 05:25:52 +0000 (00:25 -0500)]
Document FPU options (#546)

4 years agoFix comments referencing non-existent CorInfoFlags value. (#549)
Bruce Forstall [Thu, 5 Dec 2019 04:40:57 +0000 (20:40 -0800)]
Fix comments referencing non-existent CorInfoFlags value. (#549)

4 years agoAnnotate System.ComponentModel.EventBasedAsync for nullable reference types (#466)
Stephen Toub [Thu, 5 Dec 2019 03:11:25 +0000 (22:11 -0500)]
Annotate System.ComponentModel.EventBasedAsync for nullable reference types (#466)

* Annotate System.ComponentModel.EventBasedAsync for nullable reference types

* Address PR feedback

4 years agoAnnotate System.IO.FileSystem.DriveInfo for nullable reference types (#464)
Stephen Toub [Thu, 5 Dec 2019 03:11:12 +0000 (22:11 -0500)]
Annotate System.IO.FileSystem.DriveInfo for nullable reference types (#464)

* Annotate System.IO.FileSystem.DriveInfo for nullable reference types

* Address PR feedback

4 years agoUpdate nullability.md
Stephen Toub [Thu, 5 Dec 2019 03:00:49 +0000 (22:00 -0500)]
Update nullability.md

4 years agoUpdate nullability.md with notes on disposal
Stephen Toub [Thu, 5 Dec 2019 03:00:14 +0000 (22:00 -0500)]
Update nullability.md with notes on disposal

4 years agoUpdate libraries pr/ci build to use live coreclr (#526)
Santiago Fernandez Madero [Thu, 5 Dec 2019 01:39:41 +0000 (17:39 -0800)]
Update libraries pr/ci build to use live coreclr (#526)

* Use live coreclr for libraries pipeline

* Remove RHEL 6 from build pipelines

* Fix the way we flow conditions to include succeeded into the condition

4 years agoMerge pull request #519 from nattress/bad_devirt
Simon Nattress [Thu, 5 Dec 2019 01:18:51 +0000 (17:18 -0800)]
Merge pull request #519 from nattress/bad_devirt

Remove overly eager devirtualization optimization

4 years agoAvoid allocating Regex when using static methods (#496)
Stephen Toub [Wed, 4 Dec 2019 22:02:08 +0000 (17:02 -0500)]
Avoid allocating Regex when using static methods (#496)

* Avoid allocating Regex when using static methods

Regex supports a cache that's meant to be used for the static methods, e.g. the static Regex.IsMatch.  However, currently that cache isn't caching the actual Regex class, but rather a sub object that stores some of the state from the Regex and then is used to rehydrate a new Regex instance.  This means we allocate a new Regex object when these static methods are used, even if the data is found in the cache.  This means an operation like the static Regex.IsMatch is never allocation-free.  There's also weirdness around this caching, in that when a new Regex instance is constructed, it checks the cache (paying the relevant lookup costs) even though it doesn't add back to the cache, so the only way it would ever find something in the cache is if the same set of inputs (e.g. pattern, options, timeout, etc.) are used with both the Regex ctor and with the static methods, where the static methods would populate the cache that's then consulted by the ctor.  This adds unnecessary expense on the common path for a very uncommon situation; it also complicates the code non-trivially.

This commit changes things to cleanly separate the cache from Regex, and to actually cache the Regex instance itself.

* Address PR feedback

4 years agoSkip compilation for methods with BypassReadyToRun attribute (#516)
Fadi Hanna [Wed, 4 Dec 2019 21:30:05 +0000 (13:30 -0800)]
Skip compilation for methods with BypassReadyToRun attribute (#516)

4 years agoRemove overly eager devirtualization optimization
Simon Nattress [Wed, 4 Dec 2019 19:53:11 +0000 (11:53 -0800)]
Remove overly eager devirtualization optimization

Earlying out when `declMethod.OwningType == implType` is incorrect when the devirtualization manager resolves a call to `C2::M3` due to the presence of MethodImpls which redirect the slot (if a .override changes the slot, we bail on devirtualizing the call). In the example below (which is taken from https://github.com/dotnet/runtime/blob/859926f4c37158c683157bcd0f2b9d3c62d1f650/src/coreclr/tests/src/Loader/classloader/methodoverriding/regressions/576621/test.il#L10), `C2::M1` provides an override for `C1::M3` (which says the method body now comes from the virtual method `C2::M1`) which comes from a different vtable slot.

```
.class public C1
{
   .method public   virtual instance int32 M1()
   {
      ldc.i4 1
      ret
   }
   .method public   virtual instance int32 M3()
   {
      ldc.i4 3
      ret
   }
}

.class public C2 extends C1
{
   .method public   virtual instance int32 M3()
   {
      ldc.i4 4
      ret
   }
   .method public virtual instance int32 M1()
   {
    .override C1::M3
      ldc.i4 5
      ret
   }
}
```

4 years agoChange ArchiveTest reads to FixArchiveTests (#511)
Viktor Hofer [Wed, 4 Dec 2019 18:58:24 +0000 (19:58 +0100)]
Change ArchiveTest reads to FixArchiveTests (#511)

With 1d5de1533ad35b39f776701c4d22b68a3def2dd8, the ArchiveTest property
was removed. This fixes the remaining places where the old property is
still read. Additionally this introduces a new property `IgnoreForCI`
which is consistent with the xunit trait to skip the whole assembly for
CI testing.

4 years agoAllow FPU flag override (#471)
Sinan Kaya [Wed, 4 Dec 2019 18:20:00 +0000 (13:20 -0500)]
Allow FPU flag override (#471)

Command line to build for vfpv3-d16 ARM Cortex-5:

./build.sh -cross -arm -cmakeargs -DCLR_ARM_FPU_CAPABILITY=0x3 -cmakeargs -DCLR_ARM_FPU_TYPE=vfpv3-d16

Fixes https://github.com/dotnet/coreclr/issues/17043

4 years agoFix regression with manifest table: do not write entries that are already in the...
Fadi Hanna [Wed, 4 Dec 2019 15:06:30 +0000 (07:06 -0800)]
Fix regression with manifest table: do not write entries that are already in the list of assembly refs (#500)

4 years ago[master] Update dependencies from dotnet/arcade Microsoft/vstest (#398)
dotnet-maestro[bot] [Wed, 4 Dec 2019 14:50:15 +0000 (15:50 +0100)]
[master] Update dependencies from dotnet/arcade Microsoft/vstest (#398)

* Update dependencies from https://github.com/microsoft/vstest build 20191202-02

- Microsoft.NET.Test.Sdk - 16.5.0-preview-20191202-02

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.19603.17
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19603.17
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.19603.17
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.19603.17
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19603.17
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.19603.17
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.19603.17
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.19603.17
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.19603.17
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.19603.17
- Microsoft.DotNet.GenAPI - 5.0.0-beta.19603.17
- Microsoft.DotNet.GenFacades - 5.0.0-beta.19603.17
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19603.17
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.19603.17

* Remove manually specified package test TFMs

4 years agoSystem.NET Powershell Deployment scripts. (#501)
Erhan Atesoglu [Wed, 4 Dec 2019 03:01:59 +0000 (19:01 -0800)]
System.NET Powershell Deployment scripts. (#501)

This is a first commit of self contained PowerShell scripts in the Deployment directory.

4 years agofixed VirtualMemoryLogging::logRecords overflow (#308)
Qin Li [Tue, 3 Dec 2019 23:23:10 +0000 (15:23 -0800)]
fixed VirtualMemoryLogging::logRecords overflow (#308)

when VirtualMemoryLogging::recordNumber increments from LONG_MAX,
it became negative number, and the result of i % MaxRecords became
a number from -127 to 0.

When that happens we will ovewrite CRITICAL_SECTION virtual_critsec
which are stored in bss right before logRecords with garbage data.
Then most likely the process will have a GC hang with one or more
GC threads stuck trying to enter or leave critical section.

The fix is to ensure ULONG value are passed to modulo operation.

4 years agoInitial live-live CI pipeline (#294)
Tomáš Rylek [Tue, 3 Dec 2019 22:40:00 +0000 (23:40 +0100)]
Initial live-live CI pipeline (#294)

Initial changes towards combined live testing of the runtime subrepos

4 years agoMake Crossgen2 tests run daily (#482)
Sergiy Kuryata [Tue, 3 Dec 2019 22:29:14 +0000 (14:29 -0800)]
Make Crossgen2 tests run daily (#482)

4 years agoFix broken links in CONTRIBUTING.md documentation (#488)
Thomas Gassmann [Tue, 3 Dec 2019 21:25:21 +0000 (22:25 +0100)]
Fix broken links in CONTRIBUTING.md documentation (#488)

There were some broken links in the contributing docs, probably caused
by the repo consolidation.

4 years agostabilize Copy_LargeMultiDimensionalArray test (#484)
Tomas Weinfurt [Tue, 3 Dec 2019 20:07:58 +0000 (12:07 -0800)]
stabilize Copy_LargeMultiDimensionalArray test (#484)

4 years agoremove one more curl leftover (#481)
Tomas Weinfurt [Tue, 3 Dec 2019 19:15:43 +0000 (11:15 -0800)]
remove one more curl leftover (#481)

4 years agoMerge pull request #470 from wfurt/ssl_renego
Tomas Weinfurt [Tue, 3 Dec 2019 18:24:37 +0000 (10:24 -0800)]
Merge pull request #470 from wfurt/ssl_renego

improve renegotiation ssl tests

4 years agoFix `genFreeLclFrame` for arm32 when using CIL jmp. (#369)
Sergey Andreenko [Tue, 3 Dec 2019 18:12:39 +0000 (10:12 -0800)]
Fix `genFreeLclFrame` for arm32 when using CIL jmp. (#369)

* Add a repro test.

* Fix `genJmpCallArgMask` for multireg arguments.

* Start actually using result of `genJmpCallArgMask`.

* GC

* Add a comment about `intRegState.rsCalleeRegArgMaskLiveIn`.

* always use `REG_R12` as our temp reg.`

Only one statement can be true:
1) There are cases where R12 can't be used and these cases were missed in the previous version, because we never excluded it from `grabMask`. That means the previous version had a bug;
2) R12 is always available and can always be used as a temp here.

* GC.

* add more info about the test failure.

* Update the header.

4 years agoDeterminism fixes (#306)
Anubhav Srivastava [Tue, 3 Dec 2019 17:30:14 +0000 (09:30 -0800)]
Determinism fixes (#306)

* More determinism fixes.

* Address PR comments. Replace lock in GetILBytes with Interlocked.CompareExchange. Remove comment saying that ILCache would eventually be removed. Fix ModuleToIndex not adding all assemblies.

* Add determinism test that compiles CORE_ROOT with two seeds. Fix nit in ManifestMetadataTableNode.

4 years agofeedback from reviewe
wfurt [Tue, 3 Dec 2019 16:45:00 +0000 (08:45 -0800)]
feedback from reviewe

4 years agoAddress review feedback from the dominator tree PR (#348)
mikedn [Tue, 3 Dec 2019 16:08:11 +0000 (18:08 +0200)]
Address review feedback from the dominator tree PR (#348)

4 years agoAnnotate System.IO.FileSystem.Watcher for nullable reference types (#456)
Stephen Toub [Tue, 3 Dec 2019 15:28:54 +0000 (10:28 -0500)]
Annotate System.IO.FileSystem.Watcher for nullable reference types (#456)

4 years agoStop throwing exception in TimeZoneInfo POSIX parsing (#458)
Eric Erhardt [Tue, 3 Dec 2019 05:01:59 +0000 (23:01 -0600)]
Stop throwing exception in TimeZoneInfo POSIX parsing (#458)

IsDaylightSavingTime_CasablancaMultiYearDaylightSavings fails on rhel.8

When parsing the tzdata POSIX string that contains an 'n' Julian date, we are currently throwing an exception, and then falling back to a TimeZoneInfo without DST enabled. However, this is a mistake because there are other DST transitions that were read from the tzdata file that are valid and usable. We shouldn't be throwing that information away.

So instead, we now skip the POSIX string if we detect an unsupported 'n' Julian date, and just use the last transition as the AdjustmentRule for all the DateTimes in the future. This way we can still make DST determinations correctly for some DateTimes.

Fix https://github.com/dotnet/corefx/issues/42192

4 years agoFix inlining issue for raw pinvoke calls when using debug builds (#455)
Fadi Hanna [Tue, 3 Dec 2019 04:56:43 +0000 (20:56 -0800)]
Fix inlining issue for raw pinvoke calls when using debug builds (#455)

* Fix inlining issue for raw pinvoke calls when using debug builds

* Do not generate PInvoke stubs for cross-module pinvokes outside of version bubble

4 years agoimprove renegotiation ssl tests
wfurt [Tue, 3 Dec 2019 04:36:13 +0000 (20:36 -0800)]
improve renegotiation ssl tests

4 years agoMerge pull request #459 from mateoatr/issue16162
Mateo Torres-Ruiz [Tue, 3 Dec 2019 04:00:51 +0000 (20:00 -0800)]
Merge pull request #459 from mateoatr/issue16162

Run app that has a directory that ends in a dot (fix [#16162](https://github.com/dotnet/coreclr/issues/16162)).

4 years agoStart using local address nodes in the JIT frontend (#305)
mikedn [Tue, 3 Dec 2019 03:03:16 +0000 (05:03 +0200)]
Start using local address nodes in the JIT frontend (#305)

* Add GenTreeLclFld getters/setters

Also change the offset type to uint16_t since the emitter does not support
offsets larger than 65535. The freed space will later be used to store a
class layout number to support struct typed GenTreeLclFld nodes.

* Track field sequences in LocalAddressVisitor

* Generate LCL_(VAR|FLD)_ADDR nodes in LocalAddressVisitor

This starts the process of moving away from ADDR nodes by generating
some LCL_(VAR|FLD)_ADDR nodes in LocalAddressVisitor. For now, these
nodes are generated in only 2 specific cases:
 - when a local address is a call argument
 - when a local address is the RHS of an assignment
There's not a lot going on with call arguments that are addresses and
the lack of some kind of forward substituion in the JIT means that the
RHS of an assignment will not move under a different node. The result
is that very few other changes are needed to support local address
nodes at this time. In particular, this avoids the need to change the
myriad of "is local address" checks and the GTF_GLOB_REF propagation
to indirections involving address exposed variables.

* Add TODO-ADDR comments

4 years agoFix a link mistake in CONTRIBUTING.md (#468)
LeaFrock [Tue, 3 Dec 2019 02:18:05 +0000 (10:18 +0800)]
Fix a link mistake in CONTRIBUTING.md (#468)

The link of api-review-process.md in the doc should be updated.

Fix #443

4 years agoRemove *.* normalization
mateoatr [Tue, 3 Dec 2019 00:31:44 +0000 (00:31 +0000)]
Remove *.* normalization

4 years agoAdd ChannelReader<T>.{Can}Count (#312)
Stephen Toub [Tue, 3 Dec 2019 00:30:00 +0000 (19:30 -0500)]
Add ChannelReader<T>.{Can}Count (#312)

4 years ago[Arm64] Support table-driven code generation for scalar intrinsics (#447)
Egor Chesakov [Tue, 3 Dec 2019 00:16:37 +0000 (16:16 -0800)]
[Arm64] Support table-driven code generation for scalar intrinsics (#447)

* Define HWIntrinsic class to incapsulate all the initialization shared between table-driven and special intrinsics in jit/hwintrinsiccodegenarm64.cpp

4 years agoImprove Regex performance (mainly interpreted) (#449)
Stephen Toub [Tue, 3 Dec 2019 00:09:19 +0000 (19:09 -0500)]
Improve Regex performance (mainly interpreted) (#449)

* Remove branches from tight inner interpreter loop in FindFirstChar

* Tweak RegexBoyerMoore.IsMatch

Reduce the checks needed and elimiate unnecessary layers of function calls.

* Remove IsSingleton optimization

This doesn't show up in real regexes and is just adding unnecessary complication to the code.  No one writes `[a-b]`... they just write `a`.  SingletonInverse is more useful, as you can search for any character except for a specific one, e.g. find the first character that's not a dash.

* Cache CharInClass results for ASCII lookups

* Improve codegen in a few places (and a little cleanup)

* Mark RegexInterpreter.SetOperator aggressive inlining

It's small but isn't getting inlined; it's only called in 4 places, but on hot paths, and inlininig it nets around an ~8% throughput win.

4 years agoDelete Thread-related dead code (#450)
Jan Kotas [Tue, 3 Dec 2019 00:08:44 +0000 (16:08 -0800)]
Delete Thread-related dead code (#450)

* Delete Thread::m_threadsAtUnsafePlaces

Never used. Always zero.

* Delete Thread::m_pLoadingFile

Never used

* Delete Thread::m_nNestedMarshalingExceptions

Never used

* Delete Thread::m_PreventAbort

Never used

* Delete DisableAbortCheckHolder

* Delete GetCurrentTaskType()

* Delete ForbidSuspendThreadCrstHolder

* Delete Thread::IsWithinCer

* Delete fOneOnly

* Move GetProcessMemoryLoad

* Delete m_CleanupIPs

* Delete 64k aliasing conflict workaround for Pentium 4

Not needed and/or included in the OS libraries

* Delete loader heap perf counters

* Delete SOWork*

* Delete ClearThrowablesForUnload

4 years agoAdd NamedPipeServerStream method that takes an ACL (#317)
Carlos Sanchez Lopez [Mon, 2 Dec 2019 23:54:46 +0000 (15:54 -0800)]
Add NamedPipeServerStream method that takes an ACL (#317)

Add NamedPipeServerStream method that takes an ACL

Approved API proposal: dotnet/corefx#41657

We don't currently have a way to create a pipe with a given ACL in .NET Core. We can modify the ACL, but it would be more secure to have the proper ACL on the pipe from the start.

This PR adds a new static class and method that can create an NamedPipeServerStream taking a PipeSecurity object, reusing code that can already perform this task.

4 years agoFix RVA field ordering and emission issue. (#375)
Fadi Hanna [Mon, 2 Dec 2019 23:31:52 +0000 (15:31 -0800)]
Fix RVA field ordering and emission issue. (#375)

* Fix RVA field ordering and emission issue.

* CopiedFieldRvaNode have to be sorted by rva (Managed C++ binaries depend on it)
* Proper handling for overlapping fields, even with different sizes (updated test to cover this).

* Move field RVA overlap handling to CopiedFieldRvaNode

4 years agoRemove unnecessary variables.
mateoatr [Mon, 2 Dec 2019 22:55:48 +0000 (22:55 +0000)]
Remove unnecessary variables.

4 years agoStop removing trailing dots
mateoatr [Mon, 2 Dec 2019 22:21:49 +0000 (22:21 +0000)]
Stop removing trailing dots

4 years agoFix CancellationTokenRegistration.Unregister race condition (#309)
Stephen Toub [Mon, 2 Dec 2019 21:45:40 +0000 (16:45 -0500)]
Fix CancellationTokenRegistration.Unregister race condition (#309)

There's a race condition that exists if multiple threads are accessing the same CancellationTokenRegistration field, with one Unregistering and zero'ing out the field while another Unregisters.  We shouldn't ever be in a situation where we have a non-null node and a 0 id, but due to struct tearing we can end up in that exact situation inside of Unregister (if the thread zero'ing out the struct succeeded in zero'ing out the id but we still read a valid node).  If the node was then already unregistered, it will contain 0 for its id, in which case we'll see that the ids match and assume that means the node is still in the list.  At that point we proceed to dereference nodes in the list and null ref.

The fix is simple: rather than just asserting that we'll never get 0, explicitly check for 0 and return if it is.

4 years agoUpdate building in Linux docs (#350)
Juan Hoyos [Mon, 2 Dec 2019 19:32:01 +0000 (11:32 -0800)]
Update building in Linux docs (#350)

Cleanup the building on linux instructions to accound for repo consolidation

4 years agoBuild System.IO.Compression.Native on WebAssembly as well. (#322)
Zoltan Varga [Mon, 2 Dec 2019 19:23:19 +0000 (20:23 +0100)]
Build System.IO.Compression.Native on WebAssembly as well. (#322)

4 years agoUpdate links in docs/README.md (#441)
Youssef Victor [Mon, 2 Dec 2019 17:29:08 +0000 (19:29 +0200)]
Update links in docs/README.md (#441)

4 years agoRe-enable CoreLib analyzers (#424)
Viktor Hofer [Mon, 2 Dec 2019 17:13:28 +0000 (18:13 +0100)]
Re-enable CoreLib analyzers (#424)

* Re-enable CoreLib analyzers

CoreLib analyzers were unintentionally disabled with
6afe96cc2e950379d13a87efa1fa5a651cbce9bd. This re-enables the analyzers.

* Remove Microsoft.CodeAnalysis.Common from common

Microsoft.CodeAnalysis.Common shouldn't be referenced directly,
therefore removing that package from the common location and only
restoring and marking it as an analyzer in the libraries restore phase.

4 years agoRemoved WinHttpHandler from System.Net.Http (#397)
Marie Píchová [Mon, 2 Dec 2019 16:35:23 +0000 (17:35 +0100)]
Removed WinHttpHandler from System.Net.Http (#397)

* Removed WinHttpHandler from System.Net.Http.

* Disabled tests for WinHttpHandler.

* Removed UseSocketsHttpHandler settings

* Removed UseSocketsHttpHandler from tests (all tests use SocketsHttpHandler)

* Removed IsWinHttpHandler from tests.

* Updated WinHttpHandler project file.

* Fixed Linux build/tests.

* Fixed Win build of WinHttpHandler.

* Removed todos.

4 years agoDelete CLSID_ComCallUnmarshal and related code (#426)
Jan Kotas [Mon, 2 Dec 2019 16:12:29 +0000 (08:12 -0800)]
Delete CLSID_ComCallUnmarshal and related code (#426)

Not used in CoreCLR

4 years agoCurrent user identity in added to HttpConnectionKey (#303)
Alexander Nikolaev [Mon, 2 Dec 2019 14:15:43 +0000 (15:15 +0100)]
Current user identity in added to HttpConnectionKey (#303)

On retrieving a connection from a pool, HttpConnectionPoolManager adds the current user identity to the HttpConnectionKey for direct and proxy connections when the default credentials is used on Windows platform. Since on Unix there is not the concept of a user identity on the thread, the identity component in the key is always set to string.Empty.

Fixes dotnet/corefx#39621

4 years agoConverge common msbuild properties and targets (#338)
Viktor Hofer [Sun, 1 Dec 2019 10:01:39 +0000 (11:01 +0100)]
Converge common msbuild properties and targets (#338)

* Converge common msbuild properties and targets

Moving common msbuild properties and targets into the repo root.

* Consolidate analyzers logic into the repo root

Consolidating msbuild analyzers logic centrally in the repo root and
adding a property switch `EnableAnalyzers` to enable analyzers. We
still need to import the Analyzers.props file unconditionally as
libraries currently doesn't use the PackageReference logic in ref and
src projects and instead uses a depproj to create a props file
dynamically.

* More cleanup to fix CoreLib build

4 years agocorefx -> runtime (#407)
Youssef Victor [Sat, 30 Nov 2019 14:41:17 +0000 (16:41 +0200)]
corefx -> runtime (#407)

4 years agoUpdate area owners (#401)
v-jizho2 [Sat, 30 Nov 2019 02:05:18 +0000 (18:05 -0800)]
Update area owners (#401)

4 years agoUpdate the previous crossgen2 fix to interface static cctor (#396)
Jan Vorlicek [Fri, 29 Nov 2019 19:38:20 +0000 (20:38 +0100)]
Update the previous crossgen2 fix to interface static cctor (#396)

This change makes the interface static cctor fix equivalent to the
runtime's one.

4 years agoConsolidate .netcoreapp.cs files because projects is no longer cross-compiled (#392)
Roman Marusyk [Fri, 29 Nov 2019 06:53:09 +0000 (07:53 +0100)]
Consolidate .netcoreapp.cs files because projects is no longer cross-compiled (#392)

4 years agoPort CoreRT bugfix in marshalling to crossgen2 (#384)
Michal Strehovský [Thu, 28 Nov 2019 20:49:16 +0000 (21:49 +0100)]
Port CoreRT bugfix in marshalling to crossgen2 (#384)

Ports dotnet/corert#7892.

4 years agoFix crossgen2 to fix some negative tests (#344)
Jan Vorlicek [Thu, 28 Nov 2019 14:52:10 +0000 (15:52 +0100)]
Fix crossgen2 to fix some negative tests (#344)

* Fix crossgen2 to fix some negative tests

This change fixes 4 negative tests in the Loader\classloader\generics\Instantiation\Negative
folder.

The tests were trying to instantiate objects using generic definition types
without supplying generic arguments.

4 years agoCoreHost: Remove a long-name test asset (#373)
Swaroop Sridhar [Thu, 28 Nov 2019 14:48:34 +0000 (06:48 -0800)]
CoreHost: Remove a long-name test asset (#373)

* CoreHost: Remove a long-name test asset

One of the Bundler test use a test-asset with a very long name.
This caused problems during `git clone` on windows systems where longname support is not enabled.

This change removes the long-named content file from the repo, and generates it from the test instead.

* Add long-name fixup for additional tests

4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20191127.4 (#383)
dotnet-maestro[bot] [Thu, 28 Nov 2019 14:45:37 +0000 (15:45 +0100)]
Update dependencies from https://github.com/dotnet/arcade build 20191127.4 (#383)

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.19577.4
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19577.4
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.19577.4
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.19577.4
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19577.4
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.19577.4
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.19577.4
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.19577.4
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.19577.4
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.19577.4
- Microsoft.DotNet.GenAPI - 5.0.0-beta.19577.4
- Microsoft.DotNet.GenFacades - 5.0.0-beta.19577.4
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19577.4
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.19577.4

4 years agoUse platform-matrix and split jobs by steps for libraries pipelines (#274)
Santiago Fernandez Madero [Thu, 28 Nov 2019 10:22:57 +0000 (02:22 -0800)]
Use platform-matrix and split jobs by steps for libraries pipelines (#274)

4 years agoFix formatting (#374)
Jan Kotas [Thu, 28 Nov 2019 02:35:11 +0000 (18:35 -0800)]
Fix formatting (#374)

4 years agoFix crossgen2 interface static constructor handling (#370)
Jan Vorlicek [Thu, 28 Nov 2019 02:18:32 +0000 (03:18 +0100)]
Fix crossgen2 interface static constructor handling (#370)

Crossgen2 is not generating calls to static constructors of interfaces.
This is caused by a missing part of a condition in the initClass JIT
interface method. That condition is present in the runtime version of
that method.

This change fixes it.

4 years agoImprove performance of RuntimeHelpers.GetMethodTable (#275)
Levi Broderick [Thu, 28 Nov 2019 00:24:58 +0000 (16:24 -0800)]
Improve performance of RuntimeHelpers.GetMethodTable (#275)

4 years agoPerfscore dumping/dasm improvements (#264)
Brian Sullivan [Thu, 28 Nov 2019 00:21:26 +0000 (16:21 -0800)]
Perfscore dumping/dasm improvements (#264)

* Perf Score dumping/dasm improvements
 - Show how much each BasicBlock contributes to the overall PerfScore
 - Change the string "perf score" to "PerfScore when reporting in the Disassembly and Dump files

Add PerfScore support for all currently used AVX2. SSE, etc... instructions

* Code Review feedback

* Update the INS_lea throughput and latencies
Added comments for INS_movd and INS_movq and a few others

* Fix x86 break - Use baseRegisterRequiresDisplacement(baseReg)

* Fix the RIP relative block for INS_lea

* Fixed INS_lea special cases: IF_RWR_LABEL and IF_RWR_SRD

4 years agoMove profiling docs out of workflow (#352)
Maryam Ariyan [Wed, 27 Nov 2019 22:13:03 +0000 (14:13 -0800)]
Move profiling docs out of workflow (#352)

* move profiling docs out of workflow

* move to docs\design\coreclr

4 years agoFix EH handling in PInvoke stubs and remove workaround (#327)
Fadi Hanna [Wed, 27 Nov 2019 21:35:29 +0000 (13:35 -0800)]
Fix EH handling in PInvoke stubs and remove workaround (#327)

* Fix EH handling in PInvoke stubs and remove workaround

The fix in the JIT is to inline the raw PInvoke call if:
1) We are compiling a PInvoke IL Stub
2) We are compiling using the PInvoke helpers

4 years agoRename mentions corefx-testdata to runtime-assets (#337)
Viktor Hofer [Wed, 27 Nov 2019 20:28:13 +0000 (21:28 +0100)]
Rename mentions corefx-testdata to runtime-assets (#337)

We renamed the dotnet/corefx-testdata repository to
dotnet/runtime-assets. This PR updates all mentions of the old
repositories' name.

4 years ago[master] Update dependencies from dotnet/arcade (#340)
dotnet-maestro[bot] [Wed, 27 Nov 2019 19:26:06 +0000 (20:26 +0100)]
[master] Update dependencies from dotnet/arcade (#340)

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.19576.2
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19576.2
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.19576.2
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.19576.2
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19576.2
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.19576.2
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.19576.2
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.19576.2
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.19576.2
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.19576.2
- Microsoft.DotNet.GenAPI - 5.0.0-beta.19576.2
- Microsoft.DotNet.GenFacades - 5.0.0-beta.19576.2
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19576.2
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.19576.2

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.19577.2
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.19577.2
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.19577.2
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.19577.2
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.19577.2
- Microsoft.DotNet.Build.Tasks.Configuration - 5.0.0-beta.19577.2
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.19577.2
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.19577.2
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.19577.2
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.19577.2
- Microsoft.DotNet.GenAPI - 5.0.0-beta.19577.2
- Microsoft.DotNet.GenFacades - 5.0.0-beta.19577.2
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.19577.2
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.19577.2

4 years agoDisable tests on CoreCLR using new attribute (#261)
Santiago Fernandez Madero [Wed, 27 Nov 2019 19:02:52 +0000 (11:02 -0800)]
Disable tests on CoreCLR using new attribute (#261)

* Disable tests on CoreCLR using new attribute

* Address PR Feedback

4 years agoFix crossgen2 field signature emission (#343)
Jan Vorlicek [Wed, 27 Nov 2019 18:44:27 +0000 (19:44 +0100)]
Fix crossgen2 field signature emission (#343)

The SignatureBuilder.EmitFieldSignature is incorrectly getting owner
type for generic types as the type converted to canon instead ofthe
original owner type. That results in runtime failures like the one shown
below in two coreclr pri1 tests:

 Type handle 'GenericHolder`2' and field handle with declaring type
 'GenericHolder`2[System.__Canon,System.__Canon]' are incompatible. Get
 RuntimeFieldHandle and declaring RuntimeTypeHandle off the same
 FieldInfo.

This change fixes that by getting the owner type before we perform the
conversion to the Canon version.

4 years agoMerge pull request #331 from maryamariyan/fix-docs
Maryam Ariyan [Wed, 27 Nov 2019 16:47:36 +0000 (08:47 -0800)]
Merge pull request #331 from maryamariyan/fix-docs

Updating the issue pr management guideline

4 years agoSmtpClient SendMailAsync with CancellationToken API implementation (#287)
Miha Zupan [Wed, 27 Nov 2019 14:49:43 +0000 (15:49 +0100)]
SmtpClient SendMailAsync with CancellationToken API implementation (#287)

* Add SmtpClient.SendMailAsync overloads with cancellation

* Rework mock SmtpClient tests

* Verify that SmtpClient uses Auth if available

* Add tests for SmtpClient.SendMailAsync using CancellationTokens

* Revert to case-insensitive comparison of hostnames in SmtpClient tests

* Disable SmtpClient NTLM test on Unix

* Address PR feedback

* Address PR feedback

* Address PR feedback

Use Interlocked.Exchange instead of locks

4 years agoFix SmtpClient handling exceptions as timeouts (#288)
Miha Zupan [Wed, 27 Nov 2019 14:09:38 +0000 (15:09 +0100)]
Fix SmtpClient handling exceptions as timeouts (#288)

Only non-async calls on SmtpClient can timeout. As the flag is not reset in the async path, it could already be set and SmtpClient would propagate any exception in the async path as a timeout

4 years agoUpdated broken links in ./README.md (#277)
Günther Foidl [Wed, 27 Nov 2019 11:32:21 +0000 (12:32 +0100)]
Updated broken links in ./README.md (#277)

* Updated broken links in ./README.md

* Fixed wrong name of README.md

* PR feedback

4 years agoenabling index check (#310)
Anirudh Agnihotry [Wed, 27 Nov 2019 11:31:03 +0000 (03:31 -0800)]
enabling index check (#310)

4 years agoFix range check upper limit. (#198)
Sergey Andreenko [Wed, 27 Nov 2019 10:03:11 +0000 (10:03 +0000)]
Fix range check upper limit. (#198)

* add a new test case to osr015.

* Improve JitDump output for range checks.

* Rename `monotonic` to `monIncreasing`.

* Fix the bug.

`monIncreasing` can be used only to liberally assume the lower bound.

* Fix the test.

I have used a wrong exception type when copied the test.
I have checked that it fails without the fix on x86 and passes with it.

* Fix comments/printings.

4 years agoRemove libintl dependency (#270)
Adeel Mujahid [Wed, 27 Nov 2019 09:13:45 +0000 (11:13 +0200)]
Remove libintl dependency (#270)

* Remove libintl dependency

4 years agoVectorise string.Replace(char, char) (#279)
Ganbarukamo41 [Wed, 27 Nov 2019 06:33:18 +0000 (15:33 +0900)]
Vectorise string.Replace(char, char) (#279)

4 years agoFix LTTng config environment variable parser (#326)
Sung Yoon Whang [Wed, 27 Nov 2019 04:28:16 +0000 (20:28 -0800)]
Fix LTTng config environment variable parser (#326)

4 years agoAdd skip reason to SkipOnMono attribute (#324)
Santiago Fernandez Madero [Wed, 27 Nov 2019 03:31:54 +0000 (19:31 -0800)]
Add skip reason to SkipOnMono attribute (#324)

* Add skip reason to SkipOnMono attribute

* PR Feedback

4 years agoUpdating the issue pr management guideline
Maryam Ariyan [Wed, 27 Nov 2019 01:47:31 +0000 (17:47 -0800)]
Updating the issue pr management guideline

4 years agoDelete PAL_RegisterModule from the JIT (#263)
Jan Kotas [Wed, 27 Nov 2019 02:01:42 +0000 (18:01 -0800)]
Delete PAL_RegisterModule from the JIT (#263)

* Delete PAL_RegisterModule from the JIT

* I have deleted some other dead code too while I was on it.

4 years agoFix typos in ValueTask comments
Stephen Toub [Wed, 27 Nov 2019 01:18:36 +0000 (20:18 -0500)]
Fix typos in ValueTask comments

4 years agoConsolidate .netcoreapp.cs files because System.Threading.* projects is no longer...
Roman Marusyk [Wed, 27 Nov 2019 00:51:52 +0000 (01:51 +0100)]
Consolidate .netcoreapp.cs files because System.Threading.* projects is no longer cross-compiled (#320)

4 years agoArm64: Implement ReverseBitOrder (#233)
Egor Chesakov [Wed, 27 Nov 2019 00:07:02 +0000 (16:07 -0800)]
Arm64: Implement ReverseBitOrder (#233)

4 years agoDisable DynamicCode_Jit test from System.Runtime.Tests on Mono (#228)
Egor Bogatov [Tue, 26 Nov 2019 23:52:01 +0000 (02:52 +0300)]
Disable DynamicCode_Jit test from System.Runtime.Tests on Mono (#228)

It fails on mono with interpreter (IsDynamicCodeCompiled is false).

4 years agoRemove GenerateCompilerResponseFile.targets from System.Private.CoreLib build (#293)
Alexander Köplinger [Tue, 26 Nov 2019 23:47:59 +0000 (00:47 +0100)]
Remove GenerateCompilerResponseFile.targets from System.Private.CoreLib build (#293)

All it does is generate a .rsp file which passes `/runtimemetadataversion:v4.0.30319` to the compiler.
We can do the same by simply setting the `<RuntimeMetadataVersion>` property in the .csproj.

4 years agoSynchronize write access to Hashtables in LicenseManager (#300)
Stephen Toub [Tue, 26 Nov 2019 21:56:57 +0000 (16:56 -0500)]
Synchronize write access to Hashtables in LicenseManager (#300)

4 years agoRemove doc files not meant for dotnet/runtime (#311)
Maryam Ariyan [Tue, 26 Nov 2019 20:46:09 +0000 (12:46 -0800)]
Remove doc files not meant for dotnet/runtime (#311)

Related to: #304

4 years agoCorrect integer conversions (#301)
Sinan Kaya [Tue, 26 Nov 2019 19:34:59 +0000 (14:34 -0500)]
Correct integer conversions (#301)

4 years agoRe-enable testing and switch back to the correct queues (#231)
Jarret Shook [Tue, 26 Nov 2019 18:55:24 +0000 (10:55 -0800)]
Re-enable testing and switch back to the correct queues (#231)

4 years agoPrevent nullptr dereference in GenTree::IsLclVarUpdateTree (#258)
Clinton Ingram [Tue, 26 Nov 2019 18:16:43 +0000 (10:16 -0800)]
Prevent nullptr dereference in GenTree::IsLclVarUpdateTree (#258)

* prevent nullptr deref

* add comment, update var names

* add regression test

* fix comment typo

* add return value to test

* formatting

4 years agono PLT on arm64 (#269)
Sinan Kaya [Tue, 26 Nov 2019 16:50:57 +0000 (11:50 -0500)]
no PLT on arm64 (#269)

Terminate macro with endm
Fix cfi_restore call
Use name instead of name@PLT

4 years agoRevise perfjitdump (#229)
Steve MacLean [Tue, 26 Nov 2019 16:36:17 +0000 (11:36 -0500)]
Revise perfjitdump (#229)

* Revise perfjitdump

Remove unnecessary fsync() call
Use writev() instead of write() to reduce OS calls
Handle partial write cases
Use initializer list
Simplify logic
Increment codeIndex while locked
Mark codeIndex volatile
Mark enabled volatile