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

4 years agoFix Reading the Currency Formats (#33599)
Tarek Mahmoud Sayed [Tue, 17 Mar 2020 16:18:35 +0000 (09:18 -0700)]
Fix Reading the Currency Formats (#33599)

* Fix Reading the Currency Formats

* Fix the managed format arrays

* Support formats missing #'s

4 years agoMerge pull request #33602 from vitek-karas/AppHostVersionAlways
Vitek Karas [Tue, 17 Mar 2020 12:41:55 +0000 (05:41 -0700)]
Merge pull request #33602 from vitek-karas/AppHostVersionAlways

Include apphost_version parameter in download URLs for both GUI and CLI apps

4 years agoAnnotate System.Net.WebSockets.Client for nullable reference types (#33625)
Stephen Toub [Tue, 17 Mar 2020 10:33:10 +0000 (06:33 -0400)]
Annotate System.Net.WebSockets.Client for nullable reference types (#33625)

4 years agoRevert "Disable System.Reflection.Emit.Tests in mono (#32201)" (#33641)
Alexis Christoforides [Tue, 17 Mar 2020 10:26:52 +0000 (06:26 -0400)]
Revert "Disable System.Reflection.Emit.Tests in mono (#32201)" (#33641)

This reverts commit 11dcd00c1a77c8da0fe06404609a9c4af9e5da4f.

4 years agoEnable crossgen2smoke test for ARM64 (#33530)
Anton Lapounov [Tue, 17 Mar 2020 09:28:24 +0000 (02:28 -0700)]
Enable crossgen2smoke test for ARM64 (#33530)

* Enable crossgen2smoke test for ARM64.
* Re-enable NullableWithExplicitLayoutTest sub-test.
* Restore setting the image base removed by #31663.

4 years agoGC coverage can now occur in scenarios where a thread doesn't exist. (#33615)
Aaron Robinson [Tue, 17 Mar 2020 05:35:14 +0000 (22:35 -0700)]
GC coverage can now occur in scenarios where a thread doesn't exist. (#33615)

* GC coverage can now occur in scenarios where a thread doesn't exist.
Properly handle this case and assert some invariant.

* Update gccover.cpp

Misspelled function referenced in comment.

* Remove MethodDesc from GC coverage.

* Code review and fix some asserts when running the Debug version of tests.

* Limit JIT flag manipulation to FEATURE_TIERED_COMPILATION

4 years agoUse compilerName and compilerArg in pipeline configs (#33605)
Santiago Fernandez Madero [Tue, 17 Mar 2020 05:34:50 +0000 (22:34 -0700)]
Use compilerName and compilerArg in pipeline configs (#33605)

4 years agoFix Win64 exception propagation in NativeCallable methods (#33653)
Jan Vorlicek [Tue, 17 Mar 2020 05:34:35 +0000 (06:34 +0100)]
Fix Win64 exception propagation in NativeCallable methods (#33653)

A recent change has removed the UMThunkStub usage for native callable
methods. That has broken handling of exceptions propagated from the
managed native callable method into the native caller in case there were
explicit frames below the native frame, like during the GC stress 3.

This change fixes it by unwinding the explicit frames upto the native
frame during the 2nd pass of exception handling when exception unwinding
passes through the frame of a native callable method and isn't handled
there.

4 years agoSimplify Convert (#33659)
Pent Ploompuu [Tue, 17 Mar 2020 05:13:07 +0000 (07:13 +0200)]
Simplify Convert (#33659)

* Simplify Convert

* Optimize Number.UInt32ToDecStr

4 years agoFix usage of JIT_FLAG_CODE_EXEC_ONLY flag. (#33623)
monojenkins [Tue, 17 Mar 2020 04:51:25 +0000 (00:51 -0400)]
Fix usage of JIT_FLAG_CODE_EXEC_ONLY flag. (#33623)

#19219 didn't convert the JIT flags into options on cfg meaning that code currently checked JIT_FLAG_CODE_EXEC_ONLY never executed. Fix handles the new JIT flag in same way as other JIT flags, converted into bit field on cfg.

With this fix, the following C# method:

```
static double Test()
{
    return 1.0f;
}
```

will now generate the following assembly on amd64, when using MONO_ARCH_CODE_EXEC_ONLY:

```
sub rsp,8
mov r11,qword ptr [180003318h]
movsd xmm0,mmword ptr [r11]
add rsp,8
ret
```

Co-authored-by: lateralusX <lateralusX@users.noreply.github.com>
4 years agoDelete IExecutionEngine (#33640)
Jan Kotas [Tue, 17 Mar 2020 04:30:03 +0000 (21:30 -0700)]
Delete IExecutionEngine (#33640)

* Delete IExecutionEngine

* Delete InitUtilcode

* Delete cvtres invocation

* Delete cached m_pClrDebugState and fix contract violations

4 years agoDelete unused and redundant msbuild properties in coreclr build (#33645)
Jan Kotas [Tue, 17 Mar 2020 04:01:45 +0000 (21:01 -0700)]
Delete unused and redundant msbuild properties in coreclr build (#33645)

4 years agoLimit JIT flag manipulation to FEATURE_TIERED_COMPILATION
Aaron Robinson [Tue, 17 Mar 2020 03:22:17 +0000 (20:22 -0700)]
Limit JIT flag manipulation to FEATURE_TIERED_COMPILATION

4 years ago[merp] Add breadcrumb for StackHash (#33635)
monojenkins [Tue, 17 Mar 2020 02:23:38 +0000 (22:23 -0400)]
[merp] Add breadcrumb for StackHash (#33635)

Contributes to 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: alexischr <alexischr@users.noreply.github.com>
4 years agoAnnotate System.Net.Http for nullable (#33268)
buyaa-n [Tue, 17 Mar 2020 01:06:01 +0000 (18:06 -0700)]
Annotate System.Net.Http for nullable (#33268)

* Annotate System.Net.Http for nullable

4 years ago[jit] Transition the SIMD code to use the MONO_CPU_... set of flags instead of the...
monojenkins [Tue, 17 Mar 2020 01:02:22 +0000 (21:02 -0400)]
[jit] Transition the SIMD code to use the MONO_CPU_... set of flags instead of the SIMD_VERSION_... flags. (#33267)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoUpdate area owners: Setup, Infra-installer (#33650)
Davis Goodin [Tue, 17 Mar 2020 00:33:31 +0000 (18:33 -0600)]
Update area owners: Setup, Infra-installer (#33650)

4 years agoImplement simple version of On Stack Replacement (OSR) (#32969)
Andy Ayers [Tue, 17 Mar 2020 00:29:55 +0000 (17:29 -0700)]
Implement simple version of On Stack Replacement (OSR) (#32969)

Add support to runtime and jit to allow switching from unoptimized to
optimized code for a method while the method has active stack frames.

Details in the included document.

4 years agoFix COM + dynamic tests (#33642)
Elinor Fung [Tue, 17 Mar 2020 00:02:38 +0000 (17:02 -0700)]
Fix COM + dynamic tests (#33642)

4 years agoRevert "Add example profiler that does stack sampling with ICorProfilerInfo10::Suspen...
David Mason [Tue, 17 Mar 2020 00:01:08 +0000 (17:01 -0700)]
Revert "Add example profiler that does stack sampling with ICorProfilerInfo10::SuspendRuntime (#32988)" (#33656)

This reverts commit 7a362a03f6e829828b5276ab2bf3f1d3073cc166.

4 years agoCode review and fix some asserts when running the Debug version of tests.
Aaron Robinson [Mon, 16 Mar 2020 23:34:28 +0000 (16:34 -0700)]
Code review and fix some asserts when running the Debug version of tests.

4 years agoFix timespan wrap-around when multiplying back by inverse scale
Thomas Gassmann [Mon, 16 Mar 2020 22:18:55 +0000 (23:18 +0100)]
Fix timespan wrap-around when multiplying back by inverse scale

When creating a `TimeSpan` by either dividing, multiplying or using one of
the `From...` methods, the ticks are multiplied by an inverse scale.
When converting the double-precision value back to a long, this
currently causes incorrect values.

This change makes MaxValue work and to allow it to roundtrip.

4 years agoImplement Vector.Ceiling / Vector.Floor (#31993)
Ganbarukamo41 [Mon, 16 Mar 2020 22:10:27 +0000 (07:10 +0900)]
Implement Vector.Ceiling / Vector.Floor (#31993)

* Add Ceil/Floor to S.P.CoreLib and expose publicly

* Make Ceil/Floor JIT intrinsic

* Add missing identifier for closing endif

* Add JIT test for Ceil/Floor

* Add test for Ceil/Floor in S.Numerics.Vectors
* Also fix the old path for the new structure

* Apply jit-format

* Do not attempt to treat Ceil/Floor if SSE4.1 isn't available

* Mark Vector<T>.Ceiling/Floor as Intrinsic

* Add missing underscore

* Revert "Add missing idenfitier for closing endif"
* Oops

* Add missing breaks
* Oops, again

* Simplify switch case

* Per review suggestion

Co-Authored-By: Egor Chesakov <egor.chesakov@microsoft.com>
Co-authored-by: Egor Chesakov <egor.chesakov@microsoft.com>
4 years ago[CBOR] Implement Map support for CborReader and CborWriter (#33500)
Eirik Tsarpalis [Mon, 16 Mar 2020 22:00:12 +0000 (22:00 +0000)]
[CBOR] Implement Map support for CborReader and CborWriter (#33500)

* Implement map support for CborReader and CborWriter

* fix test naming

* move helper functions to nested type

* check for arithmetic overflow in CborReader.ReadStartMap

* throw FormatExceptions on data items whose definite length exceeds remaining buffer size

4 years agoChanged RuntimeName to the existing RuntimeFlavor property. (#33559)
Nathan Ricci [Mon, 16 Mar 2020 21:07:31 +0000 (17:07 -0400)]
Changed RuntimeName to the existing RuntimeFlavor property. (#33559)

Change RuntimeName to the exiting RuntimeFlavor property.

4 years agoDelete redundant LangVersion properties (#33637)
Jan Kotas [Mon, 16 Mar 2020 20:13:09 +0000 (13:13 -0700)]
Delete redundant LangVersion properties (#33637)

4 years agoUpdate the docs with the change
vitek-karas [Mon, 16 Mar 2020 19:44:45 +0000 (12:44 -0700)]
Update the docs with the change

4 years agoDelete unnecessary ReferenceSystemPrivateCoreLib from CoreCLR tests (#33629)
Jan Kotas [Mon, 16 Mar 2020 18:36:36 +0000 (11:36 -0700)]
Delete unnecessary ReferenceSystemPrivateCoreLib from CoreCLR tests (#33629)

4 years agoReplace manually managed TLS slots with regular thread_local statics (#33597)
Jan Kotas [Mon, 16 Mar 2020 17:54:49 +0000 (10:54 -0700)]
Replace manually managed TLS slots with regular thread_local statics (#33597)

* Delete TlsIdx_XXX

* Delete EnableTerminationOnHeapCorruption

* Delete redundant cant stop tracking

* Workaround compiler bug

4 years ago[Loader] Change mono_trace level from info to debug (#33104)
monojenkins [Mon, 16 Mar 2020 15:51:56 +0000 (11:51 -0400)]
[Loader] Change mono_trace level from info to debug (#33104)

Fixes mono/mono#18795

**Testing:**
Created HelloWorld script
Set environment variable `export MONO_LOG_LEVEL=info`
Compiled and executed script before and after these changes were applied
```
mdhwang:~/Desktop$ ls -al csc_*txt mono_*txt
-rw-r--r--@ 1 mdhwang  staff   4270 Mar  3 10:12 csc_after.txt
-rw-r--r--@ 1 mdhwang  staff  56698 Mar  3 10:14 csc_before.txt
-rw-r--r--@ 1 mdhwang  staff    176 Mar  3 10:12 mono_after.txt
-rw-r--r--@ 1 mdhwang  staff   3617 Mar  3 10:14 mono_before.txt
```
There is a noticeable difference in log output sizes, and the logs created after the changes were applied mainly contain `Loading reference 0 of _ asmctx _` as desired in the issue.

Co-authored-by: mdh1418 <mdh1418@users.noreply.github.com>
4 years ago[master] Update dependencies from 3 repositories (#33588)
dotnet-maestro[bot] [Mon, 16 Mar 2020 15:37:59 +0000 (16:37 +0100)]
[master] Update dependencies from 3 repositories (#33588)

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

- ILLink.Tasks - 0.1.6-prerelease.20163.2

* Update dependencies from https://github.com/microsoft/vstest build 20200313-06

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200313-06

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

- ILLink.Tasks - 0.1.6-prerelease.20166.1

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

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

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

- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20166.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20166.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20166.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20166.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoRemove calls to empty RuntimeHelpers.PrepareConstrainedRegions() (#33191)
Roman Marusyk [Mon, 16 Mar 2020 14:39:37 +0000 (16:39 +0200)]
Remove calls to empty RuntimeHelpers.PrepareConstrainedRegions() (#33191)

Fixes #33179

4 years agoRemove unused variable for System.Net.Requests, as part of #30457 (#33619)
handlespeed [Mon, 16 Mar 2020 11:27:25 +0000 (19:27 +0800)]
Remove unused variable for System.Net.Requests, as part of #30457 (#33619)

src/libraries/System.Net.Requests/src/System/Net/FtpControlStream.cs, remove unused variable 'request' in L414.

Partially Fix #30457

4 years agoAdd example profiler that does stack sampling with ICorProfilerInfo10::SuspendRuntime...
David Mason [Mon, 16 Mar 2020 08:17:58 +0000 (01:17 -0700)]
Add example profiler that does stack sampling with ICorProfilerInfo10::SuspendRuntime (#32988)

4 years agoRemove MethodDesc from GC coverage.
Aaron Robinson [Mon, 16 Mar 2020 04:57:16 +0000 (21:57 -0700)]
Remove MethodDesc from GC coverage.

4 years agoDon't delete private keys detected from SerializedCert imports
Jeremy Barton [Mon, 16 Mar 2020 04:52:33 +0000 (21:52 -0700)]
Don't delete private keys detected from SerializedCert imports

4 years agoUpdate gccover.cpp
Aaron Robinson [Mon, 16 Mar 2020 04:23:49 +0000 (21:23 -0700)]
Update gccover.cpp

Misspelled function referenced in comment.

4 years agoGC coverage can now occur in scenarios where a thread doesn't exist.
Aaron Robinson [Mon, 16 Mar 2020 03:46:49 +0000 (20:46 -0700)]
GC coverage can now occur in scenarios where a thread doesn't exist.
Properly handle this case and assert some invariant.

4 years agoAdditional code coverage in System.Text.Json - no public constructors (#33137)
Alan Isaac [Mon, 16 Mar 2020 03:02:23 +0000 (23:02 -0400)]
Additional code coverage in System.Text.Json - no public constructors (#33137)

* added tests for concurrent collection private constructors

* added tests for non generic collection private constructors

* added tests for generic collection private constructors

* added additional test for read only dictionary private constructor

* fixed location of compile directive

* added assertion for exception messages

* added additional assertions for exception messages

* using [Theory] tests to reduce LoC

* using [Theory] for additional tests

* reordered files in test project

* added internal ctor tests

4 years agoFixing the sourcelink failure for embeded files (#33521)
Anirudh Agnihotry [Sun, 15 Mar 2020 20:19:09 +0000 (13:19 -0700)]
Fixing the sourcelink failure for embeded files (#33521)

* fixing sourcelink

* enable sourcelink on official build

* addressing feedback

* removing extra space

* reverting eng common change

* adding comment

* moving comment to correct place

* not embedding files for test assemblies

4 years agoPrint Ibc messages only when --verbose is specified (#33595)
David Wrighton [Sun, 15 Mar 2020 20:02:00 +0000 (13:02 -0700)]
Print Ibc messages only when --verbose is specified (#33595)

4 years agoUpdate links to the design repo (#33606)
Jan Kotas [Sun, 15 Mar 2020 15:55:32 +0000 (08:55 -0700)]
Update links to the design repo (#33606)

4 years agoUse compilerName and compilerArg in pipeline configs
Adeel [Sun, 15 Mar 2020 09:44:51 +0000 (11:44 +0200)]
Use compilerName and compilerArg in pipeline configs

4 years agoUpdate .NET 5 Unicode data to version 13.0.0 (#33538)
Levi Broderick [Sun, 15 Mar 2020 06:53:43 +0000 (23:53 -0700)]
Update .NET 5 Unicode data to version 13.0.0 (#33538)

4 years ago[mono] Implement all Ssse3 and Sse42 intrinsics (#33591)
Egor Bogatov [Sun, 15 Mar 2020 03:20:36 +0000 (06:20 +0300)]
[mono] Implement all Ssse3 and Sse42 intrinsics (#33591)

* implement Ssse3

* Implement Sse42

* remove unrelated change

* Fix C compilation error

4 years agoAdd missing early-exit for LastIndexOfOrdinal (#33601)
Levi Broderick [Sun, 15 Mar 2020 01:22:22 +0000 (18:22 -0700)]
Add missing early-exit for LastIndexOfOrdinal (#33601)

4 years agoInclude apphost_version parameter in download URLs for both GUI and CLI apps
vitek-karas [Sun, 15 Mar 2020 00:01:19 +0000 (17:01 -0700)]
Include apphost_version parameter in download URLs for both GUI and CLI apps

So far the code only included the `&apphost_version=<version>` URL parameter in the URL used by the error dialog in GUI apps. The error written to stderr/trace would not have that parameter in its URL.

This change include this parameter in all cases. This also means that comhost/ijwhost and so on will also include the `apphost_version` parameter in their error codes and it will be the version of the comhost/ijwhost and so on. This is not 100% correct, but for the purposed of the website this should be enough (for now we don't see a reason to differentiate between the various hosting scenarios).

Adds a new test to cover this case.

4 years ago[wasm] Add a sample for collecting coverage data. (#33584)
monojenkins [Sat, 14 Mar 2020 22:23:10 +0000 (18:23 -0400)]
[wasm] Add a sample for collecting coverage data. (#33584)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoMerge pull request #33578 from vitek-karas/HostDownloadUrls
Vitek Karas [Sat, 14 Mar 2020 21:55:53 +0000 (14:55 -0700)]
Merge pull request #33578 from vitek-karas/HostDownloadUrls

Add a document describing usage of URLs in the hosting layer

4 years agoApply suggestions from code review
Vitek Karas [Sat, 14 Mar 2020 21:55:29 +0000 (14:55 -0700)]
Apply suggestions from code review

Co-Authored-By: Elinor Fung <47805090+elinor-fung@users.noreply.github.com>
4 years agoAllow Utf8String package to work on netstandard 2.0 (#33357)
Eric Erhardt [Sat, 14 Mar 2020 15:43:44 +0000 (10:43 -0500)]
Allow Utf8String package to work on netstandard 2.0 (#33357)

* Update ref assembly for building netstandard2.0.

Includes System.Text.Rune for netstandard2.0, since that is currently only netcoreapp3.0.

* Get Rune working on netstandard2.0

* Get Utf8Span compiling on netstandard2.0.

* Get Utf8String building on netstandard2.0

* Compile Utf8String/Span.Conversion.cs for netstandard.

* Build Utf8String Comparison and Enumeration for netstandard.

* Enable Index and Range on netstandard2.0

* Moving code around so it lines up with the ref assemblies.
Getting the full build working again.

* Build for netcoreapp3.0.
Get the package building.

* Get tests building on netfx

* Get Utf8String constructors working on netstandard.

* Get all tests running on netfx.

* Fix build for netcoreapp3.0, which doesn't have SerializeToStreamAsync with cancellation.

* Add netstandard2.1 support to Utf8String.Experimental.

* Make Intrinsics IsSupported be const fields.

* Address PR feedback

* Ensure nint and nuint are set correctly when building Utf8String outside of CoreLib.

* Fix bug in construction from long UTF16 string.

4 years agoFix indentations of nameof (#33586)
Next Turn [Sat, 14 Mar 2020 11:34:34 +0000 (19:34 +0800)]
Fix indentations of nameof (#33586)

4 years agoUpdate artifactName prefix for GCC publish log task (#33573)
Adeel Mujahid [Sat, 14 Mar 2020 03:49:11 +0000 (05:49 +0200)]
Update artifactName prefix for GCC publish log task (#33573)

4 years ago[master] Update dependencies from dotnet/arcade dotnet/runtime-assets (#33562)
dotnet-maestro[bot] [Sat, 14 Mar 2020 03:46:19 +0000 (20:46 -0700)]
[master] Update dependencies from dotnet/arcade dotnet/runtime-assets (#33562)

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

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

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

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

* Remove APICompat downgrade

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years ago[mono] Implement missing SSE2 intrinsics (#33574)
Egor Bogatov [Sat, 14 Mar 2020 03:35:53 +0000 (06:35 +0300)]
[mono] Implement missing SSE2 intrinsics (#33574)

* Implement missing SSE2 intrinsics

* remove SN_ConvertScalarToVector128Single case

* Remove unrelated change

* Shuffle < Sqrt (binary search)

4 years agoRead the image earlier (#33576)
Andrew Au [Sat, 14 Mar 2020 03:23:53 +0000 (20:23 -0700)]
Read the image earlier (#33576)

4 years agoDisable publishing CoreCLR product binaries on GCC leg (#33580)
Santiago Fernandez Madero [Sat, 14 Mar 2020 02:45:40 +0000 (19:45 -0700)]
Disable publishing CoreCLR product binaries on GCC leg (#33580)