platform/upstream/dotnet/runtime.git
4 years agoFix HostPolicyMock (corehost_error_writer_fn was moved) (#34903)
Egor Bogatov [Mon, 13 Apr 2020 20:33:02 +0000 (23:33 +0300)]
Fix HostPolicyMock (corehost_error_writer_fn was moved) (#34903)

4 years agofix: distinct from streams (#34918)
Bruno Garcia [Mon, 13 Apr 2020 20:32:24 +0000 (17:32 -0300)]
fix: distinct from streams (#34918)

4 years agoAdd logic for JsonIgnoreCondition[Never|WhenNull] on properties to win over global...
Layomi Akinrinade [Mon, 13 Apr 2020 19:30:00 +0000 (15:30 -0400)]
Add logic for JsonIgnoreCondition[Never|WhenNull] on properties to win over global IgnoreReadOnlyValues (#34672)

4 years agoAdd support to pass subset without arg specifier in Unix (#34844)
Santiago Fernandez Madero [Mon, 13 Apr 2020 19:22:34 +0000 (12:22 -0700)]
Add support to pass subset without arg specifier in Unix (#34844)

* Add support to pass subset without arg specifier in Unix

* PR Feedback

* Fix regex expression to match whole word

4 years agoFix bug in test regarding GC'd delegate instance. (#34901)
Aaron Robinson [Mon, 13 Apr 2020 18:22:12 +0000 (11:22 -0700)]
Fix bug in test regarding GC'd delegate instance. (#34901)

4 years agoConsole.Unix: avoid deadlock between LazyInitializer and Console.Out (#34297)
Tom Deseyn [Mon, 13 Apr 2020 17:14:12 +0000 (19:14 +0200)]
Console.Unix: avoid deadlock between LazyInitializer and Console.Out (#34297)

* Console.Unix: avoid deadlock between LazyInitializer and Console.Out

* Add assert for InternalSyncObject

* Console: use Interlocked for lazy initialization

* Cleanup unused 'using'

* Limit locking to event handlers

* Fix AllowNull -> NotNull

* Localize LazyInitializer.EnsureInitialized logic

* Remove lazy initialize delegates

* Use static local functions for initializing

* Remove unused EnsureInitializedDisposableCore

* Remove unused arg from EnsureInitializedStdInReader

* Also EnsureInitialize when not redirected

* Dispose Console Streams with their Reader/Writer

* Fix s_out -> s_error

* leaveOpen streams, fix Encoding set race

* Fix races between Encoding en initializers of In/Out/Error

* Remove EnsureInitialized

* Cleanup

* Rename static local initializer functions to EnsureInitialized

* Use lock in Input/OutputEncoding

* Rename InternalSyncObject to s_syncObject

* Cleanup space

* Fix _isStdErrRedirected -> _isStdInRedirected

* Remove space

* Improve comments

* Fix potential CancelKeyPress deadlock

* Apply suggestions from code review

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Remove unnecessary null forgiving

* Add comment about why we're not Disposing StdInReader

* Add Volatile.Writes for Volatile.Read fields

* More Volatile.Writes

* Add back lock to SetIn

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoAppend TryGetValue to ImmutableHashSet`1.Builder and ImmutableSortedSet`1.Builder...
GeorgeAlexandria [Mon, 13 Apr 2020 16:55:40 +0000 (19:55 +0300)]
Append TryGetValue to ImmutableHashSet`1.Builder and ImmutableSortedSet`1.Builder (#34869)

* Append TryGetValue method.

Append method to builder of ImmutableHashSet and ImmutableSortedSet.

Implements #28160.

* Small cleanup.

4 years agoUse 3-arg Array.Copy in ImmutableArray.CopyTo (#32387)
Marius Ungureanu [Mon, 13 Apr 2020 16:22:28 +0000 (19:22 +0300)]
Use 3-arg Array.Copy in ImmutableArray.CopyTo (#32387)

4 years ago[wasm] Configure the wasm target runtime using --with-lazy-gc-… (#34878)
Zoltan Varga [Mon, 13 Apr 2020 07:18:50 +0000 (03:18 -0400)]
[wasm] Configure the wasm target runtime using --with-lazy-gc-… (#34878)

This flag got lost in the move to mono.proj.

4 years agoLoopbackServer.ReadAsync: Fixed data corruption bug (#34875)
TalAloni [Mon, 13 Apr 2020 00:34:31 +0000 (03:34 +0300)]
LoopbackServer.ReadAsync: Fixed data corruption bug (#34875)

This caused the unused parts of the temp buffer to be copied to buffer, returning 0 to the caller instead of the actual data.
This caused several tests to fail when targeting .NET Standard 2.0

4 years agoFix corlib and runtime rules in Makefile (#34868)
Egor Bogatov [Sun, 12 Apr 2020 18:25:58 +0000 (21:25 +0300)]
Fix corlib and runtime rules in Makefile (#34868)

4 years agoRename CoreFx.Private.TestUtilities.Unicode to TestUtilities.Unicode (#34836)
Levi Broderick [Sun, 12 Apr 2020 17:36:36 +0000 (10:36 -0700)]
Rename CoreFx.Private.TestUtilities.Unicode to TestUtilities.Unicode (#34836)

And explicitly reference it from solutions which consume it

4 years agoFix System.Runtime version referenced by S.R.CS.Unsafe (#34870)
Jan Kotas [Sun, 12 Apr 2020 17:21:31 +0000 (10:21 -0700)]
Fix System.Runtime version referenced by S.R.CS.Unsafe (#34870)

* Fix System.Runtime version referenced by S.R.CS.Unsafe

* Feedback

4 years agoremove unused local of genId in BinaryObjectReader (#34865)
Eriawan Kusumawardhono [Sun, 12 Apr 2020 14:27:19 +0000 (21:27 +0700)]
remove unused local of genId in BinaryObjectReader (#34865)

4 years agoMove "hostpolicy" pinvokes to Interop.HostPolicy.cs (#34813)
Egor Bogatov [Sun, 12 Apr 2020 13:03:23 +0000 (16:03 +0300)]
Move "hostpolicy" pinvokes to Interop.HostPolicy.cs (#34813)

4 years agoOptimize HttpDateParser.TryStringToDate (#34860)
Stephen Toub [Sun, 12 Apr 2020 12:12:33 +0000 (08:12 -0400)]
Optimize HttpDateParser.TryStringToDate (#34860)

* Optimize HttpDateParser.TryStringToDate

When HttpResponseMessage headers are enumerated, even though SocketsHttpHandler adds headers with TryAddWithoutValidation, the enumeration ends up validating them (that's something to be discussed and follow-up on separately).  As part of that, it validates the Date header that's required of most responses. It does so using DateTimeOffset.TryParseExact, but using a long list of allowed formats as well as options that knock TryParseExact's processing off the fast path.  Since most responses are going to contain a date using RFC1123 format (aka "r"), we just try that first, in a way that will generally result in hitting the optimized "r" code path which is much faster.

* Address PR feedback

4 years agoReduce libraries build matrix with mono (#34835)
Santiago Fernandez Madero [Sun, 12 Apr 2020 12:12:02 +0000 (05:12 -0700)]
Reduce libraries build matrix with mono (#34835)

4 years agoFix incorrect behavior noted while compiling large aspnet application with debug...
David Wrighton [Sun, 12 Apr 2020 10:20:01 +0000 (03:20 -0700)]
Fix incorrect behavior noted while compiling large aspnet application with debug build of compiler (#34842)

- Multi-thread handling of UnboxingMethodDesc was incorrect. It would result in incorrect caching of fixups to unboxing methods
- ldtoken of a static method on a valuetype should not refer to an unboxing stub

4 years agoSeveral allocation reductions in SocketsHttpHandler (#34724)
Stephen Toub [Sat, 11 Apr 2020 18:21:37 +0000 (14:21 -0400)]
Several allocation reductions in SocketsHttpHandler (#34724)

* Remove state machine allocation for SendWithNtConnectionAuthAsync

Just manually inline the tiny helper that's only used from one call site.

* Remove unnecessary HeaderStoreItemInfo allocations

For the common case of a raw string, let the dictionary store the raw string directly rather than always wrapping it in a HeaderStoreItemInfo.

* Cache Date and Server response header values

For Server, we expect it to be the same for every request on the same connection.

For Date, if we're making lots of requests in a high-throughput fashion, we expect many responses on the same connection to have the same value.

In both cases, we compare the received value against the last one received, and if it's the same, reuse the same string.

4 years agoMore analyzer changes (#34843)
Prashanth Govindarajan [Sat, 11 Apr 2020 17:33:54 +0000 (10:33 -0700)]
More analyzer changes (#34843)

4 years agoUpdate dependencies from https://github.com/mono/linker build 20200410.1 (#34851)
dotnet-maestro[bot] [Sat, 11 Apr 2020 16:58:05 +0000 (16:58 +0000)]
Update dependencies from https://github.com/mono/linker build 20200410.1 (#34851)

- ILLink.Tasks: 5.0.0-preview.3.20209.2 -> 5.0.0-preview.3.20210.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoAdd native configurations for SunOS (#34756)
Adeel Mujahid [Sat, 11 Apr 2020 16:03:18 +0000 (19:03 +0300)]
Add native configurations for SunOS (#34756)

4 years agoHttpWebRequest allow returning redirect response (#34560)
Matthew R Johnson [Sat, 11 Apr 2020 15:55:51 +0000 (16:55 +0100)]
HttpWebRequest allow returning redirect response (#34560)

* HttpWebRequest allow returning redirect response

Throw WebException for 3xx responses only when `AllowAutoRedirect = true`

Fixes #1074

* Simplify status code check

4 years agoFixed a typo in ValueType.cs (#34854)
Sergio Pedri [Sat, 11 Apr 2020 15:44:34 +0000 (17:44 +0200)]
Fixed a typo in ValueType.cs (#34854)

4 years agoReduce allocations in UriHelper.StripBidiControlCharacters (#34794)
Miha Zupan [Sat, 11 Apr 2020 14:43:15 +0000 (16:43 +0200)]
Reduce allocations in UriHelper.StripBidiControlCharacters (#34794)

* Reduce allocations in UriHelper.StripBidiControlCharacters

* Use Span in StripBidiControlCharacters

* Span > char*

4 years agoAdd test for DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKS (#34818)
Stephen Toub [Sat, 11 Apr 2020 13:40:31 +0000 (09:40 -0400)]
Add test for DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKS (#34818)

4 years agoFix System.Private.Uri.sln hang on load (#34848)
Miha Zupan [Sat, 11 Apr 2020 13:39:52 +0000 (15:39 +0200)]
Fix System.Private.Uri.sln hang on load (#34848)

4 years agoEnable test in System.Reflection.Extensions (#6445) (#34815)
Thorsten Reichert [Sat, 11 Apr 2020 09:48:57 +0000 (11:48 +0200)]
Enable test in System.Reflection.Extensions (#6445) (#34815)

Fixes #6445.

Enabled GetCustom_Attribute_On_Return_Parameter_On_Parent_Method in System.Reflection.Extension Tests.

Note: had to change the attribute to inherit true on the parent class, so that the attribute could actually be retrieved from the derived class

* port CoreClr fix (https://github.com/dotnet/coreclr/pull/6745) to Mono

apply the same check for parameter position = -1 in Mono as is done in CoreClr

4 years ago[wasm][bcl] Handle correctly backslash in file name (#34746)
monojenkins [Sat, 11 Apr 2020 07:41:22 +0000 (03:41 -0400)]
[wasm][bcl] Handle correctly backslash in file name (#34746)

- Modify IO file to assign backslash to alternate directory separator by default
- Add tests for issue https://github.com/mono/mono/issues/18933

closes: https://github.com/mono/mono/issues/18933

<!--
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: kjpou1 <kjpou1@users.noreply.github.com>
4 years ago[R2RDump] Fix x86 gcinfo formatting (#34847)
Jan Kotas [Sat, 11 Apr 2020 05:06:21 +0000 (22:06 -0700)]
[R2RDump] Fix x86 gcinfo formatting (#34847)

4 years agoUse canonical method in TransitionFrames whenever we parse signatures (#33733)
Fadi Hanna [Sat, 11 Apr 2020 05:04:42 +0000 (22:04 -0700)]
Use canonical method in TransitionFrames whenever we parse signatures (#33733)

* Canonicalize arguments before loading instantiation when dropGenericArgumentLevel is TRUE

* Fix casing in COMPlus_GCStress env variable and remove COMPlus_gcServer

Also changing a bunch of assert() calls to _ASSERTE. Usually when _ASSERTE fails in CI lab runs, we tend to get crash dumps associated with test results, unlike assert() which shows a GUI dialog that DHandler dismisses by clicking on the Abort button.

* Remove gcstress switch.

The test will run with gcstress as part of the gcstress lab runs

4 years agoFixAcceleratedCompiledMethodEnum (#34841)
David Wrighton [Sat, 11 Apr 2020 05:03:41 +0000 (22:03 -0700)]
FixAcceleratedCompiledMethodEnum (#34841)

- Implementation checked in earlier today resulted in a non-sorted RUNTIMEFUNCTION list which caused unpredictable runtime failures
- Assertions around MethodCodeNode handling in EnumerateCompiledMethods were wrong

4 years agoRemove ActiveIssue from tests. (#34719)
Aaron Robinson [Sat, 11 Apr 2020 03:33:29 +0000 (20:33 -0700)]
Remove ActiveIssue from tests. (#34719)

* Remove ActiveIssue from tests.
Update tests to pass since issues are being marked "Won't Fix".

4 years agoBuild corelib as part of libraries build. (#34664)
Manish Godse [Sat, 11 Apr 2020 03:26:51 +0000 (20:26 -0700)]
Build corelib as part of libraries build.  (#34664)

* simplify libraries build dependencies.

* FIx depends for tests

* Fix artifact name for webAssembly

* try building corelib during libraries build.

* small typo

* Merge coreclr+libraries build scripts

* update scripts based on new refactor

* fix script error

* dont build corelib for mono or testbuilds

* Handle webassembly case

* fix allconfigurations build

* remove separate corelib job

* remove corelib jobs from pipelines

* delete build-corelib-job

* PR feedback

* remove special case for webassembly

now that its dependent on the mono runtimeFlavor

4 years agoAdd Socket(SocketSafeHandle) ctor (#34727)
Stephen Toub [Fri, 10 Apr 2020 23:54:09 +0000 (19:54 -0400)]
Add Socket(SocketSafeHandle) ctor (#34727)

4 years agoMerge pinvoke guidelines into interop guidelines (#34833)
Dan Moseley [Fri, 10 Apr 2020 23:46:56 +0000 (16:46 -0700)]
Merge pinvoke guidelines into interop guidelines (#34833)

4 years agoremoved unused vars from System.DirectoryServices.AccountManagement (#34159)
Stefan Nikolei [Fri, 10 Apr 2020 23:34:21 +0000 (01:34 +0200)]
removed unused vars from System.DirectoryServices.AccountManagement (#34159)

* removed unused vars from System.DirectoryServices.AccountManagement

removed all unused locals and class variables. also added some _ to out vars

* fix build errors.

removed assignments to non existent vars
added one var back because it was used

* remove trailing whitespace

4 years agoUse repo build script to restore internal tools (#34830)
Santiago Fernandez Madero [Fri, 10 Apr 2020 23:05:39 +0000 (16:05 -0700)]
Use repo build script to restore internal tools (#34830)

4 years agoComWrappers: Add support for ICustomQueryInterface (#34733)
Aaron Robinson [Fri, 10 Apr 2020 22:31:50 +0000 (15:31 -0700)]
ComWrappers: Add support for ICustomQueryInterface  (#34733)

* Add support for falling back to ICustomQueryInterface if the managed object wrapper
 doesn't know about the IID but implements the interface.

* The QI on the managed object wrapper is now callable from within the runtime.
This means we can no longer assume we are in preemptive mode during the QI.
Update the ICustomQueryInterface dispatch to be okay with ANY mode.

4 years agosubsets help (#34673)
Dan Moseley [Fri, 10 Apr 2020 21:42:43 +0000 (14:42 -0700)]
subsets help (#34673)

4 years agoFix GenerateCoverageReport target in tests.proj (#34829)
Santiago Fernandez Madero [Fri, 10 Apr 2020 21:30:36 +0000 (14:30 -0700)]
Fix GenerateCoverageReport target in tests.proj (#34829)

4 years agoFix installer CI job warnings for iOS/tvOS/Android (#34763)
Alexander Köplinger [Fri, 10 Apr 2020 21:09:50 +0000 (23:09 +0200)]
Fix installer CI job warnings for iOS/tvOS/Android (#34763)

We don't run tests in the installer for these OSes so the PublishTestResults task complains about missing *.xml result files.

4 years ago[master] Update dependencies from mono/linker Microsoft/vstest (#34760)
dotnet-maestro[bot] [Fri, 10 Apr 2020 21:06:34 +0000 (17:06 -0400)]
[master] Update dependencies from mono/linker Microsoft/vstest (#34760)

* Update dependencies from https://github.com/microsoft/vstest build 20200408-06

- Microsoft.NET.Test.Sdk: 16.6.0 -> 16.7.0-preview-20200408-06

* Update dependencies from https://github.com/mono/linker build 20200409.2

- ILLink.Tasks: 5.0.0-preview.3.20207.1 -> 5.0.0-preview.3.20209.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agoRemove gcstress switch.
Fadi Hanna [Fri, 10 Apr 2020 19:39:49 +0000 (12:39 -0700)]
Remove gcstress switch.

The test will run with gcstress as part of the gcstress lab runs

4 years agoAdd check for unloaded types in GetAppDomainStaticAddress (#34677)
David Mason [Fri, 10 Apr 2020 18:26:00 +0000 (11:26 -0700)]
Add check for unloaded types in GetAppDomainStaticAddress (#34677)

Fixes #33367

When a module is unloaded, the managed objectref is collected during a GC before the profiler is notified that the module is unloading. That means if you call in to GetAppDomainStaticAddress between when the object is collected and when you are notified about the module unload (GarbageCollectionFinished is a place that will hit this every time) it will cause an AV from trying to use the null objectref.

This fix prevents this AV by checking to see if the object's loaderheap or managed loaderheap object ref are invalid first.

4 years agoEnumerate compiled methods faster (#34729)
David Wrighton [Fri, 10 Apr 2020 18:01:59 +0000 (11:01 -0700)]
Enumerate compiled methods faster (#34729)

* Enumerate compiled methods faster
- Split up the data structure that holds the list of compiled methods into per module, generic and non-generic method lists.
- Hold IMethodNodes in the data structure instead of MethodDescs
- This delivers a *significant* improvement to compile times for composite image build
  - A sample application went from 456 seconds to compile down to 100 seconds in wall clock time

4 years agoSingle-file diagnostic support for SOS. (#34697)
Mike McLaughlin [Fri, 10 Apr 2020 17:22:01 +0000 (10:22 -0700)]
Single-file diagnostic support for SOS. (#34697)

Single-file diagnostic support.

This will allow SOS, dotnet-dump, etc. to work for single-file programs on Linux. An library called runtimeinfo_lib is generated that is to be linked into the single-file superhost containing coreclr.

Added "DotNetRuntimeInfo" export/block containing the symbol index/build ids needed by the diagnostic tools.

Added ICLRRuntimeLocator DAC interface for SOS and other DAC clients so their data targets can provide the single-file runtime base address.

Added the GetModuleIndex tool to get build ids.

PAL fix for single-file superhost.

Fix elfreader allocation assert in debug. The 'new' did not use utilcode overrides but the 'delete' did.

Added a line to the build-job.yml pipeline to build the new clr.diagtools subset before the native coreclr runtime build because it uses the build-runtime scripts directly.

Added a Versions.props property for the Microsoft.FileFormats version and updated it to the latest.

Changed the GetModuleIndex to take an input and output file instead of using output redirection to write it because some messages from the dotnet.cmd script used to run it got written to the output h file.

Added FEATURE_SINGLE_FILE_DIAGNOSTICS cmake flag so build-runtime.sh can work without clr.buildtools subset

4 years agoRemove most [Fact(Skip = "...")] in library tests (#34772)
Stephen Toub [Fri, 10 Apr 2020 16:51:48 +0000 (12:51 -0400)]
Remove most [Fact(Skip = "...")] in library tests (#34772)

4 years agoReduce allocations in string.Normalize (#34774)
Miha Zupan [Fri, 10 Apr 2020 16:49:58 +0000 (18:49 +0200)]
Reduce allocations in string.Normalize (#34774)

* Reduce allocations in string.Normalize

* Move stackalloc out of the loop

* Use char* instead of ref char, pin manually

* Mark methods unsafe instead of using unsafe blocks

* Return the original string if unchanged

* Use const for StackallocThreshold

4 years agoInvalidate FileInfo and DirectoryInfo upon create and delete (#34229)
Jacob Lalonde [Fri, 10 Apr 2020 16:41:49 +0000 (12:41 -0400)]
Invalidate FileInfo and DirectoryInfo upon create and delete (#34229)

* Invalidate upon delete and create for fileinfo and directoryinfo

* Add tests, remove directory info test that tested removed behavior

* Add delete test

* Fix typoe in directoryinfo

* Remove new line, and refactor away private method into delete method with paramter

* Change set time tests

* Code review linting as well as test change

* Modify other test that tested prior behavior

* Rework Reset test

* Edits for comments in tests

* Slight method refactor

* Minor test cleanup

4 years agoFix condition for building runtime.native.System.IO.Ports (#34738)
Eric StJohn [Fri, 10 Apr 2020 16:32:01 +0000 (09:32 -0700)]
Fix condition for building runtime.native.System.IO.Ports (#34738)

4 years agoRemove mono/btls directory from source mirror (#34819)
Alexander Köplinger [Fri, 10 Apr 2020 16:16:16 +0000 (18:16 +0200)]
Remove mono/btls directory from source mirror (#34819)

We won't use btls in the netcore mono.

4 years agouse localSystem to start the service (#34802)
Anirudh Agnihotry [Fri, 10 Apr 2020 15:41:45 +0000 (08:41 -0700)]
use localSystem to start the service (#34802)

4 years agoDon't swap base and index if index is float reg (#34771)
Carol Eidt [Fri, 10 Apr 2020 14:56:49 +0000 (07:56 -0700)]
Don't swap base and index if index is float reg (#34771)

* Don't swap base and index if index is float reg

Fix #33363

4 years agoAdd copy constructor to JsonSerializerOptions (#34725)
Layomi Akinrinade [Fri, 10 Apr 2020 14:41:51 +0000 (10:41 -0400)]
Add copy constructor to JsonSerializerOptions (#34725)

* Add copy constructor to JsonSerializerOptions

* Address review comments

* Address review feedback - null check and reflection based test

4 years agoRemoved ENABLE_FAST_GCPOLL_HELPER (#34796)
Vladimir Sadov [Fri, 10 Apr 2020 14:06:54 +0000 (07:06 -0700)]
Removed ENABLE_FAST_GCPOLL_HELPER (#34796)

* Removed ENABLE_FAST_GCPOLL_HELPER

* check trap flag in JIT_PollGC

* JIT_PollGC_Framed

4 years agoEnable System.Runtime.Serialization.Xml test assembly for Mono on Windows (#34816)
Maxim Lipnin [Fri, 10 Apr 2020 13:26:35 +0000 (16:26 +0300)]
Enable System.Runtime.Serialization.Xml test assembly for Mono on Windows (#34816)

Follow-up to https://github.com/dotnet/runtime/pull/32592#pullrequestreview-391381885.

4 years ago Include key when throwing KeyNotFoundException in indexer (#34759)
Lennart Brüggemann [Fri, 10 Apr 2020 12:35:59 +0000 (14:35 +0200)]
 Include key when throwing KeyNotFoundException in indexer (#34759)

* Include key when throwing KeyNotFoundException in indexer

* Add quotes around replacement markers to be consistent with other strings

4 years ago[mono] Remove CoreFX.issues_windows.rsp file (#32592)
Maxim Lipnin [Fri, 10 Apr 2020 10:41:57 +0000 (13:41 +0300)]
[mono] Remove CoreFX.issues_windows.rsp file (#32592)

Changes:
- enabled `runtime (Libraries Test Run release mono Windows_NT x64 Debug)` CI lane (Windows Nano Server CI leg is disabled);
- enabled the tests that pass;
- marked failing test assemblies/classes/methods with `ActiveIssue` attribute using respective GH issues;
- removed CoreFX.issues_windows.rsp file and related mono rsp arguments.

Fixes #1980

4 years agoAdd beginnings of WebAssembly build support for mono. (#33551)
Zoltan Varga [Fri, 10 Apr 2020 10:17:58 +0000 (06:17 -0400)]
Add beginnings of WebAssembly build support for mono. (#33551)

* Set emcc as the compiler for libraries build

* Add default subsets for webassembly build

* Fix various problems in the build

* Use WebAssembly Docker image

* Use Mono runtime for webassembly builds

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoRemove warning suppression for wrappers no longer marked obsolete (#34792)
Elinor Fung [Fri, 10 Apr 2020 06:16:41 +0000 (23:16 -0700)]
Remove warning suppression for wrappers no longer marked obsolete (#34792)

4 years ago[wasm][bcl][zoneinfo] Fix local zone info marshaling (#34762)
monojenkins [Fri, 10 Apr 2020 03:41:55 +0000 (23:41 -0400)]
[wasm][bcl][zoneinfo] Fix local zone info marshaling (#34762)

- Correctly marshal Intl.DateTimeFormat().resolvedOptions().timeZone information

/cc @pranavkm

Thanks for the report and testing Pranav

<!--
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: kjpou1 <kjpou1@users.noreply.github.com>
4 years agoChange policheck words (#34775)
Anirudh Agnihotry [Fri, 10 Apr 2020 02:41:51 +0000 (19:41 -0700)]
Change policheck words (#34775)

* change policheck words

* Apply suggestions from code review

Co-Authored-By: Eric StJohn <ericstj@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
4 years agoAdd arg aliases for runtimeConfiguration and librariesConfiguration (#34743)
Santiago Fernandez Madero [Fri, 10 Apr 2020 01:09:26 +0000 (18:09 -0700)]
Add arg aliases for runtimeConfiguration and librariesConfiguration (#34743)

* Add arg aliases for runtimeConfiguration and librariesConfiguration

* Add subset alias

4 years ago[llvm] Fix a crash in JIT mode. (#34766)
monojenkins [Thu, 9 Apr 2020 21:07:33 +0000 (17:07 -0400)]
[llvm] Fix a crash in JIT mode. (#34766)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
4 years agoFix casing in COMPlus_GCStress env variable and remove COMPlus_gcServer
Fadi Hanna [Tue, 7 Apr 2020 19:19:26 +0000 (12:19 -0700)]
Fix casing in COMPlus_GCStress env variable and remove COMPlus_gcServer

Also changing a bunch of assert() calls to _ASSERTE. Usually when _ASSERTE fails in CI lab runs, we tend to get crash dumps associated with test results, unlike assert() which shows a GUI dialog that DHandler dismisses by clicking on the Abort button.

4 years agoReenable some disabled warnings in CoreCLR (#34659)
Ivan Diaz Sanchez [Thu, 9 Apr 2020 20:57:52 +0000 (13:57 -0700)]
Reenable some disabled warnings in CoreCLR (#34659)

* First fixes to print hex without silencing warning 4477.

* After the previous commit, dasm.cpp started showing abnormalities.

* Warning 4302 reenable iteration 1

* Warning 4302 reenable iteration 2

* Warning 4312 reenable: Iteration 1

* Warning 4312 reenable: Iteration 2

* Updated configurecompiler.cmake comments with newly reenabled warnings.

* Fixed a comment.

* Fixed a 32-bit issue with printing formats as well as a scope issue on Linux.

* Warning 4302/4311/4477 reenable: Fixed Checked Builds.

* Warning 4302/4311/4477 iteration 3

* Warning 4477 reenable iteration 4: ToString of bits.

* Fixed an unsigned long long for x86.

* Fixed 4477 on x86 for real this time.

* Changed two bitness checks for size_t usage instead.

4 years agoMerge pull request #34710 from am11/feature/docs
Jan Vorlicek [Thu, 9 Apr 2020 19:12:50 +0000 (21:12 +0200)]
Merge pull request #34710 from am11/feature/docs

Add note about building PAL tests in docs

4 years agoAdd note about building PAL tests in docs
Adeel [Thu, 9 Apr 2020 19:11:35 +0000 (22:11 +0300)]
Add note about building PAL tests in docs

4 years agoAdd Task.WhenAny(task, task) overload (#34288)
Stephen Toub [Thu, 9 Apr 2020 18:28:14 +0000 (14:28 -0400)]
Add Task.WhenAny(task, task) overload (#34288)

Currently internal and used as an implementation detail under Task.WhenAny(params Task[]) as well as from SemaphoreSlim.  Once API reviewed, it can be made public.

4 years agoMerge pull request #34079 from NikolaMilosavljevic/libicu66
Nikola Milosavljevic [Thu, 9 Apr 2020 18:25:18 +0000 (11:25 -0700)]
Merge pull request #34079 from NikolaMilosavljevic/libicu66

Add libicu66 dependency

4 years ago[Arm64] Change uint to Vector64<uint> in Sha1 intrinsics (#34730)
Egor Chesakov [Thu, 9 Apr 2020 17:58:44 +0000 (10:58 -0700)]
[Arm64] Change uint to Vector64<uint> in Sha1 intrinsics (#34730)

* Change "uint hash_e" to "Vector64<uint> hash_e" since the value must be in a SIMD & FP register in Sha1.cs Sha1.PlatformNotSupported.cs

* Update System.Runtime.Intrinsics.Experimental.cs

* Update hwintrinsiclistarm64.h

* Fix formatting in GenerateTests.csx

* Rename IF_DR_2J -> IF_DV_2U since sha1h operates on SIMD&FP registers in emitarm64.cpp emitfmtsarm64.h instrsarm64.h

* Add Sha256 in GenerateTests.csx

* Add Sha256/

* Add Sha1/

* Add Sha1 in GenerateTests.csx

4 years agoRemove dead COM slot code. (#34702)
Aaron Robinson [Thu, 9 Apr 2020 17:05:04 +0000 (10:05 -0700)]
Remove dead COM slot code. (#34702)

4 years agoinclude POH in diagnostic APIs like walk_survivors. (#34567)
Vladimir Sadov [Thu, 9 Apr 2020 16:52:48 +0000 (09:52 -0700)]
include POH in diagnostic APIs like walk_survivors. (#34567)

* include POH in diagnostic APIs like walk_survivors.

* PR feedback

4 years agoOptimize newline handling for RegexOptions.Multiline (#34566)
Stephen Toub [Thu, 9 Apr 2020 16:36:10 +0000 (12:36 -0400)]
Optimize newline handling for RegexOptions.Multiline (#34566)

* Optimize newline handling for RegexOptions.Multiline

We previously didn't do any special handling of beginning-of-line anchors (^ when RegexOptions.Multiline is specified).  This PR adds special handling for the anchor so that FindFirstChar will jump to the next newline as part of its processing.

As part of this, I also cleaned up some of the anchor handling code.  The RegexPrefixAnalyzer only ever returns a single anchor, but the rest of the code was written such that it was expecting multiple anchors.

* Addres PR feedback

Also factor out a few lines of duplication.

4 years agoEnable importing PEM-formatted keys into AsymmetricAlgorithm values
Kevin Jones [Thu, 9 Apr 2020 16:23:17 +0000 (12:23 -0400)]
Enable importing PEM-formatted keys into AsymmetricAlgorithm values

4 years agofixed typo @SerializerCycleDetected (#34700)
Nico Kranz [Thu, 9 Apr 2020 16:13:48 +0000 (16:13 +0000)]
fixed typo @SerializerCycleDetected (#34700)

ReferenceHanlding -> Reference Handling

4 years agoAllow Dictionary overwrites during enumeration (#34667)
Stephen Toub [Thu, 9 Apr 2020 15:54:15 +0000 (11:54 -0400)]
Allow Dictionary overwrites during enumeration (#34667)

4 years agoFixes intellisense for vscode and VS, it also enables testing in Test Explorer (...
Anirudh Agnihotry [Thu, 9 Apr 2020 15:06:50 +0000 (08:06 -0700)]
Fixes intellisense for vscode and VS, it also enables testing in Test Explorer (#34721)

* fixes vscode and test explorer

* adding comment

4 years agoReport POH in ETW events (#34549)
Vladimir Sadov [Thu, 9 Apr 2020 09:34:03 +0000 (02:34 -0700)]
Report POH in ETW events (#34549)

* Report POH in existing events, when fitting.

* GCGenerationRange (descr_generations_to_profiler)

* GCBasicProfiler::GarbageCollectionStarted    tolerate gen 4

* More profiler fixes

* BGCOverflow_V1

* GCHeapStats_V1

* PR feedback

4 years agoWasm debug log level (#34723)
monojenkins [Thu, 9 Apr 2020 07:58:26 +0000 (03:58 -0400)]
Wasm debug log level (#34723)

enable_debugging was already an int, with this change log_level
    will remain at 1 by default but passing -1 will disable the log
    spew

Co-authored-by: lewing <lewing@users.noreply.github.com>
4 years agoCanonicalize arguments before loading instantiation when dropGenericArgumentLevel...
Fadi Hanna [Wed, 18 Mar 2020 20:03:29 +0000 (13:03 -0700)]
Canonicalize arguments before loading instantiation when dropGenericArgumentLevel is TRUE

4 years agoRemove -Bsymbolic-functions option as -Bsymbolic is already set (#34705)
Elinor Fung [Thu, 9 Apr 2020 05:38:27 +0000 (22:38 -0700)]
Remove -Bsymbolic-functions option as -Bsymbolic is already set (#34705)

4 years agoAdd EccSecurityTransforms to credscan suppresions to unblock code-mirror (#34735)
Santiago Fernandez Madero [Thu, 9 Apr 2020 05:22:37 +0000 (22:22 -0700)]
Add EccSecurityTransforms to credscan suppresions to unblock code-mirror (#34735)

4 years agoRemove Obsolete attribute from some COM related types. (#34692)
Aaron Robinson [Thu, 9 Apr 2020 03:20:53 +0000 (20:20 -0700)]
Remove Obsolete attribute from some COM related types. (#34692)

4 years agoFix installer signing after restore changes (#34707)
Santiago Fernandez Madero [Thu, 9 Apr 2020 03:02:08 +0000 (20:02 -0700)]
Fix installer signing after restore changes (#34707)

4 years agoMake sure include is included in Android runtime packs (#34706)
Steve Pfister [Thu, 9 Apr 2020 02:04:22 +0000 (22:04 -0400)]
Make sure include is included in Android runtime packs (#34706)

Fixes issue where the check did not include Android

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
4 years ago[Arm64] Simplify logic for RMW hardware intrinsics (#34668)
Egor Chesakov [Thu, 9 Apr 2020 01:50:28 +0000 (18:50 -0700)]
[Arm64] Simplify logic for RMW hardware intrinsics (#34668)

* Make HW_Flag_NoRMWSemantics Intel-architecture specific and add HW_Flag_HasRMWSemantics on Arm64 in hwintrinsic.h

* Mark RMW intrinsics with the new flag in hwintrinsiclistarm64.h

* setTgtPref should be also enabled under FEATURE_HW_INTRINSICS - to allow preferential targetReg allocation on Arm64 in lsrabuild.cpp

* Redo LinearScan::BuildHWIntrinsic in lsraarm64.cpp

* Use HWIntrinsicInfo::HasRMWSemantics in GenTree::isRMWHWIntrinsic in gentree.cpp

* Remove SpecialCodeGen for ExtractAndNarrowHigh, Decrypt and Encrypt and add RMW specific codegen in hwintrinsiccodegenarm64.cpp hwintrinsiclistarm64.h

4 years agoTest build target agnostic separately from target specific tests (#34658)
Steve MacLean [Thu, 9 Apr 2020 00:09:47 +0000 (20:09 -0400)]
Test build target agnostic separately from target specific tests (#34658)

* Add redundant metadata to simplify filtering

Instead of generic filtering add a manual property

* Filter test build using CLRTestNeedTargetToBuild

* Add targetGeneric and targetSpecific option to build-test.sh/cmd

* Add missing TraitTags

* Update CheckTestBuild expected counts

* Rename per feedback

4 years agoFix build on Clear Linux and Android device (#34211)
Adeel Mujahid [Wed, 8 Apr 2020 23:35:41 +0000 (02:35 +0300)]
Fix build on Clear Linux and Android device (#34211)

* Only skip call to check_pie_supported on Android

* Fix native component build for Clear Linux

4 years ago[metadata] Handle MONO_TYPE_FNPTR case in collect_type_images (#34517)
monojenkins [Wed, 8 Apr 2020 23:22:59 +0000 (19:22 -0400)]
[metadata] Handle MONO_TYPE_FNPTR case in collect_type_images (#34517)

Fixes abort when PTR-FNPTR field signature is encountered.

I do not have a deep understanding of how the code in this area works,
but I have called the function that appears most consistent with how
other signatures are being handled.

Fixes mono/mono#12098
Fixes mono/mono#17113
Fixes mono/mono#19433

Co-authored-by: whydoubt <whydoubt@users.noreply.github.com>
4 years agoRemove obsolete DEBUG only instance variable BasicBlock::bbLoopNum (#34652)
Brian Sullivan [Wed, 8 Apr 2020 21:18:49 +0000 (14:18 -0700)]
Remove obsolete DEBUG only instance variable BasicBlock::bbLoopNum (#34652)

* Remove obsolete DEBUG only instance variable BasicBlock::bbLoopNum

Comment at declaration in block.h

    // This is the label a loop gets as part of the second, reachability-based
    // loop discovery mechanism.  This is apparently only used for debugging.
    // We hope we'll eventually just have one loop-discovery mechanism, and this will go away.
    INDEBUG(loopNumber bbLoopNum;) // set to 'n' for a loop #n header

* Run jit-format

4 years agoMake NativeLibrary Load/TryLoad use ALC extension points for the specified assembly...
Elinor Fung [Wed, 8 Apr 2020 21:07:13 +0000 (14:07 -0700)]
Make NativeLibrary Load/TryLoad use ALC extension points for the specified assembly (#34519)

4 years ago[CBOR] Implement Write/ReadEncodedValue() methods (#34650)
Eirik Tsarpalis [Wed, 8 Apr 2020 20:20:38 +0000 (21:20 +0100)]
[CBOR] Implement Write/ReadEncodedValue() methods (#34650)

* Implement CBOR Write/ReadEncodedValue() methods

* Wrap utf8 encoding and decoding exceptions in ArgumentException and FormatException respectively

* Address feedback

* address feedback

* add contextual tests for WriteEncodedValue

4 years agoSupport ECParameters that contain only D (macOS).
Kevin Jones [Wed, 8 Apr 2020 19:48:11 +0000 (15:48 -0400)]
Support ECParameters that contain only D (macOS).

Also remove the LimitedPrivateKeySupported test conditions, as all platforms support it now.

4 years agoUpdate libraries running tests broken link. (#34704)
Santiago Fernandez Madero [Wed, 8 Apr 2020 18:39:25 +0000 (11:39 -0700)]
Update libraries running tests broken link. (#34704)

4 years agoSingle-File: Process bundles in the framework (#34274)
Swaroop Sridhar [Wed, 8 Apr 2020 18:35:03 +0000 (11:35 -0700)]
Single-File: Process bundles in the framework (#34274)

* Single-File: Process bundles in the framework

This change implements the host changes proposed in the [design](https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/design.md#startup)

The main changes for single-file bundles are:
* Bundle processing code is moved from apphost to hostpolicy
* HostFxr and HostPolicy process deps.json and runtimeconfig.json files directly from the bundle.
* HostPolicy performs verification wrt deps.json based on the contents of the single-file bundle.
* AppContext.BaseDirectory is set as explained [here](https://github.com/dotnet/designs/blob/master/accepted/2020/single-file/design.md#appcontextbasedirectory)

Currently, all files except deps.json and runtimeconfig.json are extracted to disk.
Once the runtime is able to processing assemblies directly from the bundle, they will no longer be extracted.

Notable details:
* The bundle driver (formarly runner.cpp) is divided into two parts:
   * bundle::info which describes basic information about the bundle available from the headers only
   * bundle::runner which has information about all embedded files, and the ability to drive extraction
  This facilitates linking only parts of the bundle handling code with hostfxr, while all code is linked with hostpolicy.
* The AppHost only links with bundle_marker to identify itself as a single-file bundle.
* If the AppHost is a single-file bundle, it notifies hostfxr using the new hostfxr_main_bundle_startup_info() API
* The HostFxr comminucates the single-file-information with HostPolicy using the host_interface_t structure.

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

4 years ago[master] Update dependencies from mono/linker Microsoft/vstest (#34686)
dotnet-maestro[bot] [Wed, 8 Apr 2020 17:34:33 +0000 (17:34 +0000)]
[master] Update dependencies from mono/linker Microsoft/vstest (#34686)

* Update dependencies from https://github.com/mono/linker build 20200407.1

- ILLink.Tasks - 5.0.0-preview.3.20207.1

* Update dependencies from https://github.com/microsoft/vstest build 20200408-01

- Microsoft.NET.Test.Sdk - 16.6.0

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
4 years agofix compilation on freebsd (#34671)
Tomas Weinfurt [Wed, 8 Apr 2020 17:21:02 +0000 (10:21 -0700)]
fix compilation on freebsd (#34671)

* fix compilation on freebsd

* fix test build on freebsd

4 years agoFix fgValueNumberHWIntrinsic to support encodeResultType for Arity 0 (#34621)
Brian Sullivan [Wed, 8 Apr 2020 17:00:55 +0000 (10:00 -0700)]
Fix fgValueNumberHWIntrinsic to support encodeResultType for Arity 0 (#34621)

nodes

   src/coreclr/src/jit/valuenum.cpp