platform/upstream/dotnet/runtime.git
4 years agoRemove unused strings in System.ServiceProcess (#33929)
Francesco Saltori [Sun, 22 Mar 2020 15:32:49 +0000 (16:32 +0100)]
Remove unused strings in System.ServiceProcess (#33929)

4 years agoCreate test wrappers in run phase, not build phase aka make Crossgen2 runs green...
Tomáš Rylek [Sun, 22 Mar 2020 09:20:45 +0000 (10:20 +0100)]
Create test wrappers in run phase, not build phase aka make Crossgen2 runs green (#33898)

We need to compile the test wrappers in the test run phase as the
build phase is potentially common to multiple test runs and doesn't
generally know about execution details like the use of Crossgen
/ Crossgen2. Because of this Simon's change to baseline
Crossgen2-specific issues doesn't work.

Thanks

Tomas

4 years ago[llvm] Unify the emission of GOT access. NFC. (#33714)
monojenkins [Sun, 22 Mar 2020 01:18:18 +0000 (21:18 -0400)]
[llvm] Unify the emission of GOT access. NFC. (#33714)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoEnable Microsoft.Extensions.DependencyInjection (#33816)
Maryam Ariyan [Sun, 22 Mar 2020 00:20:32 +0000 (17:20 -0700)]
Enable Microsoft.Extensions.DependencyInjection (#33816)

* Enables DI and Options

4 years agoAnnotate System.Net.Mail for nullable reference types (#33826)
Stephen Toub [Sat, 21 Mar 2020 22:01:49 +0000 (18:01 -0400)]
Annotate System.Net.Mail for nullable reference types (#33826)

4 years agoRemove duplicates and fix namespaces in S.T.RegularExpressions (#33917)
Viktor Hofer [Sat, 21 Mar 2020 18:59:46 +0000 (19:59 +0100)]
Remove duplicates and fix namespaces in S.T.RegularExpressions (#33917)

4 years agoEnable Windows arm64 JIT stress pipeline testing (#33906)
Bruce Forstall [Sat, 21 Mar 2020 17:41:21 +0000 (10:41 -0700)]
Enable Windows arm64 JIT stress pipeline testing (#33906)

Windows arm32 is still disabled until https://github.com/dotnet/runtime/issues/1097
is fully resolved.

4 years agoFix LangVersion for C# projects (#33868)
Stephen Toub [Sat, 21 Mar 2020 15:03:25 +0000 (11:03 -0400)]
Fix LangVersion for C# projects (#33868)

4 years ago[mono] Implement System.Console for iOS (#33827)
Egor Bogatov [Sat, 21 Mar 2020 14:01:13 +0000 (17:01 +0300)]
[mono] Implement System.Console for iOS (#33827)

* Add iOS version of System.Console

4 years agoNaricc/add coreclr check (#33810)
Nathan Ricci [Sat, 21 Mar 2020 13:30:39 +0000 (09:30 -0400)]
Naricc/add coreclr check (#33810)

Initial break up of tests by runtime; we now have catagories of tests that fail on mono/coreclr/both.

4 years agoFix cancellation-related deadlock in BoundedChannel (#33883)
Stephen Toub [Sat, 21 Mar 2020 12:17:57 +0000 (08:17 -0400)]
Fix cancellation-related deadlock in BoundedChannel (#33883)

If:
- a BoundedChannel is opted-in to synchronous continuations via someone setting AllowSynchronousContinuations on its options when constructed, and
- if a read operation is performed when there's no data available and with a cancelable cancellation token, and
- if cancellation is requested concurrently with a write being performed that will satisfy that read...

then there's the potential for a deadlock.  While holding a lock, the writer needs to unregister the cancellation for the reader's operation prior to trying to complete it, and needs to know that all cancellation-related work has quiesced before it proceeds to try to complete that reader.  If the cancellation is currently in progress then, it waits for the cancellation callback to complete.  However, if a synchronous continuation was used, then it's possible the user's synchronous continuation might call back into the bounded channel and perform an operation that might require taking that same lock.  Deadlock.

The fix is to simply not try to use synchronous continuations with bounded channel when a cancelable token is employed.

4 years agoRemove more unnecessary LINQ usage (#33892)
Stephen Toub [Sat, 21 Mar 2020 12:15:46 +0000 (08:15 -0400)]
Remove more unnecessary LINQ usage (#33892)

4 years agoAdd System.Globalization.Native support for Windows (#33704)
Santiago Fernandez Madero [Sat, 21 Mar 2020 07:32:41 +0000 (00:32 -0700)]
Add System.Globalization.Native support for Windows (#33704)

* Add System.Globalization.Native support for Windows

* PR Feedback

* Fix build and address more feedback

* More PR Feedback

* Fix OSX build and update lib name in dllimport

* Remove un-necessary include and update issue link

4 years agoMerge pull request #33882 from dotnet/50yaml
Vivek Mishra [Sat, 21 Mar 2020 06:32:58 +0000 (23:32 -0700)]
Merge pull request #33882 from dotnet/50yaml

5.0 yamls and  edits for 3.1.200

4 years agoUnify some cmake function definitions (#33716)
Adeel Mujahid [Sat, 21 Mar 2020 02:45:42 +0000 (04:45 +0200)]
Unify some cmake function definitions (#33716)

* Unify some cmake function definitions

* Address CR feedback

* Make installers /Zc:strictStrings compatible

* Make installer /Gz compatible

* Remove skip-strip internal implementation

* Use CLR_CMAKE_TARGET_DARWIN

* Establish iOS to Darwin relationship

* Simplify iOS conditions

4 years agoFix missing lock in CoreRTNameMangler (#33903)
Tomáš Rylek [Sat, 21 Mar 2020 02:44:47 +0000 (03:44 +0100)]
Fix missing lock in CoreRTNameMangler (#33903)

4 years agoRevert "Unify instruction set definition (#33730)" (#33901)
David Wrighton [Sat, 21 Mar 2020 02:43:26 +0000 (19:43 -0700)]
Revert "Unify instruction set definition (#33730)" (#33901)

This reverts commit f80a5147ef7662c3238275568c9dad7655a9684f.

4 years agoOnly run format job in master branch (#33896)
Bruce Forstall [Sat, 21 Mar 2020 00:55:37 +0000 (17:55 -0700)]
Only run format job in master branch (#33896)

* Only run format job in master branch

Don't run it in servicing branches, since it depends
on an unversioned `jitutils` repo.

* Run format job on PR builds as well

* Fix Target check to match reality, not documentation

4 years agoUpdate RegionInfo data and Fix RegionInfo.CurrentRegion on Windows (#33834)
Tarek Mahmoud Sayed [Sat, 21 Mar 2020 00:49:24 +0000 (17:49 -0700)]
Update RegionInfo data and Fix RegionInfo.CurrentRegion on Windows (#33834)

* Update RegionInfo data and Fix RegionInfo.CurrentRegion on Windows

* Address the feedback

* feedback

* More Feedback addressing

4 years agoAdd spec: deserializing objects with parameterized ctors (#33095)
Layomi Akinrinade [Fri, 20 Mar 2020 22:59:24 +0000 (15:59 -0700)]
Add spec: deserializing objects with parameterized ctors (#33095)

* Add spec: deserializing objects with parameterized ctors

* State updated parameter-JSON matching proposal

* Address review feedback and add more notes about matching behavior

* Update spec with thoughts following spec review

* Fix typo

4 years agoDelete repo tools manifest in CI to fix CI errors (#33871)
Viktor Hofer [Fri, 20 Mar 2020 22:51:29 +0000 (23:51 +0100)]
Delete repo tools manifest in CI to fix CI errors (#33871)

An updated SDK with the net5.0 tfm change seems to break dotnet repo
tool restore, presumably because multiple compatible tfms are found.
Working around this by deleting the repo tools manifest file until the
issue is fixed.

4 years agoFix DAC minidump generation (#33833)
Mike McLaughlin [Fri, 20 Mar 2020 22:18:54 +0000 (15:18 -0700)]
Fix DAC minidump generation (#33833)

CompressDebugInfo::EnumMemoryRegions did not add the correct debug info
memory when FEATURE_ON_STACK_REPLACEMENT is enabled. This caused the
diagnostics SOS tests to failure on Windows.

4 years ago+ ref/src/tests/pkg (#33844)
Maryam Ariyan [Fri, 20 Mar 2020 21:36:56 +0000 (14:36 -0700)]
+ ref/src/tests/pkg (#33844)

Microsoft.Extensions.Configuration.FileExtensions
Microsoft.Extensions.Configuration.Ini

4 years ago5.0 yamls and edits for 3.1.200
vivmishra [Fri, 20 Mar 2020 19:41:06 +0000 (12:41 -0700)]
5.0 yamls and  edits for 3.1.200

4 years agoForbid block morph in CSE. (#33845)
Sergey Andreenko [Fri, 20 Mar 2020 19:40:16 +0000 (12:40 -0700)]
Forbid block morph in CSE. (#33845)

* Don't call `fgMorphCopyBlock` during CSE.

It could do tranformations that replace trees, some of them could be CSE defs or uses, it would lead to asserts when we try to find them.

* Dump additional information about struct localVariables.

4 years agoAdd [JsonConstructor] and support for deserializing with parameterized ctors (#33444)
Layomi Akinrinade [Fri, 20 Mar 2020 18:29:21 +0000 (11:29 -0700)]
Add [JsonConstructor] and support for deserializing with parameterized ctors (#33444)

* Add [JsonConstructor] and support for deserializing with parameterized ctors

* Add some more tests and clean up

* Move property and parameter caches from converter to JsonClassInfo

* Address review feedback

* Address review feedback and reduce regression for existing benchmarks

* Address review feedback and add more tests

* Clean up arg state on ReadStack

4 years agoRemove SOS_README.md from every app's OutDir (#33878)
Mike McLaughlin [Fri, 20 Mar 2020 18:21:28 +0000 (11:21 -0700)]
Remove SOS_README.md from every app's OutDir (#33878)

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

4 years agoUse HW-intrinsics in BitConverter for double <-> long / float <-> int (#33476)
Günther Foidl [Fri, 20 Mar 2020 15:31:20 +0000 (16:31 +0100)]
Use HW-intrinsics in BitConverter for double <-> long / float <-> int (#33476)

* Use hw-intrinsics in BitConverter for double <-> long and float <-> int to emit movd instead of using the stack

* Added comment for workaround

Cf. https://github.com/dotnet/runtime/pull/33476#issuecomment-600937760

4 years ago[interp] Remove MINT_TYPE_P (#33850)
monojenkins [Fri, 20 Mar 2020 15:09:05 +0000 (11:09 -0400)]
[interp] Remove MINT_TYPE_P (#33850)

MINT_TYPE_P is equivalent to the integer versions. By removing it we reduce the number of interpreter types and instructions, making it also easier to apply optimizations on instructions targeting these types.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years ago[coop] Make MONO_ENTER_GC_UNSAFE fatal if no_safepoints is set (#32666)
monojenkins [Fri, 20 Mar 2020 14:58:30 +0000 (10:58 -0400)]
[coop] Make MONO_ENTER_GC_UNSAFE fatal if no_safepoints is set (#32666)

Previously it would print a warning, only, because otherwise we would get a
second assert in the same place while the crash machinery would run from the
current thread from the abort in `mono_fatal_with_history`

The solution is to turn off the "no safepoints" bit since we know we're
definitely going to assert here.

Also record the current state in the checked mode state transition history to
make it a bit easier to diagnose where the problem surfaced.

Also fixed up a pair of other debugging/tracing messages so the message strings
accurately reflect the state.

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
4 years agoFix running tests (#33719)
Andrey Kurdyumov [Fri, 20 Mar 2020 14:55:59 +0000 (20:55 +0600)]
Fix running tests (#33719)

without that code I have stack trace on Python 3.7.1
when run tests\runtest.cmd /coreclr Top200
```
Traceback (most recent call last):
  File "runtest.py", line 2450, in <module>
    sys.exit(main(args))
  File "runtest.py", line 2423, in main
    lambda path: do_setup(host_os,
  File "runtest.py", line 550, in create_and_use_test_env
    ret_code = func(None)
  File "runtest.py", line 2433, in <lambda>
    test_filter_path))
  File "runtest.py", line 2356, in do_setup
    build_test_wrappers(host_os, arch, build_type, coreclr_repo_location, test_location, None, test_filter_path)
  File "runtest.py", line 1871, in build_test_wrappers
    delete_existing_wrappers(to_unicode(test_location))
  File "runtest.py", line 1822, in to_unicode
    return str(s, "utf-8")
TypeError: decoding str is not supported
```

* Simplify string conversion and update Python
* Fix path to Python3 executable

It was discovered during testing CoreRT in
https://github.com/dotnet/corert/pull/8021

4 years agoRevert "allocate SocketAsyncEngine less frequenty to reduce the number of epoll_wait...
Adam Sitnik [Fri, 20 Mar 2020 14:55:04 +0000 (15:55 +0100)]
Revert "allocate SocketAsyncEngine less frequenty to reduce the number of epoll_wait threads (#2346)" (#33855)

This reverts commit 34dbb20d83719e15bc1bd3976c6638bbee901a0b.

4 years agoChange Environment.OSVersion to use RtlGetVersion (#33651)
Stephen Toub [Fri, 20 Mar 2020 14:08:17 +0000 (10:08 -0400)]
Change Environment.OSVersion to use RtlGetVersion (#33651)

4 years agoAnnotate System.Runtime.WindowsRuntime for nullable reference types (#33692)
Stephen Toub [Fri, 20 Mar 2020 13:58:40 +0000 (09:58 -0400)]
Annotate System.Runtime.WindowsRuntime for nullable reference types (#33692)

4 years agorework locking in SslStream to support TLS1.3 (#32925)
Tomas Weinfurt [Fri, 20 Mar 2020 13:31:49 +0000 (06:31 -0700)]
rework locking in SslStream to support TLS1.3 (#32925)

* initial locking

* feedback from review

* update _handshakeWaiter

* feedback from review

* feedback from review

* feedback from review

4 years agoUpdating the Copyright line display when running 'mono --version' (#32910)
monojenkins [Fri, 20 Mar 2020 12:21:41 +0000 (08:21 -0400)]
Updating the Copyright line display when running 'mono --version' (#32910)

Removes the copyright year.

```
$ mono --version
Mono JIT compiler version 6.6.0.166 (2019-08/d9001b5ae70 Wed Feb 12 19:20:16 EST 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS:
SIGSEGV:       altstack
Notification:  kqueue
Architecture:  amd64
Disabled:      none
Misc:          softdebug
Interpreter:   yes
LLVM:          yes(610)
Suspend:       hybrid
GC:            sgen (concurrent by default)
```

Co-authored-by: ivancitin <ivancitin@users.noreply.github.com>
4 years ago[debugger] Fix NOT_IMPLEMENTED while debugging. (#33702)
monojenkins [Fri, 20 Mar 2020 12:21:27 +0000 (08:21 -0400)]
[debugger] Fix NOT_IMPLEMENTED while debugging. (#33702)

- Changed the behavior on debugger-agent, if we can't parse the new behavior is to return invalid_argument and not assert and stop debugging
- Changed the mono_domain_set_fast before return from assembly_commands.
- Add error message when return INVALID_ARGUMENT

Fixes mono/mono#19146

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoRemove dead code from bug-10127.cs. (#31976)
monojenkins [Fri, 20 Mar 2020 12:08:15 +0000 (08:08 -0400)]
Remove dead code from bug-10127.cs. (#31976)

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years ago[FreeBSD] Fix for libinotify support and compile (#33607)
monojenkins [Fri, 20 Mar 2020 12:01:18 +0000 (08:01 -0400)]
[FreeBSD] Fix for libinotify support and compile (#33607)

Resolves mono/mono#18528 in for both detection and compiling. This should backport cleanly to next release.

Tested on 12.1-RELEASE with libinotify; configure detects features correctly, compiles successfully, resolves some observed issues during run.

```
#define HAVE_SYS_INOTIFY_H 1
#define HAVE_LIBINOTIFY 1
#define HAVE_INOTIFY_INIT 1
#define HAVE_INOTIFY_ADD_WATCH 1
#define HAVE_INOTIFY_RM_WATCH 1
#define HAVE_INOTIFY 1
```

Co-authored-by: rootwyrm <rootwyrm@users.noreply.github.com>
4 years agoFix R2RDump generic signature parsing (#33825)
Jan Vorlicek [Fri, 20 Mar 2020 08:43:51 +0000 (09:43 +0100)]
Fix R2RDump generic signature parsing (#33825)

The signature parsing wasn't handling module overrides correctly. For
generic type parameters, the current module needs to be reset to the
outer module.

4 years agoDon't pass the managed array object down when clearing a native array field. (#33830)
Jeremy Koritzinsky [Fri, 20 Mar 2020 05:37:06 +0000 (22:37 -0700)]
Don't pass the managed array object down when clearing a native array field. (#33830)

* Don't pass the managed array object down when clearing a native array field.

* Add test.

4 years agoUse ReadOnlySpan<byte> for defaultDerInit (#33828)
Kevin Jones [Fri, 20 Mar 2020 02:35:42 +0000 (22:35 -0400)]
Use ReadOnlySpan<byte> for defaultDerInit (#33828)

* Use ReadOnlySpan for defaultDerInit.

This removes an array allocation for each type initializer.

* Regenerate files.

4 years agoReactivate JsonSerializer polymorphic tests (#33815)
Layomi Akinrinade [Fri, 20 Mar 2020 02:10:28 +0000 (19:10 -0700)]
Reactivate JsonSerializer polymorphic tests (#33815)

4 years ago[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#33750)
dotnet-maestro[bot] [Fri, 20 Mar 2020 01:04:47 +0000 (21:04 -0400)]
[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#33750)

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20169.1

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

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

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoNew attempt at enabling Windows ARM32 runs (#32819)
Tomáš Rylek [Fri, 20 Mar 2020 00:24:17 +0000 (01:24 +0100)]
New attempt at enabling Windows ARM32 runs (#32819)

4 years agoFix src/libraries to build on clang 10 (#33734)
Omair Majid [Fri, 20 Mar 2020 00:23:36 +0000 (20:23 -0400)]
Fix src/libraries to build on clang 10 (#33734)

Clang 10 enable new warnings, some of which is affecting the
src/libraries code.

Clang 10 has added `-Walloca` to warn about uses of `alloca`. This
commit replaces the only non-compliant use of that with a single fixed
stack-allocated buffer.

Clang 10 has also added `-Wimplicit-int-float-conversion`. This commit
uses explicit casts to double to avoid the warnings.

Fixes #33681

Also contains a small fix for slist.h that was somehow missed in #33096.

After this commit, I can build all of runtime with Clang 10.

4 years ago[mono] Enter GC Unsafe mode in some string allocation functions (#33754)
Aleksey Kliger (λgeek) [Thu, 19 Mar 2020 23:00:09 +0000 (19:00 -0400)]
[mono] Enter GC Unsafe mode in some string allocation functions (#33754)

All these functions are MONO_RT_EXTERNAL_ONLY and they all allocate managed
objects.

Fixes a coop state machine assertion if an embedder calls the function and it needs to take the GC
lock to do a collection.

4 years agoDon't crash with SO for AdvSimd.IsSupported (#33761)
Egor Bogatov [Thu, 19 Mar 2020 22:29:59 +0000 (01:29 +0300)]
Don't crash with SO for AdvSimd.IsSupported (#33761)

4 years agoMake "iOS" not part of "all" to avoid some outerloop assumptions (#33811)
Jo Shields [Thu, 19 Mar 2020 20:39:37 +0000 (16:39 -0400)]
Make "iOS" not part of "all" to avoid some outerloop assumptions (#33811)

4 years agoAdd MemberNotNull/When attributes (#33567)
Julien Couvreur [Thu, 19 Mar 2020 18:31:17 +0000 (11:31 -0700)]
Add MemberNotNull/When attributes (#33567)

* Add MemberNotNull/When attributes

* Apply [CLSCompliant(false)]

* Fix typos and indent

* Move [CLSCompliant(false)] and remove AllowMultiple

* Declare attributes in ref file

* Store parameters into readonly properties

* Don't use deconstruction

* Qualify, move properties, remove this

4 years agoUnify instruction set definition (#33730)
David Wrighton [Thu, 19 Mar 2020 16:29:19 +0000 (09:29 -0700)]
Unify instruction set definition (#33730)

* Unify instruction set definition
- Build simple DSL to describe the instruction set support of the compiler/jit/etc
- Parse DSL and produce data structures useable throughout our compilation environment
- This is in support of adding more granular instruction set support to crossgen2, but this change is pulled out into its own PR to ease reviewing cost
- Make it hard to mess up 64bit instruction set variants by adding helper function to fill them in.
- Add 64 bit variant names to 32bit instruction set enum to remove the need to add a large number of #ifdefs to the jit

4 years agoEnable HTTP/2 client cert authentication in WinHttpHandler (#33158)
Alexander Nikolaev [Thu, 19 Mar 2020 14:37:00 +0000 (15:37 +0100)]
Enable HTTP/2 client cert authentication in WinHttpHandler (#33158)

Pre-release WinHTTP's version supports client cert authentication over HTTP/2, but the feature must be explicitly opted-in. PR sets WINHTTP_OPTION_ENABLE_HTTP2_PLUS_CLIENT_CERT to TRUE before invoking WinHttpConnect if the request's protocol is HTTP/2 and scheme is HTTPS.

This PR also enables all HTTP 1.1 tests for WinHttpHandler on .Net Core and Framework and the most of HTTP/2 tests on .Net Core.

4 years agoExclude packages from checksum generation (#33722)
Matt Mitchell [Thu, 19 Mar 2020 14:30:25 +0000 (07:30 -0700)]
Exclude packages from checksum generation (#33722)

- Remove PreparedArtifacts upload
- Alter the ItemGroup for artifacts that have checksums generated to not include nuget or symbol packages

4 years agoBump global.json dotnet version (#33735)
Egor Bogatov [Thu, 19 Mar 2020 11:00:23 +0000 (14:00 +0300)]
Bump global.json dotnet version (#33735)

4 years ago[runtime] Fix the mapping of 'int' in jit icall signatures, it should be int32 not...
monojenkins [Thu, 19 Mar 2020 10:38:35 +0000 (06:38 -0400)]
[runtime] Fix the mapping of 'int' in jit icall signatures, it should be int32 not native int. (#33711)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMake iOS sample simulator friendly (#33740)
Egor Bogatov [Thu, 19 Mar 2020 10:29:15 +0000 (13:29 +0300)]
Make iOS sample simulator friendly (#33740)

4 years agoIgnore register unwinder callback for empty patch_info data table on Windows. (#33726)
Johan Lorensson [Thu, 19 Mar 2020 10:01:53 +0000 (11:01 +0100)]
Ignore register unwinder callback for empty patch_info data table on Windows. (#33726)

Running System.Runtime.Serialization.Xml test suite triggers calls to
mono_code_manager_reserve with 0 size code block. On Windows, allocating
code regions from code manager will also add callback for code region
into unwinder function table, but since region could be 0 length,
it will be causing a crash in RtlInstallFunctionTableCallback OS call.

Fix hardens code to not try to register callbacks for code regions
of size 0, since that is considered a critical error by Windows OS API.

4 years agoRemove bad calls to ReferenceEquals (#33739)
Jeremy Barton [Thu, 19 Mar 2020 09:47:05 +0000 (02:47 -0700)]
Remove bad calls to ReferenceEquals (#33739)

All of these calls to ReferenceEquals pass a value type, which gets boxed, and
ReferenceEquals returns false.
Further, all of the calls originated in .NET Framework, so the moderately
expensive way of saying "false" has been there for a while.

* Inline the expression to `false`
* Further inline and remove dead blocks or unnecessary ifs.
* Delete any comments explaining the code, since they're not relevant.

4 years ago[interp] Optimize out intptr ctor (#33720)
monojenkins [Thu, 19 Mar 2020 08:37:37 +0000 (04:37 -0400)]
[interp] Optimize out intptr ctor (#33720)

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoMono DISABLE_SIMD define still emits OP codes depending on SIMD support. (#33717)
Johan Lorensson [Thu, 19 Mar 2020 03:31:29 +0000 (04:31 +0100)]
Mono DISABLE_SIMD define still emits OP codes depending on SIMD support. (#33717)

Fix makes sure runtime checks also report that SIMD has been disabled.
Returning FALSE from is_simd_supported will turn of MONO_OPT_SIMD and
disable all SSE/AVX cpu features will prevent code checking cpu
capabilities to emit SIMD instructions.

4 years agoFix warning building Mono using -Wint-conversion. (#33723)
Johan Lorensson [Thu, 19 Mar 2020 03:29:17 +0000 (04:29 +0100)]
Fix warning building Mono using -Wint-conversion. (#33723)

4 years agoFix SIMD case on arm64 linux with zapDisabled. (#33712)
Sergey Andreenko [Thu, 19 Mar 2020 01:57:51 +0000 (18:57 -0700)]
Fix SIMD case on arm64 linux with zapDisabled. (#33712)

4 years ago[Arm64] Implement Store Hardware Intrinsic (#33535)
Egor Chesakov [Thu, 19 Mar 2020 01:31:08 +0000 (18:31 -0700)]
[Arm64] Implement Store Hardware Intrinsic (#33535)

4 years agoMerge pull request #33678 from maryamariyan/fromoldmaster-di-spec
Maryam Ariyan [Thu, 19 Mar 2020 01:25:26 +0000 (18:25 -0700)]
Merge pull request #33678 from maryamariyan/fromoldmaster-di-spec

Brings over history on DI.Specification.Tests from Extensions

4 years agoUpdate System.Drawing to reflect GDI+ changes (#32873)
Frederik Carlier [Thu, 19 Mar 2020 00:44:56 +0000 (01:44 +0100)]
Update System.Drawing to reflect GDI+ changes (#32873)

* Update System.Drawing to reflect GDI+ changes

- Add support ValueTypePointer encoder parameters
- Support ColorSpace, ImageItems and SaveAsCmyk encoders

* Skip test on NetFx

* Add XML documentation

4 years agoAdd pipeline setup for jit experimental feature testing (#33709)
Andy Ayers [Thu, 19 Mar 2020 00:33:32 +0000 (17:33 -0700)]
Add pipeline setup for jit experimental feature testing (#33709)

Create a pipeline to test functionality in the jit that is not (yet) enabled by default:
* object stack allocation
* eh write through
* on stack replacement (+ osr stress)
* guarded devirtualization

Currently just x64, pri1 tests.

4 years agoAdd support for previously missing helper Check_FieldOffset (#33729)
Tomáš Rylek [Wed, 18 Mar 2020 23:59:40 +0000 (00:59 +0100)]
Add support for previously missing helper Check_FieldOffset (#33729)

This failure crashes Crossgen2 build of several framework assemblies
without the large version bubble. I discovered this during my work
on composite build against shared framework where we newly introduce
the notion of two separate large bubbles (app vs. framework).

Thanks

Tomas

4 years agoRemove DI.Specification csproj
Maryam Ariyan [Wed, 18 Mar 2020 22:03:24 +0000 (15:03 -0700)]
Remove DI.Specification csproj

4 years ago[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#33718)
dotnet-maestro[bot] [Wed, 18 Mar 2020 21:47:59 +0000 (17:47 -0400)]
[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest (#33718)

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

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

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

- ILLink.Tasks - 0.1.6-prerelease.20168.1

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

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200317-02

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years ago[interp] Inline also constructors of valuetypes (#33632)
monojenkins [Wed, 18 Mar 2020 21:47:27 +0000 (17:47 -0400)]
[interp] Inline also constructors of valuetypes (#33632)

Speeds up by 3.5x some span operations. We will likely get even more performance improvement there by adding special handling in interpreter for IntPtr.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years ago[interp] Do cfold for a few more unary operators (#33516)
monojenkins [Wed, 18 Mar 2020 21:11:54 +0000 (17:11 -0400)]
[interp] Do cfold for a few more unary operators (#33516)

That are accessing the stack value at level -2.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoFix unexpected exception when enumerating a completely empty drive root (#33684)
Carlos Sanchez Lopez [Wed, 18 Mar 2020 21:09:31 +0000 (14:09 -0700)]
Fix unexpected exception when enumerating a completely empty drive root (#33684)

* Fix unexpected exception when enumerating a completely empty drive root.

* Address PR suggestions:
- Add NTStatus for file not found.
- Use it in the switch case. Since it's a rare case, add it right above 'default'.

* Remove hidden character causing build failure. It showed up after the file's encoding was changed to UTF8.

4 years ago[mono] Add iOS sample (AOT, arm64) (#33633)
Egor Bogatov [Wed, 18 Mar 2020 20:51:47 +0000 (23:51 +0300)]
[mono] Add iOS sample (AOT, arm64) (#33633)

* Add iOS sample

4 years agoUpdate src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification...
Maryam Ariyan [Wed, 18 Mar 2020 20:51:09 +0000 (13:51 -0700)]
Update src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj

Co-Authored-By: Eric StJohn <ericstj@microsoft.com>
4 years agoAnnotate System.Runtime.WindowsRuntime.UI.Xaml for nullable reference types (#33725)
Stephen Toub [Wed, 18 Mar 2020 20:49:18 +0000 (16:49 -0400)]
Annotate System.Runtime.WindowsRuntime.UI.Xaml for nullable reference types (#33725)

4 years agoJIT: propagate block flags during guarded devirt transform (#33724)
Andy Ayers [Wed, 18 Mar 2020 20:32:07 +0000 (13:32 -0700)]
JIT: propagate block flags during guarded devirt transform (#33724)

This transform duplicates code that might contain constructs we track via
block flags, so update the block flags.

4 years agoFix for issue 32731 (#33534)
Fadi Hanna [Wed, 18 Mar 2020 18:03:46 +0000 (11:03 -0700)]
Fix for issue 32731 (#33534)

* Couple of crossgen2 fixes:
1) Fix an issue hitting an assert in the TypeSystem's virtual function resolution
2) Port some inlining rules from crossgen1 - One of them fixes an issue where we would incorrectly inline a virtual method that has a MethodImpl associated with it (test = self_override5)
3) Remove an assert from R2RDump related to the composite work (assert needs to be after loading _readyToRunHeaderRVA, and is actually already at the right place a few lines below)

4 years agoChange Mono runtime to use static linked c-runtime in debug builds. (#33715)
Johan Lorensson [Wed, 18 Mar 2020 17:34:43 +0000 (18:34 +0100)]
Change Mono runtime to use static linked c-runtime in debug builds. (#33715)

4 years agoOne more fix for running / debugging Crossgen2 under dogfooding VS (#33698)
Tomáš Rylek [Wed, 18 Mar 2020 17:13:21 +0000 (18:13 +0100)]
One more fix for running / debugging Crossgen2 under dogfooding VS (#33698)

4 years agoOnly add the llvm elf headers on Windows for dbgutil (#33706)
Juan Hoyos [Wed, 18 Mar 2020 16:08:20 +0000 (09:08 -0700)]
Only add the llvm elf headers on Windows for dbgutil (#33706)

4 years agoSupport Rfc3279 signature format for DSA and EcDSA (#1612)
Krzysztof Wicher [Wed, 18 Mar 2020 15:19:25 +0000 (08:19 -0700)]
Support Rfc3279 signature format for DSA and EcDSA (#1612)

This change adds overloads for SignData and SignHash/ComputeSignature on the DSA and ECDsa classes to make it easier for callers that need to use RFC3279's signature format to work with the classes in .NET.

It also moves more temporary work from temporary buffers to stackallocs.

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
4 years agoCorrect subsetCategory parameter passed to build.cmd on Windows. (#33713)
Johan Lorensson [Wed, 18 Mar 2020 13:35:08 +0000 (14:35 +0100)]
Correct subsetCategory parameter passed to build.cmd on Windows. (#33713)

4 years agoFix additional constants embedded in instruction stream on AMD64. (#33682)
monojenkins [Wed, 18 Mar 2020 12:50:46 +0000 (08:50 -0400)]
Fix additional constants embedded in instruction stream on AMD64. (#33682)

A couple of more op codes embedded constant values in instruction stream. When using MONO_ARCH_CODE_EXEC_ONLY these needs to be moved into GOT slots.

Thanks @buggeststar for bring the issues to our attention.

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
4 years agoRemove useless ip += from MINT_JMP, it is assigned later. (#33548)
monojenkins [Wed, 18 Mar 2020 09:20:07 +0000 (05:20 -0400)]
Remove useless ip += from MINT_JMP, it is assigned later. (#33548)

Co-authored-by: jaykrell <jaykrell@users.noreply.github.com>
4 years agoAdding public API for Pinned Object Heap allocations (#33526)
Vladimir Sadov [Wed, 18 Mar 2020 05:00:41 +0000 (22:00 -0700)]
Adding public API for Pinned Object Heap allocations (#33526)

* Adding API for POH allocations and propagating flags all the way to Alloc.

* make `AllocateUninitializedArray` and `AllocateArray`  public

* Added NYI implementations to Mono

* moved tests to libraries

* Actually use POH and more tests.

* Disable tests for the new API on mono

* mop up remaining TODOs

* Fix build breaking whitespace.

* Mono tabs and mark heavier tests as [Outerloop]

* Mono  space before openning parens and braces

* Refactored AllocateArray

* PR feedback

* XML Doc comments

4 years agoAvoid unnecessary use of Linq (#33700)
Jan Kotas [Wed, 18 Mar 2020 03:22:39 +0000 (20:22 -0700)]
Avoid unnecessary use of Linq (#33700)

4 years agoReverse P/Invoke methods do not support tailcalls. (#33677)
Aaron Robinson [Wed, 18 Mar 2020 01:48:32 +0000 (18:48 -0700)]
Reverse P/Invoke methods do not support tailcalls. (#33677)

* Disable tailcalls in all scenarios involving a Reverse P/Invoke

4 years ago[master] Update dependencies from mono/linker dotnet/arcade (#33646)
dotnet-maestro[bot] [Wed, 18 Mar 2020 01:30:43 +0000 (18:30 -0700)]
[master] Update dependencies from mono/linker dotnet/arcade (#33646)

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

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

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

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

* Fix nullability warnings due to new compiler

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

- ILLink.Tasks - 0.1.6-prerelease.20166.4

* PR Feedback

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

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

* Fix nullability warnings in System.Net.Http

* Use ! instead of pragma warning where we can and fix warning in tests build

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoDisable warnings-as-errors for release branches (#33664)
Jan Kotas [Wed, 18 Mar 2020 00:16:59 +0000 (17:16 -0700)]
Disable warnings-as-errors for release branches (#33664)

Fixes #33627

4 years agoTry UsePythonVersion to work around py2 removal (#33695)
Matt Galbraith [Tue, 17 Mar 2020 23:48:41 +0000 (16:48 -0700)]
Try UsePythonVersion to work around py2 removal (#33695)

* Try UsePythonVersion to work around py2 removal; Additionally, use hosted pools for windows to deal with lack of python on path

* PR feedback (typos)

4 years agoAnnotate System.Threading.Tasks.Dataflow for nullable reference types (#33644)
Stephen Toub [Tue, 17 Mar 2020 23:37:48 +0000 (19:37 -0400)]
Annotate System.Threading.Tasks.Dataflow for nullable reference types (#33644)

4 years agoAdd AzDO builds for iOS (#33424)
Jo Shields [Tue, 17 Mar 2020 23:19:56 +0000 (19:19 -0400)]
Add AzDO builds for iOS (#33424)

This is based on #33292

4 years agoFix native components build for Android (#32800)
Adeel Mujahid [Tue, 17 Mar 2020 23:03:37 +0000 (01:03 +0200)]
Fix native components build for Android (#32800)

* Fix native components build for Android

* Add cmake introspection for pthread_setcancelstate

* Address CR feedback

* Use calculated eth speed for Android

* Use #ifdef FEATURE_EVENT_TRACE

4 years agoUpdate src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification...
Maryam Ariyan [Tue, 17 Mar 2020 23:01:42 +0000 (16:01 -0700)]
Update src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Specification.Tests/Microsoft.Extensions.DependencyInjection.Specification.Tests.csproj

Co-Authored-By: Eric StJohn <ericstj@microsoft.com>
4 years agoAddress follow-up feedback on System.Net.Requests annotations (#33691)
Stephen Toub [Tue, 17 Mar 2020 22:54:08 +0000 (18:54 -0400)]
Address follow-up feedback on System.Net.Requests annotations (#33691)

4 years agoMerge branch 'fromoldmaster-di-spec' of Extensions repo into fromoldmaster-di-spec
Maryam Ariyan [Tue, 17 Mar 2020 22:15:20 +0000 (15:15 -0700)]
Merge branch 'fromoldmaster-di-spec' of Extensions repo into fromoldmaster-di-spec

4 years agoExtensions: Incremental additions (#33563)
Maryam Ariyan [Tue, 17 Mar 2020 21:29:26 +0000 (14:29 -0700)]
Extensions: Incremental additions (#33563)

 ref/src/pkg (have no test projects)

Microsoft.Extensions.Caching.Abstractions
Microsoft.Extensions.Configuration.Abstractions
Microsoft.Extensions.DependencyInjection.Abstractions
Microsoft.Extensions.Hosting.Abstractions
Microsoft.Extensions.Logging.Abstractions
 ref/src/test/pkg

Microsoft.Extensions.Configuration
Microsoft.Extensions.Configuration.Binder
Microsoft.Extensions.Configuration.CommandLine
Microsoft.Extensions.Configuration.EnvironmentVariables
Microsoft.Extensions.Options.ConfigurationExtensions
Microsoft.Extensions.Options.DataAnnotations

4 years agoAdding missing test project config to .sln file (#33679)
Anirudh Agnihotry [Tue, 17 Mar 2020 19:48:23 +0000 (12:48 -0700)]
Adding missing test project config to .sln file (#33679)

4 years agoAnnotate System.Net.WebClient for nullable reference types (#33670)
Stephen Toub [Tue, 17 Mar 2020 19:47:58 +0000 (15:47 -0400)]
Annotate System.Net.WebClient for nullable reference types (#33670)

4 years agoAnnotate System.Net.Requests for nullable reference types (#33630)
Stephen Toub [Tue, 17 Mar 2020 19:45:17 +0000 (15:45 -0400)]
Annotate System.Net.Requests for nullable reference types (#33630)