platform/upstream/dotnet/runtime.git
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 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

4 years agoMinor SpanHelpers cleanup (#259)
Jan Kotas [Tue, 26 Nov 2019 15:04:02 +0000 (07:04 -0800)]
Minor SpanHelpers cleanup (#259)

- Use ifdef instead of runtime condition
- Use explicit signature for Unsafe.AddByteOffset in VM. We were getting lucky that the right overload of Unsafe.AddByteOffset was choosen by the VM.

4 years agoUpdated viewing-jit-dumps.md (#289)
Günther Foidl [Tue, 26 Nov 2019 14:38:49 +0000 (15:38 +0100)]
Updated viewing-jit-dumps.md (#289)

* corrected space in eng/build.sh

* Updated viewing-jit-dumps.md

4 years ago[master] Update dependencies from dotnet/arcade (#243)
dotnet-maestro[bot] [Tue, 26 Nov 2019 14:35:05 +0000 (15:35 +0100)]
[master] Update dependencies from dotnet/arcade (#243)

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

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

* Set installer.tasks to IsShipping=false

* Temporarily disable SymStore targets for System.Private.CoreLib

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

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

4 years agoAdd CoreLib shared source project (#244)
Viktor Hofer [Tue, 26 Nov 2019 14:34:01 +0000 (15:34 +0100)]
Add CoreLib shared source project (#244)

* Add CoreLib shared source project

Add a CoreLib shared source project (shproj) to allow displaying shared
source files. With the move of the shared folder to a different location
VS isn't able to display the sources anymore. Adding a link attribute to
the compile items in the projitems fixes this but the information is
lost after a project reload. Therefore adding a shared project to the
solution.

* Update System.Private.CoreLib.Shared.shproj

* Update System.Private.CoreLib.Shared.shproj

4 years agoRemove references to gender (#262)
Drew Noakes [Tue, 26 Nov 2019 14:33:12 +0000 (01:33 +1100)]
Remove references to gender (#262)

4 years agoFix minor typo in readme (#285)
Sean Killeen [Tue, 26 Nov 2019 12:38:33 +0000 (07:38 -0500)]
Fix minor typo in readme (#285)

4 years agoCorrected spelling (#278)
Stuart Lang [Tue, 26 Nov 2019 12:13:08 +0000 (12:13 +0000)]
Corrected spelling (#278)

4 years agoFix typo in comment
Stephen Toub [Tue, 26 Nov 2019 11:41:12 +0000 (06:41 -0500)]
Fix typo in comment

4 years agoImprove Regex performance (in particular RegexOptions.Compiled) (#271)
Stephen Toub [Tue, 26 Nov 2019 11:18:39 +0000 (06:18 -0500)]
Improve Regex performance (in particular RegexOptions.Compiled) (#271)

* Avoid generating timeout checks for infinite timeouts

* Use Ldc_I4_X for Ldc when applicable

* Use ToLowerInvariant for invariant mode

* Remove unnecessary virtual-ness of some internal methods

* Clean up CompiledRegexRunner

* Lazily allocate RegexCharClass._categories

* Avoid negative numbers in generated names

* Optimize Is{ECMA}WordChar

* Optimize common CharInClass calls

* Clean up RegexCompiler.cs

* Add more RegexOptions.Compiled tests

* Replace RegexParser.s_category byte[] with a span

* Avoid delegate allocations each time CreateInstance is called

* Replace CharUnicodeInfo.GetUnicodeCategory w/ char's version

It has a fast path for ASCII.

* Clean up stackallocs

* Remove an unnecessary box

* Avoid string allocation for negated category

* Simplify tests

* Make low-hanging fruit allocation reduction

e.g. avoiding allocating a range list if a class contains only categories, avoiding some intermediary strings, avoiding some delegate allocations for sorting, etc.

* More code cleanup

* Use String.IndexOf in RegexParser.Unescape

4 years agoFix crossgen2 compilation with reverse pinvoke (#222)
Jan Vorlicek [Tue, 26 Nov 2019 09:40:33 +0000 (10:40 +0100)]
Fix crossgen2 compilation with reverse pinvoke (#222)

Crossgen2 is failing to compile assemblies that contain reverse pinvoke
helpers with NotImplementedException.
This change fixes it by throwing RequiresRuntimeJit exception instead
for CORINFO_HELP_JIT_REVERSE_PINVOKE_ENTER and
CORINFO_HELP_JIT_REVERSE_PINVOKE_EXIT

4 years agoTemp workaround to disable PInvoke ILStubs with EH blocks (#249)
Fadi Hanna [Tue, 26 Nov 2019 09:25:59 +0000 (01:25 -0800)]
Temp workaround to disable PInvoke ILStubs with EH blocks (#249)

4 years agoFix friend class declaration (#268)
Sinan Kaya [Tue, 26 Nov 2019 09:03:09 +0000 (04:03 -0500)]
Fix friend class declaration (#268)

[ 27%] Building CXX object src/pal/src/CMakeFiles/coreclrpal.dir/arch/amd64/signalhandlerhelper.cpp.o
coreclr/src/pal/src/thread/thread.cpp:1613:1: error: ‘CorUnix::PAL_ERROR CorUnix::InternalSetThreadDescription(CorUnix::CPalThread*, HANDLE, PCWSTR)’ has not been declared within CorUnix [-Werror]
 CorUnix::InternalSetThreadDescription(
 ^~~~~~~
In file included from coreclr/src/pal/src/include/pal/dbgmsg.h:160:0,
                 from coreclr/src/pal/src/thread/thread.cpp:21:
coreclr/src/pal/src/include/pal/thread.hpp:204:13: note: only here as a friend
             InternalSetThreadDescription(

4 years agoJIT: if IR and stack can't provide a ref class handle, use object (#239)
Andy Ayers [Tue, 26 Nov 2019 08:16:37 +0000 (00:16 -0800)]
JIT: if IR and stack can't provide a ref class handle, use object (#239)

In some cases we may end up in `lvaSetClass` without a valid ref class handle
from either the IR or the stack. Use the handle for `object` as a conservative
fallback.

Closes dotnet/coreclr#27923.

4 years agoFix exception handling in interface method that checks for marshalling requirements...
Fadi Hanna [Tue, 26 Nov 2019 06:38:56 +0000 (22:38 -0800)]
Fix exception handling in interface method that checks for marshalling requirements (#252)

4 years agoCleanup warnings for uncompiled methods for some by-design scenarios (#250)
Fadi Hanna [Tue, 26 Nov 2019 04:21:27 +0000 (20:21 -0800)]
Cleanup warnings for uncompiled methods for some by-design scenarios (#250)