platform/upstream/dotnet/runtime.git
3 years agoFix assembly name due to rename of assembly. (#41037)
Kenneth Pouncey [Thu, 20 Aug 2020 13:56:26 +0000 (15:56 +0200)]
Fix assembly name due to rename of assembly. (#41037)

3 years ago[wasm] Skip Assert.InRange in Copy.cs for Browser (#41000)
Mitchell Hwang [Thu, 20 Aug 2020 12:40:12 +0000 (08:40 -0400)]
[wasm] Skip Assert.InRange in Copy.cs for Browser (#41000)

* Revert "[Wasm] Enable CopyWithData FileSystem test (#40663)"

This reverts commit 1821567ab60e156101f2a5bdcd5dab6d96dc3c71.

* Provide context for skipping Assert in Copy.cs

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years ago[mono] Add MethodImplOptions.NoOptimization support (#40990)
Egor Bogatov [Thu, 20 Aug 2020 11:10:46 +0000 (14:10 +0300)]
[mono] Add MethodImplOptions.NoOptimization support (#40990)

3 years agoChange nullability of public IXmlNamespaceResolver parameters where appropriate ...
David Cantú [Thu, 20 Aug 2020 09:56:50 +0000 (02:56 -0700)]
Change nullability of public IXmlNamespaceResolver parameters where appropriate (#41079)

3 years agoMark some System.Net.* APIs as unsupported on Browser WASM (#40924)
Maxim Lipnin [Thu, 20 Aug 2020 09:23:21 +0000 (12:23 +0300)]
Mark some System.Net.* APIs as unsupported on Browser WASM (#40924)

3 years agoAdd nullability annotations to System.Private.Xml.Linq project (#40744)
David Cantú [Thu, 20 Aug 2020 08:56:14 +0000 (01:56 -0700)]
Add nullability annotations to System.Private.Xml.Linq project (#40744)

* Add nullability annotations to Xml.Linq project

* Fix misplaced assertion

* Address feedback

* Add missing NotNullIfNotNull attributes to operators

3 years agoCoreRT support for ARM64&Unix (#41023)
RalfKornmannEnvision [Thu, 20 Aug 2020 08:06:34 +0000 (10:06 +0200)]
CoreRT support for ARM64&Unix (#41023)

* Update codegenarm64.cpp

* ARM64 CFI unwind Data

3 years agoFix NativeBinDir for individual projects when BuildTargetFramework is not set (#41074)
Santiago Fernandez Madero [Thu, 20 Aug 2020 07:55:38 +0000 (00:55 -0700)]
Fix NativeBinDir for individual projects when BuildTargetFramework is not set (#41074)

3 years agoFix Mono LLVMJIT official build to produce the right package (#41049)
Santiago Fernandez Madero [Thu, 20 Aug 2020 06:00:40 +0000 (23:00 -0700)]
Fix Mono LLVMJIT official build to produce the right package (#41049)

3 years agoEnable nullability on System.Xml.XPath (#41060)
David Cantú [Thu, 20 Aug 2020 05:41:41 +0000 (22:41 -0700)]
Enable nullability on System.Xml.XPath (#41060)

* Enable nullability on System.Xml.XPath

* Switch XPathException ctor's message parameter to string?

3 years agoremove dead code (#41064)
Anirudh Agnihotry [Thu, 20 Aug 2020 03:06:05 +0000 (20:06 -0700)]
remove dead code (#41064)

3 years ago[Pipelines] Noop Writes when Reader completed (#40905)
Brennan [Thu, 20 Aug 2020 02:42:27 +0000 (19:42 -0700)]
[Pipelines] Noop Writes when Reader completed (#40905)

3 years agoCleaning up unused TargetsBrowser conditions (#41062)
Anirudh Agnihotry [Thu, 20 Aug 2020 02:35:23 +0000 (19:35 -0700)]
Cleaning up unused TargetsBrowser conditions (#41062)

* minor cleanup

* remove unused string

3 years agoDelete redundant or no longer necessary build properties (#41051)
Jan Kotas [Thu, 20 Aug 2020 00:35:21 +0000 (17:35 -0700)]
Delete redundant or no longer necessary build properties (#41051)

3 years agoFix trailing whitespaces (#40891)
Youssef Victor [Thu, 20 Aug 2020 00:29:01 +0000 (02:29 +0200)]
Fix trailing whitespaces (#40891)

* Trim trailing whitespaces

* Match raw with rendered

* Delete extra asterisks and |

* Update ELT Hooks - tail calls.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoupdate product version to 6.0.0 (#40950)
Anirudh Agnihotry [Thu, 20 Aug 2020 00:23:04 +0000 (17:23 -0700)]
update product version to 6.0.0 (#40950)

* update to net6

* adding comment

3 years agoDisable System.IO.Tests.FileStream_SafeFileHandle.ThrowWhenHandlePositionIsChanged_as...
Maxim Lipnin [Wed, 19 Aug 2020 22:49:56 +0000 (01:49 +0300)]
Disable System.IO.Tests.FileStream_SafeFileHandle.ThrowWhenHandlePositionIsChanged_async test on Browser wasm (#40920)

3 years agoFix Memory Leak in System.DirectoryServices.Protocols caused by not freeing native...
Jose Perez Rodriguez [Wed, 19 Aug 2020 22:36:17 +0000 (15:36 -0700)]
Fix Memory Leak in System.DirectoryServices.Protocols caused by not freeing native memory (#41053)

3 years agoRemove semicolon from WASM config (#41017)
Drew Scoggins [Wed, 19 Aug 2020 21:20:12 +0000 (14:20 -0700)]
Remove semicolon from WASM config (#41017)

3 years agoAdd Designer attributes to types that had it in full framework (part 2) (#40966)
Santiago Fernandez Madero [Wed, 19 Aug 2020 19:08:39 +0000 (12:08 -0700)]
Add Designer attributes to types that had it in full framework (part 2) (#40966)

* Move DesignerSerializerAttribute to S.CM.Primitives and add to StringDictionary

* Add TolboxItemAttribute to types that had it in Desktop

* Remove TypeDescriptionProviderAttribute from DefaultGenApiDocIds

* PR Feedback, fix build

3 years agoConfiguration Json provider: adds empty objects to configuration (#40829)
Alessio Franceschelli [Wed, 19 Aug 2020 16:51:12 +0000 (17:51 +0100)]
Configuration Json provider: adds empty objects to configuration (#40829)

3 years agoDisable default non-portable build for armel (#41031)
Gleb Balykov [Wed, 19 Aug 2020 15:18:48 +0000 (18:18 +0300)]
Disable default non-portable build for armel (#41031)

3 years agoAdd GitHub Action for backporting PRs to branches (#40955)
Alexander Köplinger [Tue, 18 Aug 2020 22:44:50 +0000 (00:44 +0200)]
Add GitHub Action for backporting PRs to branches (#40955)

This adds an action that can be triggered with a special comment on a PR: `/backport to <some branch>`.
The action then creates a new PR to the target branch with the commits from the source PR applied.

3 years agoFix bad quoting (#41002)
Drew Scoggins [Tue, 18 Aug 2020 22:41:18 +0000 (15:41 -0700)]
Fix bad quoting (#41002)

3 years agoFix packaging for the browser (#40814)
Anirudh Agnihotry [Tue, 18 Aug 2020 20:36:55 +0000 (13:36 -0700)]
Fix packaging for the browser (#40814)

* Fix packaging for the browser

* fix wasm leg

* remove unused resource

3 years agoAdd parsing of zero port for unknown Uri scheme (#40986)
Natalia Kondratyeva [Tue, 18 Aug 2020 18:48:56 +0000 (21:48 +0300)]
Add parsing of zero port for unknown Uri scheme (#40986)

Fixes #37865

3 years ago[aot] Fix the lookup of jit info for WASM. On wasm, methods have no size, so only...
monojenkins [Tue, 18 Aug 2020 18:24:07 +0000 (14:24 -0400)]
[aot] Fix the lookup of jit info for WASM. On wasm, methods have no size, so only the method address can be looked up, jinfo->code_size is set to 1. (#40969)

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

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoDisable System.Xml.Tests.SameInstanceXslTransformWriter.Variations under JitStress...
Egor Chesakov [Tue, 18 Aug 2020 17:58:41 +0000 (10:58 -0700)]
Disable System.Xml.Tests.SameInstanceXslTransformWriter.Variations under JitStress (#40964)

3 years agoFix index adjustments for Get/Set/Address called on 1 dim arrays. (#35008)
Johan Lorensson [Tue, 18 Aug 2020 16:48:50 +0000 (18:48 +0200)]
Fix index adjustments for Get/Set/Address called on 1 dim arrays. (#35008)

Enable tests failing due to missing array ctor and lbound index checks.

Fix interpreter Get/Set/Address using lbound.

Add missing OP_FCONV_TO_I on Arm64, causing test errors.

Fix interpreter arrray index and lower bound when using negative values.

Add branch checking array->bounds for NULL.

3 years agoIncrease timeout for yaml as well (#40987)
Drew Scoggins [Tue, 18 Aug 2020 15:58:47 +0000 (08:58 -0700)]
Increase timeout for yaml as well (#40987)

3 years agoFix duplicate --runtime-path in generated helix command (#40975)
Alexander Köplinger [Tue, 18 Aug 2020 15:32:56 +0000 (17:32 +0200)]
Fix duplicate --runtime-path in generated helix command (#40975)

While looking at some helix debug logs I noticed we pass the `--runtime-path` option twice:

```
Executed on dci-mac-build-083.local
+ ./RunTests.sh --runtime-path /tmp/helix/working/A68F0925/p --runtime-path /tmp/helix/working/A68F0925/p
```

Looks like this was an oversight from https://github.com/dotnet/runtime/pull/35606, it's harmless but I thought I'd clean it up :)

3 years agoFix Runtime_40444 test exclusion in issues.targets (#40973)
Tomáš Rylek [Tue, 18 Aug 2020 11:57:21 +0000 (13:57 +0200)]
Fix Runtime_40444 test exclusion in issues.targets (#40973)

After I noticed that the test Runtime_40444 is still failing in PR
runs after I disabled it in issues.targets, I found out that
I had missed the extra folder level in the exclusion spec.

Thanks

Tomas

3 years agoFix EventActivityIdControl test on MonoVM. (#39178)
Johan Lorensson [Tue, 18 Aug 2020 11:00:27 +0000 (13:00 +0200)]
Fix EventActivityIdControl test on MonoVM. (#39178)

Make EventSource call static version of EventActivityIdControl in
EventPipeEventProvider instead of direct calling low level
EventPipeInternal (now only called from EventPipe* sources). Doing
it that way will also keep EventPipeEventProvider.EventActivityIdControl
in S.P.C meaning that tests like eventactivityidcontrol won't risk
of using methods that has been trimmed away by linker.

Added missing case into Mono's EventPipeInternal::EventActivityIdControl
implementations.

Enabled eventactivityidcontrol test on Mono runtime. Adjusted test to
use static EventPipeEventProvider.EventActivityIdControl version.

3 years ago[wasm][debugger] Support deep member accesses for EvaluteOnCallFrame (#40836)
Ankit Jain [Tue, 18 Aug 2020 02:13:35 +0000 (22:13 -0400)]
[wasm][debugger]  Support deep member accesses for EvaluteOnCallFrame (#40836)

* [wasm][debugger] Support deep member accesses for EvaluteOnCallFrame

Eg. `obj.Property.X`, or `obj.Y + obj.Z.p`

Each of the member access expressions (like `a.b.c`) must be of only
primitive types. Though if the expression is a single member access (and
nothing else, like `"a.b.c"`), then that can be a non-primitive type.

This works by sending the expression to the browser, where it gets
resolved by `library_mono.js`. And that takes an easy route for doing
this, essentially just fetching the list of locals/properties, and using
that.

There are better ways to do this, that will be explored later.

* [wasm][debugger][tests] Remove some debug spew

* [wasm][debugger] fix formatting with dotnet-format

3 years agoUse Roslyn apis to generate Platform Not Supported Assemblies (#40296)
Anirudh Agnihotry [Tue, 18 Aug 2020 00:01:27 +0000 (17:01 -0700)]
Use Roslyn apis to generate Platform Not Supported Assemblies (#40296)

* fixes on the runtime side

* address feedback

* update arcade version

* merge conflicts

* update the version

3 years agoOrdinal Ignore Case Optimization (#40910)
Tarek Mahmoud Sayed [Mon, 17 Aug 2020 23:53:47 +0000 (16:53 -0700)]
Ordinal Ignore Case Optimization (#40910)

3 years agoDeduplicate Helix environment setup in send-to-helix-step.yml (#40909)
Tomáš Rylek [Mon, 17 Aug 2020 23:39:41 +0000 (01:39 +0200)]
Deduplicate Helix environment setup in send-to-helix-step.yml (#40909)

3 years ago[mono] Loader improvements: bundle optimization and logging (#40819)
Ryan Lucia [Mon, 17 Aug 2020 22:53:53 +0000 (18:53 -0400)]
[mono] Loader improvements: bundle optimization and logging (#40819)

* Delay bundle loading until after checking the ALC cache

This avoids having to create and destroy MonoImage objects over and over when looking for already-loaded assemblies, which should cut down on overall load time a bit.

* Improve loader algorithm logging

3 years agoretire TLS1.0/1.1 ciphers from default list (#40746)
Tomas Weinfurt [Mon, 17 Aug 2020 22:31:59 +0000 (15:31 -0700)]
retire TLS1.0/1.1 ciphers from default list (#40746)

* retire TLS1.0/1.1 ciphers from default list

* fix build with 1.0

* feedback from review

* add compat bio_st

* don't enforce cipher default on openssl 1.0

* fix ServerAsyncAuthenticate_MismatchProtocols_Fails

* call ERR_clear_error after protocol det:w!ection

* feedback from review

* add missing Using

3 years agoMake RegexParseException and RegexParseError public, rename enum fields (#40902)
Abel Braaksma [Mon, 17 Aug 2020 22:25:22 +0000 (00:25 +0200)]
Make RegexParseException and RegexParseError public, rename enum fields (#40902)

* RegexParseException, RegexParseError public, rename enum fields

* Add Unknown field to RegexParseError

* Add definitions to ref file

* Satisfy NET48 tests

* Some nits to resolve review comments

* Add default message and Unknown message

* Added doc comments

* Fix nit in auto-layout change of csproj file

* Simplify message for RegexParseException ctor overload

* Remove PlatformDetection.IsNetFramework in RegexParserTests.cs

* Rename resource names to match the enum names

* Use partial class and methods to separate netfx and core

* Add offset tests

* Apply suggestions from code review

Nits

* Add remaining test offsets. Verify all offsets.

* Nit and TFM

* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netcoreapp.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Code review: properly test for deserialized type of exn

* Code review: fix doc comments

* Code review: fix doc comments

* Code review: offset gt zero

* Code review: add some tests, remove redundant whiteline

* Code review: add doc comment as suggested

* Code review: fix doc comments

* ref edits with tool

* Code review: some nits

* Remove using

* Rename unknown

* Incorrect edit in AssertExtensions

* Cherry-pick #d4090296

* Fix naming, ref file, resource strings

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Prashanth Govindarajan <prgovi@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years ago[mono] Add `X86Base` support. (#40861)
imhameed [Mon, 17 Aug 2020 22:21:31 +0000 (15:21 -0700)]
[mono] Add `X86Base` support. (#40861)

Implement `BitScanForward` and `BitScanReverse` as intrinsics.

Implement `__cpuidex` as a netcore-only icall. Rename `cpuid` (in
mono-hwcap-x86.c) to `mono_cpuidex`, give it extern linkage, and add
support for extended CPUID.

Related: https://github.com/dotnet/runtime/pull/40167

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
3 years agoAdd support for the InnerException in Json formatter using ToString() (#40852)
Maryam Ariyan [Mon, 17 Aug 2020 22:16:20 +0000 (15:16 -0700)]
Add support for the InnerException in Json formatter using ToString() (#40852)

* Support InnerException(s) on JsonConsoleFormatter

Fix #40507

Co-authored-by: Werner Mairl <werner.mairl@gmail.com>
3 years agoDon't load assemblies inside bundle when using LoadFrom (#40826)
Mateo Torres-Ruiz [Mon, 17 Aug 2020 22:00:34 +0000 (15:00 -0700)]
Don't load assemblies inside bundle when using LoadFrom (#40826)

* Don't use bundler's probe in LoadFromPath

3 years agoExtend timeouts in revocation timeout tests.
Kevin Jones [Mon, 17 Aug 2020 21:58:49 +0000 (17:58 -0400)]
Extend timeouts in revocation timeout tests.

Extends the amount of time that the delay has to give the build servers
more wiggle room to fetch and process revocation.

Improve assertion output.

3 years agoDo not include extensions sequence if there are no extensions.
Kevin Jones [Mon, 17 Aug 2020 21:58:02 +0000 (17:58 -0400)]
Do not include extensions sequence if there are no extensions.

When encoding an X509 certificate, omit the extensions sequence if
the effective number of extensions is zero. Per RFC 5280, this sequence
is "one or more certificate extensions".

3 years agoThrow when reference cannot be assigned to converter.TypeToConvert (#39015)
David Cantú [Mon, 17 Aug 2020 21:54:43 +0000 (14:54 -0700)]
Throw when reference cannot be assigned to converter.TypeToConvert (#39015)

* Throw when reference cannot be assigned to converter.TypeToConvert

* Throw InvalidOperationException instead of JsonException since the cause for this error would be an error in the user code rather than in the JSON payload

* Use try-catch instead of IsAssignableFrom

* Alternatively validate reference can be assigned as T at the time is fetch

* Add suggested comment

3 years agoRemove ObsoletedInOSPlatformAttribute (#40945)
Jeff Handley [Mon, 17 Aug 2020 21:53:18 +0000 (14:53 -0700)]
Remove ObsoletedInOSPlatformAttribute (#40945)

3 years agoFix patch skip + emulation on ARM64 (#40941)
Juan Hoyos [Mon, 17 Aug 2020 21:52:17 +0000 (14:52 -0700)]
Fix patch skip + emulation on ARM64 (#40941)

* Fix patch skip + emulation on ARM64

3 years agouse port in SPN calculation if not default (#40860)
Tomas Weinfurt [Mon, 17 Aug 2020 21:43:26 +0000 (14:43 -0700)]
use port in SPN calculation if not default (#40860)

* use port in SPN calculation if not default

* remove extra line

* fix internal error test failure

3 years ago[aot] Avoid emitting generic instances with vtype arguments on wasm to save space...
monojenkins [Mon, 17 Aug 2020 21:15:40 +0000 (17:15 -0400)]
[aot] Avoid emitting generic instances with vtype arguments on wasm to save space. (#40854)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>
3 years agoPass length to PathCharString.Append on SunOS (#40928)
Adeel Mujahid [Mon, 17 Aug 2020 21:10:39 +0000 (00:10 +0300)]
Pass length to PathCharString.Append on SunOS (#40928)

3 years agoDo not build Targeting pack in source-build (#40870)
Nikola Milosavljevic [Mon, 17 Aug 2020 20:33:33 +0000 (13:33 -0700)]
Do not build Targeting pack in source-build (#40870)

* Do not build Targeting pack in source-build

* Update src/installer/pkg/projects/Directory.Build.targets

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
3 years agoTest concurrent calls to CallSite.AddRule() and MoveRule() (#40858)
Charles Stoner [Mon, 17 Aug 2020 19:59:34 +0000 (12:59 -0700)]
Test concurrent calls to CallSite.AddRule() and MoveRule() (#40858)

3 years agoNot all object converters return a JsonElement (#40921)
devsko [Mon, 17 Aug 2020 19:46:24 +0000 (21:46 +0200)]
Not all object converters return a JsonElement (#40921)

Co-authored-by: devsko <stefan.kohlmeister@outlook.de>
3 years agoCreate dump in utility thread after m_LastThrownObjectHandle has been set (#40915)
Mike McLaughlin [Mon, 17 Aug 2020 18:59:06 +0000 (11:59 -0700)]
Create dump in utility thread after m_LastThrownObjectHandle has been set (#40915)

The previous Windows stack overflow createdump trigger fix generated the dump before the m_LastThrownObjectHandle in the thread was set. This breaks SOS's !pe command.

3 years agoNormalize directory separator of paths in FileSpec (#40699)
Mateo Torres-Ruiz [Mon, 17 Aug 2020 18:53:38 +0000 (11:53 -0700)]
Normalize directory separator of paths in FileSpec (#40699)

3 years agoIntrinsicify SpanHelpers.IndexOfAny(char,...) (#40729)
Ben Adams [Mon, 17 Aug 2020 18:24:15 +0000 (19:24 +0100)]
Intrinsicify SpanHelpers.IndexOfAny(char,...) (#40729)

* Intrinsicify IndexOfAny(char,char)

* Intrinsicify IndexOfAny(char,char,char)

* Intrinsicify IndexOfAny(char,char,char,char)

* Intrinsicify IndexOfAny(char,char,char,char,char)

* Avoid movsx

* Feedback

* Super nit

3 years agoReenable crossgen2smoke under GC stress (#40849)
Tomáš Rylek [Mon, 17 Aug 2020 18:23:38 +0000 (20:23 +0200)]
Reenable crossgen2smoke under GC stress (#40849)

This change removes the open-coded Crossgen2 execution
from the crossgen2smoke test project and switches it over
to use the normal CLRTest.Crossgen.targets logic for Crossgen2
invocation.

As the CLRTest.Crossgen.targets script already contains my fix
for the underlying issue - we were inadvertently running the
Crossgen2 compiler itself in GC stress mode and timing out
due to the long compilation times - we can now reenable
this test in GC stress mode.

Thanks

Tomas

3 years agoFix GC liveness check in ByRefLocals test (#40857)
Carol Eidt [Mon, 17 Aug 2020 18:12:26 +0000 (11:12 -0700)]
Fix GC liveness check in ByRefLocals test (#40857)

Fix #40751

3 years agoMake the buffer size configurable for generational aware analysis (#40918)
Andrew Au [Mon, 17 Aug 2020 18:08:35 +0000 (11:08 -0700)]
Make the buffer size configurable for generational aware analysis (#40918)

3 years agoBlock out the Runtime_40444 test failing in PR's + alpha-ordering (#40907)
Tomáš Rylek [Mon, 17 Aug 2020 17:55:22 +0000 (19:55 +0200)]
Block out the Runtime_40444 test failing in PR's + alpha-ordering (#40907)

3 years agoFix IndexOutOfRangeException in CallSite.MoveRule. (#39159)
asmichi [Mon, 17 Aug 2020 17:12:08 +0000 (02:12 +0900)]
Fix IndexOutOfRangeException in CallSite.MoveRule. (#39159)

Because synchronization of AddRule is omitted for performance,
concurrent invocations of AddRule may cause Rules to revert back to
an older (smaller) version, making i out of bounds.
Add a guard against that.

The reasoning behind no synchronization is that Rules is just a cache
after all. As long as the cache is in a consistent state, wrong updates
will only cause more cache misses or longer lookup time.
This performance loss is fine if we get more performance gain by
omitting synchronization.

Fix #36983

3 years agoUpdate linker warning numbers (#40865)
Sven Boemer [Mon, 17 Aug 2020 16:50:31 +0000 (09:50 -0700)]
Update linker warning numbers (#40865)

* Update linker warning numbers

In response to https://github.com/mono/linker/pull/1385.
This replaces the global suppressions for IL2006 with the warnings that it was split into.

* Add suppressions for linker tests

3 years agoMake Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)
Eirik Tsarpalis [Mon, 17 Aug 2020 15:48:40 +0000 (16:48 +0100)]
Make Enumerable.Cast<T> and friends return IEnumerable<T?> (#40929)

* Make IEnumerable.Cast<TResult>() annotation admit nullable elements

* Make ImmutableArray cast method annotations report nullable elements

* fix System.Data nullability warnings

3 years agoInclude <sys/sysctl.h> only for FreeBSD in pal.cpp (#40923)
Adeel Mujahid [Mon, 17 Aug 2020 13:14:39 +0000 (16:14 +0300)]
Include <sys/sysctl.h> only for FreeBSD in pal.cpp (#40923)

3 years agoImplement ReadOnlySequence<T>.GetPosition(SequencePosition) (#771), fixes #27158
Marco Rossignoli [Mon, 17 Aug 2020 12:51:16 +0000 (14:51 +0200)]
Implement ReadOnlySequence<T>.GetPosition(SequencePosition) (#771), fixes #27158

3 years agoAdd NetworkError.TimedOut, rename Unknown to Other (#40841)
Anton Firszov [Mon, 17 Aug 2020 11:12:05 +0000 (13:12 +0200)]
Add NetworkError.TimedOut, rename Unknown to Other (#40841)

Adds NetworkError.TimedOut,
Renames Unknown to Other assuming my proposal gets accepted, will revert if not,
Improves exception message

3 years agoRenamed EventSources "Microsoft-"->"Private.InternalDiagnostics.".
Marie Píchová [Mon, 17 Aug 2020 11:10:32 +0000 (13:10 +0200)]
Renamed EventSources "Microsoft-"->"Private.InternalDiagnostics.".

3 years agoImplement concept of unstable ABI into crossgen2 (#40820)
David Wrighton [Mon, 17 Aug 2020 09:22:05 +0000 (02:22 -0700)]
Implement concept of unstable ABI into crossgen2 (#40820)

* Implement concept of unstable ABI into crossgen2
- Use for the Vector types based on current defined stability rules
- Will prevent compilation of methods with not yet stable abis, or calls to methods with said unstable apis

* Bugs

3 years agoEnsure value-type handling converter created by factory can be used to (#40879)
Layomi Akinrinade [Mon, 17 Aug 2020 01:38:51 +0000 (18:38 -0700)]
Ensure value-type handling converter created by factory can be used to (#40879)

handle corresponding nullable value types

3 years agoAdd remaining System.Net.Http Telemetry (#40838)
Miha Zupan [Sun, 16 Aug 2020 23:49:59 +0000 (01:49 +0200)]
Add remaining System.Net.Http Telemetry (#40838)

* Add remaining System.Net.Http Telemetry

* Remove http20-streams-current-total

* Use consts instead of magic values

* Move ResponseHeadersBegin event closer to actual timestamp for HTTP2

3 years agoDisable HttpTelemetry for HTTP 3 requests (#40839)
Miha Zupan [Sun, 16 Aug 2020 23:14:51 +0000 (01:14 +0200)]
Disable HttpTelemetry for HTTP 3 requests (#40839)

* Disable HttpTelemetry for HTTP 3 requests

* Link to tracking issue for HTTP/3 Telemetry

3 years agoFix runtime crash on Linux ARM64 running in WSL (#40597)
Anton Lapounov [Sun, 16 Aug 2020 22:26:27 +0000 (15:26 -0700)]
Fix runtime crash on Linux ARM64 running in WSL (#40597)

getauxval(AT_HWCAP) returns zero on Linux ARM64 running in WSL1. Fall back to reading capabilities from /proc/cpuinfo in that case.

3 years agoimplement ConnectAsync overloads with CancellationToken on Socket and TcpClient ...
Geoff Kizer [Sun, 16 Aug 2020 22:21:34 +0000 (15:21 -0700)]
implement ConnectAsync overloads with CancellationToken on Socket and TcpClient (#40750)

* implement ConnectAsync overloads with CancellationToken on Socket and TcpClient

3 years agoRemove the coreClrRepoRoot YAML variable (#40893)
Tomáš Rylek [Sun, 16 Aug 2020 21:00:29 +0000 (23:00 +0200)]
Remove the coreClrRepoRoot YAML variable (#40893)

This variable was useful for a transitional period during the
consolidation of dotnet runtime repos; it has no value anymore
after the consolidation and its presence makes the YAML scripts
more complex and harder to reason about.

I propose removing it and replacing its uses with the open-coded
relative path to the coreclr repo which also makes parts of the
script logic more obvious. This was motivated by some of Nathan's
struggles when standing up WebAssembly tests in the runtime repo.

Thanks

Tomas

3 years agoMake suspend the default port configuration (#40888)
John Salem [Sun, 16 Aug 2020 19:29:15 +0000 (12:29 -0700)]
Make suspend the default port configuration (#40888)

* Make suspend the default port configuration
* ignore empty port addresses

* Appease MSVC

3 years agoWorkaround for WSL1 process IO redirection bug (#40851)
Eirik Tsarpalis [Sun, 16 Aug 2020 14:57:58 +0000 (15:57 +0100)]
Workaround for WSL1 process IO redirection bug (#40851)

* Workaround for WSL1 process IO redirection bug

* Update src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.Unix.cs

Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
Co-authored-by: Adeel Mujahid <adeelbm@outlook.com>
3 years agoLimit Debugger.Log() calls in EventSource (#40823)
Noah Falk [Sun, 16 Aug 2020 06:29:08 +0000 (23:29 -0700)]
Limit Debugger.Log() calls in EventSource (#40823)

* Limit Debugger.Log() calls in EventSource

Fixing #40799

Previously we would send a message via Debugger.Log() for event call to ReportOutOfBandMessage().
Now we only do it the first 16 times, then all errors after that are silent. This should alleviate performance
overhead from a scenarios with a large number of errors.

I made this change quickly via github to help out Bing. I have never compiled or tested it prior to the PR
but fingers crossed it appears simple enough that it has a decent chance to work : )

* Remove trailing whitespace

Co-authored-by: David Mason <davmason@microsoft.com>
3 years agoDelete unused files (#40889)
Jan Kotas [Sat, 15 Aug 2020 21:19:32 +0000 (14:19 -0700)]
Delete unused files (#40889)

3 years agoUpdate PGO/IBC Data. (#40850)
Brian Robbins [Sat, 15 Aug 2020 19:28:24 +0000 (12:28 -0700)]
Update PGO/IBC Data. (#40850)

3 years ago[wasm] Add Timezone data generator as build task (#39913)
Tammy Qiu [Sat, 15 Aug 2020 17:47:47 +0000 (13:47 -0400)]
[wasm] Add Timezone data generator as build task (#39913)

Add two build tasks:
1. DownloadTimeZoneData
2. CreateWasmBundle (given directory bundle files into a data archive)

3 years agoChange Assembly.GetFile(s) to throw when in-memory (#40593)
Andy Gocke [Sat, 15 Aug 2020 15:52:41 +0000 (08:52 -0700)]
Change Assembly.GetFile(s) to throw when in-memory (#40593)

* Change Assembly.GetFile(s) to throw when in-memory

This is technically a breaking change, although a minor one, as the
previous behavior also threw an exception. The previous exception was
an IOException and this is an InvalidOperationException, so if users
were catching the previous exception they would not succeed now.

Fixes #40154

* Don't specify exception for GetFile when passed null

* Skip ImplementedInterfaces test on Mono

* Fix tests for running in memory

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoFix sync ConnectHelper.Connect (#40880)
Marie Píchová [Sat, 15 Aug 2020 12:30:38 +0000 (14:30 +0200)]
Fix sync ConnectHelper.Connect (#40880)

3 years agoReverts https://github.com/dotnet/corefx/pull/37583 ("Use clonefile for CopyFile...
David Cantú [Sat, 15 Aug 2020 10:10:31 +0000 (03:10 -0700)]
Reverts https://github.com/dotnet/corefx/pull/37583 ("Use clonefile for CopyFile, if available #37583") (#40753)

* Revert " Use clonefile for CopyFile, if available (dotnet/corefx#37583)"

This reverts commit 02ba75ad0fdda2e5f5c93a8e4e3ab6600d87fb99.

* Add unit test

* Disable tests failing in browser-wasm

3 years agoFix annotation in DataTableReaderListnener (#40855)
Jared Parsons [Sat, 15 Aug 2020 09:44:43 +0000 (02:44 -0700)]
Fix annotation in DataTableReaderListnener (#40855)

When running the new nullable constructor analysis on runtime we
discovered what appears to be a missing annotation in
`DataTableReaderListener`.

Note: the second `if` check in the constructor seems like dead code.
It's checking for the field to be non-null before ever setting the field
to a value. Probably could be deleted.

3 years agoNullable: System.Xml, part 6 (XSLT minus XSLT.Runtime) (#40368)
Krzysztof Wicher [Sat, 15 Aug 2020 08:44:47 +0000 (10:44 +0200)]
Nullable: System.Xml, part 6 (XSLT minus XSLT.Runtime) (#40368)

* Nullable: System.Xml, part 6 (XSLT minus XSLT.Runtime)

* change Evaluate to take non-nullable

* apply pr feedback

* fix nullability merge conflicts

* apply feedback

3 years agoGenerational aware analysis based on environment variable. (#40332)
Andrew Au [Sat, 15 Aug 2020 06:52:14 +0000 (23:52 -0700)]
Generational aware analysis based on environment variable. (#40332)

3 years ago[mono] Make bundle filename changes netcore-only (#40845)
Ryan Lucia [Sat, 15 Aug 2020 04:18:38 +0000 (00:18 -0400)]
[mono] Make bundle filename changes netcore-only (#40845)

3 years agoMove Font*, Image* and Margins converters to System.Drawing.Common and apply Unit...
Santiago Fernandez Madero [Sat, 15 Aug 2020 03:58:30 +0000 (20:58 -0700)]
Move Font*, Image* and Margins converters to System.Drawing.Common and apply Unit and Name converter (#40825)

* Move Font, Image, and Margins converters to System.Drawing.Common

* Add FontUnit converter and FontName converter to Font properties

* Fix Unix tests

* Sort Compile items

3 years agoFix stack overflow createdump triggering on Windows (#40869)
Mike McLaughlin [Sat, 15 Aug 2020 03:45:52 +0000 (20:45 -0700)]
Fix stack overflow createdump triggering on Windows (#40869)

3 years agoIgnore the executable file be deleted in Process Start (#40748)
lindexi [Sat, 15 Aug 2020 03:37:53 +0000 (11:37 +0800)]
Ignore the executable file be deleted in Process Start (#40748)

3 years agoFix TailCallStress mode. (#40698)
Eugene Rozenfeld [Sat, 15 Aug 2020 02:33:05 +0000 (19:33 -0700)]
Fix TailCallStress mode. (#40698)

Improve validation of tail calls that are not tail-prefixed in the IL
but are marked as such because of TailCallStress. We now do the same
correctness validation in morph for such tail calls as we do for
implicit tail calls. That blocks tail calls when we have address-taken
locals, struct promoted params, and pinned vars.

Fixes #39398.
Fixes #39309.
Fixes #38892.
Fixes #38889.
Fixes #38887.
Fixes #37117.
Fixes #8017.

3 years agoChange null handling in custom converters for backwards compat (#40859)
Steve Harter [Sat, 15 Aug 2020 02:28:40 +0000 (21:28 -0500)]
Change null handling in custom converters for backwards compat (#40859)

3 years agoThrow when non-nullable struct converters indicate that they handle nullable structs...
Layomi Akinrinade [Sat, 15 Aug 2020 02:24:36 +0000 (19:24 -0700)]
Throw when non-nullable struct converters indicate that they handle nullable structs (#40824)

* Wrap non-nullable struct converters in NullableOfT converter when
they explicitly handle nullable structs

* Throw exception instead of being nice

* Improve exception message

3 years agoAdding support for constrained open generics to DI (#39540)
Jimmy Bogard [Sat, 15 Aug 2020 02:19:55 +0000 (21:19 -0500)]
Adding support for constrained open generics to DI (#39540)

* Porting changes from https://github.com/dotnet/extensions/pull/536

* Correcting reference

* Avoiding wrapping exception as there may be other reasons why closing the generic type fails other than constraint failure

3 years agoFixing the allconfig build. (#40812)
Anirudh Agnihotry [Sat, 15 Aug 2020 01:28:46 +0000 (18:28 -0700)]
Fixing the allconfig build. (#40812)

* fixing all config build

* address feedback

3 years agoFix a deadlock in EventSource and CounterGroup (#40259)
Sung Yoon Whang [Sat, 15 Aug 2020 00:27:34 +0000 (17:27 -0700)]
Fix a deadlock in EventSource and CounterGroup (#40259)

* Fix a deadlock in CounterGroup and EventSource

* add more comments

* Add some more comments

* PR feedback

* Add comments

3 years agoFix ilasm, ildasm, crossgen and others launch from PATH (#40791)
Jan Vorlicek [Sat, 15 Aug 2020 00:17:14 +0000 (02:17 +0200)]
Fix ilasm, ildasm, crossgen and others launch from PATH (#40791)

* Fix ilasm, ildasm and crossgen launch from PATH

When trying to launch ilasm, ildasm, crossgen or any tool using
PAL_Initialize that are on the current PATH just by their file names,
they were crashing with SIGSEGV.
The problem was that the current exe path was extracted incorrectly
in that case.

This change fixes the problem using the same methods that corerun
uses to figure out the current exe path.

* Add missing FreeBSD headers

* Reflect PR feedback

* Update src/coreclr/src/pal/src/init/pal.cpp

* Fix typo in Solaris version of the code

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
3 years agoUpdate analyzers and various fixes to be able to build with latest RC1 SDK (#40796)
Santiago Fernandez Madero [Sat, 15 Aug 2020 00:13:44 +0000 (17:13 -0700)]
Update analyzers and various fixes to be able to build with latest RC1 SDK (#40796)

* Disable net analyzers from the SDK and use them from package reference instead

* Fix build with new SDK and bump net analyzer version

* PR Feedback

3 years agoSet MaxConcurrentStreams = 100 on new Http2Connection until first SETTINGS frame...
Alexander Nikolaev [Sat, 15 Aug 2020 00:09:06 +0000 (02:09 +0200)]
Set MaxConcurrentStreams = 100 on new Http2Connection until first SETTINGS frame (#40779)

* Set MaxConcurrentStreams = 100 on new Http2Connection until first SETTINGS frame

* Update src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/Http2Connection.cs

Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* - Setting infinite MaxConcurrentStreams fixed
- Test verifying new connection request queueing added

* More tests

* - const case fixed
- Outerloop attributed added

* ExtraStreams case fixed

Co-authored-by: Chris Ross <Tratcher@Outlook.com>