platform/upstream/dotnet/runtime.git
4 years agoAdd tizen-arm64 RIDs (#38832)
WonYoung Choi [Wed, 8 Jul 2020 19:42:19 +0000 (04:42 +0900)]
Add tizen-arm64 RIDs (#38832)

* Add tizen-arm64 RIDs

Since tizen 6.0.0, arm64 will be supported

* Add arm64 arch to all tizen versions

4 years agoRun CLRTools unittests in PR jobs (#38694)
David Wrighton [Wed, 8 Jul 2020 19:40:02 +0000 (12:40 -0700)]
Run CLRTools unittests in PR jobs (#38694)

-Add new job to existing runtime pipeline to run the unit tests that are part of the clr.tools subset
-Avoid publishing anything other than test results from that job
-Run only on Linux-X64 as that's the platform with the most spare availability. These tests do not need to be run on a broad swath of platforms, as they are unittests of pure C#

4 years agoFix calling a ThisCall delegate via Reverse P/Invoke. (#38829)
Jeremy Koritzinsky [Wed, 8 Jul 2020 19:39:12 +0000 (12:39 -0700)]
Fix calling a ThisCall delegate via Reverse P/Invoke. (#38829)

4 years agoDelete ClientWebSocket's event source (#38870)
Stephen Toub [Wed, 8 Jul 2020 18:18:32 +0000 (14:18 -0400)]
Delete ClientWebSocket's event source (#38870)

It's raising a single event for failed connects, and actual networking-related failures for failed connects will already be logged by the underlying API used.

By getting rid of the catch and rethrow, we can also avoid an extra layer of async state machine on connect.

4 years agoThrow with ParamName=value instead of Encoding (#38820)
Youssef Victor [Wed, 8 Jul 2020 17:54:54 +0000 (19:54 +0200)]
Throw with ParamName=value instead of Encoding (#38820)

* Throw with ParamName=value instead of Encoding

* Update WebClientTest.cs

4 years agoSocketHttpHandler: include host+IP information in HttpRequestException (#38131)
Anton Firszov [Wed, 8 Jul 2020 17:34:05 +0000 (19:34 +0200)]
SocketHttpHandler: include host+IP information in HttpRequestException (#38131)

Fix #1326 by appending host:port info to HttpRequestException's message when connection fails.

Didn't change the inner SocketException, since it would require subclassing SocketException, which would add unnecessary complexity here.

4 years agoignore loopback NoDelay failure on OSX (#38900)
Tomas Weinfurt [Wed, 8 Jul 2020 17:09:03 +0000 (10:09 -0700)]
ignore loopback NoDelay failure on OSX (#38900)

* ignore loopback NoDelay failure on OSX

* remove extra file

4 years agoFix live libraries build config for the runincontext pipeline (#38926)
Tomáš Rylek [Wed, 8 Jul 2020 16:17:50 +0000 (18:17 +0200)]
Fix live libraries build config for the runincontext pipeline (#38926)

4 years ago[Wasm] Modify System.IO.IsolatedStorage to throw PNSE (#38898)
Steve Pfister [Wed, 8 Jul 2020 16:06:54 +0000 (12:06 -0400)]
[Wasm] Modify System.IO.IsolatedStorage to throw PNSE (#38898)

4 years agoConsole.Unix tests: don't run tests when SIGINT/SIGQUIT disposition is ignored (...
Tom Deseyn [Wed, 8 Jul 2020 15:33:22 +0000 (17:33 +0200)]
Console.Unix tests: don't run tests when SIGINT/SIGQUIT disposition is ignored (#38334)

* Console.Unix tests: don't run tests when SIGINT/SIGQUIT disposition is ignored

* Add SkipOnMono to HandlerInvokedForSigQuit test

4 years agoFix inconsistent copyright for C# files in Mono's corelib (#38664)
Fan Yang [Wed, 8 Jul 2020 15:26:36 +0000 (11:26 -0400)]
Fix inconsistent copyright for C# files in Mono's corelib (#38664)

* Fix inconsistent copyright for C# files in Mono's corelib

* Update src/mono/netcore/System.Private.CoreLib/src/Mono/RuntimeMarshal.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Use 2-line version of copyright

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years ago[wasm][debugger] DebugDirectoryEntryType = Reproducible means that has debug informat...
monojenkins [Wed, 8 Jul 2020 14:39:46 +0000 (10:39 -0400)]
[wasm][debugger] DebugDirectoryEntryType = Reproducible means that has debug information (#38869)

Considering DebugDirectoryEntryType = Reproducible as an assembly that has debug information.

Fixes mono/mono#20075

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoRemove unnecessary codes (#38918)
Dong-Heon Jung [Wed, 8 Jul 2020 14:31:48 +0000 (23:31 +0900)]
Remove unnecessary codes (#38918)

4 years ago[wasm] Implement support for pinvoke callbacks in the interpeter. (#38839)
monojenkins [Wed, 8 Jul 2020 13:47:14 +0000 (09:47 -0400)]
[wasm] Implement support for pinvoke callbacks in the interpeter. (#38839)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoUpdate license headers (#38793)
Stephen Toub [Wed, 8 Jul 2020 13:23:11 +0000 (09:23 -0400)]
Update license headers (#38793)

4 years agoAdd iOS/tvOS/Android to AdditionalBuildTargetFrameworks (#38922)
Alexander Köplinger [Wed, 8 Jul 2020 12:53:18 +0000 (14:53 +0200)]
Add iOS/tvOS/Android to AdditionalBuildTargetFrameworks (#38922)

Saw these missing while reviewing https://github.com/dotnet/runtime/pull/37944.
As far as I can see this is only used when building inside VS but still good to add for consistency.

4 years agoAvoid unnecessary CultureInfo.CurrentCulture accesses in Enum (#38866)
Stephen Toub [Wed, 8 Jul 2020 11:26:51 +0000 (07:26 -0400)]
Avoid unnecessary CultureInfo.CurrentCulture accesses in Enum (#38866)

* Avoid unnecessary CultureInfo.CurrentCulture accesses in Enum

Enum can only be backed by primitive numerical types, and using the IConvertible interface implementations to convert to numerical types won't pay any attention to culture, so just as there's no need to pass through the supplied provider, there's no need to access CultureInfo.CurrentCulture.

* Address PR feedback

4 years agoUnignore some Makefiles in src/mono (#38923)
Alexander Köplinger [Wed, 8 Jul 2020 11:23:56 +0000 (13:23 +0200)]
Unignore some Makefiles in src/mono (#38923)

The global .gitignore ignores `Makefile` since it's typically just a build artifact of CMake/automake.
However we have a few real Makefiles in src/mono that were excluded by this, resulting in VSCode's search not looking in them.

4 years ago[interp] Remove usage of some gotos (#38813)
Vlad Brezae [Wed, 8 Jul 2020 11:02:05 +0000 (14:02 +0300)]
[interp] Remove usage of some gotos (#38813)

* [interp] Remove usage of some gotos

Their usage resulted in worse code on wasm.

* [interp] Rename method

Seems like something is failing in eglib-remap test

4 years agoMake browser peer for windows_nt and unix (#37944)
Anirudh Agnihotry [Wed, 8 Jul 2020 10:59:37 +0000 (03:59 -0700)]
Make browser peer for windows_nt and unix (#37944)

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

4 years agoJuly infra rollout: Move runtime tests out of the coreclr folder (#38058)
Tomáš Rylek [Wed, 8 Jul 2020 09:48:03 +0000 (11:48 +0200)]
July infra rollout: Move runtime tests out of the coreclr folder (#38058)

* Mechanical move of tests from src/coreclr/tests/src to src/tests

* Minimum changes to make CoreCLR tests build in the new location

(*) Path changes in the test build scripts;
(*) Modify runtime.yml filtering based on Nathan's and Santi's feedback;
(*) Fix runtime pipeline filtering clauses per Santi's PR feedback;
(*) Fix path to Coreclr.TestWrapper.csproj;
(*) Pass unprocessed build args to test wrapper creation;
(*) Fix missing $(TestRoot) on groups in Pri0 test build mode.

Thanks

Tomas

4 years agoReenable fixed tests after noRetyping and similar changes. (#38855)
Sergey Andreenko [Wed, 8 Jul 2020 07:46:55 +0000 (00:46 -0700)]
Reenable fixed tests after noRetyping and similar changes. (#38855)

* Reenable GitHub_26491.

Closes #13355

* Reenable crossgen2 tests failing with old retyping/

They were fixed both with and without retyping.
Closes #37883.

* Reenable HVA merge cases.

Closes #37341, closes #37880.

* Reenable GitHub_35821.

Closes #36206, closes #36418.

The issue was fixed by #37499.

* Delete extra lines that are no longer needed.

#37506 was fixed in #38241.

* delete a throwing init.

4 years agoPrevent shutdown being blocked by finalization (#38909)
Jan Kotas [Wed, 8 Jul 2020 07:23:50 +0000 (00:23 -0700)]
Prevent shutdown being blocked by finalization (#38909)

The finalization queue can be long or constantly growing when the finalization thread is not able to
keep up with finalizable object allocation rate. This can lead to shutdown being blocked for a long
time or indefinitely.

The fix is stop the finalization loop once we enter shutdown instead of trying to empty the finalization
queue.

Fixes #314

4 years agoUse the latest base register while accessing the stack (#38834)
Kunal Pathak [Wed, 8 Jul 2020 06:34:46 +0000 (23:34 -0700)]
Use the latest base register while accessing the stack (#38834)

* logging

* the fix

* revert lclvars.cpp changes

* Revert "revert lclvars.cpp changes"

This reverts commit d39af7084687e8fe5e6d4f71674ec84d36a88340.

* wip

* revert lclvars.cpp changes

* deleted inst_RV_ST()

* removing logging, added some asserts

* jit-formatting

* add back case of INS_add and some more asserts

* reset lclvars.cpp

* delete comments and cleanup code

* revert changes inside common.il

* Revert "Disable failing Windows arm32 tests (#38844)"

This reverts commit 311fd810053bcfc4933d1a371323306f8860b3eb.

* review comments

* added standard function header

4 years agofix failing revocation & ssl tests (#38827)
Tomas Weinfurt [Wed, 8 Jul 2020 03:14:31 +0000 (20:14 -0700)]
fix failing revocation & ssl tests (#38827)

* fix failing tests

* fix casing

* feedback from review

* style update

* retire EndEntityIsServer

4 years agoFix LookupPromotedStructDeathVars out param initialization (#38770)
Bruce Forstall [Wed, 8 Jul 2020 01:02:57 +0000 (18:02 -0700)]
Fix LookupPromotedStructDeathVars out param initialization (#38770)

4 years agoDisable 2 System.Drawing tests for TailcallStress (#38891)
Bruce Forstall [Tue, 7 Jul 2020 23:39:59 +0000 (16:39 -0700)]
Disable 2 System.Drawing tests for TailcallStress (#38891)

Issue: https://github.com/dotnet/runtime/issues/38889

4 years agoDisable DisableAiaOptionWorks for TailcallStress (#38888)
Bruce Forstall [Tue, 7 Jul 2020 23:39:18 +0000 (16:39 -0700)]
Disable DisableAiaOptionWorks for TailcallStress (#38888)

Issue: https://github.com/dotnet/runtime/issues/38887

4 years agoDisable pauseonstart test (#38883)
Bruce Forstall [Tue, 7 Jul 2020 23:38:31 +0000 (16:38 -0700)]
Disable pauseonstart test (#38883)

Issue: https://github.com/dotnet/runtime/issues/38847

4 years agoRemove illegal `delete` of `Instr` objects (#38831)
Bruce Forstall [Tue, 7 Jul 2020 23:26:21 +0000 (16:26 -0700)]
Remove illegal `delete` of `Instr` objects (#38831)

`Instr` objects come from a static pool and should not be deleted
with `delete`. Instead, they are marked no longer used by setting
their `opcode` field to -1.

Fixes #12433

4 years agoRemove static variable holding unboxing stubs (#38838)
David Wrighton [Tue, 7 Jul 2020 22:18:11 +0000 (15:18 -0700)]
Remove static variable holding unboxing stubs (#38838)

- UnboxingMethodDesc is a type that is not intended to escape JIT
interface
- This fix is a combination of 2 changes.
  - First, a change for creation of ldtoken to a generic valuetype method
  - Second, moving a bool to indicate whether or not a method is an
  unboxing stub into the MethodWithToken data structure instead of
  passing it as a side parameter everywhere
- Also, a test case for various generic ldtoken cases is added to
crossgen2smoke
- And, minor fix to make single method compilation of a generic method
function correctly. (There was a typo)

4 years agoDisable `JitDoOldStructRetyping` by default. (#37745)
Sergey Andreenko [Tue, 7 Jul 2020 21:56:45 +0000 (14:56 -0700)]
Disable `JitDoOldStructRetyping` by default. (#37745)

* Disable retyping by default.

* Keep block init/copy as baseline.

Total bytes of diff: -21971 (-0.07% of base)
3075 total methods with Code Size differences (1589 improved, 1486 regressed), 184523 unchanged.

Note: it improves code with retyping as well:
808 total methods with Code Size differences (808 improved, 0 regressed), 186790 unchanged.
Found 55 files with textual diffs.
Crossgen CodeSize Diffs for System.Private.CoreLib.dll, framework assemblies for  default jit
Summary of Code Size diffs:
(Lower is better)
Total bytes of diff: -22923 (-0.07% of base)

* Don't mark LCL_VAR that is used in RETURN(IND(ADDR(LCL_VAR)) as address taken when possible.

Protect against a promoted struct with a hole like struct<8> {hole 4; int a;};

* Replace 1-field structs with the field for returns.

* Add SSA support.

* Review response.

* isOpaqueSIMDLclVar fix

* Add tests for structs with independently promoted SIMD fields.

* Old retyping fix.

* Don't try to replace SIMD fields.

4 years ago[Arm64] ASIMD ReverseElement8 ReverseElement16 ReverseElement32 (#38850)
Egor Chesakov [Tue, 7 Jul 2020 21:16:30 +0000 (14:16 -0700)]
[Arm64] ASIMD ReverseElement8 ReverseElement16 ReverseElement32 (#38850)

4 years agoAdd examples of System.Private.CoreLib iterative workflow (#38885)
Santiago Fernandez Madero [Tue, 7 Jul 2020 20:19:37 +0000 (13:19 -0700)]
Add examples of System.Private.CoreLib iterative workflow (#38885)

* Add examples of System.Private.CoreLib iterative workflow

* Update build.sh

* PR Feedback

4 years ago[wasm] Add PNSE for System.Net.WebClient and skip test suite (#38857)
Maxim Lipnin [Tue, 7 Jul 2020 20:11:17 +0000 (23:11 +0300)]
[wasm] Add PNSE for  System.Net.WebClient and skip test suite (#38857)

4 years agoRewrite System.Net.Http.Json functional tests to use a custom HttpMessageHandler...
Alexander Köplinger [Tue, 7 Jul 2020 20:01:13 +0000 (22:01 +0200)]
Rewrite System.Net.Http.Json functional tests to use a custom HttpMessageHandler (#38733)

All of the tests start a socket-based loopback server which doesn't work on WebAssembly.
We can do the tests using a custom HttpMessageHandler instead of the loopback server as well.

4 years agoPorting serialization fix from 3.1 (#38715)
Matt Connew [Tue, 7 Jul 2020 18:15:06 +0000 (11:15 -0700)]
Porting serialization fix from 3.1 (#38715)

4 years ago[wasm] Add zoneinfo data for System.Runtime.TimeZoneInfoTests
Tammy Qiu [Tue, 7 Jul 2020 18:09:27 +0000 (14:09 -0400)]
[wasm] Add zoneinfo data for System.Runtime.TimeZoneInfoTests

Add zoneinfo data for System.Runtime.TimeZoneInfoTests
* Include dotnet.timezones.blat in runtime pack
* Adding enable-zoneinfo to runscriptcommand in tests.mobile.targets
* add mono_wasm_load_data to library-mono.js

Co-authored-by: Larry Ewing <lewing@microsoft.com>
4 years ago[wasm][debugger] Add support for deref'ing pointers (#36260)
monojenkins [Tue, 7 Jul 2020 17:48:34 +0000 (13:48 -0400)]
[wasm][debugger] Add support for deref'ing pointers (#36260)

Co-authored-by: radical <radical@users.noreply.github.com>
4 years agoTweak BufferPtrSendOperation to address argument confusion (#38868)
Stephen Toub [Tue, 7 Jul 2020 17:41:06 +0000 (13:41 -0400)]
Tweak BufferPtrSendOperation to address argument confusion (#38868)

4 years ago[Wasm]Adjust AppContext.BaseDirectory and enable Microsoft.Extensions tests (#38721)
Steve Pfister [Tue, 7 Jul 2020 17:22:16 +0000 (13:22 -0400)]
[Wasm]Adjust AppContext.BaseDirectory and enable Microsoft.Extensions tests  (#38721)

Adjust AppContext.BaseDirectory to return "/" for wasm because GetEntryAssembly().Location returns an empty string.

This change also enables most of the Microsoft.Extensions.* tests with the exception of DependencyModel and Hosting.

4 years agoAdd linker annotations for System.Text.Json (#38595)
Layomi Akinrinade [Tue, 7 Jul 2020 17:13:51 +0000 (10:13 -0700)]
Add linker annotations for System.Text.Json (#38595)

* Add linker annotations for System.Text.Json

* Review feedback - don't use property accessors in tests and use normal await pattern

* Add annotations to ref & fix immutable collections

* Address review feedback

* Clean up linker tests

* Fix ref file #if directives

* Clean up

* Re-add Hastable.cs

* Remove serialization code from Deserialize overload tests

* Verify collection deserialization is correct

4 years agoDelete dead code related to MDAs (#38825)
Jan Kotas [Tue, 7 Jul 2020 15:05:20 +0000 (08:05 -0700)]
Delete dead code related to MDAs (#38825)

- Unused QCall
- Unused arguments

4 years agoDisable GitHub_27924 for Windows arm (#38845)
Bruce Forstall [Tue, 7 Jul 2020 15:04:43 +0000 (08:04 -0700)]
Disable GitHub_27924 for Windows arm (#38845)

Issue: https://github.com/dotnet/runtime/issues/36681

4 years agoDisable Linux arm64 MinMax_ro test (#38846)
Bruce Forstall [Tue, 7 Jul 2020 15:03:15 +0000 (08:03 -0700)]
Disable Linux arm64 MinMax_ro test (#38846)

Issue: https://github.com/dotnet/runtime/issues/38799

4 years agoDisable failing Windows arm32 tests (#38844)
Bruce Forstall [Tue, 7 Jul 2020 15:01:17 +0000 (08:01 -0700)]
Disable failing Windows arm32 tests (#38844)

Issue: https://github.com/dotnet/runtime/issues/36199

4 years ago[wasm] Mark System.Net.WebSockets.Tests.WebSocketProtocolCreateTests class with an...
Maxim Lipnin [Tue, 7 Jul 2020 13:35:19 +0000 (16:35 +0300)]
[wasm] Mark System.Net.WebSockets.Tests.WebSocketProtocolCreateTests class with an active issue (#38854)

4 years agoFixed outerloop tests for Sync HttpClient API (#38453)
Marie Píchová [Tue, 7 Jul 2020 13:08:05 +0000 (15:08 +0200)]
Fixed outerloop tests for Sync HttpClient API (#38453)

4 years agoAdd eventpipe to dist files (#38858)
monojenkins [Tue, 7 Jul 2020 12:11:14 +0000 (08:11 -0400)]
Add eventpipe to dist files (#38858)

make dist fails as mono/eventpipe/Makefile never makes it into the tarball.

Co-authored-by: nealef <nealef@users.noreply.github.com>
4 years agoChanged checks for hardware intrinsics get_IsSupported() (#38835)
Yuchong Pan [Tue, 7 Jul 2020 09:47:07 +0000 (02:47 -0700)]
Changed checks for hardware intrinsics get_IsSupported() (#38835)

4 years ago[interp] Access frame arguments as locals (#38553)
monojenkins [Tue, 7 Jul 2020 07:46:22 +0000 (03:46 -0400)]
[interp] Access frame arguments as locals (#38553)

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoRemove additional testhost binplacing (#38816)
Viktor Hofer [Tue, 7 Jul 2020 06:24:12 +0000 (08:24 +0200)]
Remove additional testhost binplacing (#38816)

The additional testhost binplacing is dead code as the native assets
are already binplaced by default into the testhost.

4 years ago[Arm64] ASIMD MultiplyDoubling* and MultiplyRoundedDoubling* intrinsics (#38725)
Egor Chesakov [Tue, 7 Jul 2020 05:22:29 +0000 (22:22 -0700)]
[Arm64] ASIMD MultiplyDoubling* and MultiplyRoundedDoubling* intrinsics (#38725)

* MultiplyDoublingByScalarSaturateHigh

* MultiplyDoublingBySelectedScalarSaturateHigh

* MultiplyDoublingSaturateHigh

* MultiplyDoublingSaturateHighScalar

* MultiplyDoublingScalarBySelectedScalarSaturateHigh

* MultiplyDoublingWideningAndAddSaturateScalar

* MultiplyDoublingWideningAndSubtractSaturateScalar

* MultiplyDoublingWideningLowerAndAddSaturate

* MultiplyDoublingWideningLowerAndSubtractSaturate

* MultiplyDoublingWideningLowerByScalarAndAddSaturate

* MultiplyDoublingWideningLowerByScalarAndSubtractSaturate

* MultiplyDoublingWideningLowerBySelectedScalarAndAddSaturate

* MultiplyDoublingWideningLowerBySelectedScalarAndSubtractSaturate

* MultiplyDoublingWideningSaturateLower

* MultiplyDoublingWideningSaturateLowerByScalar

* MultiplyDoublingWideningSaturateLowerBySelectedScalar

* MultiplyDoublingWideningSaturateScalar

* MultiplyDoublingWideningSaturateScalarBySelectedScalar

* MultiplyDoublingWideningSaturateUpper

* MultiplyDoublingWideningSaturateUpperByScalar

* MultiplyDoublingWideningSaturateUpperBySelectedScalar

* MultiplyDoublingWideningScalarBySelectedScalarAndAddSaturate

* MultiplyDoublingWideningScalarBySelectedScalarAndSubtractSaturate

* MultiplyDoublingWideningUpperAndAddSaturate

* MultiplyDoublingWideningUpperAndSubtractSaturate

* MultiplyDoublingWideningUpperByScalarAndAddSaturate

* MultiplyDoublingWideningUpperByScalarAndSubtractSaturate

* MultiplyDoublingWideningUpperBySelectedScalarAndAddSaturate

* MultiplyDoublingWideningUpperBySelectedScalarAndSubtractSaturate

* MultiplyRoundedDoublingByScalarSaturateHigh

* MultiplyRoundedDoublingBySelectedScalarSaturateHigh

* MultiplyRoundedDoublingSaturateHigh

* MultiplyRoundedDoublingSaturateHighScalar

* MultiplyRoundedDoublingScalarBySelectedScalarSaturateHigh

4 years agoMove rarely used lookup table out of HeaderDescriptor static ctor (#38761)
Marek Safar [Tue, 7 Jul 2020 04:15:59 +0000 (06:15 +0200)]
Move rarely used lookup table out of HeaderDescriptor static ctor (#38761)

* Move rarely used lookup table out of HeaderDescriptor static ctor

* Move QPackStaticTable to its own file

4 years ago[wasm] Enable System.Net.WebSockets tests; mark System.Net.WebSockets.Tests.WebSocket...
Maxim Lipnin [Tue, 7 Jul 2020 04:14:49 +0000 (07:14 +0300)]
[wasm] Enable System.Net.WebSockets tests; mark System.Net.WebSockets.Tests.WebSocketTests with an active issue (#38808)

4 years agoAdd support for multiple non-string TKey on dictionaries (#38056)
David Cantu [Tue, 7 Jul 2020 02:10:17 +0000 (19:10 -0700)]
Add support for multiple non-string TKey on dictionaries (#38056)

* Add support for multiple non-string TKey on dictionaries

* Fix build errors

* Fix performance regression

* Add Read/WriteWithQuotes to the remaining supported types

* Add support for a few more missing types

* Add policy support for Enum keys

* Address performance regression.

* Fix test error on netstandard

* 1. Add support for escaped characters on Read and avoid escaping on Write
2. Address some feedback

* Remove TryGet*Core methods to mitigate perf regression

* Remove duplicated escaping tests

* Cache TKey and TValue converters

* Remove duplicated code used to read the dictionary key

* Bring back TryGet*Core

* Fix test errors with floating point types

* Address nits and feedback from steveharter

4 years agoAdd method names next to reloc adrp/add in disasm (#38671)
Kunal Pathak [Tue, 7 Jul 2020 01:56:45 +0000 (18:56 -0700)]
Add method names next to reloc adrp/add in disasm (#38671)

* adrp+add emit displaying

* Add method names in disasm

* jit formatting

* update method signature for arm

* Rename GC to GS to refer Global security

* unique enum MethodHandleType

* Add code-path for field access

* fix build break

* Use gtFlags to track the target handle type

* Rename methodHandle to targetHandle

* revert the change for static field access

* Handle a case where we were getting TOKEN_HANDLE

* fix build break

* some more renaming to relevant name

* fix typo

* fix the linux build break

4 years agoremove area-sdk from area owners list (#38836)
Dan Moseley [Tue, 7 Jul 2020 00:52:11 +0000 (17:52 -0700)]
remove area-sdk from area owners list (#38836)

As per discussion with @jeffschwMSFT @marcpopMSFT such issues should be in https://github.com/dotnet/sdk. All active issues already moved, label deleted.

4 years agoUse ExecutionContext.Restore rather than EC.Run callback (#37942)
Ben Adams [Mon, 6 Jul 2020 22:50:47 +0000 (23:50 +0100)]
Use ExecutionContext.Restore rather than EC.Run callback (#37942)

Use ExecutionContext.Restore rather than EC.Run callback

Only running inline needs to do extra work and error handling for post run restore

4 years agoUpdate area-owners.md (#38821)
Tom McDonald [Mon, 6 Jul 2020 19:48:38 +0000 (12:48 -0700)]
Update area-owners.md (#38821)

Update UWP ownership

4 years agoFix typo in EmailAddressAttribute.cs (#38802)
Charles Milette [Mon, 6 Jul 2020 17:23:05 +0000 (13:23 -0400)]
Fix typo in EmailAddressAttribute.cs (#38802)

ErrrorMessage -> ErrorMessage

4 years agoIgnore 0-byte responses from AIA fetch.
Kevin Jones [Mon, 6 Jul 2020 16:49:14 +0000 (12:49 -0400)]
Ignore 0-byte responses from AIA fetch.

When fetching a certificate with AIA, we should ignore responses that
are zero bytes in length. A zero-byte value passed to X509Certificate2
will create a default certificate with a null PAL. This was being
passed in to the OpenSSL chain builder, and would pass in a null handle
for the certificate.

4 years agoMake parts of ResourceManager trimming safe (#38432)
Michal Strehovský [Mon, 6 Jul 2020 12:48:47 +0000 (14:48 +0200)]
Make parts of ResourceManager trimming safe (#38432)

We'll need a feature switch to turn off support for the parts that read text strings out of resources to make this fully safe.

4 years ago[wasm][debugger] Don't download unnecessary assemblies to DebugProxy (#38469)
monojenkins [Mon, 6 Jul 2020 12:04:53 +0000 (08:04 -0400)]
[wasm][debugger] Don't download unnecessary assemblies to DebugProxy (#38469)

Identify if an assembly has debug information and only download it to debug proxy if it has, this will speed up a lot the debugger initialisation.

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years ago[browser][wasm][tests] Add tests for javascript Array (#38806)
Kenneth Pouncey [Mon, 6 Jul 2020 11:57:41 +0000 (13:57 +0200)]
[browser][wasm][tests] Add tests for javascript Array (#38806)

4 years agoFix native file handling for Crossgen2 package (#38788)
Anton Lapounov [Mon, 6 Jul 2020 06:13:34 +0000 (23:13 -0700)]
Fix native file handling for Crossgen2 package (#38788)

4 years agoCheck loh_compacted_p of the right heap (#38784)
Andrew Au [Sun, 5 Jul 2020 02:21:01 +0000 (19:21 -0700)]
Check loh_compacted_p of the right heap (#38784)

4 years agoReplace XML descriptors for SRE with DynamicDependency attributes (#38757)
Marek Safar [Sat, 4 Jul 2020 22:34:45 +0000 (00:34 +0200)]
Replace XML descriptors for SRE with DynamicDependency attributes (#38757)

* Replace XML descriptors for SRE with DynamicDependency attributes

Fixes #38692

* Remove duplicate using

4 years agoRemove redundant initializations in SPC (#38759)
Marek Safar [Sat, 4 Jul 2020 22:33:58 +0000 (00:33 +0200)]
Remove redundant initializations in SPC (#38759)

* Remove redundant initializations in SPC

* Update comment

4 years agoMake CultureData properties static to allow illinker to more dead code (#38778)
Marek Safar [Sat, 4 Jul 2020 22:32:56 +0000 (00:32 +0200)]
Make CultureData properties static to allow illinker to more dead code (#38778)

4 years agoSkip System.Configuration.ConfigurationManager tests on WASM (#38749)
Maxim Lipnin [Sat, 4 Jul 2020 13:58:43 +0000 (16:58 +0300)]
Skip System.Configuration.ConfigurationManager tests on WASM (#38749)

4 years agoClean up System.Net.Http build a bit for browser (#38775)
Marek Safar [Sat, 4 Jul 2020 07:49:23 +0000 (09:49 +0200)]
Clean up System.Net.Http build a bit for browser (#38775)

4 years agox86 P/Invokes marked with UnmanagedCallersOnly require marshalling (#38740)
Aaron Robinson [Fri, 3 Jul 2020 23:09:19 +0000 (16:09 -0700)]
x86 P/Invokes marked with UnmanagedCallersOnly require marshalling (#38740)

* x86 P/Invokes marked with UnmanagedCallersOnly require marshalling
Fix generated IL for test.

* Always throw NotSupportedException for UnmanagedCallersOnly usage on
  P/Invokes.

4 years agoReturn true for PlatformDection.IsMonoInterpreter on WASM (#38768)
Alexander Köplinger [Fri, 3 Jul 2020 21:21:24 +0000 (23:21 +0200)]
Return true for PlatformDection.IsMonoInterpreter on WASM (#38768)

The property only checked for the `MONO_ENV_OPTIONS=--interpreter` env var which isn't set on WebAssembly.

This needed an arcade fix to correct an inverted condition in the ActiveIssue discoverer: https://github.com/dotnet/arcade/pull/5744

4 years ago[Test] Reverse EventPipe test improvements (#38474)
John Salem [Fri, 3 Jul 2020 17:18:10 +0000 (10:18 -0700)]
[Test] Reverse EventPipe test improvements (#38474)

* generalize clean env check

* Remove in-test timeouts
* timeouts will show up as test failures and trigger dump collection
* Add notification of and diagnostics on early subprocess exit

* move pathologic test to outer loop

* Turn back on other reverse tests

* Respond to PR feedback

4 years agoAsk about prior art in API review template (#38727)
Dan Moseley [Fri, 3 Jul 2020 15:48:44 +0000 (08:48 -0700)]
Ask about prior art in API review template (#38727)

* Ask about prior art in API review template

As an example, https://github.com/dotnet/runtime/issues/35088 described an analogous pattern in the Go ecosystem. While we have distinct patterns and rules for .NET API, if there's analogous prior art it may be interesting to compare approaches.

* Update .github/ISSUE_TEMPLATE/02_api_proposal.md

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoMake DependencyInjection more linker trimmable (#38729)
Eric Erhardt [Fri, 3 Jul 2020 15:28:45 +0000 (10:28 -0500)]
Make DependencyInjection more linker trimmable (#38729)

* Make DependencyInjection more linker trimmable

Allow the unused ServiceProviderEngine strategy types to be trimmed by the ILLinker.

This allows for System.Linq.Expressions to be completely removed in a default Blazor application. It also removes one of two usages of System.Reflection.Emit.

Fix #38678

4 years agoReplace linker descriptor for AssemblyBuilder with DynamicDependency (#38710)
Marek Safar [Fri, 3 Jul 2020 15:11:38 +0000 (17:11 +0200)]
Replace linker descriptor for AssemblyBuilder with DynamicDependency (#38710)

* Replace linker descriptor for AssemblyBuilder with DynamicDependency

for better linking when AssemblyBuilder is not instantiated.

Contributes to #38692

* Review feedback

4 years agoWASM: Add PNSE for System.Net.Mail (#38207)
Alexander Köplinger [Fri, 3 Jul 2020 14:50:58 +0000 (16:50 +0200)]
WASM: Add PNSE for System.Net.Mail (#38207)

It's not supported on WebAssembly so throw PlatformNotSupportedException.

4 years agoAnnotate more Mono reflection for trimming (#38431)
Michal Strehovský [Fri, 3 Jul 2020 13:10:59 +0000 (15:10 +0200)]
Annotate more Mono reflection for trimming (#38431)

4 years agoCreate CLR interpreter Azure DevOps Pipeline (#38650)
Bruce Forstall [Fri, 3 Jul 2020 04:47:02 +0000 (21:47 -0700)]
Create CLR interpreter Azure DevOps Pipeline (#38650)

* Create CLR interpreter Azure DevOps Pipeline

This builds the runtime using:
```
-cmakeargs "-DFEATURE_INTERPRETER=1"
```
and runs Pri-0 tests using the interpreter.

* Replace C++ `assert` with VM-standard `_ASSERTE` in interpreter

4 years agoHonor user setting overrides for current culture when using ICU on Windows (#38372)
Santiago Fernandez Madero [Fri, 3 Jul 2020 03:57:04 +0000 (20:57 -0700)]
Honor user setting overrides for current culture when using ICU on Windows (#38372)

* Honor user setting overrides for current culture when using ICU on Windows

* Fix mono build

* PR Feedback, fix builds

* PR Feedback and fix build errors

* Remove using statement

* Fix Invariant tests

* Fix get time formats and PR feedback

* Revert test changes that are not needed

* PR Feedback and cleanup

* Move invariant check for UserDefaultLocaleName to helper method

4 years agoPorting additional SIMD Intrinsics to use SimdAsHWIntrinsic (#37882)
Tanner Gooding [Fri, 3 Jul 2020 02:49:39 +0000 (19:49 -0700)]
Porting additional SIMD Intrinsics to use SimdAsHWIntrinsic (#37882)

* Moving SIMDIntrinsicInit to use SimdAsHWIntrinsic

* Optimize the simple case of Create(0) and Create(-1) to get_Zero and get_AllBitsSet

* Adding a new gtNewSimdCreateBroadcastNode method

* Updating SIMDIntrinsicGetOne to use SimdAsHWIntrinsic

* Fixing build errors

* Ensure all forms of ToScalar are intrinsic on x86

* Moving SIMDIntrinsicDot to use SimdAsHWIntrinsic

* Removing SIMDIntrinsicDot, SIMDIntrinsicAdd, SIMDIntrinsicMul, and SIMDIntrinsicDiv

* Removing SIMDIntrinsicGetCount, SIMDIntrinsicGetOne, SIMDIntrinsicGetAllOnes, and SIMDIntrinsicGetZero

* Default TYP_SIMD12 constants to be 16 bytes

* Get the simdType from the size for LowerHWIntrinsicDot

* Applying formatting patch

* Use AddPairwise for floating-point dot product

* Applying formatting patch

* Correctly handle decomposed long constants on x86

* Check JitConfig.EnableHWIntrinsic when in impSIMDIntrinsic or impSimdAsHWIntrinsic

* Ensure AdvSimd.Arm64.Multiply is used for TYP_DOUBLE

* Applying formatting patch

* Updating LowerHWIntrinsicCreate to handle TYP_SIMD8 retyped as TYP_DOUBLE and fixing VectorT128_get_One

* Ensure the CreateBroadcast SimdAsHWIntrinsic nodes have the correct gtType

* Applying formatting patch

* Apply suggestions from code review

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
* Adding some additional clarifying comments

* Breaking NI_Vector256_ToScalar importation logic into its own checks

* Applying formatting patch

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
4 years agoFix memberref resolution involving substitution (#38688)
David Wrighton [Fri, 3 Jul 2020 01:38:02 +0000 (18:38 -0700)]
Fix memberref resolution involving substitution (#38688)

n .NET it is not considered a breaking change to move a method from a derived type to its base type. This is reflected by the behavior of memberref processing.

The previous implementation of this in crossgen2 did not correctly handle the substitutions required when processing this form of memberref in the case where the base type is a generic type not instantiated over the same set of generic parameters as the derived type.

This change fixes that, and adds a unit test to that effect.

Fixes #38648

4 years agoEnable SA1404 Code analysis suppression should have justification (#38537)
Stephen Toub [Fri, 3 Jul 2020 00:45:55 +0000 (20:45 -0400)]
Enable SA1404 Code analysis suppression should have justification (#38537)

4 years agoFix race condition in BatchBlock's handling of completion (#38651)
Stephen Toub [Fri, 3 Jul 2020 00:45:37 +0000 (20:45 -0400)]
Fix race condition in BatchBlock's handling of completion (#38651)

When a BatchBlock is marked for completion, it will no longer consume postponed messages.  But the BatchesNeedProcessing method, which factors in the number of postponed messages, is accidentally ignoring the _decliningPermanently flag that indicates completion was requested.  As a result, with just the right sequence of operations, the BatchBlock can get stuck in a state where it sees postponed messages and queues a task to process them, but that task then sees that it's declining permanently and so doesn't touch any of the postponed messages, and then upon checking to see if it can complete, sees there are postponed messages, and loops again, resulting in a potentially infinite asynchronous loop.  The fix is just to check _decliningPermanently in BatchesNeedProcessing when considering postponed messages.

4 years agoWASM: Enable System.Threading.Tasks.Dataflow tests (#38723)
Alexander Köplinger [Fri, 3 Jul 2020 00:01:38 +0000 (02:01 +0200)]
WASM: Enable System.Threading.Tasks.Dataflow tests (#38723)

With the recent async Tasks fix we can now skip just a handful of tests to get the testsuite to passing: `Tests run: 317, Errors: 0, Failures: 0, Skipped: 18. Time: 18.780363s`

4 years agoEnable ilasm/ildasm round trip testing in new AzDO pipeline (#38490)
Bruce Forstall [Thu, 2 Jul 2020 23:51:20 +0000 (16:51 -0700)]
Enable ilasm/ildasm round trip testing in new AzDO pipeline (#38490)

* Enable ilasm/ildasm round trip testing in new AzDO pipeline

Pipeline is `runtime-coreclr ilasm`.

Also, add an optional `IlasmRoundTripIncompatible` msbuild
property to allow disabling tests for the IlasmRoundTrip test.

* Disable tests for ilasm round-trip testing

Tracking issues:
https://github.com/dotnet/runtime/issues/11412
https://github.com/dotnet/runtime/issues/38515
https://github.com/dotnet/runtime/issues/38506
https://github.com/dotnet/runtime/issues/38507
https://github.com/dotnet/runtime/issues/38508
https://github.com/dotnet/runtime/issues/38529

4 years agoAdd new Unmanaged MD calling convention value (#38357)
Aaron Robinson [Thu, 2 Jul 2020 23:44:39 +0000 (16:44 -0700)]
Add new Unmanaged MD calling convention value (#38357)

* Respect new MD bit in runtime

* Throw "not implemented".

* Update parser for ILAsm
Add text based grammar file for IL tooling

* Update ILDasm

* Add disabled test project for function pointers.

* Add feature detection.

4 years agoDon't ship experimental packages to nuget (#38724)
Santiago Fernandez Madero [Thu, 2 Jul 2020 23:41:20 +0000 (16:41 -0700)]
Don't ship experimental packages to nuget (#38724)

4 years agoupdate DacHeapWalker to know about POH, which will start returning POH segments and...
David Mason [Thu, 2 Jul 2020 23:12:59 +0000 (16:12 -0700)]
update DacHeapWalker to know about POH, which will start returning POH segments and objects in ICorDebug (#38146)

4 years agoAdded doc with instructions to run ASP.NET Benchmarks with crossgen2 (#38695)
Ivan Diaz Sanchez [Thu, 2 Jul 2020 23:05:39 +0000 (16:05 -0700)]
Added doc with instructions to run ASP.NET Benchmarks with crossgen2 (#38695)

* Added doc with instructions on running basic ASP.NET Benchmarks with crossgen2.

* Shortened clr+libs command in Asp.Net Benchmarks doc.

4 years ago[browser][wasm] Wasm websockets support (#37962)
Kenneth Pouncey [Thu, 2 Jul 2020 21:57:45 +0000 (23:57 +0200)]
[browser][wasm] Wasm websockets support (#37962)

* [browser][wasm] Initial addition of WebSockets support

* Clean up usings

* Create and use a WebSocketHandle.Browser.cs module

* Add conditional TARGETS_BROWSER so as not to throw Proxy PNSE during ClientWebSocket creation.

* Update WebSockets code

* Removing debug line

* Remove `ThrowIfReadOnly` method to address review comments

* Address review comments

- change accessor of _requestedSubProtocols to private
- condition more code in WebSocketHandle.Managed.cs to not access _requestedSubProtocols

* Address review comments

* Address review comments

* Change to be PlatformNotSupportedException

* Add ConnectAsync implementation to create a new instance of the BrowserWebSocket implementation.

* Address review comments

* Address subprotocols comments

* Remove internal custom class ActionQueue class in favor of using a Channel.

* Fix object leak.

- Lambdas are not being released automatically.

* Add doc for the constant that is being used.

- Address review comment

* Clean up SendAsync method.

- Validate the message type.
- Validate the array segment that is passed as the message.

* Add validation to ReceiveAsync for invalid buffer.

- remove unnecessary null checks from message buffering.

* Address review comments

* Address review comments about TCS

* Address camel case by using enum

* Address abort request

* Handle nullable

* Address review comment for removing cancellationtoken registration to the connect source.

* Use non-generic TaskCompletionSource

* Cleanup var usage

* Add string to .resx

* Inline dispose

* Fix WebSocket opening exception

* Remove the asynchronous completion from SendAsync.

* Fix object leak, exception on close and address review comments

* Handle race condition

* Address  TaskCompletionSource on connect review comments

* Update src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
* Update src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
* Fix Connect not completing task on error.

* Cleanup reference

* Remove redundant error check of memorystream buffer.

* cleanup

* Update src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj

Co-authored-by: Maxim Lipnin <mlipnin@gmail.com>
* Update src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj

Co-authored-by: Maxim Lipnin <mlipnin@gmail.com>
* Update src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj

Co-authored-by: Maxim Lipnin <mlipnin@gmail.com>
* Update src/libraries/System.Net.WebSockets.Client/src/System.Net.WebSockets.Client.csproj

Co-authored-by: Maxim Lipnin <mlipnin@gmail.com>
* Fix typo

* clean up buffer code

* Modify callbacks to use lambda function.

- These are now released properly after reference counting went in.

* Fix object leak of delegate and clean up deprecated code.

* extract lambda into method

* Update src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Net.WebSockets.Client/src/System/Net/WebSockets/BrowserWebSockets/BrowserWebSocket.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Review comments addressed

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
Co-authored-by: Maxim Lipnin <mlipnin@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoTrivial fix and renaming (#38687)
Maoni Stephens [Thu, 2 Jul 2020 19:21:49 +0000 (12:21 -0700)]
Trivial fix and renaming (#38687)

+ When allocating in UOH free list we should do >= (min_obj_size) instead of >.
+ Renamed loh_a_fit_segment_end_p to uoh_a_fit_segment_end_p (should have been part of the refactoring work)

4 years agoEnable some System.Runtime.Loader tests for Mono (#38581)
Alexis Christoforides [Thu, 2 Jul 2020 17:26:44 +0000 (13:26 -0400)]
Enable some System.Runtime.Loader tests for Mono (#38581)

Contributes to https://github.com/mono/mono/issues/15142

4 years ago[Arm64] ASIMD InsertScalar and rename to ShiftLeftAndInsert ShiftRightAndInsert ...
Egor Chesakov [Thu, 2 Jul 2020 17:14:07 +0000 (10:14 -0700)]
[Arm64] ASIMD InsertScalar and rename to ShiftLeftAndInsert ShiftRightAndInsert  (#38680)

* Implements InsertScalar

* Uses InsertScalar to implement Vector128<T>.WithLower() and Vector128<T>.WithUpper()

* Renames ShiftLeftLogicalAndInsert to ShiftLeftAndInsert and ShiftRightLogicalAndInsert to ShiftRightAndInsert

4 years agoBump xharness to bring in https://github.com/dotnet/xharness/pull/282 (#38706)
Alexander Köplinger [Thu, 2 Jul 2020 14:22:18 +0000 (16:22 +0200)]
Bump xharness to bring in https://github.com/dotnet/xharness/pull/282 (#38706)

4 years agoUse full MD5 to compare bitmap rotate results (#38699)
Nicolas Portmann [Thu, 2 Jul 2020 13:27:04 +0000 (15:27 +0200)]
Use full MD5 to compare bitmap rotate results (#38699)

4 years ago[wasm] Add assembly level skip for System.Net.Requests on Browser (#38674)
Mitchell Hwang [Thu, 2 Jul 2020 12:25:08 +0000 (08:25 -0400)]
[wasm] Add assembly level skip for System.Net.Requests on Browser (#38674)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoWASM: Add an internal method to pump the threadpool (#38690)
Alexander Köplinger [Thu, 2 Jul 2020 12:19:20 +0000 (14:19 +0200)]
WASM: Add an internal method to pump the threadpool (#38690)

This can by used by the xharness xunit runner to make sure async tasks are executed.

We also need to tweak how `ThreadPoolTaskScheduler` handles `TaskCreationOptions.LongRunning` since the usual mode of starting a new thread doesn't work, instead we treat it like the option wasn't set and queue the task on the threadpool.