platform/upstream/dotnet/runtime.git
4 years ago[mono] Remove SIGTRAP handler, as it interferes with debugging (#32264)
monojenkins [Tue, 18 Feb 2020 21:33:53 +0000 (16:33 -0500)]
[mono] Remove SIGTRAP handler, as it interferes with debugging (#32264)

See https://github.com/mono/mono/pull/18243#issuecomment-586013427

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: Alexis Christoforides <alexis@thenull.net>
4 years ago[merp] Capture Environment.FailFast message in crash report (#32326)
monojenkins [Tue, 18 Feb 2020 20:59:42 +0000 (15:59 -0500)]
[merp] Capture Environment.FailFast message in crash report (#32326)

If the process calls `System.Environment.FailFast (message, exception)` we should capture the message in the crash report log.

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
4 years ago[interp] Unwrap RuntimeWrappedException if needed (#32485)
monojenkins [Tue, 18 Feb 2020 18:59:27 +0000 (13:59 -0500)]
[interp] Unwrap RuntimeWrappedException if needed (#32485)

when throwing non exception objects.

Enable the entire System.Linq.Expressions suite with interpreter

Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>
4 years ago[mono][xunit tests] Move skipped tests out of rsp file (#2087)
Maxim Lipnin [Tue, 18 Feb 2020 18:57:50 +0000 (21:57 +0300)]
[mono][xunit tests] Move skipped tests out of rsp file (#2087)

Addresses https://github.com/dotnet/runtime/issues/1980

* [xunit tests][mono] Remove disabled Microsoft.VisualBasic.Core.Tests tests from rsp file.

* [xunit tests][mono] Remove System.Collections.Specialized.Tests.Ctor_NegativeCapacity_ThrowsArgumentOutOfRangeException from rsp file

* Remove System.Collections.Concurrent.Tests.ConcurrentQueueTests.ReferenceTypes_NulledAfterDequeue from rsp file because it passes on release mono

* Remove BasicEventSourceTests.TestsManifestNegative.Test_GenerateManifest_InvalidEventSources from rsp file because it passes locally

* Remove ManagedTests.DynamicCSharp.Conformance.dynamic.overloadResolution.Methods.Oneclass2methods.twoprms004.twoprms004.Test.DynamicCSharpRunTest from rsp file

* Remove System.IO.Tests.*.CopyFileWithData_MemberData from rsp file

* Move a set of skipped System.Linq.Expressions.Tests out of rsp file.

* Annotate System.Collections.Concurrent.Tests.ConcurrentQueueTests.ReferenceTypes_NulledAfterDequeue with ActiveIssue attribute

* Move another set of skipped System.Linq.Expressions.Tests out of rsp file.

* Move skipped System.Linq.Parallel.Tests.PlinqModesTests.WithExecutionMode_Multiple test out of rsp file

* Move skipped System.Memory.Tests out of rsp file

* Move skipped System.Net.Http.Functional.Tests.PlatformHandler_HttpClientHandler.* tests out of rdp file

* Remove System.Net.Sockets.Tests.SocketOptionNameTest.MulticastInterface_Set_AnyInterface_Succeeds because it passes locally.

* Move System.Reflection tests with an active issue out of rsp file

* Move skipped System.Runtime.InteropServices.Tests out of rsp file

* Replace closed CoreFX GH issue with the active Runtime one

* Move skipped System.Runtime.Serialization.Formatters.Tests out of rsp file

* Move skipped System.Runtime.Tests with an active issue out of rsp file

* Move skipped System.Threading.Tests with an active issue out of rsp file

* Remove skipped System.Data.Common.Tests because the related issue was addressed

* Move skipped System.Data.Common.Tests.DbConnectionTests.ProviderFactoryTest with an active issue out of rsp file

* Move skipped System.Diagnostics.StackTrace.Tests with an active issue out of rsp file

* Move skipped System.Numerics.Vectors.Tests with an active issue out of rsp file

* Move skipped System.Reflection.Context.Tests with an active issue out of rsp file

* Move skipped System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinMaxThreadsTest with an active issue out of rsp

* Move skipped System.ComponentModel.Composition and Tests.Integration namespaces with an active issue out of rsp file

* Update a message in skipped System.Runtime.InteropServices.Tests

* Move skipped System.Reflection.Tests.MetadataTokenTests.SuccessImpliesNonNilWithCorrectTable with an active issue out of rsp file

* Move skipped/no repro System.Threading.Overlapped.Tests with an active issue out of rsp file

* Move skipped System.Runtime.Extensions with an active issue out of rsp file

* Re-enable skipped System.Runtime.Handles.Tests because the related issue was addressed

* Move skipped System.Reflection.TypeExtensions.Tests with an active issue out of rsp file

* Move skipped System.Reflection.Emit.Lightweight.Tests with an active issue out of rsp file

* Move skipped System.Reflection.MetadataLoadContext.Tests with an active issue out of rsp file

* Move skipped System.Xml.Xsl.XslTransformApi.Tests with an active issue out of rsp file

* Move skipped System.Security.Cryptography.Encoding.Tests with an active issue out of rsp file

* Move System.Drawing.Imaging.Tests.ImageAttributesTests.SetColorMatrix_InvalidFlags_ThrowsArgumentException out of rsp file

* Add an active issue attribute to System.Drawing.Imaging.Tests.ImageAttributesTests.SetColorMatrix_InvalidFlags_ThrowsArgumentException test; add a comment about libgdiplus dependency to PlatformDetection.IsDrawingSupported method.

* Move System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandler_ClientCertificates_Test.AutomaticOrManual_DoesntFailRegardlessOfWhetherClientCertsAreAvailable out of rsp because it has an active corefx issue; see https://github.com/dotnet/corefx/issues/37336

* Remove System.Net.Http.Functional.Tests.SocketsHttpHandler_HttpClientHandler_DangerousAcceptAllCertificatesValidator_Test.SetDelegate_ConnectionSucceeds from rsp because it's already disabled as part of system.net.* tests; see https://github.com/dotnet/runtime/pull/2318

* Move skipped System.Reflection.Emit.ILGeneration.Tests with an active issue out of rsp file

* Move skipped System.Reflection.Emit.Tests with an active issue out of rsp file

* Remove skipped System.Reflection.Tests from rsp file because they pass locally

* Try to re-enabled skipped System.Reflection.Tests.AssemblyTests.LoadFromStream_Location_IsEmpty

* Remove broken namespace

* Add an active issue to System.Reflection.Tests.AssemblyTests.LoadFromStream_Location_IsEmpty

* Add an active issue to several System.Reflection tests

* Remove skipped System.Tests.ExitCodeTests.SigTermExitCode because it passes locally.

* Remove skipped System.Tests.Types.VoidTests.IsByRef_Get_ReturnsExpected from rsp file because it passes locally

* Remove skipped System.Tests.GCTests.LatencyRoundtrips from rsp file because it passes locally

* Remove skipped System.Tests.GCExtendedTests.GetGCMemoryInfo from rsp-file because the related functionality has been implemented (see https://github.com/mono/mono/issues/15236)

* Remove skipped System.Tests.GetEnvironmentVariable.EnvironmentVariablesAreHashtable from rsp file because it passes locally

* Turn System.Threading.Tasks.Tests.ExecutionContextFlowTest.TaskCompletionSourceDoesntCaptureExecutionContext into a conditional theory because it requires precise GC

* Try to re-enable System.Threading.Tasks.Tests.TaskContinueWithTests.LongContinuationChain_ContinueWith_DoesNotStackOverflow

* Remove skipped System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinThreadsTo0Test from rsp file because it passes locally

* Remove System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinMaxThreadsTest_ChangedInDotNetCore from rsp file because it's explicitly skipped on Mono using SkipOnTargetFramework attribute

* Add an active issue to System.Tests.ExitCodeTests.SigTermExitCode and System.Tests.GCTests.LatencyRoundtrips tests

* Remove skipped System.Data.Tests.SqlTypes.SqlCharsTest.ReadWriteXmlTest from rsp file because it passes locally

* Add an active issue to System.Tests.GCExtendedTests.GetGCMemoryInfo because it fails on helix

* Add an active issue

* Add an active issue

* Re-add an active issue to System.Tests.ExceptionTests.ThrowStatementDoesNotResetExceptionStackLineOtherMethod

* Move skipped System.ComponentModel.Composition.MetadataViewProviderTests.GetMetadataView_InterfaceWithIndexer_ShouldThrowNotSupportedException with an active issue out of rsp file (see https://github.com/mono/mono/issues/15169)

* Remove skipped Tests.Integration.ExportFactoryTests.ExportFactoryStandardImports_ShouldWorkProperly from rsp file because it's already disabled within the entire Tests.Integration.ExportFactoryTests class (see https://github.com/mono/mono/issues/16417)

* Remove several skipped System.ComponentModel.Composition.Tests from rsp file because they pass locally.

* Move skipped System.ComponentModel.Composition.ExportCollectionTests.ImportCollectionsFromContainerOnly with an active issue out of rsp file

* Move skipped System.Diagnostics.Tests.StackTraceTests.Ctor_Exception_SkipFrames and System.Diagnostics.Tests.StackTraceTests.Ctor_Exception_SkipFrames_FNeedFileInfo tests with an active issue out of rsp file.

* Move skipped System.Diagnostics.Tests.StackTraceTests.ToString_Invoke_ReturnsExpected with an active issue out of rsp file

* Remove skipped System.Reflection.Tests.MetadataLoadContextTests.RelocatableAssembly from rsp file because it passes locally.

* Move skipped System.Runtime.Loader.Tests.RefEmitLoadContextTests.LoadRefEmitAssembly with an active issue out of rsp file

* Moved skipped ThreadPoolBoundHandleTests.PreAllocatedOverlapped_NullAsCallback_ThrowsArgumentNullException with an active issue out of rsp file (see https://github.com/mono/mono/issues/15313)

* Move skipped System.Runtime.Tests.ProfileOptimizationTest.ProfileOptimization_CheckFileExists with an active issue out of rsp file

* Move skipped System.Reflection.Emit.Tests.DynamicILInfoTests with an active issue out of rsp file

* Move skipped System.Reflection.Emit.Tests.DynamicILInfoTests.SetX_NullInput_ThrowsArgumentNullException and System.Reflection.Emit.Tests.DynamicMethodctor1.InvalidOwner_ThrowsArgumentException with an active issue out of rsp file

* Add an active issue to System.Threading.Tasks.Tests.TaskContinueWithTests.LongContinuationChain_ContinueWith_DoesNotStackOverflow because it's flaky

* Add an active issue to Tests.Integration.DiscoveryTests.DiscoverAddinsWithCombinedCustomExportAndMetadataAttribute

* Add an active issue to System.Threading.ThreadPools.Tests.ThreadPoolTests.SetMinMaxThreadsTest_ChangedInDotNetCore

* Add an active issue to System.ComponentModel.Composition.MetadataAttributeTests.StronglyTypedStructureTestWithTransparentViews

* Replace TargetFrameworkMonikers.Mono with TestRuntimes.Mono

* Remove redundant space

* Remove all -notrait category

* Add an active issue to System.ComponentModel.Composition.MetadataAttributeTests.StronglyTypedStructureTest

* Add an active issue to System.ComponentModel.Composition.CompositionContainerTests.GetExportOfTTMetadataView1_TypeAsMetadataViewTypeArgument_IsUsedAsMetadataConstraint

* Disable the whole System.ComponentModel.Composition.Tests namespace

* Move some System.Runtime.Loader.Tests, which rely on collectible AssemblyLoadContext, out of rsp file

* Remove three System.Runtime.Loader.Tests.AssemblyLoadContextTest tests with no local failures from rsp file

* Remove System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadNonExistentInDefaultContext and System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext from rsp file because the related issues should be addressed

* Add an active issue to System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadNonExistentInDefaultContext and System.Runtime.Loader.Tests.DefaultLoadContextTests.LoadInDefaultContext because they fail on CI

* Move several System.Runtime.Loader.Tests.AssemblyLoadContextTest with an active issues out of rsp file

* Remove System.Utf8String.Experimental.Tests from rsp file to verify how they behave on CI

* Clean up rsp file to check all remaining failures

* Skip the entire System.ComponentModel.Composition.Registration.Tests namespace on Mono

* Disable a set of classes in System.Utf8String.Experimental.Tests workspace.

* Add stubs for Utf8String and Utf8Span.cs classes to fix the test build on Mono

* Remove nint/nunit aliases unused in PNSE version of Utf8Span

* Remove CoreFX.issues.rsp file because it has been cleaned up

4 years agoFix Platform setting in mono nuget Directory.Build.props (#32491)
Alexander Köplinger [Tue, 18 Feb 2020 18:56:44 +0000 (19:56 +0100)]
Fix Platform setting in mono nuget Directory.Build.props (#32491)

Otherwise doing `./mono.sh -pack` didn't work since it'd use amd64 instead of x64.
We copied much of this logic from coreclr so I assume this is specific to their build, but I still don't fully understand every bit.

4 years agoMerge pull request #2351 from manne/feature/nullable_microsoft_win32_registry
Eirik Tsarpalis [Tue, 18 Feb 2020 18:11:27 +0000 (18:11 +0000)]
Merge pull request #2351 from manne/feature/nullable_microsoft_win32_registry

Nullable annotate for Microsoft.Win32.Registry

4 years agoIf we have the capacity, try running Mono CI on ARM64 (#32303)
Jo Shields [Tue, 18 Feb 2020 17:44:34 +0000 (12:44 -0500)]
If we have the capacity, try running Mono CI on ARM64 (#32303)

* If we have the capacity, try running Mono CI on ARM64

* Add ARM64 Helix queue to general availability

4 years agoSimplify CheckIsReserved in IriHelper (#32340)
Miha Zupan [Tue, 18 Feb 2020 17:36:49 +0000 (18:36 +0100)]
Simplify CheckIsReserved in IriHelper (#32340)

* Simplify CheckIsReserved in IriHelper

* Simplify CheckIsReserved further

4 years agoOptimize CheckIriUnicodeRange (#31860)
Miha Zupan [Tue, 18 Feb 2020 17:36:29 +0000 (18:36 +0100)]
Optimize CheckIriUnicodeRange (#31860)

* Optimize CheckIriUnicodeRange

* Improve clarity of if check in CheckIriUnicodeRange

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Improve clarity of if check in CheckIriUnicodeRange

* Optimize range checks that are equivalent mod 2^16

* Invert escape boolean condition

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoMerge pull request #32185 from NikolaMilosavljevic/pkg.dev.1
Nikola Milosavljevic [Tue, 18 Feb 2020 16:53:23 +0000 (08:53 -0800)]
Merge pull request #32185 from NikolaMilosavljevic/pkg.dev.1

Enable rpm/deb build on dev machines

4 years agoRemove unused locals in System.ServiceModel.Syndication (#31841)
Next Turn [Tue, 18 Feb 2020 14:59:42 +0000 (22:59 +0800)]
Remove unused locals in System.ServiceModel.Syndication (#31841)

4 years agoMerge branch 'master' into feature/nullable_microsoft_win32_registry
Stephen Toub [Tue, 18 Feb 2020 14:58:37 +0000 (09:58 -0500)]
Merge branch 'master' into feature/nullable_microsoft_win32_registry

4 years agoChange several `static readonly byte[]` fields to be `ReadOnlySpan<byte>` properties...
Stephen Toub [Tue, 18 Feb 2020 14:25:32 +0000 (09:25 -0500)]
Change several `static readonly byte[]` fields to be `ReadOnlySpan<byte>` properties (#32464)

4 years agoReduce allocation in HTTP/2 requests by ~30% (#32406)
Stephen Toub [Tue, 18 Feb 2020 13:24:08 +0000 (08:24 -0500)]
Reduce allocation in HTTP/2 requests by ~30% (#32406)

* Avoid forcing ExpectContinue / TransferEncodingChunked headers into existence

* Reduce cookie-related allocations

- Make CookieParser/CookieTokenizer into structs. CookieParser is just created as a helper with some state to help a loop do parsing; it's not passed around in any way.  And CookieTokenizer is just the implementation of CookieParser separated out for some reason.  They can both be structs.
- Remove enumerator allocations related to cookies. Also reduces interface method invocations.

* Remove often-unnecessary allocation in Uri.IdnHost

This is happening for every request.  But if the host is already all ASCII, we don't need to create a new string, and if it's already all lowercase, we don't need to create yet another new string. (This logic could stand to be cleaned up further; I just removed the allocations and some unnecessarily complex unsafe code along the way.)

* Combine ReadAtLeastAsync into EnsureIncomingBytesAsync

There's no need for them to be separate, and separating them leads to an extra async stack frame / state machine.

* Reduce calls to ReadFrameAsync that need to yield

Many frames either won't have a payload, or the act of waiting for the header will also end up waiting for the payload (in the same packet).  By pulling out the wait in the hot path, we significantly reduce the number of times ReadFrameAsync will need to yield.

* Override Http2ReadStream.CopyToAsync

Reduces allocation / improves throughput when using responseStream.CopyToAsync.

* Shrink EnsureIncomingBytesAsync state machine by 8 bytes

Remove two lifted Int32s.

* Shrink size of Http2Connection.SendAsync state machine

The order of a comparison operation is, based on C# required order of operations, forcing a temporary to be spilled and lifted to the state machine.

* Add additional values to known headers

Avoids string allocations when these common response values are used.

* Remove dead Uri code

4 years agoPrefer StringBuilder.Append(char) over Append(string) (#32467)
Stephen Toub [Tue, 18 Feb 2020 13:23:25 +0000 (08:23 -0500)]
Prefer StringBuilder.Append(char) over Append(string) (#32467)

* Prefer StringBuilder.Append(char) over Append(string)

* Address PR feedback

4 years ago[master] Update dependencies from mono/linker dotnet/arcade (#32472)
dotnet-maestro[bot] [Tue, 18 Feb 2020 11:24:41 +0000 (12:24 +0100)]
[master] Update dependencies from mono/linker dotnet/arcade (#32472)

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

- ILLink.Tasks - 0.1.6-prerelease.20117.1

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

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

4 years agoRemove #if __cplusplus from MagicTypeInfo. (#32461)
monojenkins [Tue, 18 Feb 2020 09:53:13 +0000 (04:53 -0500)]
Remove #if __cplusplus from MagicTypeInfo. (#32461)

This wastes about 24 static const bytes which I think is ok.
6 bytes per struct plus 2 padding, and there are 3 of them, total, ever, passed by pointer.

I was looking into https://github.com/mono/mono/issues/18827
and wanting to rule out #if __cplusplus.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoUpdate ILLinkTasksVersion dependency (#32170)
Marek Safar [Tue, 18 Feb 2020 08:10:51 +0000 (09:10 +0100)]
Update ILLinkTasksVersion dependency (#32170)

* Revert "Revert "Update ILLinkTasksVersion dependency (#2334)" (#31807)"

This reverts commit 334391bdc9d4e9e20ea8b8a19ec5788da680b850.

* Update ILLink version

* Update ILLink task netcore execution version

* Another version update

4 years agoUse CancellationToken.ThrowIfCancellationRequested directly where applicable (#32468)
Stephen Toub [Tue, 18 Feb 2020 06:36:16 +0000 (01:36 -0500)]
Use CancellationToken.ThrowIfCancellationRequested directly where applicable (#32468)

4 years agoUnobservedTaskExceptionEventArgs.Exception should not be nullable (#32457)
Joseph Musser [Tue, 18 Feb 2020 03:38:22 +0000 (22:38 -0500)]
UnobservedTaskExceptionEventArgs.Exception should not be nullable (#32457)

4 years agoR2RDump fixes (#32460)
Andrew Au [Tue, 18 Feb 2020 02:33:13 +0000 (18:33 -0800)]
R2RDump fixes (#32460)

4 years ago[win32] Make non-recursive mutexes SRWLOCK instead of CRITICAL_SECTION. (#32258)
monojenkins [Mon, 17 Feb 2020 21:35:18 +0000 (16:35 -0500)]
[win32] Make non-recursive mutexes SRWLOCK instead of CRITICAL_SECTION. (#32258)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoAnnotate System.IO.Pipes.AccessControl for nullable reference types (#32343)
Eric Erhardt [Mon, 17 Feb 2020 21:14:46 +0000 (15:14 -0600)]
Annotate System.IO.Pipes.AccessControl for nullable reference types (#32343)

* Annotate System.IO.Pipes.AccessControl for nullable reference types

Contributes to #2339

4 years agoCross compilation, check first if an env variable is defined (#32392)
s0dyy [Mon, 17 Feb 2020 19:19:49 +0000 (20:19 +0100)]
Cross compilation, check first if an env variable is defined (#32392)

4 years agoFix GeneratorCommand in Microsoft.XmlSerializer.Generator.Tests.csproj (#32446)
Alexander Köplinger [Mon, 17 Feb 2020 18:13:15 +0000 (19:13 +0100)]
Fix GeneratorCommand in Microsoft.XmlSerializer.Generator.Tests.csproj (#32446)

On non-Windows operating systems we need to use `&&` to chain the two commands instead of a single ampersand.

4 years agoFix IsArgPassedByRef in crossgen2 on ARM32 (#32425)
Dong-Heon Jung [Mon, 17 Feb 2020 17:12:19 +0000 (02:12 +0900)]
Fix IsArgPassedByRef in crossgen2 on ARM32 (#32425)

4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20200216.1 (#32438)
dotnet-maestro[bot] [Mon, 17 Feb 2020 16:38:46 +0000 (10:38 -0600)]
Update dependencies from https://github.com/dotnet/arcade build 20200216.1 (#32438)

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

4 years agoUpdate environ.cpp (#832)
Federico Zuccollo [Mon, 17 Feb 2020 16:06:19 +0000 (17:06 +0100)]
Update environ.cpp (#832)

The search for a prefix has been inlined to squeeze some extra performance by directly comparing bytes.

The prefix search functionality has been put in a separate static function to have all the state given as input and use multiple returns as control flow.

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

4 years ago[interp] Consolidate non-recursive call sites. (#32220)
monojenkins [Mon, 17 Feb 2020 16:03:17 +0000 (11:03 -0500)]
[interp] Consolidate non-recursive call sites. (#32220)

 Consolidate native_stack_addr as a result (resolving a FIXME).
 Builds on:
  https://github.com/mono/mono/pull/18857
  https://github.com/mono/mono/pull/18858
  https://github.com/mono/mono/pull/18869

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoAdd PreserveDependency to StackFrameHelper (#32023)
Vitek Karas [Mon, 17 Feb 2020 15:36:58 +0000 (07:36 -0800)]
Add PreserveDependency to StackFrameHelper (#32023)

While linker can recognize the hardcoded type name in the InitializeSoruceInfo it sometimes fails to resolve the type as the System.Diagnostics.StackTrace is not directly referenced by most assemblies. This is partially an internal linker limitation and the attribute is a workaround.

That said linker would not be able to recognize the GetMethod or CreateInstance calls which follow and in member-level trimming mode would not correctly keep the GetSourceLineInfo nor the .ctor of the type.

4 years agoIntroducing Pinned Object Heap (#32283)
Vladimir Sadov [Mon, 17 Feb 2020 15:26:21 +0000 (07:26 -0800)]
Introducing Pinned Object Heap (#32283)

* Introducing Pinned Object Heap

* PR feedback

* reverted a test-only change

4 years agoFix THREADS_SUSPEND_DEBUG to compile (id vs. mono_thread_info_get_tid). (#32393)
monojenkins [Mon, 17 Feb 2020 15:06:43 +0000 (10:06 -0500)]
Fix THREADS_SUSPEND_DEBUG to compile (id vs. mono_thread_info_get_tid). (#32393)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[llvm] Disable X86 call frame size optimization. (#11118)
monojenkins [Mon, 17 Feb 2020 14:41:54 +0000 (09:41 -0500)]
[llvm] Disable X86 call frame size optimization. (#11118)

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

For calls that require parameters passed in stack memory,
X86CallFrameOptimization can sometimes replace a sequence of movs to
prologue-reserved stack memory with a sequence of pushes and a compensating sub
rsp after the call. LLVM accumulates an OpAdjustCfaOffset MCCFIInstruction for
each push and and records the ephemeral parameter space consumed by the call
using an OpGnuArgsSize MCCFIInstruction (i.e. DW_CFA_GNU_args_size).

MonoException doesn't support encoding OpGnuArgsSize MCCFIInstructions, and
attempting to encode this instruction can cause unpredictable behavior, due to
our use of llvm_unreachable with assertions disabled [1]. Moreover, even if
MonoException happens to emit valid call frame instructions despite the UB
induced by llvm_unreachable, Mono's exception handler will restore the stack
pointer to the value it contained at the time right before the protected call
instruction was made, without compensating for any ephemeral parameter space.

The stack pointer could be fixed before the jump to the EH handler by
supporting DW_CFA_GNU_args_size or by executing call frame instructions for the
EH handler's frame all the way to the end of the protected instruction address
range--which will include a sub rsp with an appropriate immediate--to determine
an appropriate delta. But it's easier to just disable this optimization. We
already disable it for AOT [2]. It's sometimes disabled by LLVM on Darwin [3].

Also, this commit adds a test (which is a nearly verbatim copy of laszk's
reproduction sample in mono/mono#17285) for EH failures caused by the interaction of our
EH code and X86CallFrameOptimization.

See also [4], [5], and [6].

[1] https://github.com/dotnet/llvm-project/blob/adeaa08e7bbc9aba5d67cb16c2b348be12deb000/llvm/lib/CodeGen/AsmPrinter/MonoException.cpp#L209-L210
[2] https://github.com/mono/mono/blob/1317cf06da06682419f8f4b0c9810ad5d5d3ac3a/mono/mini/aot-compiler.c#L9872-L9875
[3] https://github.com/dotnet/llvm-project/blob/adeaa08e7bbc9aba5d67cb16c2b348be12deb000/llvm/lib/Target/X86/X86CallFrameOptimization.cpp#L146-L152
[4] https://bugs.llvm.org/show_bug.cgi?id=24792
[5] https://reviews.llvm.org/D13132
[6] http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151005/304074.html

Co-authored-by: imhameed <imhameed@microsoft.com>
4 years ago[jit] Run static cctors for inlined methods, the cctor might not have ran in AOT...
monojenkins [Mon, 17 Feb 2020 14:15:23 +0000 (09:15 -0500)]
[jit] Run static cctors for inlined methods, the cctor might not have ran in AOT mode. (#31752)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoAdd missing MONO_LLVM_INTERNAL to mono_marshal_get_native_wrapper (#32431)
Alexander Köplinger [Mon, 17 Feb 2020 13:39:44 +0000 (14:39 +0100)]
Add missing MONO_LLVM_INTERNAL to mono_marshal_get_native_wrapper (#32431)

It was missed due to a glitch in the GitHub API that caused the mirror to not get the latest version of the diff.

4 years ago[cross] check against correct alignment value (#31801)
monojenkins [Mon, 17 Feb 2020 13:22:12 +0000 (08:22 -0500)]
[cross] check against correct alignment value (#31801)

It's essentially dead code in any of our configurations.

`MONO_ALIGN_gint8` is define here:
https://github.com/mono/mono/blob/ab2321c1dc1bf0293dadd7e52436b2bd87f2b7c3/mono/metadata/abi-details.h#L26-L35

And the correct value is set here:
https://github.com/mono/mono/blob/ab2321c1dc1bf0293dadd7e52436b2bd87f2b7c3/mono/metadata/abi.c#L71-L75

Co-authored-by: Bernhard Urban-Forster <bernhard.urban@xamarin.com>
4 years ago[abi-details] add explaining comment for macro magic (#31802)
monojenkins [Mon, 17 Feb 2020 13:21:36 +0000 (08:21 -0500)]
[abi-details] add explaining comment for macro magic (#31802)

I think the fallback was added because "let's get it back to work quickly", back in the dark times without CI: https://github.com/mono/mono/commit/b655fb35c61fd3422003de01eed8e634d46b4186

Co-authored-by: Bernhard Urban-Forster <bernhard.urban@xamarin.com>
4 years agoRemove unnecessary ifdef before undef. (#32417)
monojenkins [Mon, 17 Feb 2020 13:01:37 +0000 (08:01 -0500)]
Remove unnecessary ifdef before undef. (#32417)

#undef never needs an ifdef guard, it works unconditionally without warning.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoAdd back System.Json to mono-profiler-coverage.suppression (#32430)
Alexander Köplinger [Mon, 17 Feb 2020 12:51:08 +0000 (13:51 +0100)]
Add back System.Json to mono-profiler-coverage.suppression (#32430)

It was removed in https://github.com/dotnet/runtime/pull/32329 but this file contains assemblies that apply to mono/mono.

4 years agoRemove duplicated Windows header content. (#32252)
monojenkins [Mon, 17 Feb 2020 12:50:44 +0000 (07:50 -0500)]
Remove duplicated Windows header content. (#32252)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoReduce execution time of Socket handle inheritance tests (#31813)
Anton Firszov [Mon, 17 Feb 2020 12:33:24 +0000 (13:33 +0100)]
Reduce execution time of Socket handle inheritance tests (#31813)

Reduce the execution time for CtorAndAccept_SocketNotKeptAliveViaInheritance and DuplicateSocket_IsNotInheritable on Windows, using a new utility method, SocketTestExtensions.TryConnect().

4 years agoFix/quash some warnings. (#32395)
monojenkins [Mon, 17 Feb 2020 11:50:21 +0000 (06:50 -0500)]
Fix/quash some warnings. (#32395)

mini\mini.c(1253,59): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3100,43): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3273,49): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3281,49): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3480,51): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3490,49): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3626,48): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3664,48): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3722,48): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini.c(3944,47): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\mini-runtime.c(549,64): warning C4390:  ';': empty controlled statement found; is this the intent?
mini\method-to-ir.c(11838,2): warning C4065:  switch statement contains 'default' but no 'case ' labels
metadata\sre.c(2286,11): warning C4309:  '=': truncation of constant value
metadata\sre.c(2179,11): warning C4309:  '=': truncation of constant value
metadata\sre.c(2204,11): warning C4309:  '=': truncation of constant value
metadata\sre.c(2232,11): warning C4309:  '=': truncation of constant value
mini\method-to-ir.c(11838,2): warning C4065:  switch statement contains 'default' but no 'case
mini\type-checking.c(167,3): warning C4334:  '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoRemove unnecesssary include. (#32394)
monojenkins [Mon, 17 Feb 2020 11:47:57 +0000 (06:47 -0500)]
Remove unnecesssary include. (#32394)

Less to build if you edit the file.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[interp] Use method_entry at interp entry instead of duplicating the code. (#32382)
monojenkins [Mon, 17 Feb 2020 11:47:00 +0000 (06:47 -0500)]
[interp] Use method_entry at interp entry instead of duplicating the code. (#32382)

`tracing` was a mix of:
 - sometimes ifdef out, sometimes not; make it always ifdefed
 - sometimes `int`, sometimes `gint`, sometimes `gboolean`; make it always `int`

Much of this PR will end up deleted when the multiple nonrecursive calls are
consolidated, but two will remain -- entry and call: label.

https://github.com/mono/mono/pull/18825 is where this is going but it was deemed
too large and requested to be split up. This is part of it.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[interp] Step toward consolidating nonrecursive call sites (retval). (#32308)
monojenkins [Mon, 17 Feb 2020 11:43:58 +0000 (06:43 -0500)]
[interp] Step toward consolidating nonrecursive call sites (retval). (#32308)

https://github.com/mono/mono/pull/18825 was deemed too large and requested to be split up.
This is one of the required pieces.
To consolidate the multiple nonrecursive call sites requires they share the same retval variable. Go ahead and share them all.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[interp] Fix incorrect comment -- stackval has no size. (#32410)
monojenkins [Mon, 17 Feb 2020 11:42:46 +0000 (06:42 -0500)]
[interp] Fix incorrect comment -- stackval has no size. (#32410)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[mono] Fix msvc mono build and add `CopyMonoRuntimeFilesFromArtifactsToDestination...
Egor Bogatov [Mon, 17 Feb 2020 09:03:13 +0000 (12:03 +0300)]
[mono] Fix msvc mono build and add `CopyMonoRuntimeFilesFromArtifactsToDestination` target (#32130)

* Fix msvc mono build

* Add CopyMonoRuntimeFilesFromArtifactsToDestination target

* Address feedback

* Change condtion to Exists(..\mono.proj)

* Minor improvements

4 years ago[interp] Step toward consolidation of non-recursive call sites. (#32306)
monojenkins [Mon, 17 Feb 2020 08:13:02 +0000 (03:13 -0500)]
[interp] Step toward consolidation of non-recursive call sites. (#32306)

https://github.com/mono/mono/pull/18825 was too large.
This starts by replacing imethod with cmethod which is a necessary
part of the consolidation of multiple non-recursive call sites to just one.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoUpdate Build Script Help Content (#2046)
Viktor Hofer [Mon, 17 Feb 2020 07:41:46 +0000 (08:41 +0100)]
Update Build Script Help Content (#2046)

* Update Build Script Help Content

Add the new runtime/library configuration arguments.

* PR feedback

4 years agoPublish (bin)logs as pipeline artifacts (#2345)
Viktor Hofer [Mon, 17 Feb 2020 07:40:50 +0000 (08:40 +0100)]
Publish (bin)logs as pipeline artifacts (#2345)

* Publish (bin)logs as pipeline artifacts

Currently we publish logs and binlogs as build artifacts. Pipeline
artifacts are the replacement for build artifacts and enable multi-stage
uploads. This doesn't change upload our build artifacts via the
PublishBuildArtifacts task.

* Parameterize artiact name

4 years agoSimplify and remove char[] allocation from AsnFormatter.EncodeHexString
Stephen Toub [Mon, 17 Feb 2020 06:54:32 +0000 (01:54 -0500)]
Simplify and remove char[] allocation from AsnFormatter.EncodeHexString

4 years agoUse double.Parse on span instead of string in Unix ping (#32423)
Stephen Toub [Mon, 17 Feb 2020 05:01:56 +0000 (00:01 -0500)]
Use double.Parse on span instead of string in Unix ping (#32423)

Avoids a string allocation.

4 years agoFix an assert error in crossgen2 on ARM (#32421)
Dong-Heon Jung [Mon, 17 Feb 2020 05:01:39 +0000 (14:01 +0900)]
Fix an assert error in crossgen2 on ARM (#32421)

- Initialize wrapperDelegateInvoke of CORINFO_CALL_INFO in ARM.

4 years agoGC polling in unboxing JIT helpers (#32353)
Vladimir Sadov [Sun, 16 Feb 2020 23:42:01 +0000 (15:42 -0800)]
GC polling in unboxing JIT helpers (#32353)

* GC polling in unboxing JIT helpers

* further tuning the type check for enums

4 years agoSimplify to use NOT operator instead of comparing to false. (#32398)
pi1024e [Sun, 16 Feb 2020 19:57:51 +0000 (14:57 -0500)]
Simplify to use NOT operator instead of comparing to false. (#32398)

4 years agoDefine FEATURE_PROFAPI_ATTACH_DETACH always (#32293)
Ilia [Sun, 16 Feb 2020 19:41:16 +0000 (22:41 +0300)]
Define FEATURE_PROFAPI_ATTACH_DETACH always (#32293)

Allow to use profiler attach/detach feature because it seems to work on
other platforms (macOS in particular).

Also, remove unused DATA_PROFAPI_ATTACH_DETACH definition.

Fixes #32093

4 years agoDisable EventLog test on all targets (#32403)
Viktor Hofer [Sun, 16 Feb 2020 19:22:18 +0000 (20:22 +0100)]
Disable EventLog test on all targets (#32403)

Disabling to get CI green: https://github.com/dotnet/runtime/issues/32241

4 years ago[master] Update dependencies from dotnet/arcade (#32292)
dotnet-maestro[bot] [Sun, 16 Feb 2020 15:06:04 +0000 (15:06 +0000)]
[master] Update dependencies from dotnet/arcade (#32292)

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

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

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

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

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

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

4 years agoRemove CreateDefensiveCopy and inline it in ImmutableArray.Create (#32386)
Marius Ungureanu [Sun, 16 Feb 2020 11:36:02 +0000 (13:36 +0200)]
Remove CreateDefensiveCopy and inline it in ImmutableArray.Create (#32386)

4 years agoTemporarily disable Windows ARM test executions (#32390)
Tomáš Rylek [Sun, 16 Feb 2020 11:12:49 +0000 (12:12 +0100)]
Temporarily disable Windows ARM test executions (#32390)

The new Windows.10.Arm64v8.Open queue exhibits flaky behavior
that is currently failing in most of our PR runs. Disabling test
execution on ARM before this is fixed.

Thanks

Tomas

4 years agoremove duplicate definition of Interop.Advapi32.CryptReleaseContext from src/librarie...
Anatoly Belyaev [Sun, 16 Feb 2020 04:46:18 +0000 (07:46 +0300)]
remove duplicate definition of Interop.Advapi32.CryptReleaseContext from src/libraries/Common/src/Interop/Windows/Crypt32/ (#32289)

4 years agoFix build on systems with space in path (#32169)
Marius Gundersen [Sun, 16 Feb 2020 04:43:40 +0000 (05:43 +0100)]
Fix build on systems with space in path (#32169)

This fixes building the project on systems where there is a space in the path of the user. For example on Windows where the user might (hypothetically) be called 'Marius Gundersen' and the path to their user folder is `C:\Users\Marius Gundersen\` the build would fail

This fixes #32165

4 years agoUpdate documentation for Vector256.Create methods (#382)
Michał Bryłka [Sun, 16 Feb 2020 04:27:02 +0000 (05:27 +0100)]
Update documentation for Vector256.Create methods (#382)

* Update documentation for Vector256.Create methods

* Add docs for _setr_ and _set1_ methods. Apply pool request suggestions

* Add XML docs to Vector.Create methods for non CLS compliant types

4 years agoAdd a comment explaining why not to switch to Array.Empty (#32365)
Marius Ungureanu [Sun, 16 Feb 2020 04:26:28 +0000 (06:26 +0200)]
Add a comment explaining why not to switch to Array.Empty (#32365)

4 years ago!entry cannot be null ever, so why even bother have a case for it? (#32384)
pi1024e [Sun, 16 Feb 2020 04:09:51 +0000 (23:09 -0500)]
!entry cannot be null ever, so why even bother have a case for it? (#32384)

4 years agoRemove DAC dependence on compile time DAC_TABLE_RVA definition on Linux (#32331)
Mike McLaughlin [Sun, 16 Feb 2020 01:20:07 +0000 (17:20 -0800)]
Remove DAC dependence on compile time DAC_TABLE_RVA definition on Linux (#32331)

Remove DAC dependence on compile time DAC_TABLE_RVA definition on Linux

Issue #https://github.com/dotnet/runtime/issues/1976

Added a fairly generic elf reader class.

Change createdump to use the elfreader for all the ELF enumeration
and find the g_dacTable to ensure all the symbol and string tables
are in the coredump.

4 years agoRemove unused COM shutdown logic. (#32381)
Aaron Robinson [Sat, 15 Feb 2020 23:26:47 +0000 (15:26 -0800)]
Remove unused COM shutdown logic. (#32381)

4 years agoAdd additional info to the mono building and testing docs (#32339)
Steve Pfister [Sat, 15 Feb 2020 22:48:57 +0000 (17:48 -0500)]
Add additional info to the mono building and testing docs (#32339)

4 years agoAvoid throwing NRE when system module is not passed to crossgen2 (#32323)
Anton Lapounov [Sat, 15 Feb 2020 21:13:58 +0000 (13:13 -0800)]
Avoid throwing NRE when system module is not passed to crossgen2 (#32323)

Crossgen2 would throw a NullReferenceException if the system module was not provided. That was caused by dereferencing CompilerTypeSystemContext.CanonTypesModule before it was set. See dotnet/corert#7972 for the context.

The fix consists of removing the CanonTypesModule property, which was needed for .NET Native only, and inverting the 'if' conditions to simplify the code a little.

4 years agoImprove Span.SequenceEqual for small buffers. (#32364)
Ahson Khan [Sat, 15 Feb 2020 18:27:56 +0000 (10:27 -0800)]
Improve Span.SequenceEqual for small buffers. (#32364)

4 years agoAvoid using stackalloc in a loop (#32375)
Miha Zupan [Sat, 15 Feb 2020 17:54:51 +0000 (18:54 +0100)]
Avoid using stackalloc in a loop (#32375)

4 years agoIncorporate feedback
Manuel Pfemeter [Sat, 15 Feb 2020 17:50:16 +0000 (18:50 +0100)]
Incorporate feedback

4 years agoJIT: note when simd store coalescing produces a full local field. (#32324)
Andy Ayers [Sat, 15 Feb 2020 16:46:49 +0000 (08:46 -0800)]
JIT: note when simd store coalescing produces a full local field. (#32324)

And if so, remove `GTF_VAR_USEASG`.

Fixes #31615.

4 years agoremoving system.json project (#32329)
Anirudh Agnihotry [Sat, 15 Feb 2020 12:34:02 +0000 (04:34 -0800)]
removing system.json project (#32329)

4 years agoAdd Socket.OSSupportsUnixDomainSocket (#32160)
Stephen Toub [Sat, 15 Feb 2020 11:11:14 +0000 (03:11 -0800)]
Add Socket.OSSupportsUnixDomainSocket (#32160)

4 years agoRemove char[] allocation from XmlConverter.StripWhitespace (#32297)
Stephen Toub [Sat, 15 Feb 2020 11:10:26 +0000 (03:10 -0800)]
Remove char[] allocation from XmlConverter.StripWhitespace (#32297)

4 years agoUse span-based IndexOfAny in ModuleBuilder (#32299)
Stephen Toub [Sat, 15 Feb 2020 11:09:51 +0000 (03:09 -0800)]
Use span-based IndexOfAny in ModuleBuilder (#32299)

Removes an unnecessary char[] allocation per iteration.

Also simplified one IndexOfAny usage in Environment.cs.

4 years agoUse SYSTEM_PRIVATE_CORELIB ifdef for consistency (#32366)
Jan Kotas [Sat, 15 Feb 2020 11:08:41 +0000 (03:08 -0800)]
Use SYSTEM_PRIVATE_CORELIB ifdef for consistency (#32366)

4 years agoRemove startup byte[] allocation in EventSource (#32276)
Stephen Toub [Sat, 15 Feb 2020 09:39:57 +0000 (01:39 -0800)]
Remove startup byte[] allocation in EventSource (#32276)

Only occurs once and is then cached, but it's hit on startup, and may as well remove it.

4 years agoAdd issues to the TODOs in S.T.Json source for better tracking and minor clean up...
Ahson Khan [Sat, 15 Feb 2020 09:13:11 +0000 (01:13 -0800)]
Add issues to the TODOs in S.T.Json source for better tracking and minor clean up (#32360)

* Remove redundant check in condition (&& true) since it doesn't change
the behavior.

* Add issues to the TODOs for better tracking and fix some that were easy.

* Update ActiveIssue and enable tests that are now fixed.

4 years agoAdd public ReferenceEqualityComparer API (#31753)
Levi Broderick [Sat, 15 Feb 2020 07:23:14 +0000 (23:23 -0800)]
Add public ReferenceEqualityComparer API (#31753)

4 years ago[llvmonly] Allow more direct calls. (#32214)
monojenkins [Sat, 15 Feb 2020 06:52:45 +0000 (01:52 -0500)]
[llvmonly] Allow more direct calls. (#32214)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoCrossgen2: set 'X' bit in unwind info for ARM (#32346)
Anton Lapounov [Sat, 15 Feb 2020 06:41:29 +0000 (22:41 -0800)]
Crossgen2: set 'X' bit in unwind info for ARM (#32346)

4 years agoCleanup old links (#32319)
Bill Wert [Sat, 15 Feb 2020 06:17:38 +0000 (22:17 -0800)]
Cleanup old links (#32319)

* Remove old debug instructions about using dumpling

* remove dumpling reference

* stop invoking dumpling

* remove unused perf scripts

* more dumpling references

* Remove unused perf scripts and change instructions to point to perf repo

* add updated SOS link

4 years ago[llvm] Remove unused llvm.mono.load/store intrinsics. (#32280)
monojenkins [Sat, 15 Feb 2020 05:57:18 +0000 (00:57 -0500)]
[llvm] Remove unused llvm.mono.load/store intrinsics. (#32280)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoDisable coreroot_determinism test (#32334)
Simon Nattress [Sat, 15 Feb 2020 02:42:37 +0000 (18:42 -0800)]
Disable coreroot_determinism test (#32334)

It's causing CI issues.

See https://github.com/dotnet/runtime/issues/32333

4 years agoKeep correct `fieldSeq` for 0-offset fields. (#32085)
Sergey Andreenko [Sat, 15 Feb 2020 02:25:12 +0000 (18:25 -0800)]
Keep correct `fieldSeq` for 0-offset fields. (#32085)

* a few renamings in fgMorphCopyBlock.

Clean up the existing code.

* Add zero field offsets where it was missed.

And don't add it as `ADD(,0)` in another.

* Add an optimization to lower to delete `LEA(addr, 0)`.

* Fix for x86 tests.

* Add a function header for `LowerNode`.

4 years agoSupport 32 byte alignment of code on xarch (#2249)
Andy Ayers [Sat, 15 Feb 2020 02:18:12 +0000 (18:18 -0800)]
Support 32 byte alignment of code on xarch (#2249)

* Support 32 byte alignment of code on xarch

Update jit and runtime to allow jit to ask for code to be 32 byte aligned.
Request 32 byte alignment for Tier1 methods on x86/x64.

Add minimal crossgen support; one can imagine requesting or choosing 32 byte
alignment for crossgenned code, but that is left as future work.

This should provide some measure of performance stability, in particular for
microbenchmarks or other code where performance depends crucially on a few
branches.

It may or may not improve performance. If/when there are regressions we can
contemplate updating the jit to add intra-method padding to address alignment
sensitive code layout (e.g. dotnet/coreclr#11607).

This will require a jit GUID update in addition to the changes here.

* restrict to larger methods with loops; don't update zapper

* new jit GUID

* fix target ifdef name

4 years ago[llvm] Fix LLVM JIT when used with multiple AppDomains. (#32219)
monojenkins [Sat, 15 Feb 2020 01:34:11 +0000 (20:34 -0500)]
[llvm] Fix LLVM JIT when used with multiple AppDomains. (#32219)

We currently reuse LLVM's command line parsing system to configure and
enable passes. When using the default code generator pass configuration,
the `ImplicitNullChecks` and `X86CallFrameOptimization` passes can only
be enabled or disabled via the command line argument parser: the
`cl::opt`s controlling these (and many other) passes are private to
their translation units, and `TargetPassConfig`/`X86PassConfig` read
from these `cl::opt`s with no other means to override these values.

Unfortunately, some LLVM command line options have restrictions on the
number of times they may be set, and running the LLVM command line
argument parser more than once can fail, because the 'number of
occurrences' counter is stored in each global `cl::opt`. This causes
several tests to fail--one such test is unhandled-exception-7.cs.

This change:
- removes the lazy LLVM JIT initialization logic and instead
  runs this initialization once during `mini_init`,

- moves some stray JIT-only code from mini-llvm.c to llvm-jit.cpp,

- wraps the declarations in domain-internals.h with a
  `G_BEGIN_DECLS`/`G_END_DECLS` pair, so that they avoid name
  mangling when included in C++ source, and

- removes `exception_cb` and `emitted_cb`: neither were actually used
  by live code.

4 years ago[llvmonly] Avoid adding the aot init wrappers to the method table, its not needed...
monojenkins [Sat, 15 Feb 2020 01:33:17 +0000 (20:33 -0500)]
[llvmonly] Avoid adding the aot init wrappers to the method table, its not needed. (#32262)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoFix and optimize EscapeUnescapeIri (#32025)
Miha Zupan [Sat, 15 Feb 2020 00:47:34 +0000 (01:47 +0100)]
Fix and optimize EscapeUnescapeIri (#32025)

* Remove byte[] allocation per encoded character

* Remove dead code from EscapeUnescapeIri

* Use int instead of IntPtr for stack buffer

* Use sizeof(int) instead of 4 as const

* Fix EscapeUnescapeIri for escaped surrogate pairs

4 years agoFix typo in S.T.J namespace in the writable dom spec (#32345)
Ahson Khan [Sat, 15 Feb 2020 00:33:55 +0000 (16:33 -0800)]
Fix typo in S.T.J namespace in the writable dom spec (#32345)

4 years agoShow all files in file explorer and some extent of refactoring (#32312)
Anirudh Agnihotry [Sat, 15 Feb 2020 00:13:58 +0000 (16:13 -0800)]
Show all files in file explorer and some extent of refactoring (#32312)

* Show all files in file explorer and some extent of refactoring

* adding comment

* improving the comment

Co-Authored-By: Santiago Fernandez Madero <safern@microsoft.com>
* Update src/libraries/Directory.Build.targets

Co-Authored-By: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoSingleFile bundles: Ensure extraction mappings are closed on Windows. (#2272)
Swaroop Sridhar [Fri, 14 Feb 2020 23:38:20 +0000 (15:38 -0800)]
SingleFile bundles: Ensure extraction mappings are closed on Windows. (#2272)

When running a single-file app, the AppHost mmap()s itself in order
to read its contents and extract the embedded contents.

The Apphost must always map its contents in order to read the headers,
but doesn't always extract the contents, because previously extracted
files are re-used when available.

In the case where apphost doesn't extract, the file mapping wasn't
immediately closed on Windows. This prevents the app from being renamed
while running -- an idiom used while updating the app in-place.

4 years agoUpdate Pull Request docs for more detailed info (#32336)
Santiago Fernandez Madero [Fri, 14 Feb 2020 23:32:14 +0000 (15:32 -0800)]
Update Pull Request docs for more detailed info (#32336)

4 years agofix buffer handling in Tls handshake (#32267)
Tomas Weinfurt [Fri, 14 Feb 2020 23:09:47 +0000 (15:09 -0800)]
fix buffer handling in Tls handshake (#32267)

* fix buffer handling in Tls handshake

* feedback from review

4 years agoMerge pull request #32207 from saurabh500/soln2fixAV
Saurabh Singh [Fri, 14 Feb 2020 22:52:54 +0000 (14:52 -0800)]
Merge pull request #32207 from saurabh500/soln2fixAV

AV Fix for OleDb x86

4 years agoDo not deserialize using internal or private default ctors for all supported TFMs...
Ahson Khan [Fri, 14 Feb 2020 22:44:24 +0000 (14:44 -0800)]
Do not deserialize using internal or private default ctors for all supported TFMs. (#32213)

* Do not deserialize using internal or private default ctors for all
supported TFMs.

* Add a test with generic class with protected internal ctor and clean up.

* Make test classes private and add Debug.Fail instead of throwing.

4 years ago[interp] Fix filter clauses (#32192)
monojenkins [Fri, 14 Feb 2020 22:40:09 +0000 (17:40 -0500)]
[interp] Fix filter clauses (#32192)

When executing a filter we create a new interp frame, that is a duplicate of the original frame that contains the filter. Once the execution of the filter is finished, we were copying the stack contents back to the base frame. The problem with this is that when the filter is run, the stack is not completely unwinded, meaning that later we can still run a finally block in a frame called by the base frame. This finally block can access the stack arguments, which would reside on the stack of base frame. This means that we must not override the stack of the base frame, only the locals.

Fixes some tests from System.Linq.Expressions suite.

Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>
4 years agoMerge pull request #32314 from DrewScoggins/AddPRPerf
Drew Scoggins [Fri, 14 Feb 2020 21:57:02 +0000 (13:57 -0800)]
Merge pull request #32314 from DrewScoggins/AddPRPerf

Add PR trigger for runtime performance