platform/upstream/dotnet/runtime.git
4 years agoRemove netstandard packaging infra (#40239)
Adeel Mujahid [Sun, 2 Aug 2020 17:45:52 +0000 (20:45 +0300)]
Remove netstandard packaging infra (#40239)

4 years agoReenable ExceptionDispatchInfo.SetCurrentStackTrace test on WASM (#40241)
Alexander Köplinger [Sun, 2 Aug 2020 16:13:00 +0000 (18:13 +0200)]
Reenable ExceptionDispatchInfo.SetCurrentStackTrace test on WASM (#40241)

It was fixed by https://github.com/dotnet/runtime/pull/40031.

4 years ago[runtime] Add a configure workaround for apple silicon + older config… (#40184)
monojenkins [Sun, 2 Aug 2020 13:43:05 +0000 (09:43 -0400)]
[runtime] Add a configure workaround for apple silicon + older config… (#40184)

….guess versions.

<!--
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: vargaz <vargaz@users.noreply.github.com>
4 years agoFix typo in comment in StringBuilderCache.cs (#40238)
Joni [Sun, 2 Aug 2020 13:09:35 +0000 (22:09 +0900)]
Fix typo in comment in StringBuilderCache.cs (#40238)

4 years ago[browser] Remove ActiveIssue from BinaryPrimitives_StaticWithSpanArgument (#40235)
Larry Ewing [Sun, 2 Aug 2020 08:07:16 +0000 (03:07 -0500)]
[browser] Remove ActiveIssue from BinaryPrimitives_StaticWithSpanArgument (#40235)

4 years agoFix for unsafe CSE of Structs (#40164)
Brian Sullivan [Sat, 1 Aug 2020 19:58:08 +0000 (12:58 -0700)]
Fix for unsafe CSE of Structs (#40164)

* Fix for unsafe CSE of Structs
- Assign a unique value number when reading a struct field as we don't know the size of the read
- Modify the Jit Dump for CSE
- No Asm diffs in the Frameworks
- Added new test Runtime_38920.cs

* Change tabs to spaces

4 years agoRemove Format wrappers around interpolated strings (#40231)
Adeel Mujahid [Sat, 1 Aug 2020 14:59:07 +0000 (17:59 +0300)]
Remove Format wrappers around interpolated strings (#40231)

4 years agoIncrease Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemo...
Alexander Nikolaev [Sat, 1 Aug 2020 09:55:37 +0000 (11:55 +0200)]
Increase Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated test timeouts (#40209)

4 years agoMake dotnet-Microsoft.XmlSerializer.Generator run on latest framework (#40216)
Eric StJohn [Sat, 1 Aug 2020 07:42:56 +0000 (00:42 -0700)]
Make dotnet-Microsoft.XmlSerializer.Generator run on latest framework (#40216)

4 years agoRemove unused bindings (#40229)
Larry Ewing [Sat, 1 Aug 2020 04:11:22 +0000 (23:11 -0500)]
Remove unused bindings (#40229)

4 years ago[master] Update dependencies from Microsoft/vstest dotnet/xharness (#40198)
dotnet-maestro[bot] [Sat, 1 Aug 2020 03:48:35 +0000 (20:48 -0700)]
[master] Update dependencies from Microsoft/vstest dotnet/xharness (#40198)

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

Microsoft.NET.Test.Sdk
 From Version 16.8.0-preview-20200730-02 -> To Version 16.8.0-preview-20200730-03

* Update dependencies from https://github.com/dotnet/xharness build 20200730.2

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20380.1 -> To Version 1.0.0-prerelease.20380.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoContract violation in generating exception is benign, it can be ignored (#40220)
David Wrighton [Sat, 1 Aug 2020 03:47:39 +0000 (20:47 -0700)]
Contract violation in generating exception is benign, it can be ignored (#40220)

4 years agoAvoid lock contention in MemberInfoCache (#40116)
Levi Broderick [Sat, 1 Aug 2020 03:00:08 +0000 (20:00 -0700)]
Avoid lock contention in MemberInfoCache (#40116)

4 years agoDisable GCStress for profiler tests (#40171)
David Mason [Fri, 31 Jul 2020 23:48:38 +0000 (16:48 -0700)]
Disable GCStress for profiler tests (#40171)

4 years agoUpdate area-owners.md (#40200)
Marek Safar [Fri, 31 Jul 2020 23:39:53 +0000 (01:39 +0200)]
Update area-owners.md (#40200)

4 years agoEnsure we can evolve IO.Pipelines package (#40212)
Eric StJohn [Fri, 31 Jul 2020 23:35:04 +0000 (16:35 -0700)]
Ensure we can evolve IO.Pipelines package (#40212)

4 years agoUnregister callback when setting a provider for deferred delete (#40191)
David Mason [Fri, 31 Jul 2020 22:33:24 +0000 (15:33 -0700)]
Unregister callback when setting a provider for deferred delete (#40191)

4 years agoHandle success case for overlapped IO in Windows Diagnostics IPC PAL (#39807)
John Salem [Fri, 31 Jul 2020 22:24:40 +0000 (15:24 -0700)]
Handle success case for overlapped IO in Windows Diagnostics IPC PAL (#39807)

Prevents unintialized memory from making its way into the call to WaitForMultipleObjects.  That memory could contain a valid handle value and cause WFMO to hang since it isn't waiting on the correct handles.

4 years agoClarify string source comments (#40210)
Levi Broderick [Fri, 31 Jul 2020 20:31:42 +0000 (13:31 -0700)]
Clarify string source comments (#40210)

4 years agoAdding sequential read as the file option in ReadAllBytes (#40213)
Matt Smith [Fri, 31 Jul 2020 20:16:46 +0000 (13:16 -0700)]
Adding sequential read as the file option in ReadAllBytes (#40213)

4 years agoFix nullability warning in ApkBuilder.cs with newer Roslyn (#40155)
Alexander Köplinger [Fri, 31 Jul 2020 18:23:45 +0000 (20:23 +0200)]
Fix nullability warning in ApkBuilder.cs with newer Roslyn (#40155)

4 years ago[wasm] Enable stack tests that now work on browser-wasm (#40206)
Larry Ewing [Fri, 31 Jul 2020 18:18:32 +0000 (13:18 -0500)]
[wasm] Enable stack tests that now work on browser-wasm (#40206)

* Enable stack tests that now work on browser-wasm

4 years agoImprove runtime error logging (#40176)
Larry Ewing [Fri, 31 Jul 2020 17:06:08 +0000 (12:06 -0500)]
Improve runtime error logging (#40176)

4 years agoMove GetCurrentProcessId interop for Browser to managed (#39367)
Marek Safar [Fri, 31 Jul 2020 15:53:30 +0000 (17:53 +0200)]
Move GetCurrentProcessId interop for Browser to managed (#39367)

* Move GetCurrentProcessId for Browser to managed

It returns constant all the time

* Remove redundant indirection

* Fix EventSource build break

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4 years agoDelete unused PInvokeInline config value (#40199)
Jan Kotas [Fri, 31 Jul 2020 15:50:06 +0000 (08:50 -0700)]
Delete unused PInvokeInline config value (#40199)

Fixes #40192

4 years ago Rename pInitRegModified ->pInitRegZeroed , fix a condition that decides if initReg...
Kunal Pathak [Fri, 31 Jul 2020 14:17:17 +0000 (07:17 -0700)]
 Rename pInitRegModified ->pInitRegZeroed , fix a condition that decides if initReg should be zero-initialized (#40148)

* Revert "Renamed pInitRegZeroed to pInitRegModified, initRegZeroed to initRegM… (#36321)"

This reverts commit e5516bb2b188e56b47a758c9cbf0a7f1adf90dd0.

* Fix the condition that determines if initReg was used during function prolog generation

Also update the comments to make the use of initRegZeroed clear.

* Reworded some comments related to pInitRegZeroed

* Review comments

* reword a comment

4 years agoBring back Microsoft.Bcl.AsyncInterfaces (#40189)
Eric StJohn [Fri, 31 Jul 2020 14:00:17 +0000 (07:00 -0700)]
Bring back Microsoft.Bcl.AsyncInterfaces (#40189)

* Bring back Microsoft.Bcl.AsyncInterfaces

This is needed in order to build a version of this assembly that uses
the latest version of its dependency System.Threading.Tasks.Extensions

Without this, we'd reference in inconsistent set of versions for S.T.T.E
in libraries that use both AsyncInterfaces and S.T.T.E.

* Update src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj

* Update src/libraries/Microsoft.Bcl.AsyncInterfaces/ref/Microsoft.Bcl.AsyncInterfaces.csproj

* Update src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

* Update src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

* Update src/libraries/System.Text.Json/src/System.Text.Json.csproj

* Update src/libraries/Microsoft.Extensions.Logging/src/Microsoft.Extensions.Logging.csproj

* Update src/libraries/Microsoft.Extensions.Logging.EventSource/src/Microsoft.Extensions.Logging.EventSource.csproj

* Update src/libraries/Microsoft.Extensions.Logging.Console/src/Microsoft.Extensions.Logging.Console.csproj

* Update src/libraries/Microsoft.Extensions.Hosting/src/Microsoft.Extensions.Hosting.csproj

* Update src/libraries/Microsoft.Extensions.Hosting.Abstractions/src/Microsoft.Extensions.Hosting.Abstractions.csproj

* Update src/libraries/Microsoft.Extensions.DependencyInjection/src/Microsoft.Extensions.DependencyInjection.csproj

* Update src/libraries/Microsoft.Bcl.AsyncInterfaces/tests/Microsoft.Bcl.AsyncInterfaces.Tests.csproj

* Update src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
4 years agoFix __asm__ specifications for Clang (#40175)
monojenkins [Fri, 31 Jul 2020 13:24:48 +0000 (09:24 -0400)]
Fix __asm__ specifications for Clang (#40175)

This patch set will enable a clean build of mono for s390x using clang. The register specifications require the use of a prefix ('r' - general registers 'f' - floating point 'a' - access) rather than just a number. This has been fixed in the most recent level of clang. The current compilers (gcc and clang) are also better at optimizing string operations so the compiler option ```-D__USE_STRING_INLINES``` is also no longer required.

Co-authored-by: nealef <nealef@users.noreply.github.com>
4 years agoDisable MSB3270 warning when referencing CoreLib (#40158)
Viktor Hofer [Fri, 31 Jul 2020 11:36:05 +0000 (13:36 +0200)]
Disable MSB3270 warning when referencing CoreLib (#40158)

We intentionally reference CoreLib (platform specific) from our platform neutral (=AnyCPU) assemblies, ie System.Runtime. Disabling the warning that is shown in VS.

4 years ago[wasm] Re-enable some System.Linq.Expressions tests (#40130)
Maxim Lipnin [Fri, 31 Jul 2020 08:38:40 +0000 (11:38 +0300)]
[wasm] Re-enable some System.Linq.Expressions tests (#40130)

4 years agoCorrectly handle gc desc for explicit layout type which inherits from another type...
David Wrighton [Fri, 31 Jul 2020 04:37:23 +0000 (21:37 -0700)]
Correctly handle gc desc for explicit layout type which inherits from another type (#40160)

- Fix memory corruption issue when an explicit layout class derived from a class with a gc pointer in it

4 years agoUse IsCopyConstructed modreq consistently in test (#40168)
David Wrighton [Fri, 31 Jul 2020 04:03:39 +0000 (21:03 -0700)]
Use IsCopyConstructed modreq consistently in test (#40168)

- X86 calling convention for copy constructed arguments is special, therefore the delegate must have the IsCopyConstructed modreq as well as the callsite

4 years agoRe-work fix for flow graph update. (#40162)
Eugene Rozenfeld [Fri, 31 Jul 2020 00:19:59 +0000 (17:19 -0700)]
Re-work fix for flow graph update. (#40162)

In #39878 I switched fgUpdateChangedFlowGraph to call fgComputeReachability,
which both removes unreachable blocks and calls fgComputeDoms. As mentioned
in that PR, in addition to removing unreachable blocks fgRemoveUnreachableBlocks
updates `BBF_LOOP_HEAD` flags even if no unreachable blocks were found. That resulted
in some diffs, both positive and negative, from downstream effects: e.g., in some cases
we now recognize more loops, which changes weights, etc.

Some of the negative diffs affected benchmarks we are tracking, e.g., in #40094
`System.Text.RegularExpressions.Tests.Perf_Regex_Common` had a 10% regression
because of codegen diffs in the large dynamic method created when compiling regular expressions.

Because of these regressions, I decided to go with a more surgical fix for the original issue (assert when
computing dominators after inlining GC polls). The downstream phases don't really need the dominator
info so I changed fgUpdateChangedFlowGraph to not re-compute dominators after GC poll inlining.

This reverses all diffs from #39878 and fixes #40094.

4 years agoDisable copy ctor test on Mono (#40161)
David Wrighton [Fri, 31 Jul 2020 00:13:37 +0000 (17:13 -0700)]
Disable copy ctor test on Mono (#40161)

The underlying feature here was designed only for IJW, which isn't supported by mono

4 years ago[RISCV] Build fixes and simple exception handling (#40142)
monojenkins [Thu, 30 Jul 2020 23:21:34 +0000 (19:21 -0400)]
[RISCV] Build fixes and simple exception handling (#40142)

Hello Mono friends,

here are some build fixes to make the RISC-V port compile again. Also I added some minimal exception handling stuff to make most of the mini regression test suites passing in the interpreter:
```console
$ for i in mono/mini/{basic.exe,basic-float.exe,basic-long.exe,basic-calls.exe,objects.exe,arrays.exe,exceptions.exe,iltests.exe,devirtualization.exe,generics.exe,basic-vectors.exe,ratests.exe}; do \
  MONO_PATH=../managed-libs/./mcs/class/lib/net_4_x-linux/ \
  qemu-riscv64 ./mono/mini/mono-sgen --config data/config --regression --interp $i;
done
```
output here: https://gist.github.com/lewurm/d7e54b47930126e6bae77b9a4eee1d40

While this is cool, keep in mind this only works because `--regression` doesn't pull in any native transitions. For this we essentially need a working JIT and implement some trampolines. Alas I ran out of time for my hackweek project to get it in any useful state, so I didn't include it in this PR. My WIP branch is here: https://github.com/lewurm/mono/commits/riscv-wip

I also ran into an annoying qemu bug which I reported here: https://github.com/riscv/riscv-binutils-gdb/issues/223 / https://bugs.launchpad.net/qemu/+bug/1889411 Hopefully this will be fixed before I touch it next time and/or I have real hardware at this point 😄

/cc @alexrp

Co-authored-by: lewurm <lewurm@users.noreply.github.com>
4 years agoReport POH objects in RootReferences and ObjectReferences (#39992)
David Mason [Thu, 30 Jul 2020 23:20:24 +0000 (16:20 -0700)]
Report POH objects in RootReferences and ObjectReferences (#39992)

4 years agoDo not check static methods for variance safety rules (#40152)
David Wrighton [Thu, 30 Jul 2020 22:34:25 +0000 (15:34 -0700)]
Do not check static methods for variance safety rules (#40152)

- There are no variance restrictions on the method signature of static members

This change brings the coreclr runtime into compliance with section 9.7 of Partition II of the ECMA 335 spec.

4 years agoCorrecting Mismatch between ref and src (#39741)
Anirudh Agnihotry [Thu, 30 Jul 2020 21:52:46 +0000 (14:52 -0700)]
Correcting Mismatch between ref and src (#39741)

* minor formatting

* ref changes

4 years agoVerify JsonSerializer support for init-only properties (#40150)
Layomi Akinrinade [Thu, 30 Jul 2020 21:52:15 +0000 (14:52 -0700)]
Verify JsonSerializer support for init-only properties (#40150)

4 years agoExclude EUid and EGid for Browser build as they are not supported (#39483)
Marek Safar [Thu, 30 Jul 2020 21:09:44 +0000 (23:09 +0200)]
Exclude EUid and EGid for Browser build as they are not supported (#39483)

4 years ago[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest dotnet...
dotnet-maestro[bot] [Thu, 30 Jul 2020 20:55:35 +0000 (13:55 -0700)]
[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest dotnet/runtime-assets dotnet/xharness (#40085)

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat
 From Version 5.0.0-beta.20364.3 -> To Version 5.0.0-beta.20374.1

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

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20374.1 -> To Version 5.0.0-preview.3.20378.1

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

Microsoft.NET.Test.Sdk
 From Version 16.8.0-preview-20200720-01 -> To Version 16.8.0-preview-20200730-02

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

System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
 From Version 5.0.0-beta.20364.1 -> To Version 5.0.0-beta.20377.1

* Update dependencies from https://github.com/dotnet/xharness build 20200730.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.20352.3 -> To Version 1.0.0-prerelease.20380.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoAdd nullability annotations to XPath*files in Xml/Cache (#40114)
David Cantu [Thu, 30 Jul 2020 20:12:54 +0000 (13:12 -0700)]
Add nullability annotations to XPath*files in Xml/Cache (#40114)

* Add nullability annotations to XPath* files in Xml/Cache

* Move missplaced assertion on CachedTextNode

* Add product fixes suggested on PR feedback

4 years agoGenerate deterministic timestamp (#40122)
David Wrighton [Thu, 30 Jul 2020 19:31:32 +0000 (12:31 -0700)]
Generate deterministic timestamp (#40122)

- Port the logic from the Roslyn compiler that handles deterministic timestamp generation
- Enable for composite images

This allows matching up generated pdb files with the composite image to work correctly in all known cases.

4 years agoCopy ctor handling for crossgen2 (#40113)
David Wrighton [Thu, 30 Jul 2020 19:04:45 +0000 (12:04 -0700)]
Copy ctor handling for crossgen2 (#40113)

- Add IL based test for copy ctor to allow testing in Crossgen2 which doesn't yet support IJW
- Add api to determine proper EmbeddedSignatureData index for these
  - And tests to ensure this remains functional
- Marshaller changes to recognize copy constructor cases
  - Note that there isn't actual marshaller support. Instead the compiler can now able to detect when copy ctors should be used, and falls back to the runtime interop layer

4 years agoBulk-suppress linker warnings during library builds (#40106)
Layomi Akinrinade [Thu, 30 Jul 2020 18:42:48 +0000 (11:42 -0700)]
Bulk-suppress linker warnings during library builds (#40106)

* Enable verbose linker output and bulk-suppress warnings

* Suppress ILLinker warnings for now, so ILLinker can enable warnings by default

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
4 years ago[browser][tests] Deactivate marshal tests as they are flaky right now. (#40139)
Kenneth Pouncey [Thu, 30 Jul 2020 18:21:31 +0000 (20:21 +0200)]
[browser][tests] Deactivate marshal tests as they are flaky right now. (#40139)

* [browser][tests] Deactivate marshal tests as they are flaky right now.

* Use active issue instead

4 years agoFor arm32, kill REG_PROFILER_RET_SCRATCH for LSRA but not for GC (#40123)
Andy Ayers [Thu, 30 Jul 2020 18:05:17 +0000 (11:05 -0700)]
For arm32, kill REG_PROFILER_RET_SCRATCH for LSRA but not for GC (#40123)

Reworking of #37969. Block LSRA from using R2 around the profiler leave
callback, but don't kill GC refs in R2, since late codegen will use
R2 to temporarily hold return values around the callback.

Fixes #37223.

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
4 years agoFix ILLink.Substitutions.xml Warnings during Blazor build (#40051)
Eric Erhardt [Thu, 30 Jul 2020 17:35:09 +0000 (12:35 -0500)]
Fix ILLink.Substitutions.xml Warnings during Blazor build (#40051)

* Fix ILLink warning for System.Runtime.Serialization.Formatters

LocalAppContextSwitches is getting trimmed from the Browser specific assembly since it is unused. However, we still have an ILLink.Substitutions.xml file referencing it, causing the warning.

The fix is to only include the ILLink.Substitutions.xml file for the non-Browser build.

* Fix ILLink warning in System.Runtime.InteropServices.JavaScript

When building for Browser, the Runtime.InteropServices.JavaScript assembly doesn't use the System.SR type which causes the ILLinker to trim it during the dotnet/runtme build. But since System.SR is used for the AnyOS build we are generating an ILLink.Substitutions.xml file telling the linker to remove the System.SR type. This causes a warning during the Blazor app build because the Type doesn't exist in the assembly, but the XML file references it.

The fix is to not create an System.SR Type, nor embed the resources file, for the Browser build. This will need to be undone once a string is used in the Browser build.

4 years agoConsider that retbuf arg can point to GC heap in fgCreateCallDispatcherAndGetResult...
Egor Chesakov [Thu, 30 Jul 2020 17:05:43 +0000 (10:05 -0700)]
Consider that retbuf arg can point to GC heap in fgCreateCallDispatcherAndGetResult() (#39815)

Caller return buffer argument can point to GC heap while DispatchTailCalls expects the return value argument to point to the stack. We should use a temporary stack allocated return buffer to hold the value during the dispatcher call and copy the value back to the caller return buffer after that.

4 years agoSync shared file (#40141)
Michal Strehovský [Thu, 30 Jul 2020 16:08:50 +0000 (18:08 +0200)]
Sync shared file (#40141)

4 years ago[wasm] Address TODO in pal_runtimeinformation.c (#40133)
Alexander Köplinger [Thu, 30 Jul 2020 16:04:37 +0000 (18:04 +0200)]
[wasm] Address TODO in pal_runtimeinformation.c (#40133)

The WASM architecture wasn't added there since we already hardcode the architecture to wasm in the managed layer.
For consistency we should still define it in the PAL though and address the TODO comment.

Also added a test that verifies we indeed get the correct wasm architecture on the Browser platform.

4 years agoRemove AspNetCore Testing Infra that isn't used (#40091)
Viktor Hofer [Thu, 30 Jul 2020 16:02:54 +0000 (18:02 +0200)]
Remove AspNetCore Testing Infra that isn't used (#40091)

4 years agoAdd first fsharp test (#39871)
Jarret Shook [Thu, 30 Jul 2020 15:27:26 +0000 (08:27 -0700)]
Add first fsharp test (#39871)

* Add our first fsharp test

This will test some newly supported codepaths in .Net 5.0

* Working test

* Small change

* Addressed feedback and resolve fsharp dependencies

* Add a separate dependency to be restored and copied

* Fix typo

4 years agoTelemetry doesn't log datagrams failed in send/receive (#40083)
Alexander Nikolaev [Thu, 30 Jul 2020 14:43:23 +0000 (16:43 +0200)]
Telemetry doesn't log datagrams failed in send/receive (#40083)

4 years ago[jit] Avoid calling mono_marshal_get_native_wrapper () too early, it needs to be...
monojenkins [Thu, 30 Jul 2020 14:05:02 +0000 (10:05 -0400)]
[jit] Avoid calling mono_marshal_get_native_wrapper () too early, it needs to be called when the pinvoke method is first called. (#40063)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoUpdate docs for packaging and other nits (#40134)
Viktor Hofer [Thu, 30 Jul 2020 13:29:30 +0000 (15:29 +0200)]
Update docs for packaging and other nits (#40134)

* Update docs for packaging and other nits

4 years agoImplement Header encoding selectors on SocketsHttpHandler (#39468)
Miha Zupan [Thu, 30 Jul 2020 08:36:38 +0000 (10:36 +0200)]
Implement Header encoding selectors on SocketsHttpHandler (#39468)

* Expose HeaderEncodingSelectors on SocketsHttpHandler

* Implement header encoding selectors in SocketsHttpHandler

* Add header encoding tests

* Add summaries for new APIs

* Use Stream.Write(byte[], int, int) overloads for framework compat

* Add dummy API implementation to browser target

* HPack/QPack fixes

* Move HeaderEncodingSelector delegate to namespace, add TContext

* Encoding fixes

* Remove unused using

* Simplify test

* HttpConnection PR feedback

* Simplify fast-path detection

4 years agoSupport dotnet pack on libs src project (#40107)
Viktor Hofer [Thu, 30 Jul 2020 07:58:05 +0000 (09:58 +0200)]
Support dotnet pack on libs src project (#40107)

* Support dotnet pack on libs src project

* Update eng/packaging.targets

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoMinor fix in library build instruction (#40109)
Anton Firszov [Thu, 30 Jul 2020 07:42:08 +0000 (09:42 +0200)]
Minor fix in library build instruction (#40109)

4 years agoFix dummy OBJ/BLK/IND nodes. (#39824)
Sergey Andreenko [Thu, 30 Jul 2020 02:33:37 +0000 (19:33 -0700)]
Fix dummy OBJ/BLK/IND nodes. (#39824)

* Add a repro.

* Add a helper function `fgTryRemoveNonLocal`.

* Fix the issue.

* extract `gtChangeOperToNullCheck`.

* update comments.

4 years agoRemove dead resource strings from Microsoft.VisualBasic.Core (#40053)
Roman Marusyk [Thu, 30 Jul 2020 00:32:51 +0000 (03:32 +0300)]
Remove dead resource strings from Microsoft.VisualBasic.Core (#40053)

4 years agoRe-enable ThreadStartBool_1 test for crossgen2 compilation (#40098)
David Wrighton [Thu, 30 Jul 2020 00:01:44 +0000 (17:01 -0700)]
Re-enable ThreadStartBool_1 test for crossgen2 compilation (#40098)

4 years agoAdd BinaryFormatter auditing EventSource (#39874)
Levi Broderick [Wed, 29 Jul 2020 22:33:18 +0000 (15:33 -0700)]
Add BinaryFormatter auditing EventSource (#39874)

4 years agoAdd profiler ELT test (#39550)
David Mason [Wed, 29 Jul 2020 21:53:07 +0000 (14:53 -0700)]
Add profiler ELT test (#39550)

Fix the following issues:

    On amd64 linux we didn't save and restore the xmm registers, and didn't handle enregistered 16 bytes structs as return values
    On arm we didn't save and restore the floating point registers (I made the linux arm helpers match the windows arm helpers)
    On arm64 we didn't handle 16 byte enregistered structs as return values

And add tests

4 years agoFix CoreLib build when building libraries solutions (#40097)
Viktor Hofer [Wed, 29 Jul 2020 21:39:02 +0000 (23:39 +0200)]
Fix CoreLib build when building libraries solutions (#40097)

If a project that is part of solution has a ProjectReference to CoreLib, the Platform property was set to AnyCPU and CoreLib was built with the wrong Platform/Platform_Target.

4 years agoAdd env var to control createdump on MacOS (#39982)
Mike McLaughlin [Wed, 29 Jul 2020 20:56:45 +0000 (13:56 -0700)]
Add env var to control createdump on MacOS (#39982)

Add env var to control createdump on MacOS

The COMPlus_DbgEnableElfDumpOnMacOS needs to be set to 1 along with all the other standard createdump env vars for dumps to be enabled on MacOS.

This is because ELF coredumps are generated on MacOS and we want customers to be very explicit and aware of what the are getting.

Change test harness to use the new env var

Createdump documentation update

4 years agoTolerate pathological growth of optCSEHash (#40056)
David Wrighton [Wed, 29 Jul 2020 20:26:34 +0000 (13:26 -0700)]
Tolerate pathological growth of optCSEHash (#40056)

The optCSEhash can grow an unbounded amount if the function has numerous trees which are put into the optCSEhash as possible CSE candidates, but fewer than MAX_CSE_CNT are found, then the compiler will spend excessive amounts of time looking up entries in the optCSEhash.

This fix addresses the issue by making the optCSEhash able to grow its count of buckets.

4 years agoTweak ObjectStackAllocationTests so that they work correctly under crossgen2 (#40096)
David Wrighton [Wed, 29 Jul 2020 20:25:00 +0000 (13:25 -0700)]
Tweak ObjectStackAllocationTests so that they work correctly under crossgen2 (#40096)

- Add a mechanism for passing arbitrary arguments to the crossgen2 process while running crossgen2 tests
- Pass the `--codegenopt JitObjectStackAllocation=1` when compiling this test with Crossgen2. This will result in enabling the object stack allocation feature during compilation
- As Crossgen2 currently disregards the debuggable attribute when deciding codegen mode, detect the presence running crossgen2 and expect allocation to occur on the stack even if S.P.C is debuggable

4 years agoFix unwind info decoding (#40030)
Andrew Au [Wed, 29 Jul 2020 19:21:11 +0000 (12:21 -0700)]
Fix unwind info decoding (#40030)

4 years agoFix TestUtilities IsTestProject being set to true inside VS (#40089)
Viktor Hofer [Wed, 29 Jul 2020 19:12:17 +0000 (21:12 +0200)]
Fix TestUtilities IsTestProject being set to true inside VS (#40089)

4 years agoAdd config var to allow disabling automatic CPU group assignment for threads (#38568)
Koundinya Veluri [Wed, 29 Jul 2020 18:50:59 +0000 (14:50 -0400)]
Add config var to allow disabling automatic CPU group assignment for threads (#38568)

- When CPU groups are enabled through config, some new threads (Thread.Start, thread pool threads) are automatically assigned to a CPU group, starting with the process' CPU group and once it is filled up, assigning new threads to a different CPU group. An app may have native components that also use threads, and may want to do its own thread-spreading (for instance in DllMain), this config allows such apps to disable the automatic CPU group assignment which would otherwise override an assignment made in DllMain. The new config var does not affect GC threads.
- This was requested for .NET Framework, porting to .NET Core as well

4 years agoNarrow four utf16 chars to ascii and write to buffer (#39508)
Prashanth Govindarajan [Wed, 29 Jul 2020 18:02:03 +0000 (11:02 -0700)]
Narrow four utf16 chars to ascii and write to buffer (#39508)

* Shims

* shim

* Cherry-pick

* NarrowFourUtf16CharsToAsciiAndWriteToBuffer

* Address comments

* Nit

4 years agoRe-enable test as issue was fixed (#40026)
David Wrighton [Wed, 29 Jul 2020 17:57:58 +0000 (10:57 -0700)]
Re-enable test as issue was fixed (#40026)

4 years agoAdd more configurations to runtimeconfig.json (#40036)
Andrew Au [Wed, 29 Jul 2020 17:44:43 +0000 (10:44 -0700)]
Add more configurations to runtimeconfig.json (#40036)

4 years agoCrossgen2 composite GC stress pipeline (#39949)
Tomáš Rylek [Wed, 29 Jul 2020 17:37:59 +0000 (19:37 +0200)]
Crossgen2 composite GC stress pipeline (#39949)

4 years agoSplit Perf Helix Workitem (#39859)
Olivia Chen [Wed, 29 Jul 2020 16:50:54 +0000 (09:50 -0700)]
Split Perf  Helix Workitem (#39859)

* wip

* split perf jobs into test categories

* add test category to run-performance-job.yml

* correct space

* add space to parameter var

* add $

* fix yaml

* revert extraparameters

* replace crossgen runkind

* change micro_mono tag

* remove space

4 years agoJIT: ensure fgFirstBB has appropriate flags (#40038)
Andy Ayers [Wed, 29 Jul 2020 16:07:23 +0000 (09:07 -0700)]
JIT: ensure fgFirstBB has appropriate flags (#40038)

This fixes an issue where release jits might sometimes generate bad GC info.
Keeping it minimal for now so we can consider servicing preview 8.

See #39023 for details.

4 years ago[wasm] Remove unused icalls for Environment properties (#40079)
Alexander Köplinger [Wed, 29 Jul 2020 14:44:16 +0000 (16:44 +0200)]
[wasm] Remove unused icalls for Environment properties (#40079)

They are no longer needed after https://github.com/dotnet/runtime/pull/38996 since we return values in managed code now.

4 years agoBindAsync -> ListenAsync (#40068)
Geoff Kizer [Wed, 29 Jul 2020 11:31:25 +0000 (04:31 -0700)]
BindAsync -> ListenAsync (#40068)

BindAsync -> ListenAsync

4 years agoDo not test sockets handler fix on WinHttpHandler. (#40070)
Marie Píchová [Wed, 29 Jul 2020 10:41:42 +0000 (12:41 +0200)]
Do not test sockets handler fix on WinHttpHandler. (#40070)

4 years agoWASM: Enable GetAssemblyNameTest_ValidAssembly and add hook to include custom files...
Santiago Fernandez Madero [Wed, 29 Jul 2020 09:55:56 +0000 (02:55 -0700)]
WASM: Enable GetAssemblyNameTest_ValidAssembly and add hook to include custom files into vfs (#40032)

4 years agoRedirect DllImport of hostpolicy to the main executable when it's embedded (#40014)
Vitek Karas [Wed, 29 Jul 2020 09:47:49 +0000 (02:47 -0700)]
Redirect DllImport of hostpolicy to the main executable when it's embedded (#40014)

4 years ago[mono] Disable cfgdir config on Windows netcore builds (#40005)
Ryan Lucia [Wed, 29 Jul 2020 09:19:08 +0000 (05:19 -0400)]
[mono] Disable cfgdir config on Windows netcore builds (#40005)

This was already disabled with autotools, but I forgot to update winconfig.h as well.

4 years ago[wasm] Re-enable some tests in the System.Net.WebSockets.Tests namespace (#40004)
Maxim Lipnin [Wed, 29 Jul 2020 09:10:35 +0000 (12:10 +0300)]
[wasm] Re-enable some tests in the System.Net.WebSockets.Tests namespace (#40004)

There is no repro for https://github.com/dotnet/runtime/issues/38807 at the moment so the related tests have been enabled.
Two tests have been disabled due to PNSE (see https://github.com/dotnet/runtime/pull/39346).

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

The test run result: `Tests run: 177, Errors: 0, Failures: 0, Skipped: 0.`

4 years agoDisabled outerloop test. (#40045)
Marie Píchová [Wed, 29 Jul 2020 08:16:04 +0000 (10:16 +0200)]
Disabled outerloop test. (#40045)

4 years agoUpdate threadpool callback error messages to fix #38803 (#40000)
Katelyn Gadd [Wed, 29 Jul 2020 05:57:13 +0000 (22:57 -0700)]
Update threadpool callback error messages to fix #38803 (#40000)

4 years agoAssert that we don't get the value we don't want instead of attempting to check for...
Katelyn Gadd [Wed, 29 Jul 2020 05:56:41 +0000 (22:56 -0700)]
Assert that we don't get the value we don't want instead of attempting to check for a specific error code. Fixes #39955 (#40019)

4 years ago[browser][wasm] Configuring request options in Browser WebAssembly (#39182)
Kenneth Pouncey [Wed, 29 Jul 2020 05:05:31 +0000 (07:05 +0200)]
[browser][wasm] Configuring request options in Browser WebAssembly (#39182)

* [browser][wasm] Initial addition of configuring request options in Browser WebAssembly

* Fix key code.  Not what was proposed

* Add TryGetValue<TValue> and Set<TValue> as per proposal

* Add missing obsolete attribute

* Address review comments

* Update tests to use Options and not obsolete Properties.

* Implement IDictionary<string, object?> explicitly

* Update tests to use Options and not obsolete Properties.

* Add HttpRequestOptions source to the System.Net.Http.Unit.Tests project to fix build.

* Address review comments - explicit

* Fix build error cannot convert from 'string' to 'System.Net.Http.HttpRequestOptionsKey<object>'

* Add tests for HttpRequestOptions

* Fix test build

* Add special case code for NETFRAMEWORK for API change.

* #endif out of place fix

* #endif out of place fix

4 years agoAdd Unsafe.IsNullRef and Unsafe.NullRef (#40008)
Sergio Pedri [Wed, 29 Jul 2020 03:06:52 +0000 (05:06 +0200)]
Add Unsafe.IsNullRef and Unsafe.NullRef (#40008)

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4 years agoFix creating RegionInfo object using names with different casing. (#40052)
Tarek Mahmoud Sayed [Wed, 29 Jul 2020 02:15:05 +0000 (19:15 -0700)]
Fix creating RegionInfo object using names with different casing. (#40052)

4 years agoNegate find_object GetConservativeGC logic. (#39905)
yowl [Tue, 28 Jul 2020 23:16:45 +0000 (18:16 -0500)]
Negate find_object GetConservativeGC logic. (#39905)

4 years ago[interp] Add null checks to STIND opcodes. (#40041)
Zoltan Varga [Tue, 28 Jul 2020 23:11:00 +0000 (19:11 -0400)]
[interp] Add null checks to STIND opcodes. (#40041)

4 years agoCleanup mscorlib references under src\coreclr\src (#39994)
Jan Kotas [Tue, 28 Jul 2020 23:10:38 +0000 (16:10 -0700)]
Cleanup mscorlib references under src\coreclr\src (#39994)

* s/MscorlibBinder/CoreLibBinder/

* s/g_Mscorlib/g_CoreLib/

* Remaining mscorlib->corelib renames

* Delete unreachable FNV NGen string

4 years agoFix parsing of embedded .clsidmap in comhost (#40022)
Elinor Fung [Tue, 28 Jul 2020 22:57:17 +0000 (15:57 -0700)]
Fix parsing of embedded .clsidmap in comhost (#40022)

* Fix parsing of embedded .clsidmap in comhost
* Update tests to use HostModel to create/embed clsidmap

4 years agoDisable based on #40034 (#40035)
Jarret Shook [Tue, 28 Jul 2020 22:38:43 +0000 (15:38 -0700)]
Disable based on #40034 (#40035)

4 years ago[debugger] Revert Removing unhandled_exception which was used for android (#40027)
monojenkins [Tue, 28 Jul 2020 22:35:56 +0000 (18:35 -0400)]
[debugger] Revert Removing unhandled_exception which was used for android (#40027)

This reverts commit 60643c36f5d4e349276e5dcce0e7fc3dc1d72f74.
To investigate error on android tests.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoManually merging driver.c from https://github.com/mono/mono/pull/20159 (#40031)
Thays Grazia [Tue, 28 Jul 2020 21:38:41 +0000 (18:38 -0300)]
Manually merging driver.c from https://github.com/mono/mono/pull/20159 (#40031)

4 years agoUpdate visualstudio.md (#40047)
Dan Moseley [Tue, 28 Jul 2020 21:33:36 +0000 (14:33 -0700)]
Update visualstudio.md (#40047)

4 years ago[wasm] Add missing EMCC_FLAGS variable when building corebindings.o (#40024)
Alexander Köplinger [Tue, 28 Jul 2020 21:27:17 +0000 (23:27 +0200)]
[wasm] Add missing EMCC_FLAGS variable when building corebindings.o (#40024)

4 years agoIntrinsify MemoryMarshal.GetArrayDataReference for interp (#39920)
Egor Bogatov [Tue, 28 Jul 2020 21:23:56 +0000 (00:23 +0300)]
Intrinsify MemoryMarshal.GetArrayDataReference for interp (#39920)