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

4 years agoFix setting of DllImportResolver in crossgen2. (#167)
Eugene Rozenfeld [Tue, 26 Nov 2019 01:17:36 +0000 (17:17 -0800)]
Fix setting of DllImportResolver in crossgen2. (#167)

After change https://github.com/dotnet/coreclr/pull/27068 we
are creating multiple instances of CorInfoImpl. That broke the scenario
when jitpath is set: we are calling NativeLibrary.SetDllImportResolver
more than once, which results in
`System.InvalidOperationException: A resolver is already set for the assembly.`

This fix ensures that we call NativeLibrary.SetDllImportResolver
at most once.

This change also ensures that we set the resolver before attempting
to load the jit. That fixes the --jitpath scenario on Linux.

4 years agoImprove test coverage for RSAEncryptionPadding comparsion (#230)
Andrew Au [Tue, 26 Nov 2019 00:13:40 +0000 (16:13 -0800)]
Improve test coverage for RSAEncryptionPadding comparsion (#230)

* Improve test coverage for RSAEncryptionPadding comparsion

* Simplify RSASignaturePadding comparison logic

4 years agoConsolidate docs (#251)
Viktor Hofer [Mon, 25 Nov 2019 22:52:43 +0000 (23:52 +0100)]
Consolidate docs (#251)

* Consolidate sub-repo docs

4 years agoFix marshalling null delegates (#241)
Michal Strehovský [Mon, 25 Nov 2019 22:21:55 +0000 (23:21 +0100)]
Fix marshalling null delegates (#241)

Null delegates marshal as null pointers and vice versa.

4 years agoFix test build error when .NET Core SDK 5 is installed on the machine (#225)
Bruce Forstall [Mon, 25 Nov 2019 21:41:49 +0000 (13:41 -0800)]
Fix test build error when .NET Core SDK 5 is installed on the machine (#225)

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

4 years agoMerge pull request #157 from ivdiazsa/parallel-test-builds
Ivan Diaz Sanchez [Mon, 25 Nov 2019 21:32:00 +0000 (13:32 -0800)]
Merge pull request #157 from ivdiazsa/parallel-test-builds

Removed test scripts platform conditions to generate test wrappers.

4 years agoSeveral cleanups in CoreCLR YAML scripts (#236)
Tomáš Rylek [Mon, 25 Nov 2019 21:26:30 +0000 (22:26 +0100)]
Several cleanups in CoreCLR YAML scripts (#236)

* Stop transporting the test subtree as it shouldn't be actually
necessary.

* Clarify build phases in multi-subrepo world; unify script executions

* Unify the naming style for managed vs. native test artifacts

* Fix clangArg to be empty on Windows_NT

* Roll back unification of main product build script invocation

* Add CoreCLR prefix to test artifact name

4 years agoHttpStress: Use Windows containers and docker-compose (#209)
Eirik Tsarpalis [Mon, 25 Nov 2019 20:59:16 +0000 (20:59 +0000)]
HttpStress: Use Windows containers and docker-compose (#209)

4 years agoProposed set of norms and best practices for issue and pull request management (#78)
Jeff Schwartz [Mon, 25 Nov 2019 19:51:44 +0000 (11:51 -0800)]
Proposed set of norms and best practices for issue and pull request management (#78)

* Proposed set of norms and best practices for issue and pull request management

* additional feedback

* additional feedback

* additional feedback

4 years agoJIT: optimize more array covariant store checks in the importer (#189)
Andy Ayers [Mon, 25 Nov 2019 16:19:14 +0000 (08:19 -0800)]
JIT: optimize more array covariant store checks in the importer (#189)

The importer was already optimizing away some array covariant store checks,
for cases where the value being stored was null, or the value being stored
came from the same array.

Change this to only optimize array covariant store checks in the importer
when optimization is enabled. For minopts, invoking the store helper produces
smaller code.

Update `gtGetClassHandle` to obtain the array handle from array newobjs,
and use this to also optimize cases where the destination array is exactly
`object[]` or is `T[]` where `T` is final and not itself subject to special
casting logic. In particular this gets the common case where `T` is `string`.

Closes dotnet/coreclr#6537.

4 years agoAllow project builds from script (#201)
Viktor Hofer [Mon, 25 Nov 2019 14:15:21 +0000 (15:15 +0100)]
Allow project builds from script (#201)

* Allow project builds from script

* Fix installer builds

4 years agoRemove optional consumption of CoreCLR transport packages in CoreCLR test build....
Jeremy Koritzinsky [Mon, 25 Nov 2019 14:13:58 +0000 (08:13 -0600)]
Remove optional consumption of CoreCLR transport packages in CoreCLR test build. (#223)

4 years agoMake marshallers shareable again (#240)
Michal Strehovský [Mon, 25 Nov 2019 13:05:14 +0000 (14:05 +0100)]
Make marshallers shareable again (#240)

Fixes build breaks on CoreRT side.

4 years agoRemove System.ComponentModel.TypeConverter exclusion from SuperILC (#217)
Jan Vorlicek [Mon, 25 Nov 2019 02:37:46 +0000 (03:37 +0100)]
Remove System.ComponentModel.TypeConverter exclusion from SuperILC (#217)

It turns out it is not needed anymore, the assembly compiles fine

4 years agoAddress some IDEXXX analysis warnings (#180)
Stephen Toub [Mon, 25 Nov 2019 00:54:27 +0000 (19:54 -0500)]
Address some IDEXXX analysis warnings (#180)

* Address some IDEXXX analysis warnings

* Address PR feedback

4 years agoUse #nullable restore in code generators (#238)
Stephen Toub [Sun, 24 Nov 2019 04:08:35 +0000 (23:08 -0500)]
Use #nullable restore in code generators (#238)

4 years agoAnnotate System.IO.MemoryMappedFiles for nullable reference types (#220)
Stephen Toub [Sat, 23 Nov 2019 21:42:18 +0000 (16:42 -0500)]
Annotate System.IO.MemoryMappedFiles for nullable reference types (#220)

4 years agoAnnotate System.IO.Compression.Brotli for nullable reference types (#218)
Stephen Toub [Sat, 23 Nov 2019 21:41:52 +0000 (16:41 -0500)]
Annotate System.IO.Compression.Brotli for nullable reference types (#218)

* Annotate System.IO.Compression.Brotli for nullable reference types

* Address PR feedback

4 years agoFix AV in System.StubHelpers.CSTRMarshaler.ConvertFixedToNative (#202)
Fadi Hanna [Sat, 23 Nov 2019 05:43:36 +0000 (21:43 -0800)]
Fix AV in System.StubHelpers.CSTRMarshaler.ConvertFixedToNative (#202)

* Fix AV in System.StubHelpers.CSTRMarshaler.ConvertFixedToNative

* Add test coverage

4 years agoUnifying many of the R2R and COR constants between crossgen2 and the r2rdump tools...
Fadi Hanna [Sat, 23 Nov 2019 00:55:46 +0000 (16:55 -0800)]
Unifying many of the R2R and COR constants between crossgen2 and the r2rdump tools (#172)

* Unifying many of the R2R and COR constants between crossgen2 and the r2rdump tools

* Move tools/crossgen2/Common to tools/Common

* Adjust paths in csproj files

4 years agoFix printing switching to MinOpts or Optimized (#214)
Egor Chesakov [Fri, 22 Nov 2019 20:15:11 +0000 (12:15 -0800)]
Fix printing switching to MinOpts or Optimized (#214)

* Initialize compSwitchedToOptimized and compSwitchedToMinOpts before calling to compInitOptions in jit/compiler.cpp

* Add LF to switchedToOptimized and switchedToMinOpts messages in jit/compiler.cpp

4 years agoFix getting affinity set on MUSL on Jetson TX2 (#206)
Jan Vorlicek [Fri, 22 Nov 2019 16:53:02 +0000 (17:53 +0100)]
Fix getting affinity set on MUSL on Jetson TX2 (#206)

* Fix getting affinity set on MUSL on Jetson TX2

The code in PAL_GetCurrentThreadAffinitySet relied on the fact that the
number of processors reported as configured in the system is always
larger than the maximum CPU index. However, it turns out that it is not
true on some devices / distros. The Jetson TX2 reports CPUs 0, 3, 4 and
5 in the affinity mask and the 1 and 2 are never reported. GLIBC reports
6 as the number of configured CPUs, however MUSL reports just 4. The
PAL_GetCurrentThreadAffinitySet was using the number of CPUs reported as
configured as the upper bound for scanning affinity set, so on Jetson
TX2, the affinity mask returned had just two bits set while there were
4 CPUs. That triggered an assert in the GCToOSInterface::Initialize.

This change fixes that by looping over all cpu indices in the affinity set.
Similar fix went to GetProcessorForHeap and related stuff in gcenv.unix.cpp

4 years agoDelete unnecessary intrinsic attributes (#216)
Jan Kotas [Fri, 22 Nov 2019 16:37:34 +0000 (17:37 +0100)]
Delete unnecessary intrinsic attributes (#216)

These are left-over from .NET Native. Not needed for RyuJIT or Mono.

4 years agoMerge pull request #215 from janvorli/fix-abstractcalls-test
Jan Vorlicek [Fri, 22 Nov 2019 15:12:59 +0000 (16:12 +0100)]
Merge pull request #215 from janvorli/fix-abstractcalls-test

Fix crossgen2 handling of direct calls to abstract methods

4 years agoChange the exception thrown for invalid abstract calls
Jan Vorlicek [Fri, 22 Nov 2019 11:21:24 +0000 (12:21 +0100)]
Change the exception thrown for invalid abstract calls

It seems that the InvalidProgramException is more appropriate.

4 years agoFix crossgen2 handling of direct calls to abstract methods
Jan Vorlicek [Fri, 22 Nov 2019 10:38:55 +0000 (11:38 +0100)]
Fix crossgen2 handling of direct calls to abstract methods

This change fixes two differences between old and new crossgen in the
getCallInfo method. Direct calls to abstract methods were being compiled
as if they were possible and lead to runtime crash in the call chain
from the PreStubWorker.

4 years agoMerge pull request #194 from janvorli/fix-box-on-method-handle
Jan Vorlicek [Fri, 22 Nov 2019 10:22:33 +0000 (11:22 +0100)]
Merge pull request #194 from janvorli/fix-box-on-method-handle

Fix missing unbox flag on method handle for struct methods

4 years agoRemove unused code in app domain (#204)
Elinor Fung [Fri, 22 Nov 2019 09:40:42 +0000 (01:40 -0800)]
Remove unused code in app domain (#204)

4 years agoRemove duplicate yml template file (#210)
Santiago Fernandez Madero [Fri, 22 Nov 2019 08:29:40 +0000 (00:29 -0800)]
Remove duplicate yml template file (#210)

* Delete common upload artifact template

* Move upload artifact step from coreclr to common

4 years agoSet platform for tools.local fixed to AnyCPU (#205)
Viktor Hofer [Fri, 22 Nov 2019 08:29:18 +0000 (09:29 +0100)]
Set platform for tools.local fixed to AnyCPU (#205)

4 years agoDisable incremental linking in coreclr Checked Windows builds (#192)
Bruce Forstall [Fri, 22 Nov 2019 06:34:43 +0000 (22:34 -0800)]
Disable incremental linking in coreclr Checked Windows builds (#192)

We force `/OPT:REF` and this is incompatible with incremental linking
(and yields a warning to that effect). To fix, explicitly disable
incremental linking.

(I couldn't find anyplace where it was explicitly enabled, so I believe
it is enabled by default with the given linker options.)

Another option would be to not force `/OPT:REF` for Checked builds.

4 years agoUpdating the JIT to support marshaling blittable generics. (#103)
Tanner Gooding [Fri, 22 Nov 2019 05:27:42 +0000 (21:27 -0800)]
Updating the JIT to support marshaling blittable generics. (#103)

* Adding some tests for marshalling generics.

* Updating the VM to allow marshalling blittable generic types.

* Adding comments for why certain blittable generics are blocked from being marshaled

* Removing the new IDS_EE_BADMARSHAL_BLITTABLE_GENERICS_RESTRICTION string in favor of fixing the text in IDS_EE_BADMARSHAL_GENERICS_RESTRICTION

* Updating CrossGen2 to handle marshalling blittable generics

4 years agoAdd a script for generating a .sln containing all library projects (#186)
Stephen Toub [Fri, 22 Nov 2019 03:56:13 +0000 (22:56 -0500)]
Add a script for generating a .sln containing all library projects (#186)

* Add a script for generating a .sln containing all library projects

* Add a script for generating a .sln containing all library projects

4 years agoAddress new nullable warnings from compiler [MaybeNull] updates (#179)
Stephen Toub [Fri, 22 Nov 2019 03:56:03 +0000 (22:56 -0500)]
Address new nullable warnings from compiler [MaybeNull] updates (#179)

The compiler is updating its handling of maybe-null values, and in doing so we're getting a bunch of new warnings.  We've not yet ingested the new compiler, but this proactively addresses the warnings for when we do.

4 years agoUpdate SslClientAuthenticationOptionsExtensions.ShallowClone to copy CipherSuitesPoli...
Stephen Toub [Fri, 22 Nov 2019 03:53:01 +0000 (22:53 -0500)]
Update SslClientAuthenticationOptionsExtensions.ShallowClone to copy CipherSuitesPolicy (#211)

4 years agoAvoid infinite recursion in RSAEncryptionPadding equality check
Andrew Au [Fri, 22 Nov 2019 03:17:06 +0000 (19:17 -0800)]
Avoid infinite recursion in RSAEncryptionPadding equality check

4 years agoRemove some NoWarns from CoreLib (#183)
Stephen Toub [Fri, 22 Nov 2019 01:49:55 +0000 (20:49 -0500)]
Remove some NoWarns from CoreLib (#183)

4 years agoRemove AppDomain::GetFusionContext (#188)
Elinor Fung [Fri, 22 Nov 2019 01:43:01 +0000 (17:43 -0800)]
Remove AppDomain::GetFusionContext (#188)

It is just the TPA binder context now.

Remove dead code

4 years agoFix `optComputeAssertionGen` dump newline. (#193)
Sergey Andreenko [Fri, 22 Nov 2019 00:45:46 +0000 (00:45 +0000)]
Fix `optComputeAssertionGen` dump newline. (#193)