platform/upstream/dotnet/runtime.git
4 years agoAdd async System.Data resultset and database schema APIs (#39098)
Shay Rojansky [Sun, 12 Jul 2020 13:56:20 +0000 (16:56 +0300)]
Add async System.Data resultset and database schema APIs (#39098)

Closes #38028

4 years agoRemove unused DeviceIoControl P/Invoke declaration (#38877)
Frederik Carlier [Sun, 12 Jul 2020 03:09:37 +0000 (05:09 +0200)]
Remove unused DeviceIoControl P/Invoke declaration (#38877)

4 years agoRemove dead SUPPORT_THREAD_ABORT code in PLINQ (#39148)
Stephen Toub [Sun, 12 Jul 2020 03:03:25 +0000 (23:03 -0400)]
Remove dead SUPPORT_THREAD_ABORT code in PLINQ (#39148)

4 years agoRemove catch ThreadAbortException (#39136)
Edison Henrique Andreassy [Sat, 11 Jul 2020 19:41:52 +0000 (16:41 -0300)]
Remove catch ThreadAbortException (#39136)

4 years agoUpdate DacHeapWalker to know about POH in SVR mode (#39139)
David Mason [Sat, 11 Jul 2020 19:03:57 +0000 (12:03 -0700)]
Update DacHeapWalker to know about POH in SVR mode (#39139)

* add POH for svr

* Use the correct alignment for objects on the POH

4 years agoJIT: retype byrefs passed to unmanaged callers as native int (#39105)
Andy Ayers [Sat, 11 Jul 2020 17:37:06 +0000 (10:37 -0700)]
JIT: retype byrefs passed to unmanaged callers as native int (#39105)

Make the jit more robust in cases where the IL producer is passing a byref
to an unmanaged caller, by retyping the argument as native int.

Allows the jit to produce self-consistent GC info and avoid the issues
seen in #34279, at least for byrefs.

Closes #39040.

4 years agoAdd missing PAL_CS_NATIVE_DATA_SIZE & DAC_CS_NATIVE_DATA_SIZE defs for macOS ARM64...
Ilia [Sat, 11 Jul 2020 17:27:26 +0000 (20:27 +0300)]
Add missing PAL_CS_NATIVE_DATA_SIZE & DAC_CS_NATIVE_DATA_SIZE defs for macOS ARM64 (#39141)

Related issue: #39010

4 years agoFix build configs for macOS ARM64 on DTK (#39142)
Ilia [Sat, 11 Jul 2020 17:27:05 +0000 (20:27 +0300)]
Fix build configs for macOS ARM64 on DTK (#39142)

Related issue: #39010

4 years agoUpdate packaging verion (#39101)
Eric StJohn [Sat, 11 Jul 2020 16:33:01 +0000 (09:33 -0700)]
Update packaging verion (#39101)

4 years agoUpdate R2RTest to compile the Serp application in two composite images (#39138)
Simon Nattress [Sat, 11 Jul 2020 11:51:51 +0000 (04:51 -0700)]
Update R2RTest to compile the Serp application in two composite images (#39138)

4 years agoFix creating OperatingSystem with PlatformID.Other (#39130)
Alexander Köplinger [Sat, 11 Jul 2020 01:49:23 +0000 (03:49 +0200)]
Fix creating OperatingSystem with PlatformID.Other (#39130)

Creating an OperatingSystem with PlatformID.Other would result in an exception about an unexpected enum value.
https://github.com/dotnet/runtime/pull/38790 was missing some tests that verified this behavior.

4 years agoMove printf in PauseOnStart (#39095)
John Salem [Sat, 11 Jul 2020 01:14:32 +0000 (18:14 -0700)]
Move printf in PauseOnStart (#39095)

* Only print to the console from the runtime when PauseOnStart has waited long enough

* Fix typo

4 years agoWASM: Fix System.Formats.Asn1 tests (#39104)
Alexander Köplinger [Sat, 11 Jul 2020 00:20:10 +0000 (02:20 +0200)]
WASM: Fix System.Formats.Asn1 tests (#39104)

Disable tests that rely on crypto APIs which don't work on WebAssembly right now which allows the test suite to pass: `Tests run: 3406, Errors: 0, Failures: 0, Skipped: 0. Time: 5.296689s`

Also enables a few test suites in tests.proj.

4 years agoAdd GCStress testing for libraries tests on checked CoreCLR (#38235)
Bruce Forstall [Fri, 10 Jul 2020 23:59:10 +0000 (16:59 -0700)]
Add GCStress testing for libraries tests on checked CoreCLR (#38235)

* Add GCStress testing for libraries tests on checked CoreCLR

Disable GCStress0x3 for now, as that causes many timeouts in
these tests.

* Increase timeout for GCStress scenarios

* Disable scheduled runs for libraries gcstress runs

There are currently too many failures in these jobs
so we don't want to run them on a schedule yet.

* Add tracking issue for disabling GCStress=3

4 years agoFix STOREIND optimization. (#39066)
Sergey Andreenko [Fri, 10 Jul 2020 22:52:29 +0000 (15:52 -0700)]
Fix STOREIND optimization. (#39066)

* add 1 repro test.

* temporary disable the tranformation.

4 years agoUpdate Environment.OSVersion for browser platform (#38790)
Marek Safar [Fri, 10 Jul 2020 22:06:56 +0000 (00:06 +0200)]
Update Environment.OSVersion for browser platform (#38790)

* Update Environment.OSVersion for browser platform

* Reflect api review

4 years agoFix precondition on OSX 10.15 mutable store tests
Jeremy Barton [Fri, 10 Jul 2020 21:28:58 +0000 (14:28 -0700)]
Fix precondition on OSX 10.15 mutable store tests

4 years ago[Wasm] Enable System.IO.Compression.ZipFile tests (#39092)
Steve Pfister [Fri, 10 Jul 2020 20:54:48 +0000 (16:54 -0400)]
[Wasm] Enable System.IO.Compression.ZipFile tests (#39092)

Found that the emscripten VFS does not write user specified file attributes, so skip
part of ZipFile_Create.InvalidDates that expects this to be supported.

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
4 years agoPreserve AsyncValueTaskMethodBuilder.ObjectIdForDebugger (#39084)
Eric Erhardt [Fri, 10 Jul 2020 20:53:12 +0000 (15:53 -0500)]
Preserve AsyncValueTaskMethodBuilder.ObjectIdForDebugger (#39084)

These internal properties are used by the debugger, so they should be preserved when debugging is supported.

4 years agoRemove type pattern from descriptor (#39047)
Mateo Torres-Ruiz [Fri, 10 Jul 2020 20:52:54 +0000 (13:52 -0700)]
Remove type pattern from descriptor (#39047)

* Remove type pattern from descriptor

* Use CLR type name

Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
Co-authored-by: Layomi Akinrinade <layomia@gmail.com>
4 years agoWASM: Add PlatformNotSupportedException for System.Net.Ping (#39091)
Alexander Köplinger [Fri, 10 Jul 2020 20:45:11 +0000 (22:45 +0200)]
WASM: Add PlatformNotSupportedException for System.Net.Ping (#39091)

The library isn't supported on WebAssembly.

4 years agoRewrite System.Text.Json stream tests to be async friendly and enable on WASM (#38663)
Alexander Köplinger [Fri, 10 Jul 2020 20:43:16 +0000 (22:43 +0200)]
Rewrite System.Text.Json stream tests to be async friendly and enable on WASM (#38663)

The tests dealing are using a (De)SerializationWrapper so the same code can be used both for String and Stream types.
It does that by wrapping the async Stream serialization calls in `Task.Run().GetAwaiter().GetResult()` to turn them into sync calls.
However that doesn't work on WebAssembly since we can't wait on tasks as there's only a single thread.

To fix this inverse the wrapper so the synchronous String calls are turned into async and use normal awaits for the Stream calls.

This allows the test suite to pass on WebAssembly: `Tests run: 8349, Errors: 0, Failures: 0, Skipped: 11. Time: 475.528706s`

4 years agoWASM: Add PlatformNotSupportedException for System.IO.Pipes (#39089)
Alexander Köplinger [Fri, 10 Jul 2020 20:18:39 +0000 (22:18 +0200)]
WASM: Add PlatformNotSupportedException for System.IO.Pipes (#39089)

* WASM: Add PlatformNotSupportedException for System.IO.Pipes

The library isn't supported on WebAssembly.

* Make test TFMs match src TFMs

4 years agoSpan BasicSymmetricCipher and other symmetric crypto internals
Kevin Jones [Fri, 10 Jul 2020 19:46:39 +0000 (15:46 -0400)]
Span BasicSymmetricCipher and other symmetric crypto internals

4 years agoWASM: Disable tests for System.Diagnostics.Process and .FileVersionInfo (#39088)
Alexander Köplinger [Fri, 10 Jul 2020 19:10:03 +0000 (21:10 +0200)]
WASM: Disable tests for System.Diagnostics.Process and .FileVersionInfo (#39088)

Both of these libraries throw PNSE on WebAssembly.

4 years agoadd IsOSPlatformOrLater and IsOSPlatformEarlierThan methods (#39005)
Adam Sitnik [Fri, 10 Jul 2020 19:04:47 +0000 (21:04 +0200)]
add IsOSPlatformOrLater and IsOSPlatformEarlierThan methods (#39005)

* add tests for IsOSPlatformOrLater and IsOSPlatformEarlierThan methods

* add IsOSPlatformOrLater and IsOSPlatformEarlierThan methods

* add xml docs that explain what the API does and what input is supported

* address code review feedback

* numbers in the middle of the platform name are not supported

4 years agoTweak crossgen2 test compilation modes (#39025)
David Wrighton [Fri, 10 Jul 2020 18:56:38 +0000 (11:56 -0700)]
Tweak crossgen2 test compilation modes (#39025)

- Change crossgen2 test coverage to compile every assembly in the application, not just the primary assembly
- Disable by default compilation with the --inputbubble flag. Instead, only use it if LargeVersionBubble is set to 1
- Add a specific error return code from crossgen2 for the case where all input assemblies are determined to be native binaries. This is used to support this scripting change

4 years agoIntrinsics support for WidenFourAsciiBytesToUtf16AndWriteToBuffer (#38597)
Prashanth Govindarajan [Fri, 10 Jul 2020 18:20:26 +0000 (11:20 -0700)]
Intrinsics support for WidenFourAsciiBytesToUtf16AndWriteToBuffer (#38597)

4 years agoCleanup WASM ICU PackageReference usage to use generated property (#39053)
Santiago Fernandez Madero [Fri, 10 Jul 2020 18:19:05 +0000 (11:19 -0700)]
Cleanup WASM ICU PackageReference usage to use generated property (#39053)

4 years agoAdd X64/Arm64 nested classes to System.Runtime.Intrinsics where missing (#38460)
Tanner Gooding [Fri, 10 Jul 2020 17:58:28 +0000 (10:58 -0700)]
Add X64/Arm64 nested classes to System.Runtime.Intrinsics where missing (#38460)

* Ensure that Arm64 and X64 classes exist in the appropriate places for the HWIntrinsics

* Adding the new Arm64 and X64 instruction sets

* Add a new test validating the IsSupported heirarchy is correct

* Updating the JIT to support the new Arm64 and X64 instruction sets

* Add missing new keywords

* Fixing a member name

* Adding Runtime_34587 to the mono exclude list

4 years agoProduce arm64-native Mono LLVM runtime packs (#38562)
Jo Shields [Fri, 10 Jul 2020 17:37:37 +0000 (13:37 -0400)]
Produce arm64-native Mono LLVM runtime packs (#38562)

Produce arm64-native Mono LLVM runtime packs (i.e. for running the SDK on ARM64, not publishing to ARM64 from x64)

4 years ago[wasm] Addressing System.Runtime.InteropServices.RuntimeInformation.Tests failures...
Mitchell Hwang [Fri, 10 Jul 2020 17:28:03 +0000 (13:28 -0400)]
[wasm] Addressing System.Runtime.InteropServices.RuntimeInformation.Tests failures (#39073)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoBump version for Microsoft.DotNet.XunitExtensions again (#39080)
Alexander Köplinger [Fri, 10 Jul 2020 17:26:49 +0000 (19:26 +0200)]
Bump version for Microsoft.DotNet.XunitExtensions again (#39080)

The recent darc update from https://github.com/dotnet/runtime/commit/9dc660148121c128dc960bf090b83fe67af3bc6f removed my https://github.com/dotnet/runtime/commit/4aea0a14f930eff557bb6e4f30b99be8a583d475 which is necessary to correctly detect WASM/Browser as using the Mono interpreter.

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200710.3 (#39076)
dotnet-maestro[bot] [Fri, 10 Jul 2020 17:01:29 +0000 (17:01 +0000)]
Update dependencies from https://github.com/mono/linker build 20200710.3 (#39076)

Microsoft.NET.ILLink.Tasks
 From Version 5.0.0-preview.3.20359.3 -> To Version 5.0.0-preview.3.20360.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoUpdate IL tools (#39049)
Aaron Robinson [Fri, 10 Jul 2020 16:46:55 +0000 (09:46 -0700)]
Update IL tools (#39049)

* Update IL tools

Enable calling convention tests with updated IL tooling.

* Disable new calling convention tests on mono

4 years agofix which test should be Pri1. (#39062)
Sergey Andreenko [Fri, 10 Jul 2020 15:44:15 +0000 (08:44 -0700)]
fix which test should be Pri1. (#39062)

4 years agoFix g_TrapReturningThreads to be accessed as 32-bit in asm and JIT code on arm64...
Jan Kotas [Fri, 10 Jul 2020 15:36:28 +0000 (08:36 -0700)]
Fix g_TrapReturningThreads to be accessed as 32-bit in asm and JIT code on arm64 (#39058)

4 years agoPrerequisite work item for the CSE of GT_CNS_INT for ARM64 work item (#39021)
Brian Sullivan [Fri, 10 Jul 2020 15:33:25 +0000 (08:33 -0700)]
Prerequisite work item for the CSE of GT_CNS_INT for ARM64 work item  (#39021)

* Prerequisite work item for the CSE of GT_CNS_INT work item  (zero code diffs in the framework libraries)

Mark nodes that use the division by constant optimization with GTF_DIV_BY_CNS_OPT
Don't perform const prop on expressions marked with GTF_DONT_CSE, as this would undo a constant CSE
Fix for bug in AssertionProp where we assign the wrong value number when folding a conditional
When dumping the BasicBlocks print hascall when the block is marked with BBF_HAS_CALL
Call CheckDivideByConstOptimized when early prop inserts a constant node
added methods: UsesDivideByConstOptimized, CheckDivideByConstOptimized and MarkDivideByConstant
Propagate any side effect flags in the gtCallAddr field of an indirect call node
Call CheckDivideByConstOptimized when morphing a divide or remainder nodes
Don't allow changing a floating point GT_DIV into a GT_MUL in fgMorph after the global morph phase
In loop hoisting, set BBF_HAS_CALL if we hoist a tree that contains a call
When hoisting something that requires a physical register, clear that requirement in the hoisted copy

* Code review feedback

* Remove two asserts in lower because it will always make an optimization for UDIV and UMOD with a power of two divisor.

4 years agoCreate copies of mutable properties on X509Certificate2
Kevin Jones [Fri, 10 Jul 2020 15:26:54 +0000 (11:26 -0400)]
Create copies of mutable properties on X509Certificate2

Export(Cert) returned the original byte array from the PAL. If a
caller mutated the result of the export, they would be mutating the
underlying representation of RawData in the PAL. To be consistent
with Windows and Linux, we return a copy in the PAL.

Fix OpenSSL PAL to prevent side effects between mutable
SubjectName.RawData and Subject properties (similarly for Issuer)

4 years ago[wasm] Fix linker dependency in the pinvoke callback table. (#39070)
Zoltan Varga [Fri, 10 Jul 2020 14:26:46 +0000 (10:26 -0400)]
[wasm] Fix linker dependency in the pinvoke callback table. (#39070)

Encode methods as class name+method name instead of their token.

4 years agoSimplify IsWow64Process interop (#39059)
Jan Kotas [Fri, 10 Jul 2020 13:41:34 +0000 (06:41 -0700)]
Simplify IsWow64Process interop (#39059)

Fixes #38910

4 years agoPut back missing EditorBrowsableState.Nevers on PlatformID (#39065)
Stephen Toub [Fri, 10 Jul 2020 13:37:42 +0000 (09:37 -0400)]
Put back missing EditorBrowsableState.Nevers on PlatformID (#39065)

4 years agoDelete NetEventSource.Enter/Exit events (#38874)
Stephen Toub [Fri, 10 Jul 2020 13:31:21 +0000 (09:31 -0400)]
Delete NetEventSource.Enter/Exit events (#38874)

They're super verbose, very inconsistent, costly, and not helpful (they appear to be trying to provide tracing of the full flow of calls, but they fail to do even that).

4 years ago[wasm] Enable System.Threading.Channels.Tests (#38849)
Mitchell Hwang [Fri, 10 Jul 2020 12:41:06 +0000 (08:41 -0400)]
[wasm] Enable System.Threading.Channels.Tests (#38849)

* [wasm] Enable System.Threading.Channels.Tests and skip hangs

* [wasm] Skip failing tests in System.Threading.Channels.Tests

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years ago[interp] Add debug option which reports the hottest methods (#39045)
Vlad Brezae [Fri, 10 Jul 2020 12:00:14 +0000 (15:00 +0300)]
[interp] Add debug option which reports the hottest methods (#39045)

* [interp] Reenable computed goto on desktop

Which I accidentaly removed recently.

* [interp] Add debug option which reports the hottest methods

4 years ago[wasm] Implement pinvoke callback support. (#38932)
Zoltan Varga [Fri, 10 Jul 2020 11:21:19 +0000 (07:21 -0400)]
[wasm] Implement pinvoke callback support. (#38932)

* [wasm] Implement pinvoke callback support.

* Allow void return types.

* Fix name mangling for assembly names.

* Handle MonoPInvokeCallbackAttribute as well for now.

4 years ago[wasm] Modify System.Net.NetworkInformation to throw PNSE (#38928)
Maxim Lipnin [Fri, 10 Jul 2020 11:18:05 +0000 (14:18 +0300)]
[wasm] Modify System.Net.NetworkInformation to throw PNSE (#38928)

4 years agoAdd OSPlatform entries for iOS/tvOS/watchOS/Android (#36704)
Alexander Köplinger [Fri, 10 Jul 2020 09:26:54 +0000 (11:26 +0200)]
Add OSPlatform entries for iOS/tvOS/watchOS/Android (#36704)

* Add OSPlatform entries for iOS/tvOS/watchOS/Android

Implements the non-controversial new OSPlatform members from https://github.com/dotnet/runtime/issues/33331

* Add tests for new OSPlatform entries

4 years ago[browser][wasm][tests] Deactivate Map tests due to CI failures (#39061)
Kenneth Pouncey [Fri, 10 Jul 2020 08:31:38 +0000 (10:31 +0200)]
[browser][wasm][tests] Deactivate Map tests due to CI failures (#39061)

4 years agoRemove cross targeting for TraceSource and TextWriterTraceListener (#39043)
Anirudh Agnihotry [Fri, 10 Jul 2020 07:36:13 +0000 (00:36 -0700)]
Remove cross targeting for TraceSource and TextWriterTraceListener (#39043)

* stop cross targeting

4 years agoAllow XmlSerializer.Generator to run on Core > 2.x (#39013)
Viktor Hofer [Fri, 10 Jul 2020 07:12:26 +0000 (09:12 +0200)]
Allow XmlSerializer.Generator to run on Core > 2.x (#39013)

* Allow XmlSerializer.Generator to run on Core > 2.x

* Use repo local dotnet toolchain to build Generator

Use the repo local dotnet toolchain to generate the sgen output.
Adding a test to verify that the repo local and the live built outputs
are identical by size.

4 years agoWASM enable System.Collections.NonGeneric.Tests (#39020)
Santiago Fernandez Madero [Fri, 10 Jul 2020 07:11:48 +0000 (00:11 -0700)]
WASM enable System.Collections.NonGeneric.Tests (#39020)

4 years agoDefine Debugger.IsSupported feature switch to allow trimming of debugger only code...
Eric Erhardt [Fri, 10 Jul 2020 07:04:36 +0000 (02:04 -0500)]
Define Debugger.IsSupported feature switch to allow trimming of debugger only code. (#37288)

4 years agoImplementations of new HttpContent sync methods. (#38635)
Marie Píchová [Fri, 10 Jul 2020 06:52:35 +0000 (08:52 +0200)]
Implementations of new HttpContent sync methods. (#38635)

4 years agoaddressing some missing feedback Relating to Browser (#38968)
Anirudh Agnihotry [Fri, 10 Jul 2020 06:45:40 +0000 (23:45 -0700)]
addressing some missing feedback Relating to Browser (#38968)

* addressing some missing feedback

* Apply suggestions from code review

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* remove odbc32 from ref

* fix stuff

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoWASM Re-enable Threading.Channels serialization tests (#39016)
Santiago Fernandez Madero [Fri, 10 Jul 2020 05:57:22 +0000 (22:57 -0700)]
WASM Re-enable Threading.Channels serialization tests (#39016)

* WASM Re-enable Threading.Channels serialization tests

* PR Feedback

* Use ConditionalFact

4 years agoDelete tools-local\scripts (#39051)
Jan Kotas [Fri, 10 Jul 2020 05:54:53 +0000 (22:54 -0700)]
Delete tools-local\scripts (#39051)

4 years agoRevert changes to test breaking outter loop build (#39046)
Juan Hoyos [Fri, 10 Jul 2020 04:30:41 +0000 (21:30 -0700)]
Revert changes to test breaking outter loop build (#39046)

4 years agoInclude member name when constructing ValidationResult in CompareAttribute (#38867)
Pranav K [Fri, 10 Jul 2020 03:40:15 +0000 (20:40 -0700)]
Include member name when constructing ValidationResult in CompareAttribute (#38867)

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

4 years agoFix mark overflow processing (#38969)
Jan Vorlicek [Fri, 10 Jul 2020 01:41:09 +0000 (03:41 +0200)]
Fix mark overflow processing (#38969)

A recent refactoring PR #1688 has regressed GC processing of mark overflow.
If GC heap segments in the segment linked list are not ordered in an ascending
order by their addresses, the mark overflow processing misses segments on
lower addresses if they follow segments on higher addresses.
This leads to some objects that are alive to not to be reported and freed.

This change fixes the problem by making sure the segment order doesn't matter.

4 years agoCleanup references to centos 6 (#39006)
Jarret Shook [Fri, 10 Jul 2020 01:34:06 +0000 (18:34 -0700)]
Cleanup references to centos 6 (#39006)

* Remove Dockerfile

* Remove references to dockerfiles in runtime. These exist in dotnet-buildtools-prereqs.

4 years agoMove tailcall dispatcher into corelib (#38938)
Jakob Botsch Nielsen [Fri, 10 Jul 2020 01:33:06 +0000 (03:33 +0200)]
Move tailcall dispatcher into corelib (#38938)

Fix #35559

4 years ago[mono] Add support for UnmanagedCallersOnlyAttribute (#38728)
Aleksey Kliger (λgeek) [Fri, 10 Jul 2020 00:37:36 +0000 (20:37 -0400)]
[mono] Add support for UnmanagedCallersOnlyAttribute (#38728)

* [marshal] Add mono_method_has_unmanaged_callers_only_attribute

* [marshal] Allow calls to mono_marshal_get_managed_wrapped without a delegate class

   In that case, create a wrapper based on the signature of the method itself.

* [aot] Allow decode_method_ref to decode NATIVE_TO_MANAGED wrappers without a delegate class

   Bump the AOT file format

* [interp] ldftn will return a native-to-managed wrapper to UnmanagedCallersOnly methods

* aot: emit byte when we don't expect a class

* jit: create wrapper creation for ldftn in method-to-ir

   Do it at IR generation of the caller, not every time the ldftn is executed

* jit: don't create a jump trampoline for ldftn of a native-to-managed wrapper

   The wrapper might be called from a thread that's not attached to the runtime, and the jump trampoline will look at TLS vars that are not initialized

* interp: transform LDFTN into LDC of a create_method_pointer for UnmanagedCallersOnly method

* marshal: throw invalid program exception for instance and generic methods

* Emit IPE throw instead of aborting JIT or interp compilation for bad UnmanagedCallersOnly methods

   Instead of throwing while JITing (or transforming), throw when the LDFTN is executed.

* disallow delegate constructor calls on UnmanagedCallersOnly methods

* throw IPE if UnmanagedCallersOnly method has non-blittable args

* disallow DllImport and UnmanagedCallersOnly together

   throw NotSupportedException

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
4 years agoWASM enable System.Collections.Specialized.Tests (#39012)
Santiago Fernandez Madero [Fri, 10 Jul 2020 00:26:59 +0000 (17:26 -0700)]
WASM enable System.Collections.Specialized.Tests (#39012)

4 years ago[wasm] Add beginnings of support for building with ICU. (#38977)
Zoltan Varga [Thu, 9 Jul 2020 23:06:22 +0000 (19:06 -0400)]
[wasm] Add beginnings of support for building with ICU. (#38977)

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years ago[wasm] Modify System.Drawing.Common to throw PNSE on Browser (#38999)
Maxim Lipnin [Thu, 9 Jul 2020 23:04:56 +0000 (02:04 +0300)]
[wasm] Modify System.Drawing.Common to throw PNSE on Browser (#38999)

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
4 years agoAdd a repro test for `IsCompatibleType(cseLclVarTyp, expTyp)` (#38972)
Sergey Andreenko [Thu, 9 Jul 2020 22:55:31 +0000 (15:55 -0700)]
Add a repro test for `IsCompatibleType(cseLclVarTyp, expTyp)` (#38972)

* Add a repro test for #35724

* move it to pri1.

4 years ago[browser][wasm][tests] Add tests for Map (#38862)
Kenneth Pouncey [Thu, 9 Jul 2020 22:46:01 +0000 (00:46 +0200)]
[browser][wasm][tests] Add tests for Map (#38862)

* [browser][wasm][map] Add tests for Map

* Address review comments

4 years agoAdd and use Environment.ProcessId (#38908)
Stephen Toub [Thu, 9 Jul 2020 22:09:05 +0000 (18:09 -0400)]
Add and use Environment.ProcessId (#38908)

* Add and use Environment.ProcessId

* Split newly added tests

4 years agoFix GC heap dump (#38893)
David Mason [Thu, 9 Jul 2020 21:32:11 +0000 (14:32 -0700)]
Fix GC heap dump (#38893)

#36932 had a typo that caused types to never be logged

4 years agofix the condition in assert (#38965)
Kunal Pathak [Thu, 9 Jul 2020 20:42:38 +0000 (13:42 -0700)]
fix the condition in assert (#38965)

4 years agoMake DSAKeyValueTests.LoadXml accept seed/counter may not roundtrip. (#38952)
Jeremy Barton [Thu, 9 Jul 2020 20:27:24 +0000 (13:27 -0700)]
Make DSAKeyValueTests.LoadXml accept seed/counter may not roundtrip. (#38952)

4 years agoDisable HandlerInvokedForSigQuit test on macOS (#39003)
Stephen Toub [Thu, 9 Jul 2020 20:07:15 +0000 (16:07 -0400)]
Disable HandlerInvokedForSigQuit test on macOS (#39003)

4 years agoWASM Enable System.Collections tests (#38976)
Santiago Fernandez Madero [Thu, 9 Jul 2020 19:39:04 +0000 (12:39 -0700)]
WASM Enable System.Collections tests (#38976)

4 years agoUpdate CadesIssuerSerial.xml (#38436)
Scott Xu [Thu, 9 Jul 2020 19:08:47 +0000 (03:08 +0800)]
Update CadesIssuerSerial.xml (#38436)

remove extra white space

4 years agoMore comparisons (#37768)
pi1024e [Thu, 9 Jul 2020 19:06:45 +0000 (15:06 -0400)]
More comparisons (#37768)

4 years agoHttpStress timeout increased to 60 seconds (#38669)
Alexander Nikolaev [Thu, 9 Jul 2020 18:56:47 +0000 (20:56 +0200)]
HttpStress timeout increased to 60 seconds (#38669)

4 years agoSilence ARM inline asm warning in libunwind (#38971)
Jan Vorlicek [Thu, 9 Jul 2020 18:50:14 +0000 (20:50 +0200)]
Silence ARM inline asm warning in libunwind (#38971)

The libunwind headers define unw_getcontext in the libunwind headers for ARM
as inline assembly with stmia instruction storing SP and PC, which clang
complains about as deprecated. However, it is required for atomic restoration
of the context, so disable that warning.

This change silences that warning.

4 years agoFix standalone GC on ARM32 (#38970)
Jan Vorlicek [Thu, 9 Jul 2020 18:48:49 +0000 (20:48 +0200)]
Fix standalone GC on ARM32 (#38970)

* Fix standalone GC on ARM32

The standalone build of GC on ARM32 was missing the FEATURE_64BIT_ALIGNMENT,
which caused aligment failures at runtime for objects that require align
on 8 byte boundary and were not getting it.

This change fixes that. I had to modify the copy of MethodTable that the
standalone GC uses so that the RequireAlign8 flag can be checked.

* Move the FEATURE_64BIT_ALIGNMENT setting to gcenv.object.h

* Fix debug build where an assert required MethodTable::IsValueType

4 years agoRemove local copying of emsdk_env.sh (#39004)
Alexander Köplinger [Thu, 9 Jul 2020 18:45:59 +0000 (20:45 +0200)]
Remove local copying of emsdk_env.sh (#39004)

Recent versions of emsdk stopped supporting the construct_env argument: https://github.com/emscripten-core/emsdk/commit/819e95cd995147d8b16c600d64e16c880cc407df
Sourcing the normal isn't that slow anyway, it takes about 300ms on my machine

4 years agoWASM: don't compile brotli sources into System.IO.Compression.Native (#38990)
Alexander Köplinger [Thu, 9 Jul 2020 18:45:10 +0000 (20:45 +0200)]
WASM: don't compile brotli sources into System.IO.Compression.Native (#38990)

Brotli isn't supported so we don't need it.

4 years ago[wasm] Enable System.Threading.Tasks.Extensions tests (#38815)
Mitchell Hwang [Thu, 9 Jul 2020 18:43:22 +0000 (14:43 -0400)]
[wasm] Enable System.Threading.Tasks.Extensions tests (#38815)

* [wasm] Enable System.Threading.Tasks.Extensions tests

* Remove synchronous blocking from System.Threading.Tasks.Extensions tests

* [wasm] ManualResetValueTaskSourceTests remove unnecessary and add necessary conditionalfacts

* [wasm] ValueTaskTests clean up ConditionalFacts

* [wasm] Amend ManualResetValueTaskSourceTests tests asserting distinct threads

* [wasm] Skip hanging System.Threading.Tasks.Extensions tests with ActiveIssue

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoImprove performance of DateTime.Kind property. (#38501)
SingleAccretion [Thu, 9 Jul 2020 18:24:37 +0000 (21:24 +0300)]
Improve performance of DateTime.Kind property. (#38501)

* Improve performance of DateTime.Kind.

* Remove the unused field.

* Fixing whitespaces.

Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
* Revert the changes and add AgressiveInlining

* Put the attribute on the getter.

* Update src/libraries/System.Private.CoreLib/src/System/DateTime.cs

Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoVarious createdump fixes and improvements to help diagnosing problems (#38940)
Mike McLaughlin [Thu, 9 Jul 2020 18:24:28 +0000 (11:24 -0700)]
Various createdump fixes and improvements to help diagnosing problems (#38940)

Better MacOS createdump thread suspend

Remove extra logging

Add trace_printf and flush diag logging

Add process id/name spew

Add stdout flushing to CrashInfo::Trace

Fix issue https://github.com/dotnet/diagnostics/issues/1305

4 years agoTrim NetEventSource when EventSource.IsSupported is false (#38828)
Eric Erhardt [Thu, 9 Jul 2020 18:12:44 +0000 (13:12 -0500)]
Trim NetEventSource when EventSource.IsSupported is false (#38828)

* Trim NetEventSource when EventSource.IsSupported is false

Follow up to #38129. NetEventSource code was still left in even when EventSource.IsSupported is false, since all the usages of NetEventSource are keying off its own static property: NetEventSource.IsEnabled.

Remove NetEventSource.IsEnabled so the linker can trim NetEventSource code when EventSource.IsSupported is false.

* Remove HttpTelemetry.IsEnabled static property so the linker can trim EventSource code when EventSource.IsSupported is false.

* Fix fake NetEventSource to match what is in the product.

4 years agoSet memory cache logger field as readonly (#37289)
lindexi [Thu, 9 Jul 2020 17:55:08 +0000 (01:55 +0800)]
Set memory cache logger field as readonly (#37289)

4 years ago[Wasm] Skip System.IO.Compression.Brotli tests b/c the library is PNSE (#38941)
Steve Pfister [Thu, 9 Jul 2020 17:20:56 +0000 (13:20 -0400)]
[Wasm] Skip System.IO.Compression.Brotli tests b/c the library is PNSE (#38941)

4 years agoUse mono_runtime_delegate_invoke in EventPipeInternal::CreateProvider. (#38989)
Johan Lorensson [Thu, 9 Jul 2020 17:16:30 +0000 (19:16 +0200)]
Use mono_runtime_delegate_invoke in EventPipeInternal::CreateProvider. (#38989)

Due to issues on some platforms related to mono_delegate_to_ftnptr_impl,
switch to use mono_runtime_delegate_invoke without need for delegate
wrapper generation currently not supported on all platforms.

4 years ago[CBOR] Make Half Read/Write methods public and add unit tests (#38946)
Eirik Tsarpalis [Thu, 9 Jul 2020 17:10:40 +0000 (18:10 +0100)]
[CBOR] Make Half Read/Write methods public and add unit tests (#38946)

* Make Cbor Half methods public and add unit tests

* address feedback

4 years agoImprove terminology used in code (#38960)
Stephen Toub [Thu, 9 Jul 2020 16:41:15 +0000 (12:41 -0400)]
Improve terminology used in code (#38960)

* Improve terminology used in code

* Address PR feedback

* Update src/libraries/System.Private.CoreLib/src/System/Resources/RuntimeResourceSet.cs

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
4 years agoextend existing test that validates the sent and received bytes with a usage of sync...
Adam Sitnik [Thu, 9 Jul 2020 16:33:38 +0000 (18:33 +0200)]
extend existing test that validates the sent and received bytes with a usage of sync method that uses BufferPtrSendOperation internally (#38935)

4 years ago[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest dotnet...
dotnet-maestro[bot] [Thu, 9 Jul 2020 16:10:33 +0000 (18:10 +0200)]
[master] Update dependencies from dotnet/arcade mono/linker Microsoft/vstest dotnet/llvm-project dotnet/xharness (#38880)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoAdd feature switch for diagnostics handler in System.Net.Http (#38765)
Marek Safar [Thu, 9 Jul 2020 15:38:55 +0000 (17:38 +0200)]
Add feature switch for diagnostics handler in System.Net.Http (#38765)

4 years agoFix a few more license headers (#38973)
Stephen Toub [Thu, 9 Jul 2020 15:32:01 +0000 (11:32 -0400)]
Fix a few more license headers (#38973)

* Fix a few more license headers

I missed a few directories outside of src.

* Update Directory.Build.props

4 years agoDelete unreachable code in stackwalker (#38978)
Jan Kotas [Thu, 9 Jul 2020 14:33:57 +0000 (07:33 -0700)]
Delete unreachable code in stackwalker (#38978)

4 years agoStandardize on same illink descriptor name (#38985)
Marek Safar [Thu, 9 Jul 2020 13:47:34 +0000 (15:47 +0200)]
Standardize on same illink descriptor name (#38985)

4 years agoUpdate windows-instructions.md
Stephen Toub [Thu, 9 Jul 2020 13:10:36 +0000 (09:10 -0400)]
Update windows-instructions.md

4 years agoDelete WebHeaderCollection's event source (#38871)
Stephen Toub [Thu, 9 Jul 2020 13:08:39 +0000 (09:08 -0400)]
Delete WebHeaderCollection's event source (#38871)

The logging is verbose, arbitrary, expensive, and duplicative of logging that happens when headers are actually read/written by the underlying networking stack.  Delete.

4 years agoAdd browser tfm to test projects that used to run when it derived from Unix (#38954)
Santiago Fernandez Madero [Thu, 9 Jul 2020 11:12:19 +0000 (04:12 -0700)]
Add browser tfm to test projects that used to run when it derived from Unix (#38954)

* Add browser tfm to test projects that used to run when it derived from Unix

* Don't build System.Net.Mail.Unit.Tests as they are already PNSE

4 years agoWASM: Enable System.Runtime.Serialization.Formatters tests (#38948)
Alexander Köplinger [Thu, 9 Jul 2020 10:33:43 +0000 (12:33 +0200)]
WASM: Enable System.Runtime.Serialization.Formatters tests (#38948)

* WASM: Enable System.Runtime.Serialization.Formatters tests

We need to preserve some assemblies the BinaryFormatter needs and also skip some test cases that would cause PNSE on WebAssembly.

* Disable IsolatedStorage case too

It throws PNSE now.