platform/upstream/dotnet/runtime.git
4 years agoBuild CoreCLR tests as platform independent (AnyCPU) (#32916)
Gleb Balykov [Tue, 3 Mar 2020 19:38:48 +0000 (22:38 +0300)]
Build CoreCLR tests as platform independent (AnyCPU) (#32916)

* Build platform independent tests dlls

* Fix tests exclusion conditions

* Fix windows specific dirs

4 years agoRevert "[mono] Include filename in Invalid image error messages (#32560)" (#33116)
Mitchell Hwang [Tue, 3 Mar 2020 18:41:04 +0000 (13:41 -0500)]
Revert "[mono] Include filename in Invalid image error messages (#32560)" (#33116)

This reverts commit 5371ef4fc3a3983f12c7fda816bd939eb37f3c65.

4 years agoAdd Fedora 33 runtime ids
Omair Majid [Tue, 3 Mar 2020 18:26:56 +0000 (13:26 -0500)]
Add Fedora 33 runtime ids

Fedora 32 is gearing up for release[1], and in-development version of
Fedora has been offically labelled as being Fedora 33:

    $ podman run -it fedora:33 cat /etc/os-release
    NAME=Fedora
    VERSION="33 (Container Image)"
    ID=fedora
    VERSION_ID=33
    VERSION_CODENAME=""
    PLATFORM_ID="platform:f33"
    PRETTY_NAME="Fedora 33 (Container Image)"
    ANSI_COLOR="0;34"
    LOGO=fedora-logo-icon
    CPE_NAME="cpe:/o:fedoraproject:fedora:33"
    HOME_URL="https://fedoraproject.org/"
    DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/"
    SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
    BUG_REPORT_URL="https://bugzilla.redhat.com/"
    REDHAT_BUGZILLA_PRODUCT="Fedora"
    REDHAT_BUGZILLA_PRODUCT_VERSION=rawhide
    REDHAT_SUPPORT_PRODUCT="Fedora"
    REDHAT_SUPPORT_PRODUCT_VERSION=rawhide
    PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
    VARIANT="Container Image"
    VARIANT_ID=container

[1] https://fedorapeople.org/groups/schedule/f-32/f-32-key-tasks.html

4 years agoSimplifying the implementation of several Vector2/3/4 methods (#33088)
Tanner Gooding [Tue, 3 Mar 2020 18:24:05 +0000 (18:24 +0000)]
Simplifying the implementation of several Vector2/3/4 methods (#33088)

4 years agoRemove pre-consolidation CoreCLR-only Official-build specific… (#32999)
Jeremy Koritzinsky [Tue, 3 Mar 2020 18:02:47 +0000 (10:02 -0800)]
Remove pre-consolidation CoreCLR-only Official-build specific… (#32999)

4 years agoUpdate shared code license headers (#33086)
Chris Ross [Tue, 3 Mar 2020 17:56:36 +0000 (09:56 -0800)]
Update shared code license headers (#33086)

4 years agoDisabled GetTotalAllocatedBytes test. (#33092)
Nathan Ricci [Tue, 3 Mar 2020 17:54:35 +0000 (12:54 -0500)]
Disabled GetTotalAllocatedBytes test. (#33092)

4 years agoReturn original value in Interlocked.Or/And (#33102)
Miha Zupan [Tue, 3 Mar 2020 17:54:15 +0000 (18:54 +0100)]
Return original value in Interlocked.Or/And (#33102)

4 years ago[merp] Create a signal ('source') breadcrumb for the crash dump process (#32945)
monojenkins [Tue, 3 Mar 2020 16:47:06 +0000 (11:47 -0500)]
[merp] Create a signal ('source') breadcrumb for the crash dump process (#32945)

TODO: Test + maybe rename 'signal' argument to 'source' everywhere

/cc @kdubau @lambdageek

Addresses https://github.com/mono/mono/issues/18715
<!--
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[mono] Include filename in Invalid image error messages (#32560)
Mitchell Hwang [Tue, 3 Mar 2020 16:14:03 +0000 (11:14 -0500)]
[mono] Include filename in Invalid image error messages (#32560)

* [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

4 years agoUpdate shared HPackEncoder (#32944)
James Newton-King [Tue, 3 Mar 2020 15:57:20 +0000 (04:57 +1300)]
Update shared HPackEncoder (#32944)

4 years agoImprove call counting mechanism (#32250)
Koundinya Veluri [Tue, 3 Mar 2020 15:53:43 +0000 (10:53 -0500)]
Improve call counting mechanism (#32250)

* Improve call counting mechanism

- Commit 1
  - Reverts commit f954c6bb80a21d9c44a6ee751d935a0573f7226a, which reverted PR https://github.com/dotnet/runtime/pull/1457 due to issues
- Commit 2
  - Fixes crashes and assertion failures seen by the original change, fixes https://github.com/dotnet/runtime/issues/29934
  - The crashes were caused by commit https://github.com/dotnet/runtime/pull/1457/commits/6aa3c7083735895c2e687a77e3636080edb366c3 in the original PR
  - Call counting infos cannot be deleted when the corresponding call counting stubs may still run, because:
    - The remaining call count decremented by the stub is in the call counting info
    - The only way to get a code version / method desc from a stub is to go through the call counting info
  - Got one repro of the assertion failure in https://github.com/dotnet/runtime/issues/22786 and it is most likely caused by the same issue, following heap corruption from modifying a deleted call counting info where the memory is reused for a `NativeCodeVersionNode`, messing up the method desc pointer
  - Fixed with a partial revert of the above commit. Added back the `Complete` stage and then call counting infos are deleted only after it's ensured that call counting stubs won't be used (shortly before deleting them).
- Commit 3
  - Public static functions of `CallCountingManager` that may be called through the debugger may occur before static initialization, added a check for null as suggested in https://github.com/dotnet/runtime/pull/29892

* Fix crashes and assertion failures seen by the original change

* Add check for null for some functions callable from the debugger

4 years ago[aot] Add support for emitting the method address table as a table of normal pointers...
monojenkins [Tue, 3 Mar 2020 15:52:26 +0000 (10:52 -0500)]
[aot] Add support for emitting the method address table as a table of normal pointers in the data segment. (#33006)

[aot] Rename acfg->opts to acfg->jit_opts.

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoSet GenFacadesForceZeroVersionSeeds for shims (#33052)
Eric StJohn [Tue, 3 Mar 2020 15:51:23 +0000 (07:51 -0800)]
Set GenFacadesForceZeroVersionSeeds for shims (#33052)

4 years agoEnable Mono netcore LLVM build on Windows. (#32869)
Johan Lorensson [Tue, 3 Mar 2020 15:14:10 +0000 (16:14 +0100)]
Enable Mono netcore LLVM build on Windows. (#32869)

Current Mono netcore LLVM build on Windows uses a prebuild LLVM and doesn't
support local build LLVM. Current mono.proj only use configure and
--with-llvm argument on none Windows build. On Windows, trying to build
Mono netcore using LLVM will fail.

Fix sets msbuild property, MONO_EXTERNAL_LLVM_CONFIG to full path of
downloaded llvm-config.exe, this is what's set when doing LLVM build
using configure --with-llvm on Mono Windows build in Mono repro, but since
Mono netcore Windows build won't use configure, the property should be
specified directly when calling msbuild.

4 years agoFix Mono Tool MSVC Debug build. (#32960)
monojenkins [Tue, 3 Mar 2020 15:12:02 +0000 (10:12 -0500)]
Fix Mono Tool MSVC Debug build. (#32960)

Changes done in object-offsets.h by mono/mono#18713 adding offsets for TARGET_AMD64 exposed
a build configuration error in the Mono Tool MSVC debug build due to incorrectly setting both X86 and AMD64 defines causing compile errors when including object-offset.h. Release configuration didn't have this configuration error, meaning that CI builds wouldn't trigger build error.

Fix makes sure all MSVC build configurations for Mono Tools (genmdesc, monodis, pedump) matches the build configuration for other binaries and that debug build configuration is inline with release build configuration.

Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
4 years agoEnable mono packages (#33074)
Jo Shields [Tue, 3 Mar 2020 14:43:25 +0000 (09:43 -0500)]
Enable mono packages (#33074)

* Build Mono nupkgs

* Add Mono to runtime-official.yml

* Define isOfficialJob for Mono

* Try not nesting if statements, use and instead

* Publish Mono nupkgs

* Do intermediate upload, copied from CoreCLR

* Forcibly embed ELF buildid on Mono on Linux

This is not default in our local Clang builds on CentOS7, and
is rejected during publishing

* Version number fixups from CoreCLR

* Steal logic from Installer to force musl RID on musl

* Add an override so Windows RID used on Windows

4 years agoFix the parameter value checks for SetWindowPosition (#32243)
Dongbo Wang [Tue, 3 Mar 2020 12:47:10 +0000 (04:47 -0800)]
Fix the parameter value checks for SetWindowPosition (#32243)

4 years agoDelete AppDomain::IsDefaultDomain (#33073)
Jan Kotas [Tue, 3 Mar 2020 03:45:33 +0000 (19:45 -0800)]
Delete AppDomain::IsDefaultDomain (#33073)

4 years agoDelete obsolete jitperf instrumentation (#33087)
Jan Kotas [Tue, 3 Mar 2020 03:24:49 +0000 (19:24 -0800)]
Delete obsolete jitperf instrumentation (#33087)

4 years agoAdd CrossOS DAC build back (#33064)
Juan Hoyos [Tue, 3 Mar 2020 02:49:49 +0000 (18:49 -0800)]
Add CrossOS DAC build back (#33064)

* Build cross OS DACs in default Windows builds (#32322)
This reverts commit 671b2ef6272330b51ddbaa4fa96e411e3f701231.
* Fix pass through arguments

4 years ago[amd64] Obtain the trampoline argument in the generic_trampoline in the AOT case...
monojenkins [Tue, 3 Mar 2020 01:16:37 +0000 (20:16 -0500)]
[amd64] Obtain the trampoline argument in the generic_trampoline in the AOT case without decoding the call instruction. (#33028)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoImplement missing Sse2 intrinsics (#33056)
Egor Bogatov [Mon, 2 Mar 2020 22:09:40 +0000 (01:09 +0300)]
Implement missing Sse2 intrinsics (#33056)

4 years agoUse GArray instead of GList when getting custom attributes from an image (#32974)
Ryan Lucia [Mon, 2 Mar 2020 21:46:03 +0000 (16:46 -0500)]
Use GArray instead of GList when getting custom attributes from an image (#32974)

Xamarin.Forms calls this _constantly_ during startup, to the point where the malloc calls were actually showing up in the profile. This should help with that, and gives us some ms back during startup.
There are also a bunch of calls that return empty arrays, which in theory could be created in managed for a perf boost. However, it seems the Xamarin.Android team has mostly gotten rid of those calls and that optimization would complicate the code and require changes to our managed CustomAttribute implemented for both legacy and netcore, so I've opted to not check it in for now. If the empty calls continue to show up down the line, I can dig the code back up from my local branch and PR it separately.

4 years agoMerge pull request #32912 from maryamariyan/primitives-total
Maryam Ariyan [Mon, 2 Mar 2020 21:34:43 +0000 (13:34 -0800)]
Merge pull request #32912 from maryamariyan/primitives-total

Extensions consolidation

4 years ago[Debug] IndexOutOfRangeException when extension data doesn't have two generic paramet...
Alan Isaac [Mon, 2 Mar 2020 20:13:39 +0000 (15:13 -0500)]
[Debug] IndexOutOfRangeException when extension data doesn't have two generic parameters (#33014)

* added generic param tests

* added proposed fix

* fixed debug statements to use underlying dictionary type

* removed baseline comment

* removed casts to idictionary

* using explicitly typed variable

Co-Authored-By: Layomi Akinrinade <layomia@gmail.com>
Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
4 years ago[master] Update dependencies from 4 repositories (#32858)
dotnet-maestro[bot] [Mon, 2 Mar 2020 19:42:36 +0000 (11:42 -0800)]
[master] Update dependencies from 4 repositories (#32858)

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

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

* Update dependencies from https://github.com/microsoft/vstest build 20200226-03

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200226-03

* Update dependencies from https://github.com/dotnet/runtime-assets build 20200225.1

- System.Windows.Extensions.TestData - 5.0.0-beta.20125.1
- System.Security.Cryptography.X509Certificates.TestData - 5.0.0-beta.20125.1
- System.Private.Runtime.UnicodeData - 5.0.0-beta.20125.1
- System.Net.TestData - 5.0.0-beta.20125.1
- System.IO.Packaging.TestData - 5.0.0-beta.20125.1
- System.IO.Compression.TestData - 5.0.0-beta.20125.1
- System.Drawing.Common.TestData - 5.0.0-beta.20125.1
- System.ComponentModel.TypeConverter.TestData - 5.0.0-beta.20125.1

* fix the libraries build

* Update Directory.Build.props

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

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

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20127.1

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

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

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

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

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

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

Co-authored-by: Anirudh Agnihotry <anirudhagnihotry098@gmail.com>
4 years agoAdd check for null for some functions callable from the debugger
Koundinya Veluri [Thu, 13 Feb 2020 19:25:49 +0000 (11:25 -0800)]
Add check for null for some functions callable from the debugger

4 years agoFix crashes and assertion failures seen by the original change
Koundinya Veluri [Wed, 12 Feb 2020 20:59:23 +0000 (12:59 -0800)]
Fix crashes and assertion failures seen by the original change

4 years agoImprove call counting mechanism
Koundinya Veluri [Wed, 12 Feb 2020 03:39:30 +0000 (19:39 -0800)]
Improve call counting mechanism

- Commit 1
  - Reverts commit f954c6bb80a21d9c44a6ee751d935a0573f7226a, which reverted PR https://github.com/dotnet/runtime/pull/1457 due to issues
- Commit 2
  - Fixes crashes and assertion failures seen by the original change, fixes https://github.com/dotnet/runtime/issues/29934
  - The crashes were caused by commit https://github.com/dotnet/runtime/pull/1457/commits/6aa3c7083735895c2e687a77e3636080edb366c3 in the original PR
  - Call counting infos cannot be deleted when the corresponding call counting stubs may still run, because:
    - The remaining call count decremented by the stub is in the call counting info
    - The only way to get a code version / method desc from a stub is to go through the call counting info
  - Got one repro of the assertion failure in https://github.com/dotnet/runtime/issues/22786 and it is most likely caused by the same issue, following heap corruption from modifying a deleted call counting info where the memory is reused for a `NativeCodeVersionNode`, messing up the method desc pointer
  - Fixed with a partial revert of the above commit. Added back the `Complete` stage and then call counting infos are deleted only after it's ensured that call counting stubs won't be used (shortly before deleting them).
- Commit 3
  - Public static functions of `CallCountingManager` that may be called through the debugger may occur before static initialization, added a check for null as suggested in https://github.com/dotnet/runtime/pull/29892

4 years agoDelete lock accounting (#33048)
Jan Kotas [Mon, 2 Mar 2020 18:49:55 +0000 (10:49 -0800)]
Delete lock accounting (#33048)

This is left-over from CLR SQL support. We do not need it in CoreCLR.

4 years agoUpdate CONTRIBUTING.md (#33054)
Dan Moseley [Mon, 2 Mar 2020 18:29:10 +0000 (10:29 -0800)]
Update CONTRIBUTING.md (#33054)

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

4 years ago[loader] Free some leaked strings in NativeLibrary resolution (#32985)
Ryan Lucia [Mon, 2 Mar 2020 16:46:39 +0000 (11:46 -0500)]
[loader] Free some leaked strings in NativeLibrary resolution (#32985)

4 years ago[threading] Switch domain assemblies lock from OS to Coop (#32502)
Ryan Lucia [Mon, 2 Mar 2020 16:46:16 +0000 (11:46 -0500)]
[threading] Switch domain assemblies lock from OS to Coop (#32502)

I don't think you can create a root domain without reaching the thread info attach call, so this should be safe to change outright.

4 years agoFix relative path (#33018)
Andrew Au [Mon, 2 Mar 2020 16:26:38 +0000 (08:26 -0800)]
Fix relative path (#33018)

4 years agoUpdate build scripts to enable Microsoft.Extensions projects incrementally
Maryam Ariyan [Sun, 1 Mar 2020 21:29:25 +0000 (13:29 -0800)]
Update build scripts to enable Microsoft.Extensions projects incrementally
- BinPlacing for Extensions projects
- Ignore building Microsoft.Extensions. projects
- Use correct StringNameKeyId for Extensions projects
- Separate packaging path for extensions projects
- Add PreReleaseVersionIteration

4 years agoMerge branch 'runtime-consolidation' from Extensions into 'primitives-total'
Maryam Ariyan [Mon, 2 Mar 2020 07:09:29 +0000 (23:09 -0800)]
Merge branch 'runtime-consolidation' from Extensions into 'primitives-total'

4 years agoRemove unused locals in System.Runtime.WindowsRuntime (#33035)
Next Turn [Mon, 2 Mar 2020 05:47:18 +0000 (13:47 +0800)]
Remove unused locals in System.Runtime.WindowsRuntime (#33035)

4 years agoAdded two unittests that test whether or not opaque is an empty string, the qop value...
Michael Katz [Sun, 1 Mar 2020 16:27:39 +0000 (08:27 -0800)]
Added two unittests that test whether or not opaque is an empty string, the qop value is read to incorporate the correct hash algorithm for the digest challenge. Also adjusted the conditional in the challenge parse function to allow the opaque value to be an empty string (#32983)

4 years agoSynchronize shared crossgen2 files (#33026)
Michal Strehovský [Sun, 1 Mar 2020 16:01:40 +0000 (17:01 +0100)]
Synchronize shared crossgen2 files (#33026)

4 years agoSpecify entrypoint name for LoadLibrary import (#33025)
Michal Strehovský [Sun, 1 Mar 2020 15:42:08 +0000 (16:42 +0100)]
Specify entrypoint name for LoadLibrary import (#33025)

The Widechar probing is unnecessary.

4 years agoRevert "Change debug info default variable tracking system" (#33021)
Jan Kotas [Sun, 1 Mar 2020 09:37:17 +0000 (01:37 -0800)]
Revert "Change debug info default variable tracking system" (#33021)

4 years agoReplace Marshal.SizeOf for primitive types (#33020)
Next Turn [Sun, 1 Mar 2020 04:41:44 +0000 (12:41 +0800)]
Replace Marshal.SizeOf for primitive types (#33020)

4 years agoHandle offset better in DateTimeFormat (#33016)
ts2do [Sun, 1 Mar 2020 04:00:34 +0000 (22:00 -0600)]
Handle offset better in DateTimeFormat (#33016)

Eliminate static field access where possible

4 years agoUpdate PGO and IBC data versions. (#32978)
Brian Robbins [Sun, 1 Mar 2020 03:42:02 +0000 (19:42 -0800)]
Update PGO and IBC data versions. (#32978)

4 years agoCode clean ups (inline out var, remove unnecessary assignments) (#2004)
Ben Adams [Sun, 1 Mar 2020 01:18:37 +0000 (01:18 +0000)]
Code clean ups (inline out var, remove unnecessary assignments) (#2004)

* Inline out variable declarations

* Remove unnessary assignments

* Update src/libraries/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.cs

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Private.CoreLib/src/System/IO/Path.Windows.cs

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoLazily generate native type layout information (#1828)
Jeremy Koritzinsky [Sat, 29 Feb 2020 23:18:58 +0000 (15:18 -0800)]
Lazily generate native type layout information (#1828)

* Rename and generalize native field categories.

Remove COM-specific blocks on NativeFieldFlags since they don't do anything except require extra categories.

Update unix-x86-only code branch.

Classify each field in EEClassLayoutInfo as used for managed or native layout

Add fast blittability detector to prep for moving interop data calculations out of the type loader. (Blittability is needed in the type loader, so we need to calculate it early).

Heavily simplify native field categories now that they don't need to track blittability.

Update new field blittability checker to also validate the MarshalAs metadata (since if it is blittable, we'll never load the native type and do validation there).

Fix up issues in blittability check.

Remove some dependencies on EEClassLayoutInfo where appropriate.

Collect native layout info in a separate function from type loading.

Initialize NFDs from FieldDescs instead of reading directly from metadata.

Load native type information at a delayed time.

Don't initalize native type information unless the data is requested and the type is non-blittable.

Clean up new field handling of Windows.UI.Xaml.Interop.TypeName.

Fix contract violations and Marshal.SizeOf.

Remove some dead code.

Clean up the blittable checker to also note that KeyValuePair<T,V> in WinRT is non-generic.

Remove special cases that allowed illegal behavior because field marshal data initalization was in the type loader.

alignof -> sizeof

Add comment on why Decimal in particular is never blittable.

Seperate out the native layout info into a separate type.

Get runtime and dac building with it. Crossgen needs some more updates to get fragile NGen working with the new design.

Update fragile NGen to understand the new layout. Get the product to build.

Fixes for Linux build.

Update the loading of fields in layout types to not recurse into the native layout logic. The new logic doesn't support being run as part of type-load.

Remove unneeded "EnsureNativeLayoutInfoInitalized" calls.

Fix build breaks on ARM.

Rename GetNativeFieldFlags->GetCategory and m_flags->m_category.

Don't use the native layout info to get the offset of a field on a blittable type.

Fix indentation.

Fix x86 build.

Fix GC-mode contracts.

Fix thead safety issues. Move methods of EEClassLayoutInfo and EEClassNativeLayoutInfo to a new classlayoutinfo.cpp file.

Fix more contracts.

Move CheckForNativeHFA to classlayoutinfo.cpp

Fix x86 Windows build break.

Track if a MethodTable is marshalable in the native field layout metadata.

Fix case where an explicit structure has a field of non-layout struct, which itself has fields that would disqualify it from managed-sequential.

Fix incorrect calculation of managed size.

Fix accidental recursion into native layout initialization when calculating the SystemV eightbyte classification.

Fix Windows x86 failure.

Wrap MarshalNative::OffsetOfHelper in a helper method frame to fix contract violation.

Fix usage of CONSISTENCY_CHECK to CONSISTENCY_CHECK_MSG.

* Calculate NativeFieldDescriptor::IsNestedType from the category instead of including a bool.

* Change IsUnmarshalable() to return a C++ bool instead of a BOOL.

* PR Feedback.

* Remove native layout info from fragile ngen images/ibc.

* Initialize m_fd in NativeFieldDescriptor constructor.

* Cleanup after removing NGen image save/restore.

* PR Feedback.

* Initialize variable to satisfy compiler.

* Fix FieldDesc assignments.

* Lookup intrinsic vector types by typedef instead of name.

* Mark GetNativeHFATypeRaw as LIMITED_METHOD_CONTRACT.

* Clean up returns and only use return buffers when required.

* Use CQuickArray instead of _alloca.

* Remove out of date comment.

* Remove unused field.

* Make m_nativeLayoutInfo volatile.

* PR Feedback.

* Fix typo that broke non-blittable HFAs.

* Add test validating that we don't marshal Auto structs.

* Add test for returning an auto-struct.

* PR Feedback.

4 years agoAdditional tests for System.Text.Json (#32705)
Alan Isaac [Sat, 29 Feb 2020 18:57:52 +0000 (13:57 -0500)]
Additional tests for System.Text.Json (#32705)

* added multi-segment DateTime tests

* added missing null argument test

* added null argument tests and missing check for SerializeAsync

* removed unreachable defensive code block

* sealed class type for dictionary converters and removed unreachable code

* added additional test permutation

* added slices to DateTime conversion tests

* Revert "sealed class type for dictionary converters and removed unreachable code"

This reverts commit 1e8e33cdb2309ed37558c37b76454dbcaec0a1fa.

* sealed class type for internal json converters

4 years agoGuard against NRE when deserializing extension data into dictionary without parameter...
Alan Isaac [Sat, 29 Feb 2020 14:44:35 +0000 (09:44 -0500)]
Guard against NRE when deserializing extension data into dictionary without parameterless ctor (#32952)

* changed exception behavior for immutable dictionary

* refactored tests for deserialize

* using full generic dictionary for tests

* moved where exception is thrown

* added immutable serialization test

* added custom immutable dictionary extension data test

* refactored private ctor dictionary to inherit

* removed unused static create

4 years agoEnsure Process.MainWindowHandle is refreshed (#32695)
Fernando Andreu [Sat, 29 Feb 2020 14:12:23 +0000 (14:12 +0000)]
Ensure Process.MainWindowHandle is refreshed (#32695)

* Ensure Process.MainWindowHandle is refreshed

This will set _haveMainWindow to true only if
_mainWindowHandle is non-zero. It also forces
the latter to be reset during a Process.Refresh()
call, hence allowing the re-evaluation of both.

Fix #32690

* Mark test for local outerloop testing only

* Rename exePath constant to ExePath

4 years agoUpdate libraries workflow (#32939)
Karel Zikmund [Sat, 29 Feb 2020 10:40:43 +0000 (02:40 -0800)]
Update libraries workflow (#32939)

* Update README.md

Minor readability improvements
Unified camelCasing

* Update README.md

4 years agoEnable nullable annotations for Utf8String. (#32967)
Eric Erhardt [Sat, 29 Feb 2020 10:39:38 +0000 (04:39 -0600)]
Enable nullable annotations for Utf8String. (#32967)

Clean up unnecessary things in the .csproj files.

4 years agoReplace Marshal.SizeOf in System.Drawing.Common (#32962)
Next Turn [Sat, 29 Feb 2020 05:54:49 +0000 (13:54 +0800)]
Replace Marshal.SizeOf in System.Drawing.Common (#32962)

* Replace Marshal.SizeOf in System.Drawing.Common

* Inline size locals

* Remove out of memory checks

* Replace Marshal operations

4 years agoUp the timeout for the cross-crossgen job to 3 hours (#32986)
Jarret Shook [Sat, 29 Feb 2020 05:21:44 +0000 (21:21 -0800)]
Up the timeout for the cross-crossgen job to 3 hours (#32986)

4 years agoSystem.IO.sln hangs (#32995)
Carlos Sanchez Lopez [Sat, 29 Feb 2020 04:01:51 +0000 (20:01 -0800)]
System.IO.sln hangs (#32995)

* System.IO.sln hangs

* Apply suggestions from code review

4 years agoFix another 58 URL's (#33003)
Dan Moseley [Sat, 29 Feb 2020 02:54:32 +0000 (18:54 -0800)]
Fix another 58 URL's (#33003)

4 years agoHonor converters for underlying types of Nullable<T> specified with JsonConverterAttr...
Mikel Blanchard [Sat, 29 Feb 2020 01:15:03 +0000 (17:15 -0800)]
Honor converters for underlying types of Nullable<T> specified with JsonConverterAttribute (#32006)

* FIxed exception being thrown when JsonConverterAttribute is used on Nullable<T> when converter can handle T.

* Expanded test coverage.

* Code review feedback.

* Code review feedback.

* Updated to use JsonValueConverterNullableFactory directly instead of fall-through logic.

* Null response is no longer possible.

* Code review.

* Updated for refactoring.

* Code review.

* Code review #2.

4 years agoUpdating labels to reflect the -coreclr postfix (#32997)
Jeff Schwartz [Sat, 29 Feb 2020 00:35:02 +0000 (16:35 -0800)]
Updating labels to reflect the -coreclr postfix (#32997)

4 years agoAdd Server-Timing to KnownHeaders in System.Net.HTtp (#32989)
Stephen Toub [Fri, 28 Feb 2020 23:15:58 +0000 (18:15 -0500)]
Add Server-Timing to KnownHeaders in System.Net.HTtp (#32989)

4 years agoFix RegexBoyerMoore.IsMatch case-insensitive (regression from 2.1 to 3.0) (#32984)
Stephen Toub [Fri, 28 Feb 2020 23:12:35 +0000 (18:12 -0500)]
Fix RegexBoyerMoore.IsMatch case-insensitive (regression from 2.1 to 3.0) (#32984)

As part of a larger change, a change was made for .NET Core 3.0 that switched a character-by-character comparison loop to instead use string.Compare.  This represents a regression, however, when a culture-aware character-by-character comparison yields different results from a multiple-character comparison.

4 years agoprocess more TLS frames at once when possible (#32897)
Tomas Weinfurt [Fri, 28 Feb 2020 22:47:07 +0000 (14:47 -0800)]
process more TLS frames at once when possible (#32897)

* process more TLS frames at once when possible

* style update

* stop on first FrameType.AppData

4 years agoOnly output type parameter constraint blank line if type parameter has a constraint...
Alistair Evans [Fri, 28 Feb 2020 21:31:02 +0000 (21:31 +0000)]
Only output type parameter constraint blank line if type parameter has a constraint (#32024)

Fixes #31614

4 years agoRemove FEATURE_COMPILED from System.Text.RegularExpressions (#32919)
Stephen Toub [Fri, 28 Feb 2020 20:37:50 +0000 (15:37 -0500)]
Remove FEATURE_COMPILED from System.Text.RegularExpressions (#32919)

4 years agoUpdate ProjectUrl in props (#32599)
Tim Heuer [Fri, 28 Feb 2020 20:29:01 +0000 (12:29 -0800)]
Update ProjectUrl in props (#32599)

I believe this should now be `/runtime` instead of `/corefx` so that it properly attributes the project location when shown in NuGet and elsewhere that relies on the ProjectUrl data.

4 years agoremoved unused local for System.Numerics.Tensor (#32948)
Alan Isaac [Fri, 28 Feb 2020 20:23:27 +0000 (15:23 -0500)]
removed unused local for System.Numerics.Tensor (#32948)

4 years agoAdding some additional coverage to areas. (#32976)
Eric StJohn [Fri, 28 Feb 2020 20:09:10 +0000 (12:09 -0800)]
Adding some additional coverage to areas. (#32976)

4 years agoRemove non-functional spawn code.
monojenkins [Fri, 28 Feb 2020 18:20:25 +0000 (13:20 -0500)]
Remove non-functional spawn code.

Subject to configuration, spawn has three widely divergent behaviors:

succeed but do nothing
print and exit
do what it sounds like
Rather than mislead the callers, provide only option 3 and let the caller decide what to do otherwise.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoFix JIT traces for the case where a tier 1 compilation switches to MinOpts (#32928)
Koundinya Veluri [Fri, 28 Feb 2020 16:32:41 +0000 (11:32 -0500)]
Fix JIT traces for the case where a tier 1 compilation switches to MinOpts (#32928)

Updated to clear the tier 1 flag when switching to MinOpts. Clearing the flag avoids printing "tier 1" in traces and to print more accurate information around here:
https://github.com/dotnet/runtime/blob/c727a412bf2c415bb2b94eeef0939aa07b87591c/src/coreclr/src/jit/compiler.cpp#L4044

4 years agoPackage libcoreclrtraceptprovider.so in shared framework (#32949)
Sung Yoon Whang [Fri, 28 Feb 2020 16:15:03 +0000 (08:15 -0800)]
Package libcoreclrtraceptprovider.so in shared framework (#32949)

4 years agoDelete unused libdl interop (#32959)
Jan Kotas [Fri, 28 Feb 2020 14:48:49 +0000 (06:48 -0800)]
Delete unused libdl interop (#32959)

4 years agoReduce number of build libraries for Mono MSVC netcore build. (#32854)
Johan Lorensson [Fri, 28 Feb 2020 14:46:54 +0000 (15:46 +0100)]
Reduce number of build libraries for Mono MSVC netcore build. (#32854)

Current mono-netcore.sln builds more than needed by Mono netcore build.
The only library currently needed is mono-2.0-sgen.dll build by
libmono-dynamic-vcxproj. In order to build that library, we also need to
build eglib as static library as well as genmdesc.vcxproj. Build also
build mono-sgen.exe to simplify use of older Mono CLI support and testing.

4 years ago[mono] Use ALC and throw FileNotFound in RuntimeAssembly.InternalLoad (#32933)
Ryan Lucia [Fri, 28 Feb 2020 10:45:14 +0000 (05:45 -0500)]
[mono] Use ALC and throw FileNotFound in RuntimeAssembly.InternalLoad (#32933)

https://github.com/dotnet/runtime/commit/7c6ec46a637017971d3eaa210fd2b6e4d4a6b737#diff-53c474033a1751601becf0eb958fcb5dL287-R287 broke a bunch of tests, this should fix them all.

Fixes #22110
Fixes #32436
Fixes #32437
Fixes #32435
Fixes #32439
Fixes #32434
Fixes #32433
Fixes #32432

4 years ago[loader] Remove unnecessary newline in loader mono_trace call (#32934)
Ryan Lucia [Fri, 28 Feb 2020 10:37:17 +0000 (05:37 -0500)]
[loader] Remove unnecessary newline in loader mono_trace call (#32934)

4 years agoEnable test fixed already (#32946)
buyaa-n [Fri, 28 Feb 2020 07:21:08 +0000 (23:21 -0800)]
Enable test fixed already (#32946)

4 years ago[runtime] Use pointer size gchandles (#32850)
monojenkins [Fri, 28 Feb 2020 07:06:10 +0000 (02:06 -0500)]
[runtime] Use pointer size gchandles (#32850)

This would enable in the future to use CoreCLR's GC with mono. This doesn't change the current embedding api, but, in the future, we will end up aligning with coreclr on an embedding api that uses pointer sized gchandles.

Co-authored-by: Vlad Brezae <brezaevlad@gmail.com>
4 years agoInvert Environment.UserInteractive (fix) (#32947)
Eric StJohn [Fri, 28 Feb 2020 01:10:04 +0000 (17:10 -0800)]
Invert Environment.UserInteractive (fix) (#32947)

4 years agoUpdate windows-requirements.md (#32938)
Karel Zikmund [Fri, 28 Feb 2020 00:11:33 +0000 (16:11 -0800)]
Update windows-requirements.md (#32938)

Clarify few minor things in initial setup workflow.

4 years agoRe-re-enable Regex tests on .NET Framework (#32931)
Stephen Toub [Thu, 27 Feb 2020 23:12:00 +0000 (18:12 -0500)]
Re-re-enable Regex tests on .NET Framework (#32931)

I'd previously done this in the Configuration.props, but then those were deleted and my change was apparently lost in the transition.

4 years agoFix .* handling of RegexOptions.Singleline (#32930)
Stephen Toub [Thu, 27 Feb 2020 23:10:25 +0000 (18:10 -0500)]
Fix .* handling of RegexOptions.Singleline (#32930)

We're accidentally not setting the iteration variable to 0, which then messes up later computation.

4 years agoAdd binlogs to coreclr's build process (#32842)
Juan Hoyos [Thu, 27 Feb 2020 22:15:33 +0000 (14:15 -0800)]
Add binlogs to coreclr's build process (#32842)

4 years agoMark HostModel package as non-shipping (#32901)
Swaroop Sridhar [Thu, 27 Feb 2020 22:10:31 +0000 (14:10 -0800)]
Mark HostModel package as non-shipping (#32901)

The Microsoft.NET.HostModel nuget package is for internal consumption by the SDK.
Therefore mark it as non-shipping, so that it is not published to nuget.org

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

4 years agoIncorrect alias in area owners (#32924)
Carlos Sanchez Lopez [Thu, 27 Feb 2020 20:52:12 +0000 (12:52 -0800)]
Incorrect alias in area owners (#32924)

4 years agoEnable workflow of building Mono and Libraries without CoreCLR (#32881)
Jared Parsons [Thu, 27 Feb 2020 20:48:27 +0000 (12:48 -0800)]
Enable workflow of building Mono and Libraries without CoreCLR (#32881)

* Build libraries against Mono runtime

This change allows you to build libraries against the Mono runtime
without having to first build CoreCLR. There isn't a specifically
supported build option for this but can be forced with the following
command line:

```
.\build.cmd -subsetcategory libraries /p:RuntimeFlavor=mono
```

4 years agoFix jit build break (#32927)
Andy Ayers [Thu, 27 Feb 2020 20:40:59 +0000 (12:40 -0800)]
Fix jit build break (#32927)

Two changes to codegencommon.cpp were merged in short order, and
git/github did not spot the merge conflict.

Fixes #32926.

4 years agoUpdate RID graph to include recent Android version and support for emulators (#32914)
Marek Safar [Thu, 27 Feb 2020 19:43:01 +0000 (20:43 +0100)]
Update RID graph to include recent Android version and support for emulators (#32914)

4 years agoAdded missing InteropServices.WindowsRuntime types to mono SPC (#32905)
Steve Pfister [Thu, 27 Feb 2020 18:23:32 +0000 (13:23 -0500)]
Added missing InteropServices.WindowsRuntime types to mono SPC (#32905)

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

4 years agoAnnotate System.Net.Security for nullable reference types (#32541)
Eirik Tsarpalis [Thu, 27 Feb 2020 17:32:39 +0000 (17:32 +0000)]
Annotate System.Net.Security for nullable reference types (#32541)

* annotate System.Net.Security for nullable reference types

* address task nullability issue

* add nullable directives to common files

* address feedback

* add missing nullable directive

* make ProcessAuthentication method explicitly nullable

* fix build after rebase

* add missing nullable directives to common source files

* fix build

* fix build

* make APM method annotations consistent

* address feedback

* address feedback

* address feedback

* address feedback

* address feedback

* fix rebase build issues

4 years agoMake JitDump label output multi-thread safe (#32578)
Kunal Pathak [Thu, 27 Feb 2020 17:19:23 +0000 (09:19 -0800)]
Make JitDump label output multi-thread safe (#32578)

* Make JitDump label output multi-thread safe

`s_compMethodsCount` is a static variable and incrementing it when
two JITs are running at the same time can result in inconsistent labels. This PR fixes it by adding an instance variable `compMethodID` on `Compiler` object and setting it to the value of `s_compMethodsCount` after incrementing it using `InterlockedIncrement()`.

Changed the type of `s_compMethodID` to `LONG` to match the signature of `InterlockedIncrement()` and made it private.

Fixes #10984

4 years agoClean up libmono-dynamic.vcxproj dependency for netcore. (#32856)
monojenkins [Thu, 27 Feb 2020 17:08:56 +0000 (12:08 -0500)]
Clean up libmono-dynamic.vcxproj dependency for netcore. (#32856)

Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
4 years agoJIT: convert codegen over to new style phases (#32899)
Andy Ayers [Thu, 27 Feb 2020 16:27:43 +0000 (08:27 -0800)]
JIT: convert codegen over to new style phases (#32899)

Convert codegen over to new style phases. To facilitate this, some
of the state that was passed around in locals in `genGenerateCode`
are now fields on the codegen object.

Also add a final "pseudo phase" in case we see very late asserts.

Fixes #32497.

4 years agoRyuJIT: Optimize `obj.GetType() != typeof(X)` for sealed classes (#32790)
Egor Bogatov [Thu, 27 Feb 2020 15:47:16 +0000 (18:47 +0300)]
RyuJIT: Optimize `obj.GetType() != typeof(X)` for sealed classes (#32790)

An array type with value type or final ref type elements is exact.

Use this to optimize more cases of type equality checking.

4 years agoDisable force_install warning produced by CMake for libraries native build. (#32853)
Santiago Fernandez Madero [Thu, 27 Feb 2020 14:05:17 +0000 (16:05 +0200)]
Disable force_install warning produced by CMake for libraries native build. (#32853)

* Use VS2019 Preview for libraries official build

This lets us enable warn as error in libraries build because this pools contain a newer CMake.

* Revert changes in runtime-official.yml

* Remove usages of useVsPreviewPool in runtime.yml

* Revert useVsPreviewPool usages in xplat-setup.yml

* Revert useVsPreviewPool changes in perf.yml

* Disable force_install warning in libraries build.

* Enable warnaserror in global live build.

* Remove empty line in perf.yml

4 years agoDetect build config mismatch for MSVC Windows LLVM build. (#32868)
monojenkins [Thu, 27 Feb 2020 12:30:27 +0000 (07:30 -0500)]
Detect build config mismatch for MSVC Windows LLVM build. (#32868)

If LLVM build is done using different build configuration, Mono build will fail to static link LLVM libraries due to incompatibility between release and debug C++ runtime library, generating a lot of linker errors like this:

error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in mini-llvm-cpp.obj

error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in mini-llvm-cpp.obj

This is normally not a problem when doing local builds of LLVM but when using an external provided build, like netcore Mono build, this problem is more likely to occur.

This fix adds an additional check to make sure build configuration reported by llvm-config.exe --build-mode matches current Mono build configuration and if not give a more specific msbuild error:

error : LLVM build Configuration=Release doesn't match current Mono build Configuration=Debug

Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
4 years agoReduce number of build libraries for Mono MSVC netcore build.
lateralusX [Wed, 26 Feb 2020 12:12:15 +0000 (13:12 +0100)]
Reduce number of build libraries for Mono MSVC netcore build.

Current mono-netcore.sln builds more than needed by Mono netcore build.
The only library currently needed is mono-2.0-sgen.dll build by
libmono-dynamic-vcxproj. In order to build that library, we also need to
build eglib as static library as well as genmdesc.vcxproj. Build also
build mono-sgen.exe to simplify use of older Mono CLI support and testing.

4 years ago[wasm][debugger] Always pass failed breakpoint requests to target (#32906)
monojenkins [Thu, 27 Feb 2020 09:10:46 +0000 (04:10 -0500)]
[wasm][debugger] Always pass failed breakpoint requests to target (#32906)

Originally we had a simple way to detect that breakpoints were
meant for the runtime but that is no longer true.  Now if we
can't locate a breakpoint we need to pass the request on to the
target so it can make an attempt.

Co-authored-by: Larry Ewing <lewing@microsoft.com>
4 years ago[wasm][debugger] Show the typename for valuetypes (#32874)
monojenkins [Thu, 27 Feb 2020 09:08:14 +0000 (04:08 -0500)]
[wasm][debugger] Show the typename for valuetypes (#32874)

- no details of the valuetype are accessible

Fixes mono/mono#18232

Co-authored-by: Ankit Jain <radical@gmail.com>
4 years ago[aot] Avoid `mono_defaults` when creating trampolines. (#32904)
monojenkins [Thu, 27 Feb 2020 07:57:19 +0000 (02:57 -0500)]
[aot] Avoid `mono_defaults` when creating trampolines. (#32904)

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

https://github.com/mono/mono/pull/18505 made PLT initialization occur at
image load time. When initializing the PLT for mscorlib,
`mono_defaults.corlib` is not yet initialized.

This change works around this by using `mscorlib_aot_module`--which is
initialized relatively early--instead of `mono_defaults.corlib`. PLT
initialization is also moved slightly later: it now happens after
`use_page_trampolines` has been initialized. The `USE_PAGE_TRAMPOLINES`
macro has also been changed to dereference `mscorlib_aot_module`.

This commit also removes an unused parameter from
`mono_aot_create_specific_trampoline`.

Co-authored-by: imhameed <imhameed@microsoft.com>
4 years agoUpdate shared code (#32779)
Justin Kotalik [Thu, 27 Feb 2020 05:35:09 +0000 (21:35 -0800)]
Update shared code (#32779)

4 years agoAnnotate System.Net.Sockets for nullable reference types (#32675)
Eric Erhardt [Thu, 27 Feb 2020 03:19:18 +0000 (21:19 -0600)]
Annotate System.Net.Sockets for nullable reference types (#32675)

* All AsyncResult classes have nullable enable.

* Most ancillary files annotated.

* UdpClient annotated

* Annotate TcpClient

* Annotate TcpListener, SafeSocketHandle, SocketTaskExtensions

* Annotate NetworkStream and SendPacketsElement

* Annotate SocketPal.

* Annotate SocketAsyncEventArgs

* Annotate SocketAsyncEngine and Context on Unix

* Annotate Socket.Tasks

* Finish annotating the Socket class.

* Remove inline #nullable lines

* Annotate all public methods.

* Sync up to latest code and cleanup.

* Fix .NET Framework build for WinHttpHandler.

4 years agoSmall fixup in System.Net.Http.WinHttpHandler.csproj (#32890)
Eric Erhardt [Thu, 27 Feb 2020 03:16:03 +0000 (21:16 -0600)]
Small fixup in System.Net.Http.WinHttpHandler.csproj (#32890)