platform/upstream/dotnet/runtime.git
4 years agoDisable not working test containing RemoteExecutor (#33560)
Jan Jahoda [Fri, 13 Mar 2020 22:17:30 +0000 (22:17 +0000)]
Disable not working test containing RemoteExecutor (#33560)

4 years agoAdd polymorphic tests for all root APIs (#33391)
Steve Harter [Fri, 13 Mar 2020 22:12:09 +0000 (17:12 -0500)]
Add polymorphic tests for all root APIs (#33391)

4 years ago[runtime] Coverage profiler improvements. (#33540)
monojenkins [Fri, 13 Mar 2020 22:01:14 +0000 (18:01 -0400)]
[runtime] Coverage profiler improvements. (#33540)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMerge pull request #33512 from kouvel/NoQuickJitFix
Koundinya Veluri [Fri, 13 Mar 2020 20:14:02 +0000 (16:14 -0400)]
Merge pull request #33512 from kouvel/NoQuickJitFix

When QuickJit is disabled, fix assertion failures regarding R2R code

4 years agoRename "PolicyProperty" to "PropertyInfoForClassInfo" and update nullability (#33432)
Steve Harter [Fri, 13 Mar 2020 19:38:46 +0000 (14:38 -0500)]
Rename "PolicyProperty" to "PropertyInfoForClassInfo" and update nullability (#33432)

4 years agoUpdate doc for exceptions thrown during serialization (#33400)
Steve Harter [Fri, 13 Mar 2020 18:57:43 +0000 (13:57 -0500)]
Update doc for exceptions thrown during serialization (#33400)

4 years agoFix content of baseline files (#33514)
Gustavo Varo [Fri, 13 Mar 2020 16:36:03 +0000 (12:36 -0400)]
Fix content of baseline files (#33514)

4 years ago[mono] Track .dotnet runtime version (#33180)
Egor Bogatov [Fri, 13 Mar 2020 16:18:10 +0000 (19:18 +0300)]
[mono] Track .dotnet runtime version (#33180)

* Track .dotnet runtime version correctly

* Use BundledNETCoreAppPackageVersion

* Rollback to an error

* Update src/mono/mono.proj

Co-Authored-By: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoReplace ushort usage with int (#32694)
Miha Zupan [Fri, 13 Mar 2020 15:30:00 +0000 (16:30 +0100)]
Replace ushort usage with int (#32694)

* Replace pointless ushort usage with int

* Revert extracting name[i] to a local

* Use int instead of byte in IPv4 ParseCanonical

4 years agoClean up unused locals in System.Drawing.Common (#32212)
Next Turn [Fri, 13 Mar 2020 14:49:09 +0000 (22:49 +0800)]
Clean up unused locals in System.Drawing.Common (#32212)

* Clean up unused locals in System.Drawing.Common

* Remove BufferedStream, use MemoryStream.ToArray()

4 years ago[threads] If shutting_down, don't create new thread, kill current thread (#32968)
Aleksey Kliger (λgeek) [Fri, 13 Mar 2020 14:45:03 +0000 (10:45 -0400)]
[threads] If shutting_down, don't create new thread, kill current thread (#32968)

If the runtime is shutting down, instead of creating a new thread, or throwing
an exception on the current thread, just shut down the current thread.

This takes advantage of `mono_threads_set_shutting_down`'s behavior that if you
call it after shutdown is already started, it will suspend, detach and exit
from the current thread.

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

4 years agoFix line endings under src/mono (#33547)
Jan Kotas [Fri, 13 Mar 2020 13:43:12 +0000 (06:43 -0700)]
Fix line endings under src/mono (#33547)

Fixes #2222

4 years agoClean `fgMorphPotentialTailCall` for the future changes. (#33457)
Sergey Andreenko [Fri, 13 Mar 2020 06:25:24 +0000 (23:25 -0700)]
Clean `fgMorphPotentialTailCall` for the future changes. (#33457)

* Clean `fgMorphPotentialTailCall` for the future changes.

* Use the original type, because the call was retyped to void.

* another fix for arm64.

4 years ago[debugger] [coop] assertion when `socket_transport_send` called from the crash report...
monojenkins [Fri, 13 Mar 2020 03:46:09 +0000 (23:46 -0400)]
[debugger] [coop] assertion when `socket_transport_send` called from the crash reporter (#33489)

If there is a crash and the debugger is attached, we call mini_get_dbg_callbacks ()->send_crash().

That call ends up in mono_debugger_agent_send_crash which does all kinds of questionable stuff like trying to take the loader lock. Eventually it ends up calling socket_transport_send which tries to do a transition to GC Safe mode.
I inserted a MONO_ENTER_GC_UNSAFE in mono_debugger_agent_send_crash function and this fixes the assert.

Fixes mono/mono#18794

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years ago[wasm][debugger] Continue SS after leaving managed code (#33272)
monojenkins [Fri, 13 Mar 2020 03:44:52 +0000 (23:44 -0400)]
[wasm][debugger] Continue SS after leaving managed code (#33272)

Continue stepping over/into/out of managed code to native code, without this fix the behavior was resume when a SS leaves the managed code.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoExtensions: Adding FileProviders and FileSystemGlobbing (#33212)
Maryam Ariyan [Fri, 13 Mar 2020 02:55:25 +0000 (19:55 -0700)]
Extensions: Adding FileProviders and FileSystemGlobbing (#33212)

* - [x] Bulk update all ref csproj except for FileProviders/FileSystemGlobbing
* - Bulk move Descriptions to json file, all except for FileProviders and FileSystemGlobbing
* - Bulk correct test project targetframeworks, all except for FileProviders and FileSystemGlobbing
* - Bulk rename ref cs file and delete the extra duplicates
* - Bulk move/rename Resources file
from: Resources.resx to Resources\Strings.resx

* Enables ref/src/test/pkg/sln on FileProviders projects and FileSystemGlobbing
- [x] Enable on Directory.Build.props
- [x] build ref/src projects and used GenerateReferenceSource
- [x] cleanup src csproj properties
- [x] set proper targetframeworks

4 years ago[jit] Add more SSE2 opcodes. Enable SSE2. (#33465)
Zoltan Varga [Fri, 13 Mar 2020 01:48:03 +0000 (21:48 -0400)]
[jit] Add more SSE2 opcodes. Enable SSE2. (#33465)

* [jit] Fix the Sse2 supported check.

* Add more SSE2 opcodes. Enable SSE2.

* Use the non-immediate version of the shift opcodes.

* Fix ShiftRightArithmetic.

* Remove a debug printf.

* Implement all SSE3 intrinsics.

* Define all intrinsics using the SimdIntrinsic struct.

* Disable SSE2 support as some intrinsics are still missing.

4 years agoRemove asserts that were firing during rejit tests (#33492)
David Mason [Fri, 13 Mar 2020 01:17:18 +0000 (18:17 -0700)]
Remove asserts that were firing during rejit tests (#33492)

The rejit path no longer suspends the runtime so that assert is inaccurate

4 years agoReduce fixed overhead of some Utf8Parser.TryParse methods (#33507)
Levi Broderick [Fri, 13 Mar 2020 00:57:23 +0000 (17:57 -0700)]
Reduce fixed overhead of some Utf8Parser.TryParse methods (#33507)

4 years agoFix handling thread abort in HelperMethodFrame (#33448)
Jan Vorlicek [Fri, 13 Mar 2020 00:55:44 +0000 (01:55 +0100)]
Fix handling thread abort in HelperMethodFrame (#33448)

* Fix handling thread abort in HelperMethodFrame

The thread abort during func eval from a managed debugger on Linux and macOS
was sometimes causing the debuggee to exit with unhandled c++ PAL_SEHException.
The reason is that the thread abort detection that is done in the
HELPER_METHOD_FRAME_BEGIN and ...END macros was done outside of the
INSTALL_MANAGED_EXCEPTION_DISPATCHER / UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
region and so the exception thrown when thread abort request is detected
there was not being caught and translated into a call to DispatchManagedException.
Since the caller frame was a managed function frame, the C++ exception handling
didn't know how to unwind it and so it declared the exception being unhandled.

This fix moves the frame pushing and popping inside of the
INSTALL_MANAGED_EXCEPTION_DISPATCHER / UNINSTALL_MANAGED_EXCEPTION_DISPATCHER
region. That way, the thread abort exception is properly handled.

4 years ago[test][mono] Capture the ExceptionDispatchInfo when rethrowing from TaskContinuation...
monojenkins [Fri, 13 Mar 2020 00:08:51 +0000 (20:08 -0400)]
[test][mono] Capture the ExceptionDispatchInfo when rethrowing from TaskContinuation (#33491)

Regression test for https://github.com/mono/mono/issues/19166

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
4 years agoJIT: fix overly aggressive tail recursive call loop marking (#33517)
Andy Ayers [Thu, 12 Mar 2020 22:49:40 +0000 (15:49 -0700)]
JIT: fix overly aggressive tail recursive call loop marking (#33517)

If there is a tail recursive call site, the jit will mark all blocks
from method entry to the block with the call as "in a loop," anticipating
a tail recursive call to loop optimization.

Because of some confusing naming we were doing this even for recursive calls
that were not tail calls. Upshot is that blocks were marked as being in loops
when they weren't, and (among other things) this made the inliner more
aggressive for calls in those blocks.

4 years agoMoved warning disables from warningcontrol.h to configurecompiler.cmake (#33439)
Ivan Diaz Sanchez [Thu, 12 Mar 2020 22:00:33 +0000 (15:00 -0700)]
Moved warning disables from warningcontrol.h to configurecompiler.cmake (#33439)

* Moved warning disables from warningcontrol.h to configurecompiler.cmake

* Completely moved the contents of inc/warningcontrol.hto configurecompiler.cmake.

4 years agoAdd CoreCLR build pipeline for GCC (#33446)
Adeel Mujahid [Thu, 12 Mar 2020 20:37:55 +0000 (22:37 +0200)]
Add CoreCLR build pipeline for GCC (#33446)

* Add CoreCLR build pipeline for GCC

* Fix GCC build issues

* Use empty clangArg in case of GCC

* Revert ilasm's cmake file

* Use GCC to also build native test components

4 years agoFixed memory leak of OverlappedData when doing read from server WebSocket stream...
Marie Píchová [Thu, 12 Mar 2020 20:07:03 +0000 (21:07 +0100)]
Fixed memory leak of OverlappedData when doing read from server WebSocket stream. (#33480)

4 years agoMerge pull request #33497 from dotnet/vivpatch
Vivek Mishra [Thu, 12 Mar 2020 19:22:50 +0000 (12:22 -0700)]
Merge pull request #33497 from dotnet/vivpatch

Adding separate 2.1 SDK yaml

4 years agoCleanup stale ApiCompatBaseline files (#33519)
Eric StJohn [Thu, 12 Mar 2020 19:04:56 +0000 (12:04 -0700)]
Cleanup stale ApiCompatBaseline files (#33519)

4 years ago[metadata] Disable three icalls on netcore monodroid (#33513)
monojenkins [Thu, 12 Mar 2020 18:18:04 +0000 (14:18 -0400)]
[metadata] Disable three icalls on netcore monodroid (#33513)

They aren't used there.

Co-authored-by: akoeplinger <akoeplinger@users.noreply.github.com>
4 years agoRemove the copy of core_root by using core_root as the corelation dir (#33498)
Jarret Shook [Thu, 12 Mar 2020 17:56:24 +0000 (10:56 -0700)]
Remove the copy of core_root by using core_root as the corelation dir (#33498)

* Remove the copy of core_root by using core_root as the corelation dir

* Change to remove core_root, it is the workitem_payload

* Fix core_root location

4 years agoMerge pull request #33494 from maryamariyan/fromoldmaster-bringmissingfiles-1
Maryam Ariyan [Thu, 12 Mar 2020 15:28:23 +0000 (08:28 -0700)]
Merge pull request #33494 from maryamariyan/fromoldmaster-bringmissingfiles-1

Bring commit history for more files from Extensions repo

4 years agoFix type layout whan Cross OS compiling (#33487)
Steve MacLean [Thu, 12 Mar 2020 15:22:14 +0000 (11:22 -0400)]
Fix type layout whan Cross OS compiling (#33487)

* Fix cache line size to be a TARGET property

* Fix CCompRC cross OS DAC layout

* Fix cross OS InlineSArray packing

* Add DAC_ALIGNAS()

Align first member of various classes which have shown
inconsistent layout during cross compilation.

* Fix RegMeta cross os layout

* Fix typo

* Remove dead code

* Remove FunctionSigBuilder et. al from DAC

Remove FunctionSigBuilder and classes which depend on its
definition from the DAC.

Remove the FunctionSigBuilder layout correction to make it
cross platform stable.

* Remove more stubgen classes from DAC

* Improve comment

4 years ago[merp] Remove unnecessary call to msync in mono_state_free_mem (#33395)
monojenkins [Thu, 12 Mar 2020 15:13:18 +0000 (11:13 -0400)]
[merp] Remove unnecessary call to msync in mono_state_free_mem (#33395)

Closes https://github.com/mono/mono/issues/19136

Co-authored-by: alexischr <alexischr@users.noreply.github.com>
4 years agoRun APICompat against the previous release of NETCoreApp (#33300)
Eric StJohn [Thu, 12 Mar 2020 14:47:09 +0000 (07:47 -0700)]
Run APICompat against the previous release of NETCoreApp (#33300)

* Run APICompat against the previous release of NETCoreApp

* Remove redundant source build condition

* Add APICompat specific attribute exclusion list.

* Update to latest ApiCompat

4 years agoWhen QuickJit is disabled, fix assertion failures
Koundinya Veluri [Wed, 11 Mar 2020 18:41:16 +0000 (11:41 -0700)]
When QuickJit is disabled, fix assertion failures

- When QuickJit is disabled, the initial tier is Optimized instead of the correct Tier0. This causes assertion failures as tiering tries to count calls and promote the method to Tier1.
  - Does not appear to be an issue in release builds, as the methods are still call-counted and promoted despite the incorrect tier
- Add some basic tiering tests for config modes that are exposed and supported through <app>.runtimeconfig.json, QuickJit and QuickJitForLoops, when on and off
- Removed an invalid and redundant assertion that was causing a profiler rejit test to fail, see https://github.com/dotnet/runtime/pull/33492#discussion_r391257466. What the assertion was intending to verify is already verified by an assertion above it that checks the tier, which also covers the default native code version case.

4 years agoBring back GenAPI subscription, update to latest and workaround roslyn issue (#33499)
Santiago Fernandez Madero [Thu, 12 Mar 2020 11:50:55 +0000 (04:50 -0700)]
Bring back GenAPI subscription, update to latest and workaround roslyn issue (#33499)

4 years agoShare managed EventSource/EventPipe implementation between CoreCLR and Mono. (#33425)
Johan Lorensson [Thu, 12 Mar 2020 11:35:50 +0000 (12:35 +0100)]
Share managed EventSource/EventPipe implementation between CoreCLR and Mono. (#33425)

First changes needed in order to start sharing managed EventSource/EventPipe
code between CoreCLR and Mono runtime. Sharable code has been moved into
S.P.C library project and split into runtime specific source files when
needed, kept within each runtime specific S.P.C project files.

Mono runtime has been extended with a set of icalls needed by
EventPipeInternal, just to make sure EventPipe can be initialized,
current Mono runtime implementation returns dummy values.

Current change also enables ETW provider support on Mono Windows runtime.

NOTE, this is just initial changes needed in order to share managed
EventSource/EventPipe code between runtimes. Future changes will incrementally
add EventPipe native code into Mono runtime.

4 years ago[mono] Improve how EnumBuilder handles type attributes (#33389)
Alexis Christoforides [Thu, 12 Mar 2020 10:53:47 +0000 (06:53 -0400)]
[mono] Improve how EnumBuilder handles type attributes (#33389)

Literally copy set of attributes from https://github.com/dotnet/runtime/blob/dc62dd61071c239401ef6397a4d7ae29161d10a7/src/coreclr/src/System.Private.CoreLib/src/System/Reflection/Emit/EnumBuilder.cs#L330

4 years agoFix assertion failure when running some composite CoreCLR tests (#33503)
Tomáš Rylek [Thu, 12 Mar 2020 09:37:22 +0000 (10:37 +0100)]
Fix assertion failure when running some composite CoreCLR tests (#33503)

In composite testing, ReadyToRunInfo::GetImage() returns the
composite image layout (NativeImageLayout) for which
PEDecoder::GetReadyToRunHeader doesn't work (we decided we don't
want to modify the general PEDecoder logic). A simple fix is not
to go through GetImage() and expose the header on the R2R info
directly instead.

Thanks

Tomas

4 years agoImplement Bundler version 2 (#33413)
Swaroop Sridhar [Thu, 12 Mar 2020 03:58:21 +0000 (20:58 -0700)]
Implement Bundler version 2 (#33413)

* Implement Bundler version 2

Implement support for single-file version 2 layout as described in https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/bundler.md

The supporting changes are:
* Implement new HostModel interfaces to communicate additional information from the SDK to the HostModel
   * The SDK changes will be done in an upcoming PR.
   * Some depricated APIs are maintained so that SDK build doesn't break in the meantime]
* Handle various bundling options described in https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/design.md#optional-settings
   * This requires ability to recognize native binaries for various architectures.
   * Added ability to minimaly parse ELF binaries. PE/MachO support already exists.
   * Refactored out PE processing from BinaryUtils, so that PE-ELF-MachO parsers have similar abstractions.
* Create bundles with the appropriate layout (`v1` for `netcoreapp3.0`, `v2` for `net5`)
* Consume the new layout from the host bundle process/extraction code.
* Test cases
* Some of the AppHost rewriter files imported from the SDK repo had the license banner in a differnt format; make them consistent with rest of the files in the installer partition.

4 years agoAdd iOS build configurations (#33292)
Alexander Köplinger [Wed, 11 Mar 2020 23:55:38 +0000 (00:55 +0100)]
Add iOS build configurations (#33292)

This adds support for iOS using the Mono runtime to the build system.

4 years ago[master] Update dependencies from 4 repositories (#33230)
Santiago Fernandez Madero [Wed, 11 Mar 2020 23:19:42 +0000 (16:19 -0700)]
[master] Update dependencies from 4 repositories (#33230)

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

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

* Update dependencies from https://github.com/microsoft/vstest build 20200305-01

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200305-01

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

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

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20157.1

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20158.2

* Update dependencies from https://github.com/dotnet/llvm-project build 20200302.1

- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20152.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20152.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20152.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20152.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20152.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20152.1

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

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

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20159.1

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20160.1

* Remove GenAPI from darc updates for now until we figure out what's causing compiler to fail

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoFix JIT crash caused by GetType() == typeof(SealedClass) optimization (#33337)
Egor Bogatov [Wed, 11 Mar 2020 23:19:00 +0000 (02:19 +0300)]
Fix JIT crash caused by GetType() == typeof(SealedClass) optimization (#33337)

Downstream phases can't handle commas under JTRUE, so do more thorough cleanup in `fgFoldConditional` for JTRUE (and SWITCH).

Fixes #33333.

4 years agoFix SuperIlc to work on Linux / OSX in composite mode (#33358)
Tomáš Rylek [Wed, 11 Mar 2020 23:15:55 +0000 (00:15 +0100)]
Fix SuperIlc to work on Linux / OSX in composite mode (#33358)

1) I have generalized the concept of framework exclusions so that
the CPAOT runner can consume it - without it we were picking up
"CommandLine.dll" in the Core_Root folder as a Crossgen2 compilation
input and R2RDump was subsequently failing to dump the file as
CommandLine.dll is one of the stupid assemblies where the assembly
name differs from the PE file name (the assembly name is
'commandline' causing a mismatch on case-sensitive file systems).

2) On Linux / OSX, we need to copy around a bunch of native libraries
to the output, e.g. libSystem.Globalization.Native.so.

Thanks

Tomas

4 years agoUpdate src/libraries/Directory.Build.props
Maryam Ariyan [Wed, 11 Mar 2020 23:04:19 +0000 (16:04 -0700)]
Update src/libraries/Directory.Build.props

Co-Authored-By: Eric StJohn <ericstj@microsoft.com>
4 years agoExclude from building Microsoft.AspNetCore.Testing
Maryam Ariyan [Wed, 11 Mar 2020 22:11:34 +0000 (15:11 -0700)]
Exclude from building Microsoft.AspNetCore.Testing

4 years agoAdding separate 2.1 SDK yaml
vivmishra [Wed, 11 Mar 2020 22:17:37 +0000 (15:17 -0700)]
Adding separate 2.1 SDK yaml

4 years agoInclude all System.Native packages in PackageOverrides (#33493)
Eric StJohn [Wed, 11 Mar 2020 22:15:51 +0000 (15:15 -0700)]
Include all System.Native packages in PackageOverrides (#33493)

4 years ago[interp] Add more Math intrinsics (#33431)
monojenkins [Wed, 11 Mar 2020 22:14:59 +0000 (18:14 -0400)]
[interp] Add more Math intrinsics (#33431)

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

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoSupport table driven importation for scalar hardware intrinsics (#33350)
Kunal Pathak [Wed, 11 Mar 2020 21:48:46 +0000 (14:48 -0700)]
Support table driven importation for scalar hardware intrinsics (#33350)

* Deleted `mustExpand` parameter that we were passing to methods that never used it.
* Below xarch instructions are now imported with table driven logic:
  * NI_BMI1_AndNot
  * NI_BMI1_X64_AndNot
  * NI_BMI2_ParallelBitDeposit
  * NI_BMI2_ParallelBitExtract
  * NI_BMI2_X64_ParallelBitDeposit
  * NI_BMI2_X64_ParallelBitExtract
  * NI_BMI1_ExtractLowestSetBit
  * NI_BMI1_GetMaskUpToLowestSetBit
  * NI_BMI1_ResetLowestSetBit
  * NI_BMI1_TrailingZeroCount
  * NI_BMI1_X64_ExtractLowestSetBit
  * NI_BMI1_X64_GetMaskUpToLowestSetBit
  * NI_BMI1_X64_ResetLowestSetBit
  * NI_BMI1_X64_TrailingZeroCount
  * NI_BMI2_MultiplyNoFlags
  * NI_BMI2_X64_MultiplyNoFlags
  * InstructionSet_LZCNT
  * InstructionSet_LZCNT_X64
  * InstructionSet_POPCNT
  * InstructionSet_POPCNT_X64
  * NI_SSE42_Crc32
  * NI_SSE42_X64_Crc32
* Below ARM instructions are now imported with table driven logic:
  * NI_ArmBase_LeadingZeroCount
  * NI_ArmBase_ReverseElementBits
  * NI_ArmBase_Arm64_LeadingSignCount
  * NI_ArmBase_Arm64_LeadingZeroCount
  * NI_ArmBase_Arm64_ReverseElementBits
  * NI_Sha1_FixedRotate
  * NI_Crc32_ComputeCrc32
  * NI_Crc32_ComputeCrc32C
  * NI_Crc32_Arm64_ComputeCrc32
  * NI_Crc32_Arm64_ComputeCrc32C

* Updated the impIsTableDrivenHWIntrinsic() method to not check for `HW_Category_Scalar` anymore because almost all scalar intrinsic will be handled by table-driven. For scalar intrinsic which needs special handling I have tagged them with `HW_Flag_SpecialImport` to make sure they don't get imported using table-driven logic.
* In `hwintrinsiccodegenarm64.cpp`, I have removed a condition of `HW_Category_Special` because no instruction of arm64 were tagged with this category.
* I have created `getBaseTypeFromArgIfNeeded()` method that contains logic to extract `baesType` from args if the argument was flagged as one of `BaseTypeFromFirstArg` or `BaseTypeFromSecondArg`. This method is reused inside special handling of intrinsic for arm.

4 years agoAdd more regex tests (and fix one atomicity bug) (#33458)
Stephen Toub [Wed, 11 Mar 2020 21:28:02 +0000 (17:28 -0400)]
Add more regex tests (and fix one atomicity bug) (#33458)

* Avoid automatically making Regex loops followed by a lookbehind atomic

We allow a positive lookahead to be used to determine whether a loop can be upgraded to be atomic, but we're currently missing the RTL check that distinguishes between positive lookaheads and positive lookbehinds, so we're currently erroneously making some loops followed by positive lookbehinds atomic when we shouldn't.  Fix that just by ensuring we only traverse Require nodes when they're lookahead rather than behind.

Also, just for additional safety, change a subsequent check to ensure that the two nodes being compared have identical options.  Today we're just checking for case-sensitivity, but it's more robust (and doesn't hurt) to just check all options.

* Add more tests to boost code coverage

Plus lookaround tests for min length computation

4 years agoMerge branch 'fromoldmaster-missingfiles' of Extensions on commit:
Maryam Ariyan [Wed, 11 Mar 2020 20:58:54 +0000 (13:58 -0700)]
Merge branch 'fromoldmaster-missingfiles' of Extensions on commit:
https://github.com/dotnet/Extensions/commit/f4066026ca06984b07e90e61a6390ac38152ba93 into fromoldmaster-bringmissingfiles-1

4 years agoImplement building the repo for multiple configurations and architectures with a...
Jeremy Koritzinsky [Wed, 11 Mar 2020 20:36:56 +0000 (13:36 -0700)]
Implement building the repo for multiple configurations and architectures with a single command on Windows. (#33295)

* Implement building the repo for multiple configurations and architectures with a single command on Windows.

* Use -Command instead of -File to invoke pwsh build script.

* Run all builds and output which builds failed at the end (if any)

* Update help output.

* Prepend argument list with architecture args instead of appending so as to allow scripts to override them with MSBuild arguments.

* Fix typo.

4 years agoRemove GenAPI from darc updates for now until we figure out what's causing compiler...
Santiago Fernandez Madero [Wed, 11 Mar 2020 20:29:57 +0000 (13:29 -0700)]
Remove GenAPI from darc updates for now until we figure out what's causing compiler to fail

4 years agoJIT: enable tail calls and copy omission for implicit byref structs (#33004)
Andy Ayers [Wed, 11 Mar 2020 20:16:23 +0000 (13:16 -0700)]
JIT: enable tail calls and copy omission for implicit byref structs (#33004)

Handle cases where a caller passes an implicit byref argument struct to
a callee in tail position. There is no need to create a local copy or
to block tail calling.

To prove this is safe we must show that we're not introducing aliasing by
not copying the arguments. We do a simplistic and limited form of alias
analysis.

This pattern comes up increasingly often as we write more layered code
operating on spans and similar structs.

4 years agoMerge pull request #33484 from NikolaMilosavljevic/stop.netstandard
Nikola Milosavljevic [Wed, 11 Mar 2020 19:24:59 +0000 (12:24 -0700)]
Merge pull request #33484 from NikolaMilosavljevic/stop.netstandard

Stop building NETStandard 2.1 packages

4 years agoDisable the IL verifier for now, it can't handle code compiled without /features...
monojenkins [Wed, 11 Mar 2020 18:45:02 +0000 (14:45 -0400)]
Disable the IL verifier for now, it can't handle code compiled without /features:peverify-compat (#33478)

See https://github.com/mono/mono/issues/18572#issuecomment-595924767.

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

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoUpdate eng/Versions.props
Nikola Milosavljevic [Wed, 11 Mar 2020 18:42:04 +0000 (11:42 -0700)]
Update eng/Versions.props

Co-Authored-By: Davis Goodin <dagood@users.noreply.github.com>
4 years agocross-crossgen job, reduce workitem size (#33436)
Jarret Shook [Wed, 11 Mar 2020 18:11:44 +0000 (11:11 -0700)]
cross-crossgen job, reduce workitem size (#33436)

* cross-crossgen job, reduce workitem size

* Fix yml authoring error

* Fix typo and add validation to corelib location

* Print run time

4 years ago[interp] Optimize delegate invokes (#33099)
monojenkins [Wed, 11 Mar 2020 18:10:09 +0000 (14:10 -0400)]
[interp] Optimize delegate invokes (#33099)

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years ago[mono] Optimize boxing in Pattern Matching idioms (#32194)
Egor Bogatov [Wed, 11 Mar 2020 16:45:42 +0000 (19:45 +0300)]
[mono] Optimize boxing in Pattern Matching idioms (#32194)

* Optimize boxing in Pattern Matching

4 years agoUnconditionally upgrade installed Brew packages on OSX (#33481)
Jo Shields [Wed, 11 Mar 2020 16:42:11 +0000 (12:42 -0400)]
Unconditionally upgrade installed Brew packages on OSX (#33481)

With Apt, if you have X 1.0 installed, 1.1 exists in the package manifest, and say "install X", X is upgraded to 1.1. With Brew, a fatal error is thrown.

Blindly upgrading all previously installed packages is not ideal, and not a perfect mirror for the Apt behaviour, but it should mean that if X is previously installed it gets upgraded (causing a warning during install, when it's asked to be installed again with the same version), and if it's not already installed then it gets installed later.

Closes: https://github.com/dotnet/runtime/issues/33471

4 years agoStop building NETStandard 2.1 packages
Nikola Milosavljevic (CLR) [Wed, 11 Mar 2020 16:14:20 +0000 (09:14 -0700)]
Stop building NETStandard 2.1 packages

4 years agoImprove ProcessManager.Win (#32010)
Next Turn [Wed, 11 Mar 2020 15:48:50 +0000 (23:48 +0800)]
Improve ProcessManager.Win (#32010)

* ---- Style changes start here ----

* Remove unnecessary using directives

* Remove unnecessary assignments

* Use IntPtr.Zero

* Replace magic numbers

* Remove unused parameters

* Replace constructor with initializer

* Simplify delegate interop

* Inline temporary variables

* Remove unnecessary checked keyword

* Remove unnecessary cast

* Introduce using statement

* ---- Style changes end here ----

* Remove magic sleep

* Prealloc list

* Reduce copying

* Use ArrayPool

* Support long path

* Improve P/Invoke signatures

* Optimize modules enumeration

* Rename and move HandleLastWin32Error

* while (true)

* Move comments near codes

* Revert "Support long path"

This reverts commit 1f06435144925668e7273ec458e78b869aad6055.

* Revert "Introduce using statement"

This reverts commit e3d383a229c13b096dbdef9aa9c857ee6cf986e1.

* Revert "Remove magic sleep"

This reverts commit d8bc0017131a9d9d6c1f66569a87699f9f7faea6.

* Add braces

* Simplify initialization

* Fix last Win32 error

* Avoid reallocation if modules count decreased

* Nits

* Simplify codes

4 years agoRe-use StringBuilder inside iteration (#32759)
Alaa Masoud [Wed, 11 Mar 2020 14:59:59 +0000 (17:59 +0300)]
Re-use StringBuilder inside iteration (#32759)

* Re-use StringBuilder inside iteration

* another one

* Reuse StringBuilder in tools

* Revert accidental formatting

* pr feedback

* formatting

* 1 more

4 years agoMerge pull request #33455 from NikolaMilosavljevic/libicu65
Nikola Milosavljevic [Wed, 11 Mar 2020 14:22:00 +0000 (07:22 -0700)]
Merge pull request #33455 from NikolaMilosavljevic/libicu65

Add libicu65 to DEB deps package

4 years ago[arm] Fix branch island disassembly for arm64 and thumb. (#33469)
monojenkins [Wed, 11 Mar 2020 12:43:53 +0000 (08:43 -0400)]
[arm] Fix branch island disassembly for arm64 and thumb. (#33469)

Followup to https://github.com/mono/mono/pull/19126 and
https://github.com/mono/mono/pull/19169.

Bring arm64 `mono_arch_get_call_target` in line with other platforms by
returning NULL on failure instead of asserting. Bits 30-26 in an arm64
unconditional branch are exactly 0b00101, so 0x1f (0b11111) is used as a
mask to determine if the branch uses an immediate target--0x7 (0b111)
would incorrectly match against branches using register targets. The
extracted immediate is now sign extended in a branch-free way.

Avoid following blx entries in the method address table; ld64 can emit 4
different instruction sequences for islands involving thumb, and I'd
rather not implement support for them all now because 32-bit iOS is old
and large unlinked assemblies seem rare.

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
4 years agoUpdate unwind.c to minimize usage of 'while (TRUE)' (#33107)
pi1024e [Wed, 11 Mar 2020 12:41:03 +0000 (08:41 -0400)]
Update unwind.c to minimize usage of 'while (TRUE)' (#33107)

There is no need to have a "while (TRUE)" statement if we can check at the end of the loop or at the beginning.

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200310.1
dotnet-maestro[bot] [Wed, 11 Mar 2020 12:18:01 +0000 (12:18 +0000)]
Update dependencies from https://github.com/mono/linker build 20200310.1

- ILLink.Tasks - 0.1.6-prerelease.20160.1

4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20200310.4
dotnet-maestro[bot] [Wed, 11 Mar 2020 12:17:24 +0000 (12:17 +0000)]
Update dependencies from https://github.com/dotnet/arcade build 20200310.4

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

4 years ago[interp][32bit] Fix warning about precedence/parentheses. (#33468)
monojenkins [Wed, 11 Mar 2020 11:43:21 +0000 (07:43 -0400)]
[interp][32bit] Fix warning about precedence/parentheses. (#33468)

/s/mono2/mono/mini/interp/transform.c:3166:25: note: place parentheses around
      the '&&' expression to silence this warning
        if (mt >= MINT_TYPE_I1 && mt <= MINT_TYPE_I4
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years ago[mini] Fix warning about unused variables. (#33453)
monojenkins [Wed, 11 Mar 2020 09:18:02 +0000 (05:18 -0400)]
[mini] Fix warning about unused variables. (#33453)

/s/mono2/mono/mini/mini-generic-sharing.c:1415:9: warning: unused variable
      'param_names' [-Wunused-variable]
        char **param_names;

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years ago[wasm] Fix warnings about unused variables. (#33451)
monojenkins [Wed, 11 Mar 2020 09:14:21 +0000 (05:14 -0400)]
[wasm] Fix warnings about unused variables. (#33451)

/s/mono2/mono/metadata/sgen-mono.c:2883:16: warning: unused variable
      'last_major_gc_warned' [-Wunused-variable]
        static gint32 last_major_gc_warned = -1;
                      ^
/s/mono2/mono/metadata/sgen-mono.c:2884:16: warning: unused variable
      'num_degraded' [-Wunused-variable]
        static gint32 num_degraded = 0;
                      ^
/s/mono2/mono/metadata/sgen-mono.c:2886:9: warning: unused variable
      'major_gc_count' [-Wunused-variable]
        gint32 major_gc_count = mono_atomic_load_i32 (&mono_gc_stats.maj...
               ^

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years agoFix warnings about misleading indentation. (#33456)
monojenkins [Wed, 11 Mar 2020 09:12:18 +0000 (05:12 -0400)]
Fix warnings about misleading indentation. (#33456)

This is subtle and not actually misleading,
because it tends to be space tab or space tab, not wrong
number of tabs or significant wrong number of spaces.

/s/mono2/mono/metadata/class.c:4010:6: warning: misleading indentation;
      statement is not part of the previous 'if' [-Wmisleading-indentation]
                                 if (mono_class_implement_interface_slo...

/s/mono2/mono/metadata/class.c:4039:3: warning: misleading indentation;
      statement is not part of the previous 'if' [-Wmisleading-indentation]
        if (m_class_is_delegate (target) && mono_class_has_variant_gener...

/s/mono2/mono/mini/driver.c:1780:4: warning: misleading indentation; statement
      is not part of the previous 'if' [-Wmisleading-indentation]
                if (strncmp (argv [i], "--debugger-agent=", 17) == 0) {

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years ago[wasm] Fix warnings about unused variables. (#33452)
monojenkins [Wed, 11 Mar 2020 09:09:08 +0000 (05:09 -0400)]
[wasm] Fix warnings about unused variables. (#33452)

/s/mono2/mono/mini/mini-runtime.c:2284:15: warning: unused variable 'ji'
      [-Wunused-variable]
        MonoJitInfo *ji;

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years agoImplement CBOR array support
Eirik Tsarpalis [Wed, 11 Mar 2020 05:39:51 +0000 (05:39 +0000)]
Implement CBOR array support

* Implement array support for CborWriter

* convert CborReader to class

* add CborReaderState enum

* Implement CborReader array support

* refactor reader tests

* add peek state assertions in happy path tests

* remove redundant assertion

* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborReaderTests.Array.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Security.Cryptography.Encoding/tests/Cbor.Tests/CborWriterTests.Array.cs

Co-Authored-By: Jeremy Barton <jbarton@microsoft.com>
* address feedback

* styling

* BeginWriteArray -> WriteStartArray

* rename CborReaderState.EOF to CborReaderState.EndOfData

* add BytesRead and BytesWritten properties

* add an `Unknown` enum case for zero values

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoDon't probe for A/W variants of entry points on non-Windows. (#33250)
Jeremy Koritzinsky [Wed, 11 Mar 2020 04:16:07 +0000 (21:16 -0700)]
Don't probe for A/W variants of entry points on non-Windows. (#33250)

* Don't probe for A/W variants of entry points on non-Windows.

* Cal PAL_GetProcAddressDirect directly on Unix.

* Remove dependence on A/W probing on non-Windows.

4 years agoRemove `AllocLHeap`. (#33402)
Vladimir Sadov [Wed, 11 Mar 2020 01:09:32 +0000 (18:09 -0700)]
Remove `AllocLHeap`. (#33402)

* The main difference of `AllocLHeap` is that it uses per-heap acontext instead of per-thread. There is no advantage in that and results in allocations under-reported in `GetAllocatedBytesForCurrentThread`

This change unifies to one allocation entry point - `Alloc` (and its `AllocAlign8` variety)

* Removed AllocAlign8

* PR feedback - some refactoring to merge duplicate calls to `Alloc`

* Splited an `ifdef/else`  in two to not cross code blocks.

* No need to update `GC_INTERFACE_MAJOR_VERSION` more than once per release. And we already did for this one.

4 years agoSave stack arguments size in InlinedCallFrame.m_Datum on x86 to handle callee's poppi...
Fadi Hanna [Tue, 10 Mar 2020 23:47:52 +0000 (16:47 -0700)]
Save stack arguments size in InlinedCallFrame.m_Datum on x86 to handle callee's popping of arguments (#33249)

* Save stack arguments size in InlinedCallFrame.m_Datum on x86 to handle callee's popping of arguments

4 years agoAdd libicu65 to DEB deps
Nikola Milosavljevic [Tue, 10 Mar 2020 22:32:07 +0000 (22:32 +0000)]
Add libicu65 to DEB deps

4 years agoRevert "Enable restore for ref and src projects in libraries (#33242)" (#33437)
Viktor Hofer [Tue, 10 Mar 2020 20:33:27 +0000 (21:33 +0100)]
Revert "Enable restore for ref and src projects in libraries (#33242)" (#33437)

This reverts commit 981cc64bc42eeed5c5634ad8f3680398039603cc.

4 years agoImplement Marshal.GetIDispatchForObject on platforms with COM support (#33403)
Elinor Fung [Tue, 10 Mar 2020 19:24:48 +0000 (12:24 -0700)]
Implement Marshal.GetIDispatchForObject on platforms with COM support (#33403)

4 years agoAdd XML doc comments for Get/SetRawSocketOption (#33390)
Stephen Toub [Tue, 10 Mar 2020 18:07:28 +0000 (14:07 -0400)]
Add XML doc comments for Get/SetRawSocketOption (#33390)

* Add XML doc comments for Get/SetRawSocketOption

I neglected to add XML doc comments for these new APIs in previous PR.  Fixing that.

* Update src/libraries/System.Net.Sockets/src/System/Net/Sockets/Socket.cs

Co-Authored-By: Günther Foidl <gue@korporal.at>
Co-authored-by: Günther Foidl <gue@korporal.at>
4 years agoFix getting time zone names with Invariant Culture (#33318)
Tarek Mahmoud Sayed [Tue, 10 Mar 2020 16:38:34 +0000 (09:38 -0700)]
Fix getting time zone names with Invariant Culture (#33318)

* Fix getting time zone names with Invariant Culture

* Address the feedback

* Restrict the test to English languages only.

* Fix misspelling

* Remove un-needed line

4 years agoMove JIT documentation to new docs/design/coreclr/jit directory (#33321)
Bruce Forstall [Tue, 10 Mar 2020 15:53:57 +0000 (08:53 -0700)]
Move JIT documentation to new docs/design/coreclr/jit directory (#33321)

Reduce clutter in the shared directory, and make it easier to find
all the JIT-related documentation.

4 years agoFix very minor typo (#33423)
tub5 [Tue, 10 Mar 2020 15:11:02 +0000 (15:11 +0000)]
Fix very minor typo (#33423)

Co-authored-by: Ben Rothermel <ben.rothermel@tocabot.io>
4 years ago[mono] Include filename in Invalid image error messages (#33117)
Mitchell Hwang [Tue, 10 Mar 2020 14:48:36 +0000 (10:48 -0400)]
[mono] Include filename in Invalid image error messages (#33117)

* [mono] Include filename in Invalid Image message

* [mono] Rename Invalid Image to File Not Found where applicable

* [Mono] Remove ActiveIssue attributes 31649 and 31650

* Touch up callers of mono_error_set_simple_file_not_found in appdomain.c

* Specify file name in mono_error_set_simple_file_not_found reflection_only message

* Touch up mono_error_set_file_not_found callers in icall.c

* Include image name in mono_error_set_bad_image_by_name calls in metadata.c

* Include aot name in mono_error_set_bad_image_by_name calls in aot-runtime.c

Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years ago[mono] Disable SIMD support for Windows target (#33421)
Egor Bogatov [Tue, 10 Mar 2020 13:45:23 +0000 (16:45 +0300)]
[mono] Disable SIMD support for Windows target (#33421)

A temp fix for #1933.

4 years agoEnable restore for ref and src projects in libraries (#33242)
Viktor Hofer [Tue, 10 Mar 2020 12:48:20 +0000 (13:48 +0100)]
Enable restore for ref and src projects in libraries (#33242)

* Enable restore for projects in libraries

Enabling project restore for ref and src projects

* Remove winrt.depproj

* Remove tools.depproj

* Enable upfront restore

* Fix casing of PInvokeAnalyzerException file

* Remove harvestPackages.depproj and refactoring

Removing havestPackages.depproj in favor of a target that is hooked
into Arcade's repo restore phase in Tools.props.

Additionally moving common properties that are used both in Arcade and
the repo inside Configurations.props. Before they were scattered around
multiple places (Versions.props, Subsets.props).

* Set ilasm/ildasm RID for restore

* Sequence restore into steps out of upfront restore

* Fix docker entrypoints by using build.cmd/sh

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200309.1
dotnet-maestro[bot] [Tue, 10 Mar 2020 12:17:44 +0000 (12:17 +0000)]
Update dependencies from https://github.com/mono/linker build 20200309.1

- ILLink.Tasks - 0.1.6-prerelease.20159.1

4 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20200309.2
dotnet-maestro[bot] [Tue, 10 Mar 2020 12:17:11 +0000 (12:17 +0000)]
Update dependencies from https://github.com/dotnet/arcade build 20200309.2

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

4 years ago[interp] Add EXCEPTION_CHECKPOINT to MINT_JMP consistent with other method tranform...
monojenkins [Tue, 10 Mar 2020 12:00:53 +0000 (08:00 -0400)]
[interp] Add EXCEPTION_CHECKPOINT to MINT_JMP consistent with other method tranform paths. (#33359)

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years agoConvert PLT table and call site to execute only on AMD64. (#33120)
monojenkins [Tue, 10 Mar 2020 11:20:11 +0000 (07:20 -0400)]
Convert PLT table and call site to execute only on AMD64. (#33120)

Current implementation embedded critical runtime information directly into PLT slot. It also depends on finding call site in generic trampoline reading call target from instruction stream in order to locate PLT slot in use and then read GOT offset as well as PLT info offset from PLT slot instruction stream.

This is problematic on platforms where code is execute only. Fix changes how the metadata needed in order to correctly patch PLT is discovered. Instead of depending on reading instruction stream, it is loaded into RAX (free to be used when calling through PLT on AMD64) in PLT slot before jmp takes place that moves control over to generic trampoline.

The PLT slot is the only place where we have access to both GOT index (used in jmp), PLT info offset (currently embedded after jmp instruction) and emitted PLT slot index. Since PLT slot index can be used to recover GOT offset used by PLT slot as well as PLT info offset at runtime, PLT slot index will be emitted into instruction stream and loaded into RAX (prepared to be configurable to other reg if needed) before doing the jump over to generic trampoline. Size of emitted imm constant is optimized based on number of total PLT slots used in image, meaning that 1, 2, or 4 bytes could be used to store PLT slot index as an imm constant in instruction stream. The additional jmp should have minimal to no performance overhead since it should complete within 1 cycle, reading imm constant from instruction stream that shouldn’t incur additional cache misses and sine there is no data dependency between mov and jmp, there should be options to pipeline both instructions.  Since mov has smaller latency than indirect jmp, mov should be complete once control gets into the generic tramp (if pipelined).

In order to resolve plt info offset at runtime, needed information is now emitted as part of got_info_offsets, increase table with 4 bytes/plt slot, same size currently emitted into the PLT slot instruction stream.

Code size of PLT slot is currently 10 bytes (6 bytes jmp and 4 byte PLT info offset). Since PLT info offset has been moved into got_info_offset table, size of PLT slot will be 2, 4, 5 byte mov (depending on needed imm size) and 6 bytes jmp instruction. As an example, mscorlib can emit all its PLT slots using 2 byte imm constant, meaning that the PLT slot will still be 10 bytes, but since PLT info offset of 4 bytes is moved into got_info_offset, total image increase will be 4 bytes/PLT slot. This is however still cheaper than alternatives that would burn 1 trampoline/PLT slot (at least 10 additional bytes/slot) or setup lookup tables in image or calculate more info at runtime, all-consuming more memory in total.

Note, using this approach is optional and runtime needs to be built using MONO_ARCH_CODE_EXEC_ONLY in order to enable it since it’s only an opt in features on platforms that can't read from instructions stream.

Current implementation is AMD64 only, but same pattern could be applied to other architectures when needed.

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
4 years agoFix overaggressive CanBeMadeAtomic check for Set + Notone (#33405)
Stephen Toub [Tue, 10 Mar 2020 10:51:07 +0000 (06:51 -0400)]
Fix overaggressive CanBeMadeAtomic check for Set + Notone (#33405)

We're erroneously converting a set loop to be atomic when it's followed by a notone where the notone's character is in the set.  But if we for example have `[ab]*[^a]`, we can't make the loop atomic, because the `[ab]*` can actually give back something (a `b`) that the `[^a]` will match.  The fix is simply to delete the erroneous, overaggressive checks.

4 years ago[Mono] Intrinsify Interlocked.And and Interlocked.Or using LLVM (#33253)
Egor Bogatov [Tue, 10 Mar 2020 08:49:05 +0000 (11:49 +0300)]
[Mono] Intrinsify Interlocked.And and Interlocked.Or using LLVM (#33253)

* Intrinsify Interlocked.And and Interlocked.Or

4 years agoFix misleading-indentation compilation error under clang 10 (#33406)
Omair Majid [Tue, 10 Mar 2020 07:13:14 +0000 (03:13 -0400)]
Fix misleading-indentation compilation error under clang 10 (#33406)

The error looks like this (seen in dotnet/coreclr repo):

    In file included from /root/coreclr/src/ildasm/dasm_mi.cpp:7:
    /root/coreclr/src/ildasm/exe/../../tools/metainfo/mdinfo.cpp:1951:9: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation]
        if (!wcscmp(W("__DecoratedName"), rcName))
        ^
    /root/coreclr/src/ildasm/exe/../../tools/metainfo/mdinfo.cpp:1947:5: note: previous statement is here
if (pSig && pMethName)
^
    1 error generated.

4 years agoMark PerformanceCounter_PerformanceData is a stress test. (#33410)
Tarek Mahmoud Sayed [Tue, 10 Mar 2020 07:12:09 +0000 (00:12 -0700)]
Mark PerformanceCounter_PerformanceData is a stress test. (#33410)

This is done to avoid running this test by default which can cause a timeout in CI.

4 years agoDelete porting_guide (#33411)
Jan Kotas [Tue, 10 Mar 2020 05:48:46 +0000 (22:48 -0700)]
Delete porting_guide (#33411)

The live version of the porting guide with a lot more details lives at https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to

4 years agoAdd License Header to Installer Test Assets (#33408)
Swaroop Sridhar [Tue, 10 Mar 2020 01:48:00 +0000 (18:48 -0700)]
Add License Header to Installer Test Assets (#33408)

D:\git\_runtime\src\installer\test\Assets\TestProjects\... files were missing licence headers.
This change adds them.

4 years agoConsolidate objcopy detection (#33342)
Adeel Mujahid [Tue, 10 Mar 2020 00:08:21 +0000 (02:08 +0200)]
Consolidate objcopy detection (#33342)

4 years ago[jit] Implement support for all Sse1 intrinsics for netcore. (#33356)
Zoltan Varga [Mon, 9 Mar 2020 22:37:37 +0000 (18:37 -0400)]
[jit] Implement support for all Sse1 intrinsics for netcore. (#33356)

* [jit] Implement support for all Sse1 intrinsics for netcore.

* Add generic OP_XOP opcodes for opcodes which the JIT doesn't care about.
  Add a SimdOp enum to list the operations performed by these opcodes.
* Add a SimdIntrinsic struct so the mapping between the .net methods
  and the JIT opcodes can be specified declaratively.
* Add all intrinsics from the Sse class.

* Fix UnpackHigh/UnpackLow.

* Implement missing load/store intrinsics.

* Implement missing opcodes.

* Fix nontemporal metadata.

* Fix MOVNTPS alignment..

* Fix OP_XOP_X_X.