platform/upstream/dotnet/runtime.git
4 years agoChange bIsFree check in DacValidateMethodTable (#1086)
Dong-Heon Jung [Mon, 23 Dec 2019 19:11:43 +0000 (04:11 +0900)]
Change bIsFree check in DacValidateMethodTable (#1086)

Some commands of SOS validate a method table in DacValidateMethodTable.
In the function, it checks whether a method table is FreeObjectMethodTable or not with GetClass() value.
However, GetClass() should not be NULL. (There is an assert in GetClass())
In this patch, it compares pMT address with g_pFreeObjectMethodTable address only.

4 years agomore appropriate default rootfs-dir path (#1126)
Yaroslav Yamshchikov [Mon, 23 Dec 2019 17:14:45 +0000 (20:14 +0300)]
more appropriate default rootfs-dir path (#1126)

crossbuilding of at least armel:tizen and arm64:xenial works fine
without specifying the ROOTFS_DIR environment variable (with default
path) only if changes of this PR are applied. (building coreclr using
src/coreclr/build.sh script on linux)

4 years agochmod +x on scripts building rootfs for Tizen (#1125)
Yaroslav Yamshchikov [Mon, 23 Dec 2019 14:36:07 +0000 (17:36 +0300)]
chmod +x on scripts building rootfs for Tizen (#1125)

get the execute rights to Tizen scripts building the rootfs

4 years agoSequenceEqual picks the correct overload (#1113)
Günther Foidl [Sun, 22 Dec 2019 06:49:11 +0000 (07:49 +0100)]
SequenceEqual picks the correct overload (#1113)

4 years agoConsolidate .netcoreapp.cs files because System.Diagnostics.* projects is no longer...
Roman Marusyk [Sun, 22 Dec 2019 06:13:14 +0000 (08:13 +0200)]
Consolidate .netcoreapp.cs files because System.Diagnostics.* projects is no longer cross-compiled (#1101)

4 years agoRevert "Fix .cmd scripts help arguments (#1043)" (#1110)
Jan Kotas [Sat, 21 Dec 2019 20:54:56 +0000 (12:54 -0800)]
Revert "Fix .cmd scripts help arguments (#1043)" (#1110)

This reverts commit 0a29c61468f60f815119e52e477d0154351a4abf.

4 years agoPublish the official build to blob storage (#1092)
Davis Goodin [Fri, 20 Dec 2019 21:26:47 +0000 (15:26 -0600)]
Publish the official build to blob storage (#1092)

* Publish installers and checksums

- Use the arcade publishing process to publish the installers and checksums
- Remove old blob publishing
- Calculate the product version using an always-suffixed version
- Change the blob path that we should upload to to be Runtime/<version> instead of assets/core-setup/.. to line up with the desired paths.

* Updates for dotnet/runtime

Use InstallerTasksAssemblyPath.

Fail fast on RuntimeNupkgFile item duplicates.

Find some more symbol packages. AllConfigurations symbol nupkgs weren't detected due to different artifact arrangement. There may be more missing, however I did this to do unblock some quick local validation so I'm including it.

Co-authored-by: Matt Mitchell <mmitche@microsoft.com>
4 years agoAllow R2RReader to reuse existing MetadataReader/PEReader objects (#1077)
Andrew Au [Fri, 20 Dec 2019 21:25:36 +0000 (13:25 -0800)]
Allow R2RReader to reuse existing MetadataReader/PEReader objects (#1077)

4 years agoPublish CoreCLR packages (#1090)
Davis Goodin [Fri, 20 Dec 2019 19:41:09 +0000 (13:41 -0600)]
Publish CoreCLR packages (#1090)

Add missing _BuildConfig. Pass configuration with Arcade style, at the end for win arg parsing.

Fix build-packages.sh binlog location.

Remove CoreCLR nupkg output redirection.

4 years agoInitial global build PR pipeline (#986)
Tomáš Rylek [Fri, 20 Dec 2019 18:34:22 +0000 (19:34 +0100)]
Initial global build PR pipeline (#986)

Fixes: #951

* Fix OSX build dependencies and container use per Santiago's advice

* Comment the purpose of the new pipeline per Jared's PR feedback

* Prune unused parameters of global-build-job

* Fix variable propagation

4 years agoMerge pull request #784 from layomia/nested_dicts
Layomi Akinrinade [Fri, 20 Dec 2019 03:27:35 +0000 (19:27 -0800)]
Merge pull request #784 from layomia/nested_dicts

Improve serialization support for nested dictionaries

4 years agoMake test libraries configuration agnostic (#378)
Santiago Fernandez Madero [Fri, 20 Dec 2019 02:06:30 +0000 (20:06 -0600)]
Make test libraries configuration agnostic (#378)

* Make test libraries configuration agnostic

* PR Feedback, keep Debug define for tests

* More PR Feedback

* Last pr feedback

4 years agoRestore "Start generating LCL_FLDs in LocalAddressVisitor #737" (#991)
mikedn [Fri, 20 Dec 2019 01:26:23 +0000 (03:26 +0200)]
Restore "Start generating LCL_FLDs in LocalAddressVisitor #737" (#991)

* Revert "Revert "Start generating LCL_FLDs in LocalAddressVisitor (#737)" (#973)"

This reverts commit 9bf91f8d178e09bb81fb1749a82d588cbe8028cf.

* Add a test that produces an unused, top-level indir

* If an indir has no user then it's not a def

* Fix test return code

4 years agoMerge pull request #993 from pgovind/RegEx
Prashanth Govindarajan [Thu, 19 Dec 2019 23:33:33 +0000 (15:33 -0800)]
Merge pull request #993 from pgovind/RegEx

Parse RegEx such as "[^]"

4 years agoFix .cmd scripts help arguments (#1043)
Santiago Fernandez Madero [Thu, 19 Dec 2019 19:38:25 +0000 (13:38 -0600)]
Fix .cmd scripts help arguments (#1043)

* Fix .cmd scripts help arguments

* Support -? arg in .cmd scripts

4 years agoPrevent method from being inlined to get correctly handled in try-catch blocks (...
Fadi Hanna [Thu, 19 Dec 2019 19:11:50 +0000 (11:11 -0800)]
Prevent method from being inlined to get correctly handled in try-catch blocks (#1066)

4 years agoFix dependencies.props import (#833)
Viktor Hofer [Thu, 19 Dec 2019 18:57:49 +0000 (19:57 +0100)]
Fix dependencies.props import (#833)

* Fix dependencies.props import

* Fix props by sanitizing variables

* Don't use ProjectDir variable in script

4 years agoMerge remote-tracking branch 'upstream/master' into RegEx
Prashanth Govindarajan [Thu, 19 Dec 2019 18:46:41 +0000 (10:46 -0800)]
Merge remote-tracking branch 'upstream/master' into RegEx

4 years agoAdd binder resolution events (#604)
Leandro A. F. Pereira [Thu, 19 Dec 2019 18:45:41 +0000 (10:45 -0800)]
Add binder resolution events (#604)

4 years agoHandle GenericParameterDesc's in validation (#1063)
Fadi Hanna [Thu, 19 Dec 2019 18:04:52 +0000 (10:04 -0800)]
Handle GenericParameterDesc's in validation (#1063)

4 years agoAdd Pri1 Crossgen2 pipeline (#1033)
Tomáš Rylek [Thu, 19 Dec 2019 11:13:18 +0000 (12:13 +0100)]
Add Pri1 Crossgen2 pipeline (#1033)

4 years agoUse goto to exit in build.cmd so that error code propagates out of cmd (#990)
Santiago Fernandez Madero [Thu, 19 Dec 2019 01:37:47 +0000 (19:37 -0600)]
Use goto to exit in build.cmd so that error code propagates out of cmd (#990)

* Use goto to exit in build.cmd so that error code propagates out of cmd

* Add comment

* Fix windows format job

4 years agoConsolidate .netcoreapp.cs test files in System.Runtime.* (#999)
Roman Marusyk [Thu, 19 Dec 2019 01:16:39 +0000 (03:16 +0200)]
Consolidate .netcoreapp.cs test files in System.Runtime.* (#999)

* Consolidate .netcoreapp.cs files because System.Runtime.* projects is no longer cross-compiled

4 years agoAdd official signed build pipeline (#1016)
Davis Goodin [Thu, 19 Dec 2019 00:55:25 +0000 (18:55 -0600)]
Add official signed build pipeline (#1016)

* Add official signed build

* Don't attempt test signing during PR validation

* Add build trigger include/exclude paths

* Remove unnecessary conditions (config, success)

* Add issue link for internal tool restore

* Add issue link for test signing

* Fix consolidation TODO formatting, links for all

4 years agoAdd a test to throw when Ecmascript is not specified
Prashanth Govindarajan [Wed, 18 Dec 2019 23:18:07 +0000 (15:18 -0800)]
Add a test to throw when Ecmascript is not specified

4 years agoFix EventSource to stop ignoring EventCommand.SendManifest (#848)
Sung Yoon Whang [Wed, 18 Dec 2019 22:57:33 +0000 (14:57 -0800)]
Fix EventSource to stop ignoring EventCommand.SendManifest (#848)

* Dont ignore EventCommand.SendManifest command in EventSource

* Add ETW manifest generation test

* Mark the ETW ManifestGeneration tests as privileged only

* Define IsProcessElevatedAndNotWindowsNanoServer

* Change undefined file path

4 years agoDelete strong name cruft (#1006)
Jan Kotas [Wed, 18 Dec 2019 22:26:28 +0000 (14:26 -0800)]
Delete strong name cruft (#1006)

The amount of strong name support that CoreCLR needs is very small (really just a method to convert public key to public key token). It is not worth it to build a separate .lib for just this single method. Fold the strong name APIs into metadata and change the API to return HRESULT.

4 years agoJsonNull return false when comparing against null (#842)
Henrik [Wed, 18 Dec 2019 21:28:07 +0000 (22:28 +0100)]
JsonNull return false when comparing against null (#842)

* JsonNull return false when comparing against null

I'ved modified JsonNulls comparison methods to return false when
compared against null, the matching test have also been updated
in change

Fix #820

* Updated xml comments to reflect my changes

I have updated the xml comments to reflect the changes
that was made in JsonNull and removed left over comment
in JsonNullTests

* Applied suggested change

Applied the suggested change to correct xml documentation

Co-Authored-By: Ahson Khan <ahkha@microsoft.com>
* Applied Suggested change

Applied the suggested change to correct xml documentation

Co-Authored-By: Ahson Khan <ahkha@microsoft.com>
4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20191217.1 (#1013)
dotnet-maestro[bot] [Wed, 18 Dec 2019 20:47:58 +0000 (14:47 -0600)]
Update dependencies from https://github.com/dotnet/arcade build 20191217.1 (#1013)

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

4 years agoFix to array validation in type loadability checks (#1004)
Fadi Hanna [Wed, 18 Dec 2019 18:58:12 +0000 (10:58 -0800)]
Fix to array validation in type loadability checks (#1004)

4 years agosimplify SslStream.AuthenticateAs*Async() (#453)
Tomas Weinfurt [Wed, 18 Dec 2019 18:52:52 +0000 (10:52 -0800)]
simplify SslStream.AuthenticateAs*Async() (#453)

* port from corefx

* add TestHelper.cs

* capture handshake exception

* feedback from review

* cleanup more apm and renegotiation

* fix unit test

* feedback from review

* feedback from review

* feedback from review

* fix test after merge

* feedback from review

* add back ProcessAuthentication as main entry point

4 years agoFix named cgroup handling in docker (#980)
Jan Vorlicek [Wed, 18 Dec 2019 16:07:36 +0000 (17:07 +0100)]
Fix named cgroup handling in docker (#980)

While named cgroups work fine outside of docker container, they weren't
working when created and used inside of a docker container. The problem
was caused by the fact that the hierarchy root extracted from
/proc/self/mountinfo and the cgroup path extracted from /proc/self/cgroup
are not equal for named groups. They just share the same prefix.
The cgroups handling code was not epxecting this case and ended up building
the final cgroup path incorrectly (including the common part of the path).
This change fixes it by checking for matching prefix of the paths instead
of comparing the whole paths.

4 years agoSwitch over the remaining CoreCLR pipelines to live-live mode (#813)
Tomáš Rylek [Wed, 18 Dec 2019 13:55:35 +0000 (14:55 +0100)]
Switch over the remaining CoreCLR pipelines to live-live mode (#813)

I have also found out that my recent change to switch over the JIT
stress pipelines was incomplete - it was building the live libraries
but not actually using it due to a typo in the parameter name. I am
fixing that as part of this change.

Thanks

Tomas

4 years agoAdd tracing for default probing for managed assemblies (#740)
Elinor Fung [Wed, 18 Dec 2019 04:56:16 +0000 (20:56 -0800)]
Add tracing for default probing for managed assemblies (#740)

4 years agoRe-enable symstore targets for System.Private.CoreLib (#1003)
Santiago Fernandez Madero [Wed, 18 Dec 2019 04:30:38 +0000 (22:30 -0600)]
Re-enable symstore targets for System.Private.CoreLib (#1003)

4 years agoFileSystemAclExtensions missing `this` nullchecks (#1001)
Carlos Sanchez Lopez [Wed, 18 Dec 2019 03:06:55 +0000 (19:06 -0800)]
FileSystemAclExtensions missing `this` nullchecks (#1001)

4 years agoSet vtable offset as contained (#722)
Dong-Heon Jung [Wed, 18 Dec 2019 01:01:37 +0000 (10:01 +0900)]
Set vtable offset as contained (#722)

- Can remove a machine instruction which adds vtable offset

4 years agoadd test for nested ssl authentication (#873)
Tomas Weinfurt [Tue, 17 Dec 2019 22:31:47 +0000 (14:31 -0800)]
add test for nested ssl authentication (#873)

* add test for nested ssl authentication

* feedback from review

4 years agoMove System.Globalization.Native under libraries (#875)
Jan Kotas [Tue, 17 Dec 2019 21:39:23 +0000 (13:39 -0800)]
Move System.Globalization.Native under libraries (#875)

- Delete Microsoft.NETCore.Native package
- Unify CMake files with the rest of libraries/native
- Fix pedantic warnings
- Comment out assert (https://github.com/dotnet/runtime/issues/946)
- Delete dlclose during shutdown. It is not safe to unload any libraries that the runtime depends on.
- Install ICU for libraries build in the CI

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

4 years agosq
Prashanth Govindarajan [Tue, 17 Dec 2019 21:21:48 +0000 (13:21 -0800)]
sq

4 years agoParse [^] when ecmascript is set
Prashanth Govindarajan [Tue, 17 Dec 2019 21:15:27 +0000 (13:15 -0800)]
Parse [^] when ecmascript is set

4 years agoMerge pull request #984 from cshung/dev/andrewau/r2rdump-perf-fix
Simon Nattress [Tue, 17 Dec 2019 21:09:26 +0000 (13:09 -0800)]
Merge pull request #984 from cshung/dev/andrewau/r2rdump-perf-fix

Improving performance of R2RDump

4 years agoAll related headers are marked as NonTrailing (#903)
Alexander Nikolaev [Tue, 17 Dec 2019 20:51:25 +0000 (21:51 +0100)]
All related headers are marked as NonTrailing (#903)

Currently, some of the known headers disallowed in the message trailer are marked with HttpHeaderType.NonTrailing flag. However, there are others identified as disallowed by the related RFC missing this flag.
Fixes dotnet/corefx#42474

4 years agoSslStress: add randomized delays (#977)
Eirik Tsarpalis [Tue, 17 Dec 2019 19:17:51 +0000 (21:17 +0200)]
SslStress: add randomized delays (#977)

4 years agoRemove CoreFX.issues.rsp (#985)
Santiago Fernandez Madero [Tue, 17 Dec 2019 18:34:05 +0000 (12:34 -0600)]
Remove CoreFX.issues.rsp (#985)

4 years agoImproving performance of R2RDump
Andrew Au [Tue, 17 Dec 2019 17:38:43 +0000 (09:38 -0800)]
Improving performance of R2RDump

4 years agoRevert "Start generating LCL_FLDs in LocalAddressVisitor (#737)" (#973)
Sergey Andreenko [Tue, 17 Dec 2019 16:17:26 +0000 (08:17 -0800)]
Revert "Start generating LCL_FLDs in LocalAddressVisitor (#737)" (#973)

This reverts commit 4fa163852af62908948e8108a03f4044f96d2bc1.

4 years ago[master] Update dependencies from Microsoft/vstest dotnet/arcade (#874)
dotnet-maestro[bot] [Tue, 17 Dec 2019 13:15:38 +0000 (14:15 +0100)]
[master] Update dependencies from Microsoft/vstest dotnet/arcade (#874)

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

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

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

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

4 years agoremote *_i.h blacklist from .gitignore (#975)
Eirik Tsarpalis [Tue, 17 Dec 2019 11:11:13 +0000 (13:11 +0200)]
remote *_i.h blacklist from .gitignore (#975)

4 years agoUpdate NCL stress infra for live-live builds (#896)
Eirik Tsarpalis [Tue, 17 Dec 2019 00:39:15 +0000 (02:39 +0200)]
Update NCL stress infra for live-live builds (#896)

4 years agoR2RDump changes to allow separation of presentation from parsing (#267)
Andrew Au [Mon, 16 Dec 2019 23:13:53 +0000 (15:13 -0800)]
R2RDump changes to allow separation of presentation from parsing (#267)

4 years ago Annotate System.Collections.Immutable for nullable (#367)
buyaa-n [Mon, 16 Dec 2019 21:09:45 +0000 (13:09 -0800)]
  Annotate System.Collections.Immutable for nullable (#367)

* Annotate System.Collections.Immutable for nullable

4 years agoMerge remote-tracking branch 'upstream/master' into RegEx
Prashanth Govindarajan [Mon, 16 Dec 2019 20:45:59 +0000 (12:45 -0800)]
Merge remote-tracking branch 'upstream/master' into RegEx

4 years agoUnit test to repro
Prashanth Govindarajan [Mon, 16 Dec 2019 20:45:45 +0000 (12:45 -0800)]
Unit test to repro

4 years agoJIT: detect address of field as an invariant inlining arg (#845)
Andy Ayers [Mon, 16 Dec 2019 20:03:15 +0000 (12:03 -0800)]
JIT: detect address of field as an invariant inlining arg (#845)

Update the check for arg invariance to include addresses of fields in local
structs. This allows the inliner to directly substitute more arguments into
the body of the inlinee.

Resolves dotnet/coreclr#27630.

4 years agoStart generating LCL_FLDs in LocalAddressVisitor (#737)
mikedn [Mon, 16 Dec 2019 18:49:09 +0000 (20:49 +0200)]
Start generating LCL_FLDs in LocalAddressVisitor (#737)

* Start generating LCL_FLDs in LocalAddressVisitor

* Fix broken vararg offset computation

Since it's subtracted the local field offset also need to be subtracted so it actually ends up being added as needed.

* Introduce array/index temps for LCL_FLDs

Previously fgMorphArrayIndex was always creating temporaries for array/index FIELD trees. Since now LCL_FLDs are created before fgMorphArrayIndex this preserves the existing behavior.

* CR feedback

* Fix incorrect field sequence type check

* Fix GetTail formatting

4 years agoRemove usage of TargetGroup where possible (#899)
Viktor Hofer [Mon, 16 Dec 2019 18:36:55 +0000 (19:36 +0100)]
Remove usage of TargetGroup where possible (#899)

In non-infra related paths we don't need to check on TargetGroup anymore
and can instead use the well-known TargetFramework property.

4 years agoMerge pull request #257 from tannergooding/float-format
Tanner Gooding [Mon, 16 Dec 2019 15:48:36 +0000 (07:48 -0800)]
Merge pull request #257 from tannergooding/float-format

Fixing Dragon4 to take unbiased rounding into account.

4 years agoUse default setting for UseSharedCompilation (#900)
Viktor Hofer [Mon, 16 Dec 2019 15:30:02 +0000 (16:30 +0100)]
Use default setting for UseSharedCompilation (#900)

UseSharedCompilation now defaults to true in the Microsoft.Net.Compilers.Toolset package. Previously we used the deprecated Microsoft.Net.Compilers package in which the property defaults to false.

4 years agoAdd SkipLocalsInitAttribute (#454)
Andy Gocke [Sun, 15 Dec 2019 23:13:46 +0000 (15:13 -0800)]
Add SkipLocalsInitAttribute (#454)

This attribute supports a new compiler feature that allows a user to
specify that they don't want to emit the CLR `.locals init` portion of
the header in methods. This can sometimes produce a performance
improvement but, in some cases, can reveal uninitialized memory to the
application.

Fixes https://github.com/dotnet/corefx/issues/29026

4 years agoAdjusting `GetCurrentProcessorId` caching to different environments. (#467)
Vladimir Sadov [Sun, 15 Dec 2019 19:43:39 +0000 (11:43 -0800)]
Adjusting `GetCurrentProcessorId` caching to different environments. (#467)

* Adjusting `GetCurrentProcessorId` caching rate based on relative performance of `GetCurrentProcessorNumber` and `TheadStatic`

4 years agoAdding a regression test for corefx#42576
Tanner Gooding [Fri, 22 Nov 2019 23:33:41 +0000 (15:33 -0800)]
Adding a regression test for corefx#42576

4 years agoFixing Dragon4 to take unbiased rounding into account.
Tanner Gooding [Thu, 21 Nov 2019 20:39:03 +0000 (12:39 -0800)]
Fixing Dragon4 to take unbiased rounding into account.

4 years agoUse wildcard to resolve S.P.CoreLib from CoreCLRArtifacts (#878)
Santiago Fernandez Madero [Sun, 15 Dec 2019 00:36:43 +0000 (18:36 -0600)]
Use wildcard to resolve S.P.CoreLib from CoreCLRArtifacts (#878)

* Use wildcard to resolve S.P.CoreLib from CoreCLRArtifacts

* Probe 2 paths instead

4 years agoRemove PackageReference to cijobs tool used to add it to Core_Ro… (#746)
Jeremy Koritzinsky [Sat, 14 Dec 2019 23:06:20 +0000 (15:06 -0800)]
Remove PackageReference to cijobs tool used to add it to Core_Ro… (#746)

* Remove PackageReference to cijobs tool.

* Remove jit-dasm and jit-analyze package references per feedback.

* Remove test_runtime.csproj and move the copying of the UCRT files to Core_Root to test_dependencies.csproj.

4 years agoFix incorrect merge of my framework crossgenning fix with Jeremy's local live-live...
Tomáš Rylek [Sat, 14 Dec 2019 22:38:17 +0000 (23:38 +0100)]
Fix incorrect merge of my framework crossgenning fix with Jeremy's local live-live change (#879)

I found out that in two places my fix for crossgenning the framework
incorrectly merged with Jeremy's live-live change. In particular,
as I was moving around the steps for patching CORE_ROOT with explicit
CoreFX while Jeremy was deleting them, my changes inadvertently
resurrected two such deleted sections.

Thanks

Tomas

4 years agoRemoving "netcoreapp" and "netfx" TargetGroup (#457)
Anirudh Agnihotry [Sat, 14 Dec 2019 20:22:29 +0000 (12:22 -0800)]
Removing "netcoreapp"  and "netfx" TargetGroup (#457)

* netcoreapp -> netcoreapp5.0 in .sln files

* netcoreapp; -> netcoreapp5.0;  , netcoreapp- to netcoreapp5.0-

* netcoreapp- -> netcoreapp5.0 in .csproj

* 'netcoreapp -> 'netcoreapp5.0 in .csproj

* done with libraries sub folder

* missed semicolon

* minor changes

* netcoreapp -> netcoreapp5.0 in some extra files

* vNext target variable in configurations.props

* netcoreapp => netcoreapp5/0 in some other .props file

* netcoreapp -> vnext in .csproj

* making the netcorepap framework switch work

* fixing sendToHelix and linux build

* TargetFrameworkVNext -> netcoreappCurrent

* case correct netcoreappcurrent

* fixing send to helix zip path

* netfx -> net472 in .sln

* netfx; -> net472; in .props

* netfx- -> net472- in .props

* netfx - -> net472- in .csproj

* 'netfx-> 'net472 in .csproj

* netfx -> net472 manual change

* fixing ci build for netfx

* Not trying to change the global property

* Fixing build failure due to master changes in net https tests

* adding documentaiton and fixing filtering

* netcoreapp -> netcore5.0 in py file

* changing the path to use netcoreapp5.0 version

* feedback and override corefx path corrected in installers

* remaing netcoreapp5.0 changes done

* netcoreapp-> netcoreapp5.0 after live builds

* net472 -> netframeworkcurrent

4 years agoFix crossgenning of framework libraries on Windows (#747)
Tomáš Rylek [Sat, 14 Dec 2019 19:39:04 +0000 (20:39 +0100)]
Fix crossgenning of framework libraries on Windows (#747)

1) Fix crossgenning of framework libraries on Windows;

2) Enable crossgenning S.P.C with CG2, remove obsolete CoreCLR logic;

3) Fix framework build with legacy Crossgen due to a typo in my change;

4) The ordering of steps in build-test was incorrect - we need to
patch CORE_ROOT with live-live libraries build before Crossgenning
the framework therein, otherwise weird things happen (and the result
is incorrect in any case).

5) Removed misplaced >nul 2>nul - we agreed with JanV that it's
better to not throw diagnostic information away.

6) Applied JanV's suggestion for improvement - using a tighter filter
for reference assemblies - Microsoft.*.dll / System.*.dll /
mscorlib.dll instead of just *.dll that ended up picking tons of
garbage like clrjit.dll and the various Win32 API contracts, both
in the build-test script and in CLRTest.Crossgen.targets.

Thanks

Tomas

4 years agoFix JitEECallTimingInfo bit rot (#868)
Bruce Forstall [Sat, 14 Dec 2019 06:17:13 +0000 (22:17 -0800)]
Fix JitEECallTimingInfo bit rot (#868)

Added new JIT/EE interface functions. Moved some around so
the order of functions is exactly the same order as in the
corinfo.h header file.

This functionality can be enabled by:
1. Changing the definition of `MEASURE_CLRAPI_CALLS` in jit.h
from `0` to `1`.
2. Building Release on x86 or x64 (arm32 and arm64 are currently unsupported)
3. Set environment variables:
```
set COMPlus_JitTimeLogFile=time.txt
set COMPlus_JitEECallTimingInfo=1
```
4. Run a program.

The `time.txt` file will contain a JIT phase time line item "CLR API calls"
for the sum total of all JIT-EE function call cost, plus a per-API breakdown
for each called API with number of calls, total/max/average time, and percentage
of total ABI call cost.

4 years agoIgnore method name when doing `mcs -removeDup` (#602)
Bruce Forstall [Sat, 14 Dec 2019 06:15:37 +0000 (22:15 -0800)]
Ignore method name when doing `mcs -removeDup` (#602)

Thus, methods with different names but otherwise are identical will
match and only one will be retained.

This improves both Checked and Release, and fixes the Release
build removeDup regression introduced in #548.

4 years agoFix enterprise testing pipeline due to live-live changes (#843)
David Shulman [Sat, 14 Dec 2019 02:14:11 +0000 (18:14 -0800)]
Fix enterprise testing pipeline due to live-live changes (#843)

Revised script to build the libraries subset due to changes with CoreCLR and live-live build.

4 years agoAdd note about test generation depth
Layomi Akinrinade [Sat, 14 Dec 2019 00:25:35 +0000 (16:25 -0800)]
Add note about test generation depth

4 years agoClarify Lowering in ryujit-overview (#859)
Carol Eidt [Fri, 13 Dec 2019 23:54:27 +0000 (15:54 -0800)]
Clarify Lowering in ryujit-overview (#859)

4 years agotiny comment typo. (#846)
yowl [Fri, 13 Dec 2019 21:04:26 +0000 (16:04 -0500)]
tiny comment typo. (#846)

4 years agoComment on why s_createProcessLock exists in Process.Windows.cs (#838)
Stephen Toub [Fri, 13 Dec 2019 21:02:54 +0000 (16:02 -0500)]
Comment on why s_createProcessLock exists in Process.Windows.cs (#838)

4 years agoClarify Lowering in ryujit-overview (#844)
Carol Eidt [Fri, 13 Dec 2019 20:55:21 +0000 (12:55 -0800)]
Clarify Lowering in ryujit-overview (#844)

4 years agoFix bug with type loadability validation (#841)
Fadi Hanna [Fri, 13 Dec 2019 20:00:48 +0000 (15:00 -0500)]
Fix bug with type loadability validation (#841)

The check had a small typo: .IsRuntimeDeterminiedType instead of .IsRuntimeDeterminedSubtype

4 years agoRevert workarounds for IEquatable and nullable (#795)
Stephen Toub [Fri, 13 Dec 2019 18:51:34 +0000 (13:51 -0500)]
Revert workarounds for IEquatable and nullable (#795)

Roslyn now special-cases IEquatable to be contravariant for nullable, so we can remove our workarounds.

4 years agoFileSecurity/DirectorySecurity should support long paths (#647)
Carlos Sanchez Lopez [Fri, 13 Dec 2019 18:35:15 +0000 (10:35 -0800)]
FileSecurity/DirectorySecurity should support long paths (#647)

* FileSecurity/DirectorySecurity should support long paths

* Address danmosemsft suggestions

* Address unit test danmosemsft suggestions

* Address test failures in NetFX

* addressing suggestions

4 years agoLocal live-live builds (#494)
Jeremy Koritzinsky [Fri, 13 Dec 2019 18:30:58 +0000 (10:30 -0800)]
Local live-live builds (#494)

* Convert libraries and installer to use a live CoreCLR.

* Installer uses a live libraries build for DLLs.

* Remove newline in path.

* Enable live-live builds to build required live dependencies when the dependencies are in the building subset/subset category.

* Update path to coreclr output.

* Fix typo in coreclr.proj.

* Remove last usage of CoreCLRPDBOverridePath.

* Update path of binplaced runtime to include OS and Arch.

* Fix typo in coreclr/tests/src/Common/Directory.Build.targets.

* Restore CoreFX shared framework from live build for CoreCLR test dependencies.

* Remove dependency on Microsoft.NETCore.CoreCLR.TestDependencies package.

* Enable referencing live builds of the OOB libraries by temporarily adding a new BinplaceConfiguration. Update test_dependencies in the CoreCLR tree to use that to restore OOB libraries.

* Remove reference to System.Drawing.Common from NETClientPrimitives (the reference is only needed at runtime and Core_Root already has System.Drawing.Common).

* Remove package-based checked CoreCLR + CoreFX test runs. In the live-live world, we'll run this test configuration by pointing the CoreFX test host build step at the artifacts from a checked CoreCLR build (possible in both local and CI builds).

* Only copy the UCRT on Windows.

* CoreCLR test build now builds against a live libraries sfx+oob ref assembly set.

* Override GetCorePackagePaths target to not reference unused packages (breaks the live-live build on a clean system).

* Remove live references to Microsoft.NETCore.Platforms now that it seems to be unneeded since the SDK now packages a RID graph. Use the live RID graph in test_runtime.csproj where we may actually be looking for the live RID graph.

* Fix coreclr build arg generation bug that was causing build failures.

* Remove references to Microsoft.NETCore.Platforms outside of package references from the installers.

* Fix problems in installer build in live-live that were found from a clean build.

* Remove unused dependency on Microsoft.NETCore.Targets.

* Fix Microsoft.NETCore.App -> Microsoft.NETCore.Platforms dependency.

* Remove Microsoft.NETCore.Targets version from Versions.props.

* Remove unused deps.csproj file that was the last dependency on the packaged Microsoft.NETCore.Platforms package.

* Fix OSGroup calculation for dependent projects off-Windows.

* Fix construction of Microsoft.NETCore.App.Internal package.

* Remove unneeded CoreRun copying.

* Serialize subsets that have dependencies across subset groups. Don't use `<MSBuild />` tasks to rebuild subsets since we don't want to rebuild projects multiple times (coreclr was being built multiple times).

* Cleanup from PR feedback.

* Only copy libraries outputs to artifacts/bin/runtime.

* Use the netcoreapp output directories for OOB-included references to libraries outputs.

* Remove references to deleted old corefx override setup.

* First pass to get new runtime pipeline using the local live-live infra (coreclr+libraries only for now).

* Don't generate layout during test native build.

* Fix ref assembly default binplacing for netcoreapp.

* Remove msbuild goo around importing Subsets.props and Directory.Build.props only once each. This goo isn't needed anymore.

* Fix disabling of binplacing for the target vertical to exclude only runtime.depproj and not exclude winrt.depproj.

* Fix libraries test build.

* Copy all paths used by the "ResolveLibrariesFromLocalBuild" target to publish from libraries build.

* For shims, reference the System.Private.CoreLib directly from CoreCLR outputs instead of through runtime.depproj.

* Hard-code the libraries configuration to release in coreclr test builds.

* Resolve ReferenceFromRuntime items directly from the CoreCLR output instead of via the runtime.depproj project.

* Fix test host generation. Fix running the XML Serialization generator as part of libraries test build.

* Fix XmlSerializer.Generator.Tests again.

* Don't look for CoreCLR files when using ReferenceFromRuntime and not using netcoreapp.

* Crossgen-comparison should depend on a libraries build so we can populate Core_Root.

* Add job dependency on libraries build from run-test-job to ensure we wait correctly. Otherwise we might have a race since the managed test build might depend on one libraries build while the test run depends on another.

* Only resolve coreclr files from local build when targetting netcoreapp.

* Add steps to download libraries build for crossgen-comparison.

* Revive old method of resolving references to the runtime for building against old netcoreapp (ie netcoreapp 3.0). Fix correctly passing along aliases info.

* Fix failing AllConfigurations leg that was due to the netcoreapp runtime.depproj getting binplaced in the runtime output folder.

* Update eng/liveBuilds.targets

Co-Authored-By: Davis Goodin <dagood@users.noreply.github.com>
* HostArch->BuildArchitecture and share with installer.

* Fix format nits.

* Update YAML variable name.

* Remove setting property to import liveBuilds.targets.

* Upload docs and packages folders from libraries build

* Inclue doc files in the Microsoft.NETCore.App.Internal package

* Try making the runtime-installer pipeline live-live using the build-coreclr-and-libraries-job template.

* Update artifacts download paths and msbuild properties for installer build.

* Mark cross-component files as native.

* Remove FrameworkPackageName to  remove error about missing $(FrameworkPackageName).versions.txt file that other shared frameworks also don't generate.

* Restore GetFilesFromPackageResolve override.

* Don't clean the unpack folder for the libraries download. It wipes out the CoreCLR download.

* Make sure that we restore the WinRT targetting pack during the installer build.

* Add libraries package directory to RestoreSources for the case where the LibrariesConfiguration is different from the installer build configuration.

* Don't pass OfficialBuildId unless it is an official build. We want to be consistent with the libraries build so our package versions match.

* Give default value for OfficialBuildArg variable

* Ensure installer tests can see the libraries-generated packages. Fix typo in TargetPath for CoreCLR assets (runtime instead of runtimes).

Fix paths for CoreCLR cross-target files as well as crossgen to place them in the correct directories.

* Add back FrameworkPackageName to get the partial platform manifest to generate.

4 years agoRemove TKey : notnull constraint from `IDictionary<TKey, TValue>` (#793)
Stephen Toub [Fri, 13 Dec 2019 17:16:55 +0000 (12:16 -0500)]
Remove TKey : notnull constraint from `IDictionary<TKey, TValue>` (#793)

* Remove TKey : notnull constraint from `IDictionary<TKey, TValue>`

The interface explicitly documents that some implementations may choose to support null keys.

* Remove TKey : notnull constraint from `IReadOnlyDictionary<TKey, TValue>`

* Remove notnull constraints from extension methods on those interfaces

4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20191212.1 (#835)
dotnet-maestro[bot] [Fri, 13 Dec 2019 17:14:49 +0000 (11:14 -0600)]
Update dependencies from https://github.com/dotnet/arcade build 20191212.1 (#835)

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

4 years agoInvoke dotnet.cmd/sh from right location in py (#823)
Viktor Hofer [Fri, 13 Dec 2019 09:28:29 +0000 (10:28 +0100)]
Invoke dotnet.cmd/sh from right location in py (#823)

4 years agoFix the gc layout algorithm to not double count byref (#814)
Andrew Au [Fri, 13 Dec 2019 03:22:18 +0000 (19:22 -0800)]
Fix the gc layout algorithm to not double count byref (#814)

4 years agoMiscellaneous performance fixes for Crossgen2 (#758)
Anubhav Srivastava [Fri, 13 Dec 2019 03:14:19 +0000 (19:14 -0800)]
Miscellaneous performance fixes for Crossgen2 (#758)

* Miscellaneous performance fixes.
Create comparison functions for Enum (Enum.CompareTo boxes since it takes an Object).
In ModuleToken, use the existing MetadataReader instead of making a new one each time.
Use Dictionary instead of ImmutableDictionary in CoreRTNameMangler to reduce allocations.
In CopiedFieldRvaNode, only read as much of the section as we need to copy.

4 years agoCheck method can compile before rooting (#729)
Fadi Hanna [Fri, 13 Dec 2019 03:10:29 +0000 (22:10 -0500)]
Check method can compile before rooting (#729)

* Check if a method should be skipped from compilation, and if so, do not root it.

* Harden various signature nodes against type system exceptions

Use existing validation API in CompilerTypeSystemContext to validate types on the various signature-emitting nodes: if it throws a
TypeSystem exception due to a malformed type/method, the exception will propagate, get handled, and cause the current
method being compiled to abort and be skipped (otherwise, the compiler will crash while emitting these problematic signatures)

4 years agoAdd more path exclusions to subsets (#828)
Santiago Fernandez Madero [Fri, 13 Dec 2019 03:02:08 +0000 (21:02 -0600)]
Add more path exclusions to subsets (#828)

4 years agoDocument tests and add some more
Layomi Akinrinade [Fri, 13 Dec 2019 01:56:47 +0000 (17:56 -0800)]
Document tests and add some more

4 years ago[master] Update dependencies from dotnet/arcade Microsoft/vstest (#790)
dotnet-maestro[bot] [Fri, 13 Dec 2019 00:48:29 +0000 (01:48 +0100)]
[master] Update dependencies from dotnet/arcade Microsoft/vstest (#790)

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

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

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

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

4 years agoUpdate Contributing.MD links (#815)
dhusemann [Fri, 13 Dec 2019 00:47:06 +0000 (18:47 -0600)]
Update Contributing.MD links (#815)

* Update Contributing.MD link for misspelled link

Updated link docs/project/api-review-process.md so 404 error will be corrected.

* update Contributing.MD links

updated coreclr to run time for remainder of links.

4 years agoAdded OS and Bit Specific tags to accordingly .csproj files. (#637)
Ivan Diaz Sanchez [Fri, 13 Dec 2019 00:40:00 +0000 (16:40 -0800)]
Added OS and Bit Specific tags to accordingly .csproj files. (#637)

4 years agoJIT: fix spill logic for local structs (#797)
Andy Ayers [Fri, 13 Dec 2019 00:27:53 +0000 (16:27 -0800)]
JIT: fix spill logic for local structs (#797)

If we're appending an assignment whose LHS is is a location within a local
struct, we need to spill all references to that struct from the eval stack.

Update the existing logic for this to handle the case where the LHS is a field
of a local struct, and the field is updated by unusual means (here, `initobj`).

Fixes #764.

4 years agoSupport targeting ARM64 in crossgen2 (#775)
Anton Lapounov [Thu, 12 Dec 2019 23:21:58 +0000 (15:21 -0800)]
Support targeting ARM64 in crossgen2 (#775)

With these changes compilation for ARM64 finishes successfully and generates a R2R image.
 There are some execution issues that need addressing.

4 years agoFix the LockFreeReaderHashtable (#777)
David Wrighton [Thu, 12 Dec 2019 22:59:46 +0000 (14:59 -0800)]
Fix the LockFreeReaderHashtable (#777)

Fix the LockFreeReaderHashtable
- Communication of the presence of an expanding hashtable was very close to not safe
  - Changed to aggressively use Interlocked operations instead
- If there were 3 threads, 1 which was expanding (thread A), 1 which failed an insert and was waiting on an expand(thread B), and a third which did a lookup for the item in process of insert on thread B, the table would find the item in process of insertion
  - Fixed by moving to a scheme where insertion didn't actually write in the value until it was confirmed that that spot was the right place to insert, and the value would be preserved into an expansion
  - In order to acquire a sentinel for scenarios without requiring the explicit definition of one, the first item inserted is used as the sentinel. It simply exists outside of the hashtable in a side variable

4 years agoFixes to static field offsets (#699)
Fadi Hanna [Thu, 12 Dec 2019 22:38:16 +0000 (17:38 -0500)]
Fixes to static field offsets (#699)

* Fixes to static field offsets

1) Stop counting offsets for RVA fields (this messes up the offsets of all statics)
2) Small fix to the size computation of nonGC statics (we were counting some GC statics as non-gc statics)
3) Bringing a small optimization we had with crossgen1 (safe static byref return)
4) Tiny micro-optimization: avoid allocation while looking up a field in one of the Typesystem hashtables (introduced with determinism work)

* Count the sizes of RVA statics in module field layout to match coreclr TypeSystem

4 years agoUpdate RyuJIT documentation (#755)
Bruce Forstall [Thu, 12 Dec 2019 19:13:42 +0000 (11:13 -0800)]
Update RyuJIT documentation (#755)

* Update RyuJIT documentation

1. Convert links to reference new repo
2. Update various mostly stylistic things in the RyuJIT overview
3. Add more high-level strategy/steps statements to the RyuJIT porting guide

* Update for code review comments

4 years agoMerge pull request #769 from vcsjones/735-fix
Jeremy Barton [Thu, 12 Dec 2019 17:55:30 +0000 (09:55 -0800)]
Merge pull request #769 from vcsjones/735-fix

Preserve HResult for bad password in managed PKCS12 PAL

4 years agoLimit crossgen2 instantiating depth (#791)
Jan Vorlicek [Thu, 12 Dec 2019 17:24:12 +0000 (18:24 +0100)]
Limit crossgen2 instantiating depth (#791)

Two coreclr pri1 tests were causing the crossgen2 to run until all
memory was depleeted due to the fact that we were not limiting depth of
instantiations of methods and those tests had recursive instantiation.
An example taken from one of the tests is this:
```
private static T meth<T>(int v, T x)
{
   //Recursive generic
   return ((v >= 0) ? meth<Tuple<T, T>>(v - 1, new Tuple<T, T>(x, x)).Field0 : x);
}
```

This change fixes it by adding the instantiation depth check for
function calls. If the level of instantiation for any of the generic
parameters exceeds a preset value (currently 10, taken from old
crossgen), the caller is not compiled by crossgen2. Such a method will
be compiled at runtime by JIT instead.

4 years agoConsolidate NCL stress testing infrastructure (#700)
Eirik Tsarpalis [Thu, 12 Dec 2019 17:05:22 +0000 (19:05 +0200)]
Consolidate NCL stress testing infrastructure (#700)

4 years agoMake sure we tell the same lie to the JIT for default interface methods
Andrew Au [Thu, 12 Dec 2019 15:18:03 +0000 (07:18 -0800)]
Make sure we tell the same lie to the JIT for default interface methods