platform/upstream/dotnet/runtime.git
3 years agoV3 publishing for Runtime (#42262)
Epsitha Ananth [Thu, 17 Sep 2020 18:15:17 +0000 (11:15 -0700)]
V3 publishing for Runtime (#42262)

* V3 publishing  (#41899)

3 years agoFix MacOS createdump testing failures (#42357)
Mike McLaughlin [Thu, 17 Sep 2020 16:53:07 +0000 (09:53 -0700)]
Fix MacOS createdump testing failures (#42357)

Fix MacOS createdump testing failures

There are a few things that are causing MacOS dumps not to be complete and causing the diagnostics SOS tests to fail:

1) The threads were completely stopped with the per thread suspend. Switch from thread_suspend to task_suspend.
2) .Stopping filtering out SM_EMPTY share_mode type memory regions. There are read/write sections that are needed in the dump by the tools

3 years agoAvoid race condition in WebClient.IsBusy. (#42076)
Theodore Tsirpanis [Thu, 17 Sep 2020 15:58:21 +0000 (18:58 +0300)]
Avoid race condition in WebClient.IsBusy. (#42076)

3 years agoAdd a pointer to Android build doc and a pointer to Hello World sample (#42345)
Fan Yang [Thu, 17 Sep 2020 15:13:14 +0000 (11:13 -0400)]
Add a pointer to Android build doc and a pointer to Hello World sample (#42345)

* Update README.md

* Update docs/workflow/building/mono/README.md

Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Update README.md

Resolve Egor's feedback

Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoFix default handling for value types when converter based on interface (#42319)
Steve Harter [Thu, 17 Sep 2020 14:58:11 +0000 (09:58 -0500)]
Fix default handling for value types when converter based on interface (#42319)

3 years agoFix order of singlefilehost libarires passed to the linker (#42094)
Omair Majid [Thu, 17 Sep 2020 14:26:52 +0000 (10:26 -0400)]
Fix order of singlefilehost libarires passed to the linker (#42094)

We give a list of arguments to the linker which includes a list of
static objects we want to be linked together and a set of system-wide
native libraries they should be dynamically linked against.

Some build environments, such as Fedora, use the `--as-needed` linker
flag. This makes the linker pay attention to the order in which
libraries appear and remove uneeded libararies.

When the linker sees this:

    ld --as-needed -lz staticobject.a

It works from left to right and sess that nothing so far depends on
libz. The linker removes libz from the set of objects being linked. Then
it links staticobject.a, which needs symbols from libz. The linker then
complains that it contains an undefined reference.

We can fix that by changing the order so that dependencies appear last
in the linker command line:

    ld --as-needed staticobject.a -lz

This makes the linker link staticobject.a against libz correctly.

3 years agoConsole.Unix: fix terminal settings during Console.KeyAvailable (#42371)
Tom Deseyn [Thu, 17 Sep 2020 14:20:22 +0000 (16:20 +0200)]
Console.Unix: fix terminal settings during Console.KeyAvailable (#42371)

* Console.Unix: fix terminal settings during Console.KeyAvailable

Arguments passed to configure the terminal are in the wrong order.
This causes Enter keys to be returned as ConsoleKey.J instead of
ConsoleKey.Enter.

* Add test

3 years agoHarden AssemblyDependencyResolver assemblyPaths (#42055)
Lakshan Fernando [Thu, 17 Sep 2020 12:58:36 +0000 (05:58 -0700)]
Harden AssemblyDependencyResolver assemblyPaths (#42055)

* Harden AssemblyDependencyResolver assemblyPaths  AssemblyDependencyResolver is made resilience to the case where  hostpolicy.dll returns the same assembly paths by ignoring multiple  entries. This is done by using OrdinalIgnoreCase comparison on Windows and Ordinal comparison elsewhere  Fix #37162

* Pick the first simple assembly for multiples

AssemblyDependencyResolver is made resilience to the case when
hostpolicy.dll returns multiple assembly paths for the same assembly
by picking the first one.

Fix #37162

* missed an extra line

* Test case for casing change with the same assembly

* typo

* Disabled the tests for non-windows

Filed #42334 to track the linux-mac differences

Co-authored-by: Lakshan Fernando <lakshanf@microsoft.com>
3 years agoRemove unused locals and methods in System.Private.Xml (#39592)
Matt Kotsenas [Thu, 17 Sep 2020 12:28:25 +0000 (05:28 -0700)]
Remove unused locals and methods in System.Private.Xml (#39592)

* Remove unused locals and methods in System.Private.Xml

* Remove unneeded discards and simplify expressions

* Restore #if DEBUG code

3 years agoMake EventPipeProviderCallbackData own the filter data (#42307)
David Mason [Thu, 17 Sep 2020 06:50:23 +0000 (23:50 -0700)]
Make EventPipeProviderCallbackData own the filter data (#42307)

Fixes a use after free issue in EventPipe, where the EventPipeProviderCallbackData would cache a pointer to the filter data string on EventPipeSessionProvider, but disabling the session would free all of the EventPipeSessionProviders.

3 years agoHTTP/3 interop fixes (#42315)
Cory Nelson [Thu, 17 Sep 2020 03:41:43 +0000 (20:41 -0700)]
HTTP/3 interop fixes (#42315)

* Fix SETTINGS frame creation.
* Only call tracing when it is enabled.
* Add descriptions for stream read states.
* Fix: SETTINGS frame parsing not discarding bytes from ArrayBuffer.
* Fix: ownership of ArrayBuffer could have resulted in double-free of arrays.

3 years ago[wasm][debugger] Improving logging control for tests (#42175)
Ankit Jain [Thu, 17 Sep 2020 00:58:16 +0000 (20:58 -0400)]
[wasm][debugger] Improving logging control for tests (#42175)

- replace CWLs with log messages
- Fix use of loggerFactory, and logger to correctly configure them, and
allow being controlled via appsettings.json

- Also, add default settings for proxy also, just an example:

```
     "LogLevel": {
       "Default": "Error",
       "Microsoft": "Warning",
       "Microsoft.WebAssembly.Diagnostics.TestHarnessProxy": "Information",
       "Microsoft.WebAssembly.Diagnostics.DevToolsProxy": "Information",
       "DebuggerTests.Inspector": "Information"
    }
```

Eg. to see trace messages (eg. protocol chat) for the test proxy:
    `"Microsoft.WebAssembly.Diagnostics.TestHarnessProxy": "Trace"`

3 years agocorrect perf-send-to-helix on windows (#42235)
Olivia Chen [Thu, 17 Sep 2020 00:32:22 +0000 (17:32 -0700)]
correct perf-send-to-helix on windows (#42235)

* correct perf helix workitems on windows

* Will Revert: turn on PR validation

* change Agent.Os to runtime var

* remove sendparams condition

* test if macro syntax var case sensitive

* try expression for Agent.Os

* try $(Agent.Os)

* pass osGroup param

* revert pr trigger:

3 years agoFix continuation of JSON deserialization (#42158)
devsko [Wed, 16 Sep 2020 23:44:41 +0000 (01:44 +0200)]
Fix continuation of JSON deserialization (#42158)

* Repro #42070

* formatting

* namespace

* Fix

* never forget the header

* More tests
- Test continuation at every position inside the tested object
- Many member with primitive and nullable types
- One more level of nested object
- All combinations of class/struct for tested and nested object
- tested and nested object with parametrized ctor for some properties

* Addressed feedback

* Test with original repro data from #42070

* custom converter to ensure the padding is written in front of the tested object

* rename

* test data moved to Strings.resx

3 years agoRemove unused locals and fix tests in System.ServiceModel.Syndication (#39639)
Matt Kotsenas [Wed, 16 Sep 2020 23:41:45 +0000 (16:41 -0700)]
Remove unused locals and fix tests in System.ServiceModel.Syndication (#39639)

* Remove unused locals and fix tests in System.ServiceModel.Syndication

Remove unused locals in System.ServiceModel.Syndication.

While refactoring I found two places where unit tests appear to have a
copy/paste error and were asserting the wrong value.

* Add back `thirdDocument` and correct tests

* Add back `sixthDocument` and correct tests

* Add back item and correct tests

* Add back `genericFormatter` and correct test

* Add back `elementExtensions` and add assert

3 years agoUse portable PDBs even on .NETFramework (#42331)
Eric StJohn [Wed, 16 Sep 2020 23:23:31 +0000 (16:23 -0700)]
Use portable PDBs even on .NETFramework (#42331)

Previously we were building full / windows PDBs for .NETFramework
because at the time .NETFramework couldn't read portable PDBs
so things like StackTrace wouldn't include file/line info.

That has been fixed as of 4.7.2 and we can switch to portable PDB
everywhere.

Symbol archiving will still convert to windows PDBs where necessary so
that we don't break any consumption scenarios for folks on older
frameworks.

This is important to get the latest symbols features only available in
the portable PDB format.

3 years agosmall imp for `fgMorphMultiregStructArg`. (#42320)
Sergey Andreenko [Wed, 16 Sep 2020 20:48:49 +0000 (13:48 -0700)]
small imp for `fgMorphMultiregStructArg`. (#42320)

3 years agoRun PAL tests in CI (#42049)
David Wrighton [Wed, 16 Sep 2020 19:55:59 +0000 (12:55 -0700)]
Run PAL tests in CI (#42049)

Refactor the PAL test framework to be useable in our CI system, and enable it for testing

The existing PAL tests are problematic in a few ways for our CI.
1. They are large in terms of disk space used per test, this interferes with building them properly, especially as they are part of the product build, and not of the test build
2. While part of the product build, the option to build them was well hidden.
3. The tests are not related to our existing tests, and in particular are not driven from managed xunit wrappers.

The change here has 4 components
1. Reduce the volume of the binaries such that they can be passed from a product build to a test job effectively. This is done by merging all tests which are not strictly dependent on secondary libraries.
  - This was done via a tool which parsed and replaced all of the CMakeFiles.txt
  - And then manual editing to remove all duplicate global symbols
2. The build flag for building the tests has been exposed as a first class option to build-runtime, as well as through the subset mechanism. As of this change, developers who wish to build the tests should use the clr.paltests subset to build the tests.
3. As the tests do not have normal xunit wrappers, but they *do* have a script which will generate xunit output, they cannot quite be run in the existing helix pathway. Add a separate path for launch the appropriate helix workitem as part of outerloop test runs.
4. A new issue exclusion mechanism has been built. Add exclusions by modifying src/coreclr/src/pal/tests/palsuite/issues.targets
  - There are a number of failures in the current test suite that should probably be investigated, but making meaningful changes to the tests should not be part of this change.

3 years agoAdjust console error logging for msbuild (#42285)
David Wrighton [Wed, 16 Sep 2020 18:20:40 +0000 (11:20 -0700)]
Adjust console error logging for msbuild (#42285)

- Show a summary of error on completion
- And don't attempt to force alignment to screen width (which will allow for better copy/paste from the console)

3 years agoJIT: make profile data available to inlinees (#42277)
Andy Ayers [Wed, 16 Sep 2020 18:14:37 +0000 (11:14 -0700)]
JIT: make profile data available to inlinees (#42277)

Update the jit to try and read profile data for inlinees, and if successful,
scale it appropriately for the inline call site. This kicks in for crossgen
BBOPT and TieredPGO Tier1.

Update VM and Crossgen hosts to handle requests for inlinee profile counts.
Crossgen2 does not seem to support profile data retrieval yet.

Note crossgen experience may not be as good as one might expect, because
crossgen BBINSTR loses counts for inlinees. But enabling this for crossgen
even with this limitation is probably a win overall.

Fix small issue in the jit where we were overly aggressive about merging the
callee block's flags into the callsite block's flags.

3 years agoSupport CFB8 for 3DES and AES on Windows 7
Kevin Jones [Wed, 16 Sep 2020 16:52:57 +0000 (12:52 -0400)]
Support CFB8 for 3DES and AES on Windows 7

This also throws a better exception on platforms that do not support
setting the feedback size (such as Win7).

3 years ago[mono] Add proper check for clock_gettime (#42206)
Ryan Lucia [Wed, 16 Sep 2020 15:24:14 +0000 (11:24 -0400)]
[mono] Add proper check for clock_gettime (#42206)

Fixes mono/mono wasm build

3 years ago[utils] Don't use __builtin_available on x86 and amd64 macos (#42251)
monojenkins [Wed, 16 Sep 2020 14:24:20 +0000 (10:24 -0400)]
[utils] Don't use __builtin_available on x86 and amd64 macos (#42251)

Fixes package building.  We build packages with Xcode 8.3.3 for x86 and amd64
build, and it is too old for __builtin_available

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
3 years agoFix createdump Windows triage dumps (#42159)
Mike McLaughlin [Wed, 16 Sep 2020 02:54:38 +0000 (19:54 -0700)]
Fix createdump Windows triage dumps (#42159)

Fix createdump Windows triage dumps

Add ld (i.e. ld_2_23.so) interpreter program headers to Linux coredumps. This is important to the windbg linux support.

3 years agoa naive fix for Jit Time log with the new style phases. (#42199)
Sergey Andreenko [Tue, 15 Sep 2020 23:41:59 +0000 (16:41 -0700)]
a naive fix for Jit Time log with the new style phases. (#42199)

* a naive check for time log.

* format fix.

3 years agoAdd comment to ThreadSuspend::RestartEE (#42281)
Jan Kotas [Tue, 15 Sep 2020 23:16:10 +0000 (16:16 -0700)]
Add comment to ThreadSuspend::RestartEE (#42281)

3 years agoAdd running of the release/5.0 branch for the runtime repo (#42279)
Drew Scoggins [Tue, 15 Sep 2020 22:27:39 +0000 (15:27 -0700)]
Add running of the release/5.0 branch for the runtime repo (#42279)

3 years agoRe-enable tests for Directory.GetFileSystemEntries (#42242)
David Cantú [Tue, 15 Sep 2020 21:33:05 +0000 (14:33 -0700)]
Re-enable tests for Directory.GetFileSystemEntries (#42242)

3 years ago[wasm][debugger] Log messages in the proxy with the correct debug level (#42170)
Ankit Jain [Tue, 15 Sep 2020 21:03:44 +0000 (17:03 -0400)]
[wasm][debugger] Log messages in the proxy with the correct debug level (#42170)

- Eg. exceptions thrown in the proxy get logged as debug, instead of an
error, so you might get strange test failures with no details!

Also, updated the current messages logged as `info` to `debug`, since
that is what they were being logged as anyway.

3 years agoTransition to GC Unsafe in mono_runtime_invoke_array (#41174)
monojenkins [Tue, 15 Sep 2020 20:22:52 +0000 (16:22 -0400)]
Transition to GC Unsafe in mono_runtime_invoke_array (#41174)

`mono_runtime_invoke_array` is marked as `MONO_API MONO_RT_EXTERNAL_ONLY`, but it does not transition to GC Unsafe in contrast to similar methods like `mono_runtime_invoke`. This led to crashes when calling it from unmanaged code.

The original PR that added the transitions in the other methods is https://github.com/mono/mono/pull/8613, maybe there was a particular reason for not updating  `mono_runtime_invoke_array` also?

<!--
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: Boulougou <Boulougou@users.noreply.github.com>
3 years agorestart fix for weak memory model processors (#42243)
Maoni Stephens [Tue, 15 Sep 2020 19:46:25 +0000 (12:46 -0700)]
restart fix for weak memory model processors (#42243)

3 years agoUpdate bug report template for Blazor (#42271)
Katelyn Gadd [Tue, 15 Sep 2020 19:25:46 +0000 (12:25 -0700)]
Update bug report template for Blazor (#42271)

Bug reports about Blazor should include info on the user's web browser(s)

3 years agoSet targetplatform only if necessary in runsetting (#42256)
Viktor Hofer [Tue, 15 Sep 2020 18:15:57 +0000 (20:15 +0200)]
Set targetplatform only if necessary in runsetting (#42256)

* Set targetplatform only if necessary in runsetting

3 years ago[wasm][debugger] Add support for raising events in the app, intended to (#42171)
Ankit Jain [Tue, 15 Sep 2020 18:04:33 +0000 (14:04 -0400)]
[wasm][debugger] Add support for raising events in the app, intended to (#42171)

* [wasm][debugger] Add support for raising events in the app, intended to

.. be received by the debug proxy.

* [wasm][debugger] `mono_wasm_raise_event` -> `mono_wasm_raise_debug_event`

Based on @lewing's suggestion

3 years agoDelete obsolete folder src/coreclr/tests/debugger_tests (#42218)
Tomáš Rylek [Tue, 15 Sep 2020 17:46:41 +0000 (19:46 +0200)]
Delete obsolete folder src/coreclr/tests/debugger_tests (#42218)

3 years ago[wasm][debugger] Fix stepping out from an async method (#42227)
Thays Grazia [Tue, 15 Sep 2020 17:24:38 +0000 (14:24 -0300)]
[wasm][debugger] Fix stepping out from an async method (#42227)

* Fix assert when calling set_set_notification_for_wait_completion_flag

* Fix compilation error.

3 years ago[wasm] Download Symbols from microsoft symbol server (#40690)
Thays Grazia [Tue, 15 Sep 2020 16:46:29 +0000 (13:46 -0300)]
[wasm] Download Symbols from microsoft symbol server (#40690)

* Creating a draft to download symbols from microsoft symbol server when there is an exception and exceptions are turned on on debugger.
This is a workaround while VS doesn't work on it, which should be the final solution.

* Fix what lewing suggested.

* Changing what @radical suggested.

* Changed what @radical suggested.

* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* If it's not available on a URL try in the next one in the list.

* Logging error and adding comment about SDSR

* Returning if we find the method even if we have an exception sending files to browser.

* Logging when we don't find the pdb.

* Changing what @radical suggested.

* Avoiding that we try to load symbols from the same assembly more than once.

* Simplifying and adding more log.

* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Adding support for receive the urlSymbolServer as a parameter in the request as discussed with Diego:

Diego: The response from vs code is that this shouldn't live in js-debug, so I think that passing it around in inspectUri would be the best approach for us

* Fix @radical suggestion.

* Removing default symbol server URL, like this we can land this on rc 5.0 without any risk of side effect.

* Fix compilation.

* Update src/mono/wasm/debugger/DebuggerTestSuite/TestHarnessStartup.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/mono/wasm/debugger/BrowserDebugHost/Startup.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Accepting @radical suggestion.

* Adding workaround on dotnet/runtime while PR 686 is not merged on Cecil. When it's merged we will not get any side effect with this workaroud.

Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years agoUpdating HttpCLientFactory ownership (#42245)
Karel Zikmund [Tue, 15 Sep 2020 14:00:00 +0000 (16:00 +0200)]
Updating HttpCLientFactory ownership (#42245)

Networking team owns it

3 years agoAdd test to make sure we release the ICorProfilerCallback interfaces (#41855)
David Mason [Tue, 15 Sep 2020 09:16:25 +0000 (02:16 -0700)]
Add test to make sure we release the ICorProfilerCallback interfaces (#41855)

3 years agoDon't set TargetPlatform to arm64 in runsettings (#42210)
Viktor Hofer [Tue, 15 Sep 2020 09:01:03 +0000 (11:01 +0200)]
Don't set TargetPlatform to arm64 in runsettings (#42210)

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

3 years agoMark Thread.ResetAbort as obsolete (#42228)
Luke Parker [Tue, 15 Sep 2020 05:52:58 +0000 (15:52 +1000)]
Mark Thread.ResetAbort as obsolete (#42228)

3 years agoHTTP2 Perf: Optimize decoding of HPack static table (#40745)
Geoff Kizer [Tue, 15 Sep 2020 05:34:02 +0000 (22:34 -0700)]
HTTP2 Perf: Optimize decoding of HPack static table (#40745)

* optimize decoding of HPack static table

* use byte[] instead of ReadOnlyMemory<byte> in table

* address feedback

* add error string for multiple status codes

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoclean up Span/Memory usage (#42236)
Geoff Kizer [Tue, 15 Sep 2020 05:32:45 +0000 (22:32 -0700)]
clean up Span/Memory usage (#42236)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
3 years agoUnpin C# compiler version (#42174)
Jan Kotas [Tue, 15 Sep 2020 03:21:20 +0000 (20:21 -0700)]
Unpin C# compiler version (#42174)

3 years agoRenable build of several tests on wasm. (#42134)
Nathan Ricci [Tue, 15 Sep 2020 03:09:18 +0000 (23:09 -0400)]
Renable build of several tests on wasm. (#42134)

3 years agoImprove codegen for `Marshal.ThrowExceptionForHr` (#40211)
John Kelly [Tue, 15 Sep 2020 02:55:14 +0000 (03:55 +0100)]
Improve codegen for `Marshal.ThrowExceptionForHr` (#40211)

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years ago[mono] Introduce MonoMemoryManager to hold memory previously owned by the domain...
Ryan Lucia [Tue, 15 Sep 2020 01:55:45 +0000 (21:55 -0400)]
[mono] Introduce MonoMemoryManager to hold memory previously owned by the domain (#41754)

* Introduce MonoMemoryManager

* Move things out of the domain

* Update callers

This does *not* handle cases where we call mono_domain_alloc and friends, just direct access to domain->mp etc. As of this, everything is allocated from the default ALC on netcore and the domain on legacy.

* Update locks in domain_alloc functions

* Take correct lock around mp

* Introduce memory manager allocation helpers

* Shorten mono_domain_default_memory_manager

* Add memory_manager alloc nolock variants

* Fix locking

* More use of nolock functions

* Add trailing newline to monovm.h

This is obviously unrelated, but it was causing issues with my sed commands

* mono_memory_manager -> mono_mem_manager

Bit shorter at least, but I can cut it down further if deemed necessary

* Add to msvc build

* Fix mono/mono build

* Fix test failure

Oops

* Remove erroneous returns

* Store domain in memory manager, take domain lock

* Build fixes

* Remove comment

* Free memory manager during domain unload

* C++ fix

* Don't double free

* Remove designated initializer

MSVC C++ fails it seems :(

3 years agoSPMI: fix performance of `repRecordCallSite`. (#42192)
Sergey Andreenko [Tue, 15 Sep 2020 01:21:26 +0000 (18:21 -0700)]
SPMI: fix performance of `repRecordCallSite`. (#42192)

* Fix a long replaying test.

* add a comment.

3 years agoFix the globalization test. (#42212)
Tarek Mahmoud Sayed [Mon, 14 Sep 2020 22:14:20 +0000 (15:14 -0700)]
Fix the globalization test. (#42212)

3 years agoRedo annotation of Enumerable.Cast and friends to use oblivious TResult (#42215)
Stephen Toub [Mon, 14 Sep 2020 22:08:03 +0000 (18:08 -0400)]
Redo annotation of Enumerable.Cast and friends to use oblivious TResult (#42215)

* Revert "Make Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)"

This reverts commit e75670889321611505115e4561a98e80732b58a0.

* Redo annotation of Enumerable.Cast and friends to use oblivious T

Some folks aren't happy with the fallout of Cast being annotated to return a `TResult?`, and others aren't happy with having it be `TResult`.  Consensus is to make the TResult oblivious, such that we don't declare one way or another what it is, since there's no good way to annotate it appropriately.

3 years ago[utils] Fix MONO_SOLIB_EXT in mono-dl.h on Apple ARM64 (now .dylib) (#42181)
monojenkins [Mon, 14 Sep 2020 20:48:16 +0000 (16:48 -0400)]
[utils] Fix MONO_SOLIB_EXT in mono-dl.h on Apple ARM64 (now .dylib) (#42181)

Co-authored-by: k15tfu <k15tfu@users.noreply.github.com>
3 years agoDon't use BADCODE when inlining. (#42193)
Sergey Andreenko [Mon, 14 Sep 2020 19:59:00 +0000 (12:59 -0700)]
Don't use BADCODE when inlining. (#42193)

3 years ago[wasm][debugger] Avoid infinite loop when we have a boxed `new object` (#42059)
Ankit Jain [Mon, 14 Sep 2020 19:12:21 +0000 (15:12 -0400)]
[wasm][debugger] Avoid infinite loop when we have a boxed `new object` (#42059)

* [wasm][debugger] Avoid infinite loop when we have a boxed `new object`

Eg. `object o = new object(); object o1 = o;`
- Avoid infinitely looping for `o1`

* [wasm][debugger] Handle valuetypes boxed in classes that are not

.. type `object`.

Prompted by @lambdageek's comment - https://github.com/dotnet/runtime/pull/42059#issuecomment-690310274

3 years ago[wasm][debugger] Skip downloading pdb, for empty urls (#42060)
Ankit Jain [Mon, 14 Sep 2020 19:09:49 +0000 (15:09 -0400)]
[wasm][debugger] Skip downloading pdb, for empty urls (#42060)

3 years agoMark System.Runtime APIs Supported on Windows (#42030)
Mitchell Hwang [Mon, 14 Sep 2020 19:02:35 +0000 (15:02 -0400)]
Mark System.Runtime APIs Supported on Windows (#42030)

* [wasm] System.Runtime enable platform attributes

* System.Runtime Mark APIs Supported on Windows

* Avoid nullable token error

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoAccessViolation when using ValueTypes as a Service (#42152)
Eric Erhardt [Mon, 14 Sep 2020 18:35:21 +0000 (13:35 -0500)]
AccessViolation when using ValueTypes as a Service (#42152)

* AccessViolation when using ValueTypes as a Service

When using ValueTypes as services in DependencyInjection, we are generating incorrect IL in a few cases:

- When the ValueType is a top level service
- When the ValueType is in an IEnumerable of services

We were double unboxing the ValueType, which was causing AccessViolations.

This was a regression caused by a previous change when ValueTypes were used in constructor parameters of services.

To fix this, I lifted the unboxing into the VisitConstructor and VisitIEnumerable methods instead of forcing VisitConstant to always do the unboxing. VisitConstant doesn't have enough context to know whether it should do the unboxing or not.

Fix #42037

* Add transient tests

3 years agoTest only the BodyContent property (#42177)
Kevin Gosse [Mon, 14 Sep 2020 17:39:13 +0000 (19:39 +0200)]
Test only the BodyContent property (#42177)

Parse the response as JSON in order to test only the BodyContent property.

3 years agoRemoving the T4 templates used by Vector<T> (#42050)
Tanner Gooding [Mon, 14 Sep 2020 16:28:31 +0000 (09:28 -0700)]
Removing the T4 templates used by Vector<T> (#42050)

* Removing the T4 templates used by Vector<T>

* Fixing System.Numerics.Vectors.Tests

* Adding back Register so morph doesn't break

* Renaming Vector.cs to Vector_1.cs

* Renaming Vector_Operations.cs to Vector.cs

3 years agoImplement MIPS64 RID (#42194)
Leslie Zhai [Mon, 14 Sep 2020 16:05:22 +0000 (00:05 +0800)]
Implement MIPS64 RID (#42194)

https://github.com/gsvm/loongson-dotnet/issues/6

3 years ago[mono] Enable startup stats timer on wasm (#41994)
Ryan Lucia [Mon, 14 Sep 2020 14:47:47 +0000 (10:47 -0400)]
[mono] Enable startup stats timer on wasm (#41994)

* Set clock in mono_clock_init if available and add wasm definitions

This matches the OSX behavior and cleans things up a bit. We also now call this cross-platform, so don't error when called on Windows

* Add new "real time" counter based on clock_gettime

The initial value is set early in mono_main as part of mono_counters_init. This is needed because /proc/stat does not exist with emscripten and we need a way to measure time on wasm

3 years agoTemporarily disable Linux musl ARM testing in Helix (#42195)
Jan Vorlicek [Mon, 14 Sep 2020 13:56:50 +0000 (15:56 +0200)]
Temporarily disable Linux musl ARM testing in Helix (#42195)

We need to disable it until the CLI for musl arm is produced.

3 years agoRemove the directory src/coreclr/tests/src (#42139)
Tomáš Rylek [Mon, 14 Sep 2020 12:17:10 +0000 (14:17 +0200)]
Remove the directory src/coreclr/tests/src (#42139)

Move CLRTest.*.targets under src/tests/Common;

Consolidate Directory.Build.props in src/tests, src/tests/Common and src/coreclr/tests/src - src/tests is now the "master" version, src/tests/Common just points to it and src/coreclr/tests/src no longer exists;

Move Directory.Build.targets from src/coreclr/tests/src to src/tests/Directory.Build.targets that was previously just importing the src/coreclr/tests/src version;

Move the few remaining scripts under src/coreclr/tests/src to src/tests/Common (dirs.proj, nobuild.targets, runonly.targets, xunitconsolerunner.depproj).

Thanks

Tomas

3 years ago[master] Update dependencies from Microsoft/vstest dotnet/xharness mono/linker dotnet...
dotnet-maestro[bot] [Mon, 14 Sep 2020 10:20:31 +0000 (10:20 +0000)]
[master] Update dependencies from Microsoft/vstest dotnet/xharness mono/linker dotnet/arcade dotnet/icu (#41796)

[master] Update dependencies from Microsoft/vstest dotnet/xharness mono/linker dotnet/arcade dotnet/icu

 - Merge branch 'master' into darc-master-7eb28eb8-d9b3-4ab3-8732-196d2424c589

 - Merge branch 'master' into darc-master-7eb28eb8-d9b3-4ab3-8732-196d2424c589

3 years agoMark some System.Net.HttpListener APIs as unsupported on browser (#42063)
Maxim Lipnin [Mon, 14 Sep 2020 08:57:29 +0000 (11:57 +0300)]
Mark some System.Net.HttpListener APIs as unsupported on browser (#42063)

* Mark some System.Net.HttpListener APIs as unsupported on browser

* FIx windows builds

* Fix windows builds

* Remove browser annotations from the properties with windows-specific setters.

* Mark only setter of ExtendedProtectionPolicy

* Remove another redundant annotation

3 years agoDisable UnmanagedCallersOnlyTest on WASM. (#42191)
Aaron Robinson [Mon, 14 Sep 2020 07:59:42 +0000 (00:59 -0700)]
Disable UnmanagedCallersOnlyTest on WASM. (#42191)

3 years agoRe-add linker attributes to generic type params of JsonSerializer methods (#42186)
Layomi Akinrinade [Mon, 14 Sep 2020 04:31:54 +0000 (21:31 -0700)]
Re-add linker attributes to generic type params of JsonSerializer methods (#42186)

3 years agoAdd specification for extending supported types of TKey in ditionaries. (#32676)
David Cantú [Sun, 13 Sep 2020 16:25:55 +0000 (09:25 -0700)]
Add specification for extending supported types of TKey in ditionaries. (#32676)

* Add specification for extending supported types of TKey in ditionaries.

* Fix enumeration in notes

* fix notes

* Fix supported types.

3 years agoConvert invalid C# uses of UnmanagedCallersOnly to IL. (#42146)
Aaron Robinson [Sun, 13 Sep 2020 02:39:29 +0000 (19:39 -0700)]
Convert invalid C# uses of UnmanagedCallersOnly to IL. (#42146)

* Convert invalid C# uses of UnmanagedCallersOnly to IL for negative testing.

3 years agoDelete unused multibyte methods from PAL (#42157)
Adeel Mujahid [Sun, 13 Sep 2020 00:11:17 +0000 (03:11 +0300)]
Delete unused multibyte methods from PAL (#42157)

3 years ago[wasm][debugger][test] Change DateTime format test (#42136)
Thays Grazia [Sat, 12 Sep 2020 20:54:32 +0000 (17:54 -0300)]
[wasm][debugger][test] Change DateTime format test (#42136)

* Changing DateTime format tests, we cannot test how we were doing before because wasm and dotnet core uses different versions of ICU.

* Changing what @radical suggested.

3 years ago[gc] add stop-the-world api (#42138)
monojenkins [Sat, 12 Sep 2020 16:57:23 +0000 (12:57 -0400)]
[gc] add stop-the-world api (#42138)

It's sometimes useful to have a way for the runtime to stop the world.  Only works on SGen.

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
3 years ago[metadata] Add #JTD heap MonoImage:minimal_delta bit (#42137)
monojenkins [Sat, 12 Sep 2020 14:28:54 +0000 (10:28 -0400)]
[metadata] Add #JTD heap MonoImage:minimal_delta bit (#42137)

The presence of the heap indicates that it's a minimal delta image (where the heaps are meant to be appended to the previous heaps), as opposed to a full delta image (where the heap in the delta image contains the previous and the
new data)

---
Also add `MONO_TRACE_METADATA_UPDATE` (set `MONO_LOG_MASK` to `metadata-update`) for tracing

Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
3 years agoMove the remaining test dependencies under src/tests (#42103)
Tomáš Rylek [Fri, 11 Sep 2020 20:45:44 +0000 (22:45 +0200)]
Move the remaining test dependencies under src/tests (#42103)

Move ilasm, test_dependencies and test_dependencies_fs under src/tests.

3 years agoFix ldtoken for generic RuntimeMethodHandle (#42112)
Jan Kotas [Fri, 11 Sep 2020 20:29:20 +0000 (13:29 -0700)]
Fix ldtoken for generic RuntimeMethodHandle (#42112)

ldtoken for generic RuntimeMethodHandle in non-generic method triggered generic dictionary lookup due to normalization of MethodDescs for reflection. It lead to InvalidProgramException later.

Fixes #41674

3 years agoFix Unix build issue (#42104)
David Wrighton [Fri, 11 Sep 2020 19:58:59 +0000 (12:58 -0700)]
Fix Unix build issue (#42104)

When native build fails, handle exit code properly by checking it immediately after cmake is called

3 years agoFix building JIT without runtime on Linux (#42090)
Michal Strehovský [Fri, 11 Sep 2020 19:56:28 +0000 (21:56 +0200)]
Fix building JIT without runtime on Linux (#42090)

* Don't build createdump
* We need mscorrc

3 years agoPhysicalFileProvider and PhysicalFilesWatcher should implement IDisposable correctly...
Roman Marusyk [Fri, 11 Sep 2020 19:50:57 +0000 (22:50 +0300)]
PhysicalFileProvider and PhysicalFilesWatcher should implement IDisposable correctly  (#41918)

3 years agoRemoving the Vector*_Intrinsics.cs file, regions from the numerics code, and normaliz...
Tanner Gooding [Fri, 11 Sep 2020 19:27:39 +0000 (12:27 -0700)]
Removing the Vector*_Intrinsics.cs file, regions from the numerics code, and normalizing the member order (#41898)

* Removing the Vector*_Intrinsics.cs file, regions from the numerics code, and normalizing the member order

* Updating the doc comment for Quaternion

3 years agoEnable build + pack of cross-OS diagnostic artifacts on Linux-musl-arm (#42096)
Juan Hoyos [Fri, 11 Sep 2020 15:39:58 +0000 (08:39 -0700)]
Enable build + pack of cross-OS diagnostic artifacts on Linux-musl-arm (#42096)

3 years agoDelete unused kernel32 QCalls (#42058)
Adeel Mujahid [Fri, 11 Sep 2020 15:02:49 +0000 (18:02 +0300)]
Delete unused kernel32 QCalls (#42058)

3 years ago[mono] Preserve GetterAdapterFrame if CreateGetterDelegate is used (#42091)
Aleksey Kliger (λgeek) [Fri, 11 Sep 2020 13:36:15 +0000 (09:36 -0400)]
[mono] Preserve GetterAdapterFrame if CreateGetterDelegate is used (#42091)

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

3 years agoDelete the obsolete PerfHarness project (#42092)
Tomáš Rylek [Fri, 11 Sep 2020 13:20:13 +0000 (15:20 +0200)]
Delete the obsolete PerfHarness project (#42092)

According to Drew's clarification this is an old version of the
perf harness that is no longer used. Deleting it as part of my
ongoing work on CoreCLR test system cleanup.

Thanks

Tomas

3 years agomove template (#42098)
Anirudh Agnihotry [Fri, 11 Sep 2020 13:06:50 +0000 (06:06 -0700)]
move template (#42098)

3 years agoFix vtable chunk sharing with covariant returns (#42077)
Jan Vorlicek [Fri, 11 Sep 2020 12:39:00 +0000 (14:39 +0200)]
Fix vtable chunk sharing with covariant returns (#42077)

* Fix vtable chunk sharing with covariant returns

There is an issue causing invalid sharing of a vtable chunk when a
method is overriden using method impl in a class and its parent class
and the slot in the parent class is in a previous vtable chunk. The
algorithm in MethodTableBuilder::ChangesImplementationOfVirtualSlot that
detects whether a slot in a vtable chunk was changed doesn't know that
the override will be propagated to all slots occupied by the method
being overriden. In the test attached to this fix, it leads to a stack
overflow due to an infinite recursion in the type system code. It could
also result in an overwrite of the method in the parent class, so when
another class derives from it, it would get a method from its sibling.

This change fixes it by checking if the parent method of a current slot
was overriden in some previous slot in the vtable.

3 years agoMark System.Security.Cryptography.Algorithms as unsupported on Browser WASM (#42010)
Maxim Lipnin [Fri, 11 Sep 2020 09:42:32 +0000 (12:42 +0300)]
Mark System.Security.Cryptography.Algorithms as unsupported on Browser WASM (#42010)

* Mark System.Security.Cryptography.Algorithms as unsupported on Browser WASM

* Address the comment regarding IncrementalHash.CreateHMAC

* Group System.* usings

* Restore the blank lines between the meta-comment and the code for all the HMAC classes

* Fix style issues

* Mark MD5 class as unsupported on Browser; clean up the api exclusion list and proj file.

* Using

* Style fix

3 years agoRemove some accidental duplicates from mini/CMakeLists.txt. (#42095)
Zoltan Varga [Fri, 11 Sep 2020 07:59:57 +0000 (03:59 -0400)]
Remove some accidental duplicates from mini/CMakeLists.txt. (#42095)

3 years agoMark some System.Net.Http APIs as unsupported on browser (#42074)
Maxim Lipnin [Fri, 11 Sep 2020 06:10:44 +0000 (09:10 +0300)]
Mark some System.Net.Http APIs as unsupported on browser (#42074)

3 years agoRemove machine state modifications on Unix (#42083)
Viktor Hofer [Fri, 11 Sep 2020 00:09:31 +0000 (02:09 +0200)]
Remove machine state modifications on Unix (#42083)

Changing /proc/sys/kernel/core_pattern is handled by core-eng and should not be done by helix consuming repositories. Also removing a workaround that has been fixed since (__CrashDumpFolder=/cores) on macOS. Also removing ulimit which is handled by core-eng as well.

3 years agoFixing TargetHasAVXSupportCheck to read ECX not EDX (#42089)
Tanner Gooding [Fri, 11 Sep 2020 00:05:51 +0000 (17:05 -0700)]
Fixing TargetHasAVXSupportCheck to read ECX not EDX (#42089)

3 years agoRemove Windows / Unix duplications in send-to-helix script variants (#42038)
Tomáš Rylek [Thu, 10 Sep 2020 22:32:27 +0000 (00:32 +0200)]
Remove Windows / Unix duplications in send-to-helix script variants (#42038)

After cleaning up send-to-helix-step / send-to-helix-inner-step,
I have noticed two more scripts unnecessarily duplicating the
Windows / Unix variant the same way, both of which can be adapted
to my (slightly generalized) send-to-helix-inner-step.

Thanks

Tomas

3 years agoCorrect fallback logic for ECDiffieHellmanCng with other ECDHPublicKey types
Kevin Jones [Thu, 10 Sep 2020 22:31:28 +0000 (18:31 -0400)]
Correct fallback logic for ECDiffieHellmanCng with other ECDHPublicKey types

Use the concrete ECDiffieHellmanCng type (which is the internal type in Algorithms and the public type in Cng) instead of calling Create (which always returns the internal type).

3 years agoOngoing work on the cmake build. (#42072)
Zoltan Varga [Thu, 10 Sep 2020 19:34:22 +0000 (15:34 -0400)]
Ongoing work on the cmake build. (#42072)

* Ongoing work on the cmake build.

* Add wasm cross compiler support.
* Add ios target support.
* Make ranlib deterministic on osx.
* Add GC_SUSPEND option.

* Add a 'preemptive' value to GC_SUSPEND.

* Add an ENABLE_WERROR option.

* Split mono/mini/CMakeLists.txt file into per-subdirectory files.

3 years agoimprove ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperation test (#42054)
Tomas Weinfurt [Thu, 10 Sep 2020 18:18:59 +0000 (11:18 -0700)]
improve ConnectAsync_CancellationRequestedAfterConnect_ThrowsOperation test (#42054)

3 years agoEnabling CA1416: Validate platform compatibility (#41760)
Tanner Gooding [Thu, 10 Sep 2020 17:51:09 +0000 (10:51 -0700)]
Enabling CA1416: Validate platform compatibility (#41760)

* Enabling CA1416

* Resolving PR feedback

* Updating the .NET analyzers to 5.0.0-rc2.20458.2

* Resolving compilation errors on full framework

* Fixing two more tfm issues with the platform compat checks

* Adjusting various platform compat checks to work with netstandard and netfx

3 years agoDelete AreEqualOrdinalIgnoreCase (#42067)
Michal Strehovský [Thu, 10 Sep 2020 17:31:32 +0000 (19:31 +0200)]
Delete AreEqualOrdinalIgnoreCase (#42067)

This is unused after #40910 and breaks building standalone System.Globalization.Native (`error G94D986AD: unused function 'AreEqualOrdinalIgnoreCase' [-Werror,-Wunused-function]`).

3 years agoImplement SocketsHttpHandler.ConnectCallback (#41955)
Geoff Kizer [Thu, 10 Sep 2020 16:13:39 +0000 (09:13 -0700)]
Implement SocketsHttpHandler.ConnectCallback (#41955)

* Implement SocketsHttpHandler.ConnectCallback

3 years agomove Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedA...
Tomas Weinfurt [Thu, 10 Sep 2020 15:49:42 +0000 (08:49 -0700)]
move Http2_MultipleConnectionsEnabled_IdleConnectionTimeoutExpired_ConnectionRemovedAndNewCreated to outerloop (#42051)

3 years ago[crashing] update s390x handling (#41961)
monojenkins [Thu, 10 Sep 2020 15:47:54 +0000 (11:47 -0400)]
[crashing] update s390x handling (#41961)

commit 2a4e66af4dc628a84a42ff443bc2c09a4bcc7dec broke build on s390x after
changing the signature of `mono_handle_native_crash()`. We need to update
exceptions-s390x.c as well.

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

Co-authored-by: sharkcz <sharkcz@users.noreply.github.com>
3 years agoEnable Alpine ARM support (#41982)
Jan Vorlicek [Thu, 10 Sep 2020 13:36:47 +0000 (15:36 +0200)]
Enable Alpine ARM support (#41982)

* Enable Alpine ARM support

This change enables Alpine ARM support in the lab build scripts,
packages and RID graph. It enables CI and official builds.
No test leg execution until packages are produced.

3 years agoAdd test leg to the PR build to run libraries tests on iOS x64 Simulators (#37476)
Přemek Vysoký [Thu, 10 Sep 2020 12:45:09 +0000 (14:45 +0200)]
Add test leg to the PR build to run libraries tests on iOS x64 Simulators (#37476)

Forked from https://github.com/dotnet/runtime/pull/37057

Adds the iOS test leg that will execute selected BCL tests on an iOS x64 Simulator (13.5) using the `OSX.1015.Amd64.Open` queue which is our on-prem Mac Mini infrastructure (60 machines).

To prepare the Helix job, we are using the Arcade Helix SDK, more specifically the [XHarness Helix SDK](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Helix/Sdk/tools/xharness-runner/Readme.md) which uses the [XHarness tool](https://github.com/dotnet/xharness) to control the test run.