platform/upstream/dotnet/runtime.git
4 years agoFix building JIT without runtime on Linux (#42090)
Michal Strehovský [Fri, 11 Sep 2020 19:56:28 +0000 (21:56 +0200)]
Fix building JIT without runtime on Linux (#42090)

* Don't build createdump
* We need mscorrc

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

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

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

* Updating the doc comment for Quaternion

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

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

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

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

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

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

Thanks

Tomas

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

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

* Fix vtable chunk sharing with covariant returns

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

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

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

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

* Address the comment regarding IncrementalHash.CreateHMAC

* Group System.* usings

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

* Fix style issues

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

* Using

* Style fix

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

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

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

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

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

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

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

Thanks

Tomas

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

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

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

* Ongoing work on the cmake build.

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

* Add a 'preemptive' value to GC_SUSPEND.

* Add an ENABLE_WERROR option.

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

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

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

* Enabling CA1416

* Resolving PR feedback

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

* Resolving compilation errors on full framework

* Fixing two more tfm issues with the platform compat checks

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

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

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

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

* Implement SocketsHttpHandler.ConnectCallback

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

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

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

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

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

* Enable Alpine ARM support

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

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

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

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

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

4 years agoTemporarily disable arm64-intrin. UTF-16 validation (#42052)
Levi Broderick [Thu, 10 Sep 2020 11:06:35 +0000 (04:06 -0700)]
Temporarily disable arm64-intrin. UTF-16 validation (#42052)

4 years ago[mono] Propagate -Werror properly, fix warning (#41996)
Ryan Lucia [Thu, 10 Sep 2020 10:50:53 +0000 (06:50 -0400)]
[mono] Propagate -Werror properly, fix warning (#41996)

4 years agoUpdate SDK min and target version to >= Preview8 (#41947)
Viktor Hofer [Thu, 10 Sep 2020 08:50:09 +0000 (10:50 +0200)]
Update SDK min and target version to >= Preview8 (#41947)

* Update SDK min and target version to >= Preview8

4 years agoAdds instruction count and summarized variable debug info (#42040)
Kunal Pathak [Thu, 10 Sep 2020 05:32:50 +0000 (22:32 -0700)]
Adds instruction count and summarized variable debug info (#42040)

* Print instruction count in Jitasm

* Print summarized variable debug info

* Make instrCount a local variable

4 years ago[browser][http] Add support for AllowAutoRedirect. (#41394)
Kenneth Pouncey [Thu, 10 Sep 2020 04:25:46 +0000 (06:25 +0200)]
[browser][http] Add support for AllowAutoRedirect. (#41394)

* [browser][http] Add support for AllowAutoRedirect.

* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
* Address review comments and add flag to determine if the _allowAutoRedirect was explicitly set or not.

* Remove Disposed and Handler checks to address review comments

* Update src/libraries/System.Net.Http/src/System/Net/Http/BrowserHttpHandler/BrowserHttpHandler.cs

Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
* MaxAutomaticRedirections moved back to PlatformNotSupportedException.

* Address review comments about wrong order.

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
4 years agoadd build rotation doc (#42005)
Anirudh Agnihotry [Thu, 10 Sep 2020 03:00:45 +0000 (20:00 -0700)]
add build rotation doc (#42005)

* add build rotation doc

* Update docs/buildtriage.md

* address feedback

* removing the extra table

* Update docs/buildtriage.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* remove  pass rate

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
4 years agorework UseCallback_BadCertificate_ExpectedPolicyErrors test to use Loopback server...
Tomas Weinfurt [Thu, 10 Sep 2020 01:09:47 +0000 (18:09 -0700)]
rework UseCallback_BadCertificate_ExpectedPolicyErrors test to use Loopback server to avoid external dependency (#41850)

* rework UseCallback_BadCertificate_ExpectedPolicyErrors test to use Loppbackserver to avoid external dependency

* feedback from review

* attempt to fix old winhttp

4 years agoset isShipping=false for internal.transport (#42032)
Anirudh Agnihotry [Thu, 10 Sep 2020 00:52:13 +0000 (17:52 -0700)]
set isShipping=false for internal.transport (#42032)

4 years agoAvoid Unnecessary Cast (#42033)
Khalid Abuhakmeh [Thu, 10 Sep 2020 00:27:45 +0000 (20:27 -0400)]
Avoid Unnecessary Cast (#42033)

By changing  to  we no longer have a
cast from double to float.

Fixes #41140

4 years ago[iOS] Make Environment.GetFolderPathCore Xamarin.iOS compatible (#41959)
Egor Bogatov [Thu, 10 Sep 2020 00:16:16 +0000 (03:16 +0300)]
[iOS] Make Environment.GetFolderPathCore Xamarin.iOS compatible (#41959)

4 years agoRemove empty transform file. (#42042)
Jeremy Koritzinsky [Wed, 9 Sep 2020 22:44:03 +0000 (15:44 -0700)]
Remove empty transform file. (#42042)

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
4 years agoBuild infra changes to enable building a more universal cross target jit builds ...
David Wrighton [Wed, 9 Sep 2020 21:49:42 +0000 (14:49 -0700)]
Build infra changes to enable building a more universal cross target jit builds (#41126)

This change is part of a larger effort to enable crossgen2 to perform general purpose cross compilation from any architecture to any other architecture. This portion of the change is to begin generating cross targeting jits with a consistent naming scheme with a minimal amount of code change.

The practical output of this change is replacement of the current practice of building protojit/protononjit/etc. with `clrjit_<targetos>_<target_arch>_<host_arch>` binaries.

In addition I've defined a couple of new subsets so that this can be less impactful to the inner dev loop.

clr.alljits, which will build all of the jits.
clr.jit, which will build only non-cross targeting jits.
clr.runtime which has been enhanced to not trigger the alljits build.

Current restrictions of the change:
1. This change does not support 32bit to 64bit compilation. I've built a larger change that includes the necessary work for that, but the changes are more disruptive, and I would prefer to scope this work to make it reviewable.
2. This work builds different compilers for the unix targetting and windows targetting compilers. This is due to the different ABIs that the architectures support. Upon investigation, I've determined that the actual product differences in these cases is small for ARM and ARM64. In the future, once we have testing, I believe it would be reasonable to unify the generated compiler binaries.
3. These changes do not build an armel targeting compiler for all scenarios, but it does build one with the current naming scheme as was done before. Again, like in condition 2, I believe we can make a single arm targetting compiler that will work.
4. These changes include changes to crossgen2 to use the new compiler binaries. However, there is no expanded testing to cover test the newly available cross compilation capabilities. That will appear in follow-on work.

4 years agoAdd managed Marshal.AllocBSTRByteLen() (#41962)
Adeel Mujahid [Wed, 9 Sep 2020 21:41:13 +0000 (00:41 +0300)]
Add managed Marshal.AllocBSTRByteLen() (#41962)

4 years ago[interp] Remove dead basic blocks and merge adjacent ones (#41913)
monojenkins [Wed, 9 Sep 2020 21:39:11 +0000 (17:39 -0400)]
[interp] Remove dead basic blocks and merge adjacent ones (#41913)

We have a new pass that iterates over basic blocks list. This pass merges adjacent bblocks (who have a single out/in with is matches with one another and they are also consecutive in code order, `first_bb->next_bb == second_bb`) and removes dead basic blocks (who have `in_count == 0`). The linking between basic blocks is set during code generation and it is also updated, by removing links during constant folding and removal of conditional branches. If we merge a pair of basic blocks then we do another copy propagation pass, since cprop runs only at basic block level, and it can now propagate values to the new merged bblock.

This PR also enables inlining of methods with multiple returns, by having an exit_bb where all `ret` from inlined method can branch to.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoFix ilasm parsing of defines (#42002)
Jan Kotas [Wed, 9 Sep 2020 19:07:15 +0000 (12:07 -0700)]
Fix ilasm parsing of defines (#42002)

Regression introduced by #41611

Fixes #42001

4 years agoHandle IdLinkage X509 chain building status.
Kevin Jones [Wed, 9 Sep 2020 18:32:25 +0000 (14:32 -0400)]
Handle IdLinkage X509 chain building status.

In macOS, when building an X509 chain, if a leaf and issuing certificate
form a chain, but the subject and authority key identifiers do not match,
an IdLinkage status is reported.

To match Windows, we ignore this chain status.

Linux appears to use these extensions when building a chain, and reports
PartialChain even if the attributes were not strictly needed to aid in
building a chain.

Additionally, this updates the debugging output for macOS to use an allocating
function to convert a CFString to a C string. CFStringGetCStringPtr will return
"NULL if the internal storage of theString does not allow this to be returned efficiently."
which it appears to have started doing for me.

4 years agoUpdate comments to match official Win32 API documentation. (#42026)
Aaron Robinson [Wed, 9 Sep 2020 18:22:40 +0000 (11:22 -0700)]
Update comments to match official Win32 API documentation. (#42026)

4 years agoEnsure <Nullable>enable<Nullable> on System.IO.Packaging and S.Resources.Extensions...
Krzysztof Wicher [Wed, 9 Sep 2020 16:15:30 +0000 (18:15 +0200)]
Ensure <Nullable>enable<Nullable> on System.IO.Packaging and S.Resources.Extensions (#41731)

Fix src ref diffs

4 years agoImplement ExportSubjectPublicKeyInfo on ECDHPublicKey
Kevin Jones [Wed, 9 Sep 2020 16:03:49 +0000 (12:03 -0400)]
Implement ExportSubjectPublicKeyInfo on ECDHPublicKey

Implement {Try}ExportSubjectKeyInfo on ECDHPK.

4 years agoHandle name constraint errors from chain building.
Kevin Jones [Wed, 9 Sep 2020 16:00:49 +0000 (12:00 -0400)]
Handle name constraint errors from chain building.

Map Linux name constraint status codes to the appropriate
X509ChainStatusFlags.

macOS does not have a unique status for different types of name
constraint violations like Linux and Windows do. Map this to
InvalidNameConstraint.

4 years agoIntegrate minor fixes from dotnet/runtimelab:NativeAOT (#41999)
Jan Kotas [Wed, 9 Sep 2020 14:05:33 +0000 (07:05 -0700)]
Integrate minor fixes from dotnet/runtimelab:NativeAOT (#41999)

4 years agoMark System.IO.Pipes Unsupported at assembly level (#41976)
Mitchell Hwang [Wed, 9 Sep 2020 13:36:02 +0000 (09:36 -0400)]
Mark System.IO.Pipes Unsupported at assembly level (#41976)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoFix exception mapping during expect 100 cancellation. (#41800)
Marie Píchová [Wed, 9 Sep 2020 12:27:08 +0000 (14:27 +0200)]
Fix exception mapping during expect 100 cancellation. (#41800)

4 years agofix assert ordering (#42007)
Eirik Tsarpalis [Wed, 9 Sep 2020 09:10:42 +0000 (10:10 +0100)]
fix assert ordering (#42007)

4 years ago[mono] Minor fixes to the wasm browser sample (#41992)
Ryan Lucia [Wed, 9 Sep 2020 06:26:39 +0000 (02:26 -0400)]
[mono] Minor fixes to the wasm browser sample (#41992)

Use python 3, fix typo, prevent inlining

4 years agoUpdate xml char type (#41756)
Wraith [Wed, 9 Sep 2020 00:52:10 +0000 (01:52 +0100)]
Update xml char type (#41756)

4 years ago[wasm] Mark System.Net.NameResolution Unsupported at assembly level (#41985)
Mitchell Hwang [Tue, 8 Sep 2020 23:24:33 +0000 (19:24 -0400)]
[wasm] Mark System.Net.NameResolution Unsupported at assembly level (#41985)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoMark System.Net.WebSockets.ClientWebSocketOptions APIs as unsupported on Browser...
Maxim Lipnin [Tue, 8 Sep 2020 23:24:22 +0000 (02:24 +0300)]
Mark System.Net.WebSockets.ClientWebSocketOptions APIs as unsupported on Browser (#41963)

* Mark System.Net.WebSockets.ClientWebSocketOptions APIs as unsupported on Browser

* Add the attributes to non-browser version of ClientWebSocketOptions class to avoid build error

* Add using

* Include platform attributes

4 years ago[wasm] Mark System.Threading.ThreadPool unsupported on Browser (#41891)
Mitchell Hwang [Tue, 8 Sep 2020 23:24:09 +0000 (19:24 -0400)]
[wasm] Mark System.Threading.ThreadPool unsupported on Browser (#41891)

* System.Threading.ThreadPool enable platform attributes

* Mark System.Threading.ThreadPool APIs unsupported on browser

* System.Threading.ThreadPool Add Unsupported attribute to other ThreadPool files

* Remove Unsupported attributes from BindHandle

* Add windows Supported Attribute to BindHandle

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoAdd initial release testing for outerloop and jitstress pipelines (#41856)
Tomáš Rylek [Tue, 8 Sep 2020 22:55:25 +0000 (00:55 +0200)]
Add initial release testing for outerloop and jitstress pipelines (#41856)

I have fixed the CoreCLR outerloop pipeline to include the release
branches. For jitstress and libraries_jitstress I have split the
schedules to run every other day for master vs. release as with
the growing number of Mono runs there's not much space for maneuver
w.r.t. allocating new lab HW.

Thanks

Tomas

4 years agoRemove netcore/ directory from the mono/mono repository. (#41972)
monojenkins [Tue, 8 Sep 2020 21:52:54 +0000 (17:52 -0400)]
Remove netcore/ directory from the mono/mono repository. (#41972)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoDo not address expose a struct having 1 slot (#40957)
Kunal Pathak [Tue, 8 Sep 2020 20:36:56 +0000 (13:36 -0700)]
Do not address expose a struct having 1 slot (#40957)

4 years agoARM64: Eliminate redundant ldr/str instruction (#39222)
Kunal Pathak [Tue, 8 Sep 2020 20:36:06 +0000 (13:36 -0700)]
ARM64: Eliminate redundant ldr/str instruction (#39222)

* IsRedundantLdStr

Added method to check if we can eliminate ld/str instruction

* jit format

* Fixed IsRedundantLdStr and call it from emitIns_R_S() and emitIns_S_R()

* Added check for lastEmitInstr->opSize

* Add some comments

4 years ago[WASM] Add satellite assemblies bundle and hook to register them (#41358)
Santiago Fernandez Madero [Tue, 8 Sep 2020 19:25:12 +0000 (12:25 -0700)]
[WASM] Add satellite assemblies bundle and hook to register them (#41358)

* [WASM] Add satellite assemblies bundle and hook to register them

* Fix test failures

* PR Feedback

* PR Feedback and add test to make sure load from path respects culture

* Add binding so that blazor can register bundled assemblies

* Remove blank line.

* PR Feedback

4 years agoExclude .a files from the runtime native files when packaging (#41966)
Vitek Karas [Tue, 8 Sep 2020 18:41:46 +0000 (11:41 -0700)]
Exclude .a files from the runtime native files when packaging (#41966)

There's no use for the .a files in the shared framework or runtime pack, they just increase disk size.

Also not that we didn't include them in 3.1, so it's effectively a regression in 5.0.

4 years agoDisable Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequests...
Alexander Nikolaev [Tue, 8 Sep 2020 18:22:24 +0000 (20:22 +0200)]
Disable Http2_MultipleConnectionsEnabled_ConnectionLimitNotReached_ConcurrentRequestsSuccessfullyHandled (#41974)

4 years agoFix Configuration Save Full setting default value (#41912)
Wei Zheng [Tue, 8 Sep 2020 16:23:35 +0000 (00:23 +0800)]
Fix Configuration Save Full setting default value (#41912)

* Fix Configuration Save Full setting default value

* Cleaned out untrimmed whitespaces

4 years agoVarious Regexes for more testing. (#41935)
Jiri Cincura ↹ [Tue, 8 Sep 2020 16:18:39 +0000 (18:18 +0200)]
Various Regexes for more testing. (#41935)

4 years agoHonor custom number handling only when property/type is a number/collection of number...
Layomi Akinrinade [Tue, 8 Sep 2020 15:39:46 +0000 (08:39 -0700)]
Honor custom number handling only when property/type is a number/collection of numbers (#41679)

* Honor custom number handling only when property/type is a number/collection of numbers

* Verify typeof(object) + custom number handling behavior

* Simplify setting of per-property number handling

* Clean up number-handling-applicable check

* Fix issue with number-handling + boxed non-number types

4 years agoDisable System.Xml.Tests.AsyncReaderLateInitTests.InitializationWithUriOnNonAsyncRead...
Maxim Lipnin [Tue, 8 Sep 2020 15:21:59 +0000 (18:21 +0300)]
Disable System.Xml.Tests.AsyncReaderLateInitTests.InitializationWithUriOnNonAsyncReaderTrows test on Browser WASM due to PNSE (#41936)

4 years agoFixed stress test pipeline and other issues. (#41513)
Marie Píchová [Tue, 8 Sep 2020 13:36:43 +0000 (15:36 +0200)]
Fixed stress test pipeline and other issues. (#41513)

4 years agoMove Marshal memory allocation methods into CoreLib shared partition (#41911)
Jan Kotas [Tue, 8 Sep 2020 04:51:03 +0000 (21:51 -0700)]
Move Marshal memory allocation methods into CoreLib shared partition (#41911)

* Move Marshal memory allocation methods into CoreLib shared partition

* Unify behavior across platforms

4 years agoForce concurrent LdapConnection in new process (#41880)
Eric StJohn [Tue, 8 Sep 2020 04:33:51 +0000 (21:33 -0700)]
Force concurrent LdapConnection in new process (#41880)

* Ensure an initial non-concurrent call to OpenLDAP

OpenLDAP requires a single call for initialization before any other concurrent call.

This fixes asserts and segfaults we were seeing when calling OpenLDAP concurrently.

4 years agoSeptember infra rollout - continued CoreCLR / Mono test cleanup (minimal) (#40345)
Tomáš Rylek [Mon, 7 Sep 2020 22:18:14 +0000 (00:18 +0200)]
September infra rollout - continued CoreCLR / Mono test cleanup (minimal) (#40345)

Similar to the previous occasion, I have identified this set as the minimum meaningful set of scripts to move without causing too much disruption apart from purely mechanical renames. This change moves the developer-facing test-related CoreCLR scripts under the src/tests folder in accordance with the previous move of the tests themselves:

src/coreclr/build-test.cmd to src/tests/build.cmd
src/coreclr/build-test.sh to src/tests/build.sh
src/coreclr/tests/build.proj to src/tests/build.proj
src/coreclr/tests/runtest.cmd to src/tests/run.cmd
src/coreclr/tests/runtest.sh to src/tests/run.sh
src/coreclr/tests/src/runtest.proj to src/tests/run.proj
src/coreclr/tests/issues.targets to src/tests/issues.targets

The rest of the change constitutes mere path adjustments to match the primary rename.

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

Thanks

Tomas

4 years agoCleanup stack limits usage (#41946)
Jan Vorlicek [Mon, 7 Sep 2020 22:16:19 +0000 (00:16 +0200)]
Cleanup stack limits usage (#41946)

There were couple of members / functions for stack limits checking that
were not used anymore.

4 years agoAdd transitive CompilerServices.Unsafe dependency (#41616)
Viktor Hofer [Mon, 7 Sep 2020 20:18:28 +0000 (22:18 +0200)]
Add transitive CompilerServices.Unsafe dependency (#41616)

* Add transitive CompilerServices.Unsafe dependency

for System.Memory and System.Threading.Tasks.Extensions package
references. Adding the dependency as a P2P to prefer the live asset
over the prebuilt.

4 years agoRemove multi-targeting from runtime.depproj (#41666)
Viktor Hofer [Mon, 7 Sep 2020 19:53:25 +0000 (21:53 +0200)]
Remove multi-targeting from runtime.depproj (#41666)

* Remove multi-targeting from runtime.depproj

and convert it to a csproj and use the NoBuild msbuild sdk. Simplify the
project logic in relation to IL vs native code as well.

4 years agoMore tests for Marshal.Realloc{HGlobal|CoTaskMem} (#41910)
Jan Kotas [Mon, 7 Sep 2020 17:11:07 +0000 (10:11 -0700)]
More tests for Marshal.Realloc{HGlobal|CoTaskMem} (#41910)

- The corner case behavior of Marshal.Realloc method is non-standard and differs between the two realloc methods. Capture the current behavior in tests.
- Add temporary workarounds for Windows vs. Unix differences
- Disable the tests on Mono for now

4 years agoModify condition to match message: (#41933)
Kenneth Pouncey [Mon, 7 Sep 2020 15:30:26 +0000 (17:30 +0200)]
Modify condition to match message: (#41933)

- Since we are throwing: `net_http_value_must_be_greater_than, 0` it makes more sense to use the same value in the condition.

4 years agoRestore exception compatibility in TcpListener.EndAccept*** (#41745)
Anton Firszov [Mon, 7 Sep 2020 12:51:11 +0000 (14:51 +0200)]
Restore exception compatibility in TcpListener.EndAccept*** (#41745)

According to the old (pre- #40476) code and the documentation, we should throw ObjectDisposedException in EndAcceptSocket and EndAcceptTcpClient.

Fixes #41585

4 years agoRemoved nightly to workaround failing Kestrel init. (#41934)
Marie Píchová [Mon, 7 Sep 2020 11:25:43 +0000 (13:25 +0200)]
Removed nightly to workaround failing Kestrel init. (#41934)

4 years ago[Browser] Add mono_wasm_get_icudt_name API (#41795)
Egor Bogatov [Mon, 7 Sep 2020 10:36:21 +0000 (13:36 +0300)]
[Browser] Add mono_wasm_get_icudt_name API (#41795)

4 years agoAdd unsigned overloads for Unsafe Add/Subtract and Add/SubtractByteOffset (#40715)
Huo Yaoyuan [Sun, 6 Sep 2020 17:30:42 +0000 (01:30 +0800)]
Add unsigned overloads for Unsafe Add/Subtract and Add/SubtractByteOffset (#40715)

* Implement unsigned reference math in IL.

* Update reference source for Unsafe.

* Copy docs to UIntPtr overloads.

* Add tests for UIntPtr.

* Use nuint instead of UIntPtr.

* Fix reference to CORE_ASSEMBLY.

4 years agoUpdates servicing doc and servicing template (#41844)
Anirudh Agnihotry [Sun, 6 Sep 2020 08:02:32 +0000 (01:02 -0700)]
Updates servicing doc and servicing template (#41844)

* add template

* edit servicing doc

* Update PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* Apply suggestions from code review

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
* add exclude paths

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
4 years ago[interp] Add basic block support (#41574)
monojenkins [Sat, 5 Sep 2020 10:54:58 +0000 (06:54 -0400)]
[interp] Add basic block support (#41574)

This PR makes basic blocks a fundamental part of the code generation machinery. Before this change, there wasn't really any notion of basic blocks, there was a single list of instructions. With this change, we emit instructions inside basic blocks which are linked together. These basic blocks are iterated one at a time when doing optimization passes or emitting the final code. Currently, the origin of all basic blocks is IL code (they originate from branch targets and exception clauses) and we might never support creation of additional bblocks (since we could just create more complex instructions, which would also result in faster code). The bblocks will be emitted in the final code in the same order as they appear in IL code. This order is maintained through `next_bb` link.

Since the list of bblocks was completely changed, some fixes were required for debugging support. Some tests seemed to pass by chance, since we didn't emit MINT_SDB_INTR_LOC in the same locations as jit. There are probably still some discrepancies there.

This PR enables inlining of methods with multiple basic blocks. Currently, this might regress performance because we don't merge some basic blocks that we could (for method start), reducing benefits from cprop passes operating on single basic blocks. We will soon add a pass that traverses the list of basic blocks which eliminates dead basic blocks, merging any adjacent ones.

Co-authored-by: BrzVlad <BrzVlad@users.noreply.github.com>
4 years agoremove LazyAsyncResult and unnecessary proj references (#41909)
Geoff Kizer [Sat, 5 Sep 2020 07:39:20 +0000 (00:39 -0700)]
remove LazyAsyncResult and unnecessary proj references (#41909)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
4 years agorefine obsolete messages (#41877)
Genevieve Warren [Sat, 5 Sep 2020 05:08:13 +0000 (22:08 -0700)]
refine obsolete messages (#41877)

4 years agoSuppress C5105 warning on build (#41900)
Levi Broderick [Sat, 5 Sep 2020 05:06:49 +0000 (22:06 -0700)]
Suppress C5105 warning on build (#41900)

4 years ago[wasm][debugger] Small improvements to fail gracefully (#41713)
Ankit Jain [Sat, 5 Sep 2020 04:55:31 +0000 (00:55 -0400)]
[wasm][debugger] Small improvements to fail gracefully (#41713)

* [wasm][debugger] Instead of failing completely, skip the problematic

.. property. Some times we might not get a `value`, or `name`, or it
might instead have a `get`. Handle those cases correctly when combining
the name/value/get objects.

This showed up in case of a `MulticastDelegate`, where we didn't have a
`value`, and ended up incorrectly combining the name/value objects, thus
returning incorrect locals.

* [wasm][debugger] Handle MulticastDelegate, and events

- Essentially we just surface these as a symbol showing the type name

* [wasm][debugger] Fail gracefully when vt could not be expanded

* [wasm][debugger] Handle invalid scope ids

scope<0, or scope too high

- This does get filtered at the proxy level, but app side should be able
to handle it too

* [wasm][debugger] Handle invalid/missing/failed value descriptions

- Eg. missing because of invalid param/local id, or value description
failed because of some as yet unsupported type

* [wasm][debugger] Fix frame indexing

- `collect_frames`, `list_frames` - both iterate over stack frames. They
skip some frames. This debug proxy assigns a simple index to each of the
received(filtered) frames.

    - so, if we had `[ frame0, (skipped frame1), frame2 ]`, the proxy will
    have `[ frame0(index:0), frame2(index:1) ]`

- `describe_variables_on_frame` also iterates over stack frames, and
tries to find a given frame by an index. And this index is what the
proxy had assigned.
    - because some frames were skipped, this function also needs to skip
    the *same* ones, so that it can find the intended frame.

    - Instead of trying to keep these in sync, here the indexing is
    changed to be the real index found as we iterate over the frames.
    - And the proxy just uses that.
    - So, we will have `[ frame0(index:0), frame2(index:2) ]`

This showed up in a trace in aspnetcore, which was called via
reflection. And that frame didn't get added to the list because it was
not `MONO_WRAPPER_NONE`, which caused the indexing to get out of sync.

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

* fix warning: remove unused var

* rebase on master, fix errors

* Make frame indices returned from debugger.c, 0-based

- Earlier this 1-based, and it was being adjusted in `MonoProxy`.
- Based on @lewing's suggestion, changing this to be 0-based in
debugger.c, itself, thus removing the need to "fixup" in `MonoProxy`.

* dotnet-format fixes

4 years ago[wasm][debugger] Show actual data for boxed values (#41562)
Ankit Jain [Sat, 5 Sep 2020 02:13:35 +0000 (22:13 -0400)]
[wasm][debugger] Show actual data for boxed values (#41562)

* [wasm][debugger] Add support for Nullable<T>

Return the value, or null.

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

* Address review feedback - merge functions

* [wasm][debugger] run dotnet-format on the debugger test app

* [wasm][debugger] simplify function sig, based on usage

- addresses review feedback from @lewing

* [wasm][debugger] Simplify the function further, based on @lewing's

.. excellent suggestion!

* [wasm][debugger] Show actual data for boxed values

Eg. `object o = "foobar"`

This will show the string `"foobar"`, instead of an object, in the
debugger.

4 years ago[wasm][debugger] Add support for Nullable<T> (#41559)
Ankit Jain [Sat, 5 Sep 2020 02:08:55 +0000 (22:08 -0400)]
[wasm][debugger] Add support for Nullable<T>  (#41559)

* [wasm][debugger] Add support for Nullable<T>

Return the value, or null.

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

* Address review feedback - merge functions

* [wasm][debugger] run dotnet-format on the debugger test app

* [wasm][debugger] simplify function sig, based on usage

- addresses review feedback from @lewing

* [wasm][debugger] Simplify the function further, based on @lewing's

.. excellent suggestion!

4 years agoOptimize the allocation and speed of ActivitySet/GetCustomProperty (#41840)
Tarek Mahmoud Sayed [Sat, 5 Sep 2020 00:19:09 +0000 (17:19 -0700)]
Optimize the allocation and speed of ActivitySet/GetCustomProperty (#41840)

4 years agoBundle assemblies at 4K for linux arm64 (#41809)
Sven Boemer [Sat, 5 Sep 2020 00:08:27 +0000 (17:08 -0700)]
Bundle assemblies at 4K for linux arm64 (#41809)

* Bundle assemblies at 4K for linux arm64

* Add arch to bundler trace output

* PR feedback

* Remove extra overload

* Update comment

* Fix RID computation

4 years agoAdd more Half methods to BitConverter (#41789)
Huo Yaoyuan [Fri, 4 Sep 2020 23:46:59 +0000 (07:46 +0800)]
Add more Half methods to BitConverter (#41789)

* Add GetBytes, TryWriteBytes, ToHalf overloads for Half.

* Add ref source in System.Runtime.

* Add basic tests.

* Add array and span tests in BitConverter.

* Add xmldoc for BitConverter.GetBytes and TryWriteBytes.

* Add xmldoc for BitConverter.ToXXX.

* Add xmldoc for BitConverter.BitsTo.

4 years agoFix covariant returns validation (#41874)
Jan Vorlicek [Fri, 4 Sep 2020 23:23:31 +0000 (01:23 +0200)]
Fix covariant returns validation (#41874)

* Fix covariant returns validation

Recent fix to a problem with covariant returns validation has introduced
another problem related to code versioning. The validation method is now
called too late in the type load process which causes problem in
crossgening or in case code versioning is disabled.

This change fixes it by splitting the return type verification and
mutating changes like vtable slot updates into two separate phases.

* Fix missing precondition for calling SetRequiresCovariantReturnTypeChecking

4 years agoSingleFile: Enable hammer servicing (#41847)
Swaroop Sridhar [Fri, 4 Sep 2020 23:13:56 +0000 (16:13 -0700)]
SingleFile: Enable hammer servicing (#41847)

* SingleFile: Enable hammer servicing

This change enables hammer servicing to work on single-file apps.

The runtime resolves assemblies in the bundle even before attempting to resolve using the TPA.
This masks any entries in the TPA that correspond to hammer-serviced DLLs.
This change fixes this problem: If a file is resolved to the servicing directory, it is disabled in the bundle directory.

Testing: Added automated tests on Unix systems, manually tested on Windows.

Fixes #36031

4 years agoDisable LoadAsync_CancelDuringLoad_CompletesAsCanceled test on mono (#41878)
Santiago Fernandez Madero [Fri, 4 Sep 2020 23:01:19 +0000 (16:01 -0700)]
Disable LoadAsync_CancelDuringLoad_CompletesAsCanceled test on mono (#41878)

* Disable LoadAsync_CancelDuringLoad_CompletesAsCanceled test on mono

* Update src/libraries/System.Windows.Extensions/tests/System/Media/SoundPlayerTests.cs

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoUpdate msftbot configuration contacts (#41903)
Jeff Handley [Fri, 4 Sep 2020 22:46:57 +0000 (15:46 -0700)]
Update msftbot configuration contacts (#41903)

4 years agoSimplify webassembly targets (#41869)
Alexander Köplinger [Fri, 4 Sep 2020 22:41:32 +0000 (00:41 +0200)]
Simplify webassembly targets (#41869)

Add a subset for compiling only the wasm runtime: `mono.wasmruntime`
This allows us to rebuild the wasm runtime without building the full libraries subset.

Updated documentation with new guidance.

Updated how we build the dotnet.timezones.blat.

4 years ago[wasm] Mark System.Console APIs as unsupported on Browser (#41184)
Mitchell Hwang [Fri, 4 Sep 2020 21:31:48 +0000 (17:31 -0400)]
[wasm] Mark System.Console APIs as unsupported on Browser (#41184)

* [wasm] Mark System.Console APIs as unsupported on Browser

* System.Console remove unsupported attribute from Console.Clear()

* System.Console mark SetIn as unsupported on Browser

* System.Console move UnsupportedOSPlatform attributes down to the accessor

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years ago[merp] Revert 7a0425e which is causing xamarin-android failures (#41709)
monojenkins [Fri, 4 Sep 2020 21:03:56 +0000 (17:03 -0400)]
[merp] Revert 7a0425e which is causing xamarin-android failures (#41709)

This commit https://github.com/mono/mono/commit/7a0425e81ffe0e77a4ba22ff45e691934ecc49a1 is causing the following xamarin-android issue: https://github.com/mono/mono/issues/20275

This pull request reverts it.

Co-authored-by: naricc <naricc@users.noreply.github.com>
4 years ago[wasm] Mark System.IO.IsolatedStorage APIs as unsupported on Browser (#41700)
Mitchell Hwang [Fri, 4 Sep 2020 20:09:09 +0000 (16:09 -0400)]
[wasm] Mark System.IO.IsolatedStorage APIs as unsupported on Browser (#41700)

* [wasm] System.IO.IsolatedStorage enable platform attributes

* Mark System.IO.IsolatedStorage Unsupported at assembly level

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years ago[wasm] Mark System.IO.FileSystem.Watcher APIs as unsupported on Browser (#41682)
Mitchell Hwang [Fri, 4 Sep 2020 19:57:31 +0000 (15:57 -0400)]
[wasm] Mark System.IO.FileSystem.Watcher APIs as unsupported on Browser (#41682)

* [wasm] System.IO.FileSystem.Watcher enable platform attributes

* Mark System.IO.FileSystem.Watcher unsupported at assembly level

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
4 years agoUnconditionally build the cross-os DAC (#41852)
Juan Hoyos [Fri, 4 Sep 2020 18:54:47 +0000 (11:54 -0700)]
Unconditionally build the cross-os DAC (#41852)

* Unconditionally build the cross-os DAC.

4 years agoimprove test dynamic certificate generation (#41659)
Tomas Weinfurt [Fri, 4 Sep 2020 18:48:21 +0000 (11:48 -0700)]
improve test dynamic certificate generation (#41659)

* improve test dynamic certificate generation

* feedback from review