platform/upstream/dotnet/runtime.git
4 years agoFix SOS/managed debugging failures from PR #36847 (#38689)
Mike McLaughlin [Thu, 2 Jul 2020 02:30:12 +0000 (19:30 -0700)]
Fix SOS/managed debugging failures from PR #36847 (#38689)

Add PAL_GetApplicationGroupId() that returns null for Linux.

4 years ago[wasm] Ignore missing assemblies in the wasm app builder. (#38672)
Zoltan Varga [Thu, 2 Jul 2020 02:15:25 +0000 (22:15 -0400)]
[wasm] Ignore missing assemblies in the wasm app builder. (#38672)

4 years agoFix interpreter build (#38673)
Bruce Forstall [Thu, 2 Jul 2020 02:14:59 +0000 (19:14 -0700)]
Fix interpreter build (#38673)

Fix interpreter build

4 years agoTurn on argument exception analyzer on runtime, fix warnings found (#38578)
buyaa-n [Thu, 2 Jul 2020 01:36:56 +0000 (18:36 -0700)]
Turn on argument exception analyzer on runtime, fix warnings found (#38578)

* Turn on argument exception analyzer on runtime, fix failures found

4 years agoAlign native SpecializeComparer with managed ComparerHelpers (#38681)
Nicolas Portmann [Thu, 2 Jul 2020 00:37:54 +0000 (02:37 +0200)]
Align native SpecializeComparer with managed ComparerHelpers (#38681)

* Align SpecializeComparer with ComparerHelpers

* Align SpecializeEqualityComparer with ComparerHelpers

4 years agoRemove dead code paths in System.Transactions.Local (#38685)
Levi Broderick [Thu, 2 Jul 2020 00:35:16 +0000 (17:35 -0700)]
Remove dead code paths in System.Transactions.Local (#38685)

4 years agoadd two SslStream tests for custom validation (#38182)
Tomas Weinfurt [Wed, 1 Jul 2020 23:50:34 +0000 (16:50 -0700)]
add two SslStream tests for custom validation (#38182)

* add two SslStream tests for custom validation

* use BuildPrivatePki

* feedback from review

* disable on windows

4 years agoAdd platform-specific attributes (#38604)
William Li [Wed, 1 Jul 2020 23:48:42 +0000 (16:48 -0700)]
Add platform-specific attributes (#38604)

* Add platform-specific attributes

Spec https://github.com/dotnet/runtime/issues/33331

* Convert to xml doc

* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MinimumOSAttribute.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ObsoletedInPlatformAttribute.cs

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
* Address code review

* Add to ref assembly, test and fix build errors

* Fix spacing, revert unwanted changes

* Namespace was wrong, updated

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Buyaa Namnan <bunamnan@microsoft.com>
4 years agoDisable the two remaining CG2 composite failure buckets (#38299)
Tomáš Rylek [Wed, 1 Jul 2020 22:14:27 +0000 (00:14 +0200)]
Disable the two remaining CG2 composite failure buckets (#38299)

4 years agoFix type layout with explicitly sized structs and classes (#38632)
David Wrighton [Wed, 1 Jul 2020 22:06:24 +0000 (15:06 -0700)]
Fix type layout with explicitly sized structs and classes (#38632)

- Mimic the alignment and other algorithms present in coreclr
- Add tests to crossgen2smoke to cover these scenarios
- Update type system unit tests so that they can run in VS
- Fix issue #38450

4 years agofix for cg2 + sealed default interface methods (#38575)
Manish Godse [Wed, 1 Jul 2020 21:50:19 +0000 (14:50 -0700)]
fix for cg2 + sealed default interface methods (#38575)

* move the interface check to be before versionbubble

* updating fix to check for TypicalMethod of the target

* Adding a comment to clarify the check

* uncoditinoally invoke GetTypicalMethodDef

* Add a smoke test.

* moving the interface check to before version bubble

Also adding a cross module test.

4 years agoadd TargetHostName to SslStream (#38202)
Tomas Weinfurt [Wed, 1 Jul 2020 20:45:12 +0000 (13:45 -0700)]
add TargetHostName to SslStream (#38202)

* add TargetHostName to SslStream

* fix unit tests

* feedback from review

4 years ago[wasm] Make Common.Tests pass (#38667)
Maxim Lipnin [Wed, 1 Jul 2020 20:41:59 +0000 (23:41 +0300)]
[wasm] Make Common.Tests pass (#38667)

* Make Common.Tests pass

* Remove Common test project from the exclusion list

4 years ago[mono] Implement getting the type modifiers for DynamicMethod parameters (#38646)
Alexis Christoforides [Wed, 1 Jul 2020 20:14:30 +0000 (16:14 -0400)]
[mono] Implement getting the type modifiers for DynamicMethod parameters (#38646)

* [mono] Implement getting the type modifiers for DynamicMethod parameters

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

* Remove unused parameter from type_array_from_modifiers()

4 years agoBump Helix SDK with breaking change in XHarness SDK (#38665)
Přemek Vysoký [Wed, 1 Jul 2020 19:40:33 +0000 (21:40 +0200)]
Bump Helix SDK with breaking change in XHarness SDK (#38665)

There is a small breaking change in the SDK about how we run the XHarness tool - we are no longer installing the full .NET SDK to install the tool on every agent but rather installing it on the build machine and then shipping it as-is as Helix correlation payload. We then only need the .NET runtime to be installed on the Helix agents saving us bandwidth and cycles

4 years agoFix scalar check when fixing up struct return. (#38644)
Carol Eidt [Wed, 1 Jul 2020 19:37:52 +0000 (12:37 -0700)]
Fix scalar check when fixing up struct return. (#38644)

Fix #38455

4 years agoMono: reenable tests in System.ComponentModel.Composition.Registration that were...
Alexander Köplinger [Wed, 1 Jul 2020 17:37:55 +0000 (19:37 +0200)]
Mono: reenable tests in System.ComponentModel.Composition.Registration that were fixed (#38658)

Closes https://github.com/dotnet/runtime/issues/32744

4 years agoInclude System Directory in search dirs for app local ICU (#38649)
Santiago Fernandez Madero [Wed, 1 Jul 2020 17:09:30 +0000 (10:09 -0700)]
Include System Directory in search dirs for app local ICU (#38649)

4 years agoTidy up ARM tools installation instructions (#38676)
Eirik Tsarpalis [Wed, 1 Jul 2020 17:07:33 +0000 (18:07 +0100)]
Tidy up ARM tools installation instructions (#38676)

4 years ago[mono] Change default output encoding for ConsolePal.WebAssembly.cs to utf8 (#38641)
Egor Bogatov [Wed, 1 Jul 2020 16:12:56 +0000 (19:12 +0300)]
[mono] Change default output encoding for ConsolePal.WebAssembly.cs to utf8 (#38641)

* Change default output encoding to utf8 for wasm

4 years ago[docs] Fix wasm testing example directories (#38624)
Aleksey Kliger (λgeek) [Wed, 1 Jul 2020 16:04:16 +0000 (12:04 -0400)]
[docs] Fix wasm testing example directories (#38624)

And use a testsuite that passes for the example

4 years agoAdd ExcludeFromCodeCoverageAttribute.Justification property (#38520)
Stephen Toub [Wed, 1 Jul 2020 12:50:39 +0000 (08:50 -0400)]
Add ExcludeFromCodeCoverageAttribute.Justification property (#38520)

* Add ExcludeFromCodeCoverage.Justification property

Delete some ExcludeFromCodeCoverages that aren't warranted, and add justifications almost everywhere else (only not doing so where a project builds for targets without the member).

* Update src/libraries/Microsoft.CSharp/src/Microsoft/CSharp/RuntimeBinder/Semantics/Types/PointerType.cs

Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com>
Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com>
4 years ago[wasm] Rename obsolete --llvm-lto 1 argument, lto is already enabled when -s WASM_OBJ...
Zoltan Varga [Wed, 1 Jul 2020 11:00:44 +0000 (07:00 -0400)]
[wasm] Rename obsolete --llvm-lto 1 argument, lto is already enabled when -s WASM_OBJECT_FILES=0 is used. (#38370)

4 years agofixes genapi for project with corelib reference (#38656)
Anirudh Agnihotry [Wed, 1 Jul 2020 07:06:44 +0000 (00:06 -0700)]
fixes genapi for project with corelib reference (#38656)

4 years agoFix 'varDsc->lvExactSize == 12' assert. (#38484)
Sergey Andreenko [Wed, 1 Jul 2020 05:25:48 +0000 (22:25 -0700)]
Fix 'varDsc->lvExactSize == 12' assert. (#38484)

* Require struct handler to be set after for CSE.

* Reenable the test.

* fix for empty cache

* Update the comment.

4 years agoAdd native runtime components to Crossgen2 package. (#38600)
Anton Lapounov [Wed, 1 Jul 2020 05:16:37 +0000 (22:16 -0700)]
Add native runtime components to Crossgen2 package. (#38600)

For Windows, add clrcompression.dll to the package. For Linux, add { libSystem.IO.Compression.Native.so, libSystem.Native.so, libSystem.Net.Security.Native.so, libSystem.Security.Cryptography.Native.OpenSsl.so } to the package and also remove the corresponding static libraries with the .a extension from crossgen2.deps.json.

4 years ago[browser][wasm][tests] Add tests for TypedArrays (#38612)
Kenneth Pouncey [Wed, 1 Jul 2020 04:42:58 +0000 (06:42 +0200)]
[browser][wasm][tests] Add tests for TypedArrays (#38612)

* [browser][wasm][tests] Add tests for TypedArrays

* Address review comments

4 years agoEnable PInvoke stub compilation for R2R (#35229)
Dong-Heon Jung [Wed, 1 Jul 2020 02:41:48 +0000 (11:41 +0900)]
Enable PInvoke stub compilation for R2R (#35229)

R2R doesn't generate PInvoke stub for arm because of crossbitness issue.
This patch enables PInvoke stub compilation for R2R,
and updates native size, field offset, and so on based on target machine's bitness.

4 years agoJit liveness fix. (#38591)
Eugene Rozenfeld [Wed, 1 Jul 2020 01:16:41 +0000 (18:16 -0700)]
Jit liveness fix. (#38591)

`fgComputeLifeUntrackedLocal` can be called multiple times for the same
`lclVarNode` since `fgLocalVarLiveness` may call
`fgInterBlockLocalVarLiveness` multiple times. Therefore,
`m_promotedStructDeathVars` may be updated more than once for the same
node.

Fixes #38496.

4 years agoBlock P/Invokes with UnmanagedCallersOnlyAttribute (#38493)
Aaron Robinson [Wed, 1 Jul 2020 00:35:10 +0000 (17:35 -0700)]
Block P/Invokes with UnmanagedCallersOnlyAttribute (#38493)

* Block support for a P/Invoke marked with UnmanagedCallersOnly.

* Update crossgen2.

4 years ago[EventSourceLogger] Adding FormattedMessage for json message (#38509)
Maryam Ariyan [Tue, 30 Jun 2020 23:31:59 +0000 (16:31 -0700)]
[EventSourceLogger] Adding FormattedMessage for json message (#38509)

4 years ago[Arm64] ASIMD ExtractNarrowingSaturate and ExtractNarrowingSaturateUnsigned (#38371)
Egor Chesakov [Tue, 30 Jun 2020 23:10:26 +0000 (16:10 -0700)]
[Arm64] ASIMD ExtractNarrowingSaturate and ExtractNarrowingSaturateUnsigned (#38371)

* ExtractNarrowingSaturateLower and ExtractNarrowingSaturateUpper

* ExtractNarrowingSaturateUnsignedLower and ExtractNarrowingSaturateUnsignedUpper

* ExtractNarrowingSaturateScalar and ExtractNarrowingSaturateUnsignedScalar

4 years agoOptimize TextEncoder.FindFirstCharacterToEncodeUtf8 (#284)
Günther Foidl [Tue, 30 Jun 2020 23:09:08 +0000 (01:09 +0200)]
Optimize TextEncoder.FindFirstCharacterToEncodeUtf8 (#284)

4 years agoAdding default string for stacktrace Word_At (#38634)
Jose Perez Rodriguez [Tue, 30 Jun 2020 23:05:32 +0000 (16:05 -0700)]
Adding default string for stacktrace Word_At (#38634)

* Adding default string for stacktrace Word_At

* Also adding defaults to other resources used on the stacktrace ToString method

* Apply suggestions from code review

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
4 years agoEnable warning 5038 on VS. (#38499)
Sergey Andreenko [Tue, 30 Jun 2020 23:03:42 +0000 (16:03 -0700)]
Enable warning 5038 on VS. (#38499)

* Enable w35038 on VS.

* fix for a contract.h

* FIx other places.

* another fix.

4 years agoAdd missing string resources to the ILVerify tool (#38630)
Jan Kotas [Tue, 30 Jun 2020 22:38:21 +0000 (15:38 -0700)]
Add missing string resources to the ILVerify tool (#38630)

Fixes #38623

4 years agoAdding qcalls-def.h to Makefile.am (#38621)
monojenkins [Tue, 30 Jun 2020 22:19:25 +0000 (18:19 -0400)]
Adding qcalls-def.h to Makefile.am (#38621)

Fixes mono/mono#20049

Co-authored-by: thaystg <thaystg@users.noreply.github.com>
4 years agoDo not override CoreCLRArtifactsPath if RuntimeIdentifier is empty (#38602)
Vladimir Sadov [Tue, 30 Jun 2020 20:36:19 +0000 (13:36 -0700)]
Do not override CoreCLRArtifactsPath if RuntimeIdentifier is empty (#38602)

4 years agoAdd exclusion category argument to interpreter runs (#38633)
Drew Scoggins [Tue, 30 Jun 2020 20:28:11 +0000 (13:28 -0700)]
Add exclusion category argument to interpreter runs (#38633)

* Add exclusion category argument to interpreter runs

* Add for Windows as well

4 years agoSpanify S.S.C.X509Certificates and S.S.C.Pkcs inputs
Jeremy Barton [Tue, 30 Jun 2020 20:13:03 +0000 (13:13 -0700)]
Spanify S.S.C.X509Certificates and S.S.C.Pkcs inputs

S.S.C.Pkcs.ContentInfo..ctor(byte[]) didn't get spanified because it holds
a reference to the array, and returns it via a property.

4 years agoObsolete Encoding.UTF7 property and UTF7Encoding ctors (#37535)
Levi Broderick [Tue, 30 Jun 2020 20:10:48 +0000 (13:10 -0700)]
Obsolete Encoding.UTF7 property and UTF7Encoding ctors (#37535)

- Disallow Encoding.GetEncoding("utf-7", ...) from returning an Encoding instance
- Minor code cleanup by removing unused ifdefs
- A compat switch is available to re-enable Encoding.GetEncoding("utf-7", ...)

4 years ago[wasm] Set a stack trace limit of 1000 for CI testing with V8 (#38625)
Aleksey Kliger (λgeek) [Tue, 30 Jun 2020 19:50:00 +0000 (15:50 -0400)]
[wasm] Set a stack trace limit of 1000 for CI testing with V8 (#38625)

The default 10 is not enough stack frames to make sense of failures

4 years agoAdding generation of substitution files for trimming out resources when feature switc...
Jose Perez Rodriguez [Tue, 30 Jun 2020 19:24:39 +0000 (12:24 -0700)]
Adding generation of substitution files for trimming out resources when feature switch is present (#38397)

* Adding generation of substitution files for trimming out resources when feature switch is present

* Adding support for CoreLib as well and fix issue with SR returning empty string

* Cache result of AppContext Switch lookup

* Fixing allConfigurations leg and addressing feedback

* Fixing thread safety issue by removing caching

* Addressing feedback

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Addressing feedback and adding tests

* Fix typo

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4 years agoDisable test based off of #38455 (#38580)
Jarret Shook [Tue, 30 Jun 2020 18:38:33 +0000 (11:38 -0700)]
Disable test based off of #38455 (#38580)

4 years agoProperly disable test on mono (#38615)
Vlad Brezae [Tue, 30 Jun 2020 17:52:17 +0000 (20:52 +0300)]
Properly disable test on mono (#38615)

Fix issue link for wasm specific limitation.

4 years agoFix packaging of PDBs for host binaries (#38589)
Elinor Fung [Tue, 30 Jun 2020 17:41:53 +0000 (10:41 -0700)]
Fix packaging of PDBs for host binaries (#38589)

4 years agoMarkdown: Close anchor tags correctly (#38619)
xtqqczze [Tue, 30 Jun 2020 17:37:30 +0000 (18:37 +0100)]
Markdown: Close anchor tags correctly (#38619)

4 years agoAdd type layout stress mode to crossgen2/runtime (#38579)
David Wrighton [Tue, 30 Jun 2020 17:08:34 +0000 (10:08 -0700)]
Add type layout stress mode to crossgen2/runtime (#38579)

- New command line parameter --verify-type-and-field-layout
  - Intended for use diagnosing bugs in crossgen2 only, not for general
  production use
- New r2r precode fixups Verify_TypeLayout and Verify_FieldOffset
  - These allows the compiler to specify that a particular type/field
  layout must match with the runtime calculation.
  - If there is a mismatch, the runtime will failfast, even on release
  builds
- Add use of new switch to crossgen2smoke test
- Fix encoding bug in FieldFixupSignature. Check_FieldOffset and
Verify_FieldOffset use unsigned offsets, not signed offsets

4 years agoRemove AsyncCausalityTracer by logging into TplEventSource directly (#38313)
Sung Yoon Whang [Tue, 30 Jun 2020 17:06:53 +0000 (10:06 -0700)]
Remove AsyncCausalityTracer by logging into TplEventSource directly (#38313)

* Add AsyncCausalityTracer

* cleanup

* Handle multiple sessions

* CR feedback

* Remove AsyncCausalityTracer and replace it with direct calls to TplEventSource

4 years agoRemove decimal alignment quirk from the type loader (#38603)
Jan Kotas [Tue, 30 Jun 2020 16:45:01 +0000 (09:45 -0700)]
Remove decimal alignment quirk from the type loader (#38603)

System.Decimal fields did not match Win32 DECIMAL type for historic reasons. It required type loader to have a quirk to artificially inflate System.Decimal alignment to match the alignment of Win32 DECIMAL type to make interop work well.

This change is fixing the System.Decimal fields to match Win32 DECIMAL type and removing the quirk from the type loader since it does not belong there.

The downsides are:
- Slightly lower code quality on 32-bit platforms. 32-bit platforms are not our high performance targets anymore.
- Explicit implementation of ISerializable is required on System.Decimal for binary serialization compatibility.

Fixes #38390

4 years agoMarkdown: remove unused definitions (#38618)
xtqqczze [Tue, 30 Jun 2020 15:36:34 +0000 (16:36 +0100)]
Markdown: remove unused definitions (#38618)

* Update glossary.md

Remove unused markdown definitions introduced in https://github.com/dotnet/corefx/pull/38103

* Update source-generator-pinvokes.md

Remove unused markdown definitions introduced in https://github.com/dotnet/runtime/pull/33742

4 years agoARM64: Eliminate redundant opposite mov (#38179)
Kunal Pathak [Tue, 30 Jun 2020 15:07:30 +0000 (08:07 -0700)]
ARM64: Eliminate redundant opposite mov (#38179)

* Added IsOppositeOfPrevMov()

Added IsOppositeOfPrevMov() that will skip generating redundant mov.

* review comments

* Refactor code into IsRedundantMov()

* dont optimize beyong IG boundary

* add check to not cross IG boundary

* Add more checks:
- Change IG boundary check to exclude extended IGs.
- Check the operand size before removing redundant movs.

* fix the check

* review comments

* Add check to ensure if src/dst are both scalar or both vector

* minor comment

* Add check for insFormat

* fix the typo

* minor comments

4 years agoDisable two System.Linq.Parallel tests that fail on WASM due to forced parallelism...
Alexander Köplinger [Tue, 30 Jun 2020 13:58:27 +0000 (15:58 +0200)]
Disable two System.Linq.Parallel tests that fail on WASM due to forced parallelism (#38617)

4 years ago[interp] Small improvements around ByReference ctor (#38561)
Vlad Brezae [Tue, 30 Jun 2020 13:04:01 +0000 (16:04 +0300)]
[interp] Small improvements around ByReference ctor (#38561)

* [interp] Add stfld opcode for storing valuetypes without refs

* [interp] Remove MINT_VTRESULT use with byrefernce ctor intrinsic

4 years ago[wasm] Add assembly level skip for System.Threading.Tasks.Extensions (#38554)
Mitchell Hwang [Tue, 30 Jun 2020 12:38:00 +0000 (08:38 -0400)]
[wasm] Add assembly level skip for System.Threading.Tasks.Extensions (#38554)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoPort EventPipeBuffer, EventPipeBufferList, EventPipeBufferManager to Mono. (#37756)
Johan Lorensson [Tue, 30 Jun 2020 12:31:40 +0000 (14:31 +0200)]
Port EventPipeBuffer, EventPipeBufferList, EventPipeBufferManager to Mono. (#37756)

* Port EventPipeBuffer.
* Port EventPipeBufferList.
* Port EventPipeManager.
* Merge internals source files. Changed GETTER_SETTER to only mandate use
of inlined functions when calling betweeen source files for different types.
Upgraded all use within each source file for direct struct access.
* Changed function entry error checkin strategy. Only apply active checks
on outer library API, ep.h, and use EP_ASSERT for all other functions.
* Dropped requires_lock_held in function naming, switch to comment in header
or in forward declare for functions that validates that lock is held.
* Removed currently unused GETTER/SETTERS.
* Moved more comments into sources from corresponding CoreCLR EventPipe
sources.
* Add EventPipeBuffer/EventPipeBufferManager unit tests.
* Align to changes in native CoreCLR eventpipe* sources.
* Add support starting default file session using env variables.
* Disable eventpipe callback on WASM due to platform issues with delegates.

4 years ago[interp] Intrinsify ClearWithReferences (#38569)
Vlad Brezae [Tue, 30 Jun 2020 11:56:09 +0000 (14:56 +0300)]
[interp] Intrinsify ClearWithReferences (#38569)

4 years agoSDK base images upgraded to 5.0 and docker-compose logging fixed (#38389)
Alexander Nikolaev [Tue, 30 Jun 2020 11:51:43 +0000 (13:51 +0200)]
SDK base images upgraded to 5.0 and docker-compose logging fixed (#38389)

It does the following:
1. Upgrades the base image versions of HttpStress and SslStress tests containers to `nightly/sdk:5.0`
2. Wraps over `docker-compose` call to prevent it from accidentally reporting progress to `stderr `instead of `stdout` and thus breaking CI pipeline (see docker/compose#7346)

4 years ago[wasm] Disable test on browser (#38613)
Vlad Brezae [Tue, 30 Jun 2020 11:21:07 +0000 (14:21 +0300)]
[wasm] Disable test on browser (#38613)

It OOMs due to excessive allocations

4 years agoBring back previous debug_abbrev offset behavior on Apple platforms (#38454)
monojenkins [Tue, 30 Jun 2020 10:02:24 +0000 (06:02 -0400)]
Bring back previous debug_abbrev offset behavior on Apple platforms (#38454)

https://github.com/mono/mono/pull/19794 broke on iOS. Analyzing the result showed that, while the assembly was generated as expected, the linked result was different. Analyzing the LLVM code (which triggered the original fix) seems to imply that, on Apple platforms, they will not generate a label for it, only doing the 0-offset as we were doing before. Therefore, match the LLVM behavior by bringing back our previous logic when targetting Mach, otherwise use the new way of doing things.

Fixes mono/mono#8806 (again)

Co-authored-by: mathieubourgeois <mathieubourgeois@users.noreply.github.com>
4 years agoRemove some stale pragma warning disables (#38551)
Stephen Toub [Tue, 30 Jun 2020 09:35:49 +0000 (05:35 -0400)]
Remove some stale pragma warning disables (#38551)

4 years ago[wasm] Optimize interp->native transitions. (#38483)
monojenkins [Tue, 30 Jun 2020 08:13:39 +0000 (04:13 -0400)]
[wasm] Optimize interp->native transitions. (#38483)

* Generate tables of signatures/transition functions.
* Add mono_wasm_get_interp_to_native_trampoline () function to look up the transition function
for a signature.
* Cache the transition function in a imethod->method_data slot.

Previously, we were calling a mono_wasm_interp_to_native_trampoline () function and a generated
icall_trampoline_dispatch () function which added a lot of overhead.

<!--
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 agoDisable Bundle_can_be_renamed_while_running test (#38300)
Swaroop Sridhar [Tue, 30 Jun 2020 07:10:45 +0000 (00:10 -0700)]
Disable Bundle_can_be_renamed_while_running test (#38300)

Disable the test due to non-deterministic failure in the CI.
Enabling tracked by: #38013

Fixes: #35068

4 years agoRemove dead code in binder (#38557)
Elinor Fung [Tue, 30 Jun 2020 05:17:09 +0000 (22:17 -0700)]
Remove dead code in binder (#38557)

4 years agoDisable reverse eventpipe test (#38583)
Simon Nattress [Tue, 30 Jun 2020 03:08:47 +0000 (20:08 -0700)]
Disable reverse eventpipe test (#38583)

The exclude list entry path was incorrect

4 years agoFix sizeof tests for arm and x86 (#38577)
Andy Ayers [Tue, 30 Jun 2020 02:26:10 +0000 (19:26 -0700)]
Fix sizeof tests for arm and x86 (#38577)

On these tests the arm class layout happens to match the x64/arm64 layout and
is different than the x86 layout.

So, introduce arm specific test projects for these tests.

Also in the recent test build conversion one project was overlooked, so update
that project to work with this new scheme as well.

Remove all exclusions for these and older variants of these tests.

Closes #37470.

4 years agoFixed IL bad format bug (#38560)
Yuchong Pan [Tue, 30 Jun 2020 02:04:41 +0000 (19:04 -0700)]
Fixed IL bad format bug (#38560)

4 years agoFix mono/mono#20022 - changing the signature of mono_handle_native_crash() for s390x...
monojenkins [Tue, 30 Jun 2020 01:41:43 +0000 (21:41 -0400)]
Fix mono/mono#20022 - changing the signature of mono_handle_native_crash() for s390x (#38428)

* Fix exception-s390x so mono_handle_native_crash() is called according to the changes made in mono/mono#19973
* Make roslyn the default compiler for s390x

Co-authored-by: nealef <nealef@users.noreply.github.com>
4 years agoRemove defunct comment (#38558)
Dan Moseley [Tue, 30 Jun 2020 00:30:37 +0000 (17:30 -0700)]
Remove defunct comment (#38558)

4 years agoUpdate xharness to latest version with WASM fixes (#38576)
Alexander Köplinger [Mon, 29 Jun 2020 23:58:08 +0000 (01:58 +0200)]
Update xharness to latest version with WASM fixes (#38576)

Addresses an issue that caused the testResult.xml to be empty on Helix runs.

Adds options to only execute a specific class/method to the WASM runner.

4 years agoUse shared instances of OID where possible
Kevin Jones [Mon, 29 Jun 2020 23:40:09 +0000 (19:40 -0400)]
Use shared instances of OID where possible

4 years ago[Crossgen2] Remove legacy behavior around non-virtual interface calls (#38564)
Simon Nattress [Mon, 29 Jun 2020 23:37:52 +0000 (16:37 -0700)]
[Crossgen2] Remove legacy behavior around non-virtual interface calls (#38564)

Resolves https://github.com/dotnet/runtime/issues/37400

The regression test was not failing in Crossgen2 because somewhere along the way when we eyeball ported `getCallInfo` the ordering of these two if block was switched, so Crossgen2 was always treating such calls as non-virtual.

4 years agoDisable P/Invoke analyzer (#38550)
Stephen Toub [Mon, 29 Jun 2020 22:06:21 +0000 (18:06 -0400)]
Disable P/Invoke analyzer (#38550)

4 years agoUpdate lead specification for AppModel items (#38532)
Andy Gocke [Mon, 29 Jun 2020 21:01:39 +0000 (14:01 -0700)]
Update lead specification for AppModel items (#38532)

4 years agoUpdate analyzers version to remove pragma (#38512)
Stephen Toub [Mon, 29 Jun 2020 20:24:17 +0000 (16:24 -0400)]
Update analyzers version to remove pragma (#38512)

4 years ago[Wasm] Disable tests for HostFileChangeMonitor (#38386)
Steve Pfister [Mon, 29 Jun 2020 19:50:33 +0000 (15:50 -0400)]
[Wasm] Disable tests for HostFileChangeMonitor (#38386)

The HostFileChangeMonitor relies on FSW, which is not supported on wasm.  This change disables the tests that were failing because of it.

4 years ago[browser][wasm][tests] Add tests for DataView (#38498)
Kenneth Pouncey [Mon, 29 Jun 2020 19:22:55 +0000 (21:22 +0200)]
[browser][wasm][tests] Add tests for DataView (#38498)

4 years agoImplement BigInteger.GetBitLength (#37870)
Andrew Boyarshin [Mon, 29 Jun 2020 19:21:54 +0000 (02:21 +0700)]
Implement BigInteger.GetBitLength (#37870)

4 years ago[wasm] Add assembly level skip for System.Threading.Tassk.Dataflow (#38470)
Mitchell Hwang [Mon, 29 Jun 2020 18:57:30 +0000 (14:57 -0400)]
[wasm] Add assembly level skip for System.Threading.Tassk.Dataflow (#38470)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoAdd throwing PNSE to System.Security.Cryptography on WASM (#38379)
Maxim Lipnin [Mon, 29 Jun 2020 18:55:43 +0000 (21:55 +0300)]
Add throwing PNSE to System.Security.Cryptography on WASM   (#38379)

Since the entire set of System.Security.Cryptography.* tests has been disabled on WASM recently in https://github.com/dotnet/runtime/pull/37723, we need to let everyone know that those areas are not quite supported on WASM at the moment. In that case System.Security.Cryptography classes could throw PlatformNotSupportedException until some solution comes (https://github.com/dotnet/runtime/issues/37669)

4 years agoRelax assert in ResolveTokenInScope (#38542)
Michal Strehovský [Mon, 29 Jun 2020 18:44:53 +0000 (20:44 +0200)]
Relax assert in ResolveTokenInScope (#38542)

`ResolveTokenInScope` now gets called with `typeOrMethodContext` that is a non-generic method. Make sure the method is on the same type.

4 years agoStop using std::map since it races with the finalizer during shutdown. (#38375)
Aaron Robinson [Mon, 29 Jun 2020 18:16:10 +0000 (11:16 -0700)]
Stop using std::map since it races with the finalizer during shutdown. (#38375)

4 years agoRemove unnecessary char[] from ProcessStartupHooks() (#38544)
Stephen Toub [Mon, 29 Jun 2020 17:33:44 +0000 (13:33 -0400)]
Remove unnecessary char[] from ProcessStartupHooks() (#38544)

4 years agoClean descriptor for Mono's SPC (#38442)
Marek Safar [Mon, 29 Jun 2020 16:46:34 +0000 (18:46 +0200)]
Clean descriptor for Mono's SPC (#38442)

- Remove names pointing to non-existent members
- Fix spaces in method signatures which break matching rules
- Remove duplicate entries
- Format file for consistency

4 years agoUse HttpClient.Send in HttpWebRequest.GetResponse (#38511)
Stephen Toub [Mon, 29 Jun 2020 16:10:43 +0000 (12:10 -0400)]
Use HttpClient.Send in HttpWebRequest.GetResponse (#38511)

4 years agoReimplement CertificateAssetDownloader.DownloadAsset with HttpClient.Send (#38502)
Stephen Toub [Mon, 29 Jun 2020 16:10:09 +0000 (12:10 -0400)]
Reimplement CertificateAssetDownloader.DownloadAsset with HttpClient.Send (#38502)

* Reimplement CertificateAssetDownloader.DownloadAsset with HttpClient.Send

* Address PR feedback

4 years ago[CBOR] Use System.Half for encoding and decoding half-precision data items (#38466)
Eirik Tsarpalis [Mon, 29 Jun 2020 15:52:08 +0000 (16:52 +0100)]
[CBOR] Use System.Half for encoding and decoding half-precision data items (#38466)

* remove unused usings and remove #nullable declarations

* Wire half-precision float support to System.Half

* address feedback

* add test for ReadSingle handing double-precision encodings

4 years agoJsonSerializer - Prevent Stack and Queue types from being pulled in if not used in...
Layomi Akinrinade [Mon, 29 Jun 2020 15:02:39 +0000 (08:02 -0700)]
JsonSerializer - Prevent Stack and Queue types from being pulled in if not used in calling app (#38458)

* JsonSerializer - Prevent Stack and Queue types from being pulled in if not used in calling app

* Add comment about type fetch indirection

* Load types based on target frameworks

4 years agoUpdate windows requirements.md (#38546)
xtqqczze [Mon, 29 Jun 2020 14:36:28 +0000 (15:36 +0100)]
Update windows requirements.md (#38546)

* Remove VS 16.6 Preview 2 requirement

* Clarify wording on Visual Studio community edition

4 years agoAdd mono_exception_try_get_managed_backtrace(). (#38391)
monojenkins [Mon, 29 Jun 2020 12:10:45 +0000 (08:10 -0400)]
Add mono_exception_try_get_managed_backtrace(). (#38391)

This is an enhanced version of `mono_exception_get_managed_backtrace()` that takes an optional `const char *prefix` argument (to indent the stack-trace) and returns FALSE with a NULL backtrace on error.

Co-authored-by: baulig <baulig@users.noreply.github.com>
4 years agoHttpContent.ReadAsStream API (#37494)
Marie Píchová [Mon, 29 Jun 2020 11:55:34 +0000 (13:55 +0200)]
HttpContent.ReadAsStream API (#37494)

4 years agoIncrease delays in flaky tets (#38444)
Alexander Nikolaev [Mon, 29 Jun 2020 10:10:42 +0000 (12:10 +0200)]
Increase delays in flaky tets (#38444)

Two tests are failing due to delays being too small for background actions completion when test VM perf degrades. PR increases those delays.

4 years agoDisable 3 tests for #37237 (#38519)
Bruce Forstall [Mon, 29 Jun 2020 04:29:57 +0000 (21:29 -0700)]
Disable 3 tests for #37237 (#38519)

4 years agoHost with coreclr linked in (#36847)
Vladimir Sadov [Mon, 29 Jun 2020 04:21:46 +0000 (21:21 -0700)]
Host with coreclr linked in (#36847)

* make all-inclusive coreclr_static.lib and link into singlefilehost

* Disable superhost linking on windows for now (issues with mixed Debug-on-Release builds)

* shim coreclr policy between singlefile and standalone hosts

* enable exports on singlefilehost executable

* export __progname, perhaps it will make FreeBSD happy.

* add environ too

* mergeable wks and jit

* ignore empty clr_path in single_file_bundle

* hide R2R specific assert behind R2R ifdef

* produce separate obj files from platform specific asm files for mergeable WKS - to make CMake happy

* remove libcoreclr and libclrjit from   netcoreapp/pkg

* temporary disable setting up GS cookie on OSX superhost

* renamed clrjit_static folder   dll->static

* extract JIT dllmain.cpp and eliminate clrjit_mergeable

* make coreclr_static dependent on def/exports files instead of coreclr.

* reducing double-build in cee_wks to just few files. Most of cee_wks is built once as an obj library and reused.

* bring back cee_wks_mergeable and push shared object lib stuff lower to cee_wks_core

* A comment about FreeBSD-specific workaround.

* move finding unwind libs to a CMake function

* since we have files compiled differently between embedded and standalone coreclr, we do not need EMBEDDED_RUNTIME marker.

* renamed host_resolver_t.h and host_resolver_t.cpp to not have "_t"

* path separating slash when forming CORECLR_STATIC_LIB_LOCATION

4 years agoAdd gcstress testing for Windows arm64 (#36794)
Bruce Forstall [Mon, 29 Jun 2020 03:27:43 +0000 (20:27 -0700)]
Add gcstress testing for Windows arm64 (#36794)

This increases the platform matrix tested by:
gcstress-extra.yml
gcstress0x3-gcstress0xc.yml
r2r-extra.yml

These pipelines each run twice weekly: once on Saturday, once on Sunday.

4 years agoDisable 2 tracing tests under GCStress (#38525)
Bruce Forstall [Mon, 29 Jun 2020 03:23:46 +0000 (20:23 -0700)]
Disable 2 tracing tests under GCStress (#38525)

Tracking: https://github.com/dotnet/runtime/issues/38524

4 years ago[wasm] Enable the full gc by default (#38345)
Larry Ewing [Mon, 29 Jun 2020 02:47:39 +0000 (21:47 -0500)]
[wasm] Enable the full gc by default (#38345)

* [wasm] Enable the full gc by default

* fix the condition

* rename argument

4 years agoConvert Parent Id to Context before calling the ActivityListener (#38312)
Tarek Mahmoud Sayed [Mon, 29 Jun 2020 01:59:49 +0000 (18:59 -0700)]
Convert Parent Id to Context before calling the ActivityListener (#38312)

4 years agoFix error handling in SocketHttpHandler's ConnectHelper.Connect (#38510)
Stephen Toub [Mon, 29 Jun 2020 01:42:00 +0000 (21:42 -0400)]
Fix error handling in SocketHttpHandler's ConnectHelper.Connect (#38510)

4 years agoStoreIND/Store_BLK/Store_OBJ improvements. (#38316)
Sergey Andreenko [Sun, 28 Jun 2020 23:54:17 +0000 (16:54 -0700)]
StoreIND/Store_BLK/Store_OBJ improvements. (#38316)

* Arm64: support contained `GT_LCL_VAR/FLD_ADDR` in indir.

Support contained `GT_LCL_VAR_ADDR, GT_LCL_FLD_ADDR` under `IND, STOREIND`.

* XARCH: Support contained `GT_LCL_FLD_ADDR` in IND.

Support contained `GT_LCL_FLD_ADDR` under `GT_STORE_IND, GT_IND`.

* Clear `GTF_IND_ASG_LHS` after Rationalize for STORE_OBJ/BLK.

We were doing this for `STOREIND`, but forgetting for `STORE_OBJ/BLK`.

* Extract `LowerStoreIndirCommon`, `LowerIndir`.

Extract without changes, I will need to add additional calls to them later.

* Call the extracted funtions.

Fix a few regressions with `NoRetyping`.

* Create `LEA` of comples addr expr.

Gives a few improvements when addr has an index.

* Extract `LowerBlockStoreCommon`.

* Tranform STORE_BLK/OBJ into STOREIND.

When it is possible and profitable.

* Don't tranform for GC and small types.

For GC types we were not trying to contain addr(why?) when needed a barrier and it looked dangerous for me to do such a change(for 5.0).

For small types we were generating `movzx rax` for `IND byte` instead of `mov ax` .

* Update src/coreclr/src/jit/lower.cpp

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
* Use `TODO-CQ`.

* Extract `Rationalizer::RewriteIndir`.

* Fix code review.

Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>