platform/upstream/dotnet/runtime.git
2 years agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 190001...
dotnet bot [Mon, 25 Jul 2022 15:11:28 +0000 (08:11 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1900011 (#72729)

2 years agoExpands a list of always trimmed mobile+web CA with few recently added (#72678)
Marek Safar [Mon, 25 Jul 2022 14:17:07 +0000 (16:17 +0200)]
Expands a list of always trimmed mobile+web CA with few recently added (#72678)

* Expands a list of aggressively trimmed CA with few recently added ones

* Add also UnscopedRefAttribute

2 years agoFix SendAsync_GetWithInvalidHostHeader_ThrowsException (#72779)
Radek Zikmund [Mon, 25 Jul 2022 14:02:00 +0000 (16:02 +0200)]
Fix SendAsync_GetWithInvalidHostHeader_ThrowsException (#72779)

2 years agoEnsure `GetCorElementType` returns value type for enums on Mono runtime (#72685)
mathieubourgeois [Mon, 25 Jul 2022 13:16:29 +0000 (09:16 -0400)]
Ensure `GetCorElementType` returns value type for enums on Mono runtime (#72685)

`Type.GetTypeCode` on Mono was calling `GetCorElementType`, which, when invoked on an enum nested in a generic class, would return `TypeCode.Object` instead of `TypeCode.Int32`. Matching to CoreClr, we change `GetCorElementType` to return `VALUETYPE` for enums to fix the issue. The original issue would also provoke Enum parsing to trigger an assert in a debug runtime and go through a slower, rare path for parsing as well.

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

2 years agoRevert "Detect truncated GZip streams (#61768)" (#72742)
Stephen Toub [Mon, 25 Jul 2022 13:10:39 +0000 (09:10 -0400)]
Revert "Detect truncated GZip streams (#61768)" (#72742)

* Revert "Detect truncated GZip streams (#61768)"

This reverts commit e71a46b90451a4f6892a199b4e6098f25f72de05.

* Add regression test

2 years ago[wasm][debugger] Fix test regressions (#72751)
Ankit Jain [Mon, 25 Jul 2022 12:12:37 +0000 (08:12 -0400)]
[wasm][debugger] Fix test regressions (#72751)

* [wasm][debugger] Fix test regressions

```
DebuggerTests.BreakpointTests.StepThroughOrNonUserCodeAttributeWithUserBp(justMyCodeEnabled: False, debuggingFunction: "Debugger.stepInto", evalFunName: "RunStepThrough", functionNameCheck1: "StepThrougUserBp", line1: 841, col1: 8, functionNameCheck2: "RunStepThrough", line2: 848, col2: 4) [FAIL]
..
Expected: DebuggerAttribute.StepThrougUserBp
Actual:   DebuggerAttribute.StepThroughUserBp
```

And
```
[xUnit.net 00:08:39.10]     DebuggerTests.BreakpointTests.StepThroughOrNonUserCodeAttributeResumeWithBp(justMyCodeEnabled: False, evalFunName: "RunStepThrough", decoratedFunName: "StepThrougBp") [FAIL]
  Failed DebuggerTests.BreakpointTests.StepThroughOrNonUserCodeAttributeResumeWithBp(justMyCodeEnabled: False, evalFunName: "RunStepThrough", decoratedFunName: "StepThrougBp") [80 ms]
  Error Message:
   Assert.True() Failure
Expected: True
Actual:   False
  Stack Trace:
     at DebuggerTests.DebuggerTestBase.SetBreakpointInMethod(String assembly, String type, String method, Int32 lineOffset, Int32 col, String condition) in /_/src/mono/wasm/debugger/DebuggerTestSuite/DebuggerTestBase.cs:line 1096
   at DebuggerTests.BreakpointTests.StepThroughOrNonUserCodeAttributeResumeWithBp(Boolean justMyCodeEnabled, String evalFunName, String decoratedFunName) in /_/src/mono/wasm/debugger/DebuggerTestSuite/BreakpointTests.cs:line 668
--- End of stack trace from previous location ---
```

Caused by:
```
commit 9d6396deb02161f5ee47af72ccac52c2e1bae458
Author: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date:   Sun Jul 24 06:24:28 2022 +0300

    Fix typos (#72709)
```

* Missing typo fixes.

Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
2 years agoFix ARM64 Unix debugging (#72735)
Juan Hoyos [Mon, 25 Jul 2022 08:33:43 +0000 (01:33 -0700)]
Fix ARM64 Unix debugging (#72735)

2 years ago[mono] Include dynamic methods in stacktrace (#72732)
Vlad Brezae [Mon, 25 Jul 2022 07:46:23 +0000 (10:46 +0300)]
[mono] Include dynamic methods in stacktrace (#72732)

Same as coreclr

2 years agoFix ReflectionCachesUpdateHandler_CachesCleared test in aggressive trim mode (#72682)
Eric Erhardt [Mon, 25 Jul 2022 06:25:38 +0000 (00:25 -0600)]
Fix ReflectionCachesUpdateHandler_CachesCleared test in aggressive trim mode (#72682)

The test uses a reflection pattern that isn't recognized by the trimmer. Changing it to use one that is recognized by the trimmer so it doesn't remove the type being tested.

Fix #57456

2 years agoAvoid transformation from multiplication to left shift in case of 64 bit value (...
Alhad Deshpande [Mon, 25 Jul 2022 05:35:44 +0000 (11:05 +0530)]
Avoid transformation from multiplication to left shift in case of 64 bit value (#71189)

2 years agoAvoid some unnecessary static readonly arrays (#72727)
Stephen Toub [Sun, 24 Jul 2022 22:50:09 +0000 (18:50 -0400)]
Avoid some unnecessary static readonly arrays (#72727)

* Avoid some unnecessary static readonly arrays

* Address PR feedback

* Address PR feedback

2 years agoReplace a static readonly in[] in System.Data.Common (#72743)
Stephen Toub [Sun, 24 Jul 2022 20:36:55 +0000 (16:36 -0400)]
Replace a static readonly in[] in System.Data.Common (#72743)

There are a small number of values, all within the byte range.

2 years agoFixed stress error System.Exception: Completed unexpectedly (#72734)
Marie Píchová [Sun, 24 Jul 2022 18:07:37 +0000 (20:07 +0200)]
Fixed stress error System.Exception: Completed unexpectedly (#72734)

2 years agoAvoid unnecessary return val copying in tailcall-via-help (#72720)
Jakob Botsch Nielsen [Sun, 24 Jul 2022 17:37:50 +0000 (19:37 +0200)]
Avoid unnecessary return val copying in tailcall-via-help (#72720)

The initial implementation of this did not handle the fact that retbuf
can point to GC heap during reflection invoke. It was fixed in #39815,
but the way it was fixed was by copying it into a local. This changes
the fix so that we simply report the return value pointer as a byref
throughout the mechanism, which simplifies the JIT's handling and is a
perf improvement as well.

2 years agoRevert "Consolidate importer spilling code (#72291)" (#72738)
Jan Kotas [Sun, 24 Jul 2022 13:26:55 +0000 (06:26 -0700)]
Revert "Consolidate importer spilling code (#72291)" (#72738)

This reverts commit c624626419e125cdd3cd1f3814da92a54e416b25.

2 years agoFix nativeaot arm64 build on macOS (#72733)
Adeel Mujahid [Sun, 24 Jul 2022 13:01:17 +0000 (16:01 +0300)]
Fix nativeaot arm64 build on macOS (#72733)

2 years ago[main] Update dependencies from dotnet/arcade (#72672)
dotnet-maestro[bot] [Sun, 24 Jul 2022 12:40:11 +0000 (08:40 -0400)]
[main] Update dependencies from dotnet/arcade (#72672)

2 years ago[QUIC] Return connection dispose in H3loopback connection (#72713)
Marie Píchová [Sun, 24 Jul 2022 12:39:19 +0000 (14:39 +0200)]
[QUIC] Return connection dispose in H3loopback connection (#72713)

* Return connection dipose in H3loopback connection

* Fixed QuicError

2 years agoFix typos (#72709)
Adeel Mujahid [Sun, 24 Jul 2022 03:24:28 +0000 (06:24 +0300)]
Fix typos (#72709)

2 years ago[main] Update dependencies from dotnet/linker (#72597)
dotnet-maestro[bot] [Sat, 23 Jul 2022 22:31:15 +0000 (18:31 -0400)]
[main] Update dependencies from dotnet/linker (#72597)

* Update dependencies from https://github.com/dotnet/linker build 20220720.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22369.1 -> To Version 7.0.100-1.22370.2

* Update dependencies from https://github.com/dotnet/linker build 20220721.3

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22369.1 -> To Version 7.0.100-1.22371.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoConsolidate importer spilling code (#72291)
SingleAccretion [Sat, 23 Jul 2022 17:59:35 +0000 (20:59 +0300)]
Consolidate importer spilling code (#72291)

* Add tests

* Fix losing GLOB_REF on the LHS

The comment states we don't need it, which is incorrect.

Diffs are improvements because we block forward substitution of
calls into "ASG(BLK(ADDR(LCL_VAR<field>, ...)))", which allows
morph to leave the "can be replaced with its field" local alone.

* Prospective fix

Spill "glob refs" on stores to "aliased" locals.

* Delete now-not-necessary code

* Fix up asserts

* Clean out '(unsigned)CHECK_SPILL_ALL/NONE' casts

* Don't manually spill for 'st[s]fld'

* Revert 'Clean out '(unsigned)CHECK_SPILL_ALL/NONE' casts'

2 years agoDelete lvVerTypeInfo (#71597)
SingleAccretion [Sat, 23 Jul 2022 15:48:41 +0000 (18:48 +0300)]
Delete lvVerTypeInfo (#71597)

2 years agoImprove performance of RegistryKey.GetValue (#66918)
Stephen Toub [Sat, 23 Jul 2022 11:01:04 +0000 (07:01 -0400)]
Improve performance of RegistryKey.GetValue (#66918)

Reduces typical number of syscalls as well as avoids allocation (or uses the ArrayPool otherwise).

Also updates Corelib's copy of RegistryKey to match (with things like perf key support removed).

2 years agoUpdate some more dependencies pulling in Newtonsoft.Json 9.0.1 (#72662)
Jakob Botsch Nielsen [Sat, 23 Jul 2022 07:50:44 +0000 (09:50 +0200)]
Update some more dependencies pulling in Newtonsoft.Json 9.0.1 (#72662)

This time I've verified that Newtonsoft.Json 9.0.1 is no longer present
in any project.assets.json files.

2 years agoImprove reliability of WarningsAsErrors replacement (#72070)
Levi Broderick [Sat, 23 Jul 2022 07:50:02 +0000 (00:50 -0700)]
Improve reliability of WarningsAsErrors replacement (#72070)

* Improve reliability of WarningsAsErrors replacement

* PR feedback

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
2 years agoFix ClonedServer_ActsAsOriginalServer test (#72698)
Stephen Toub [Sat, 23 Jul 2022 02:45:25 +0000 (22:45 -0400)]
Fix ClonedServer_ActsAsOriginalServer test (#72698)

We recently introduced a configuration of the pipe stream tests where named pipes are constructed with PipeOptions.None.  And in that configuration, the ClonedServer_ActsAsOriginalServer has started sporadically hanging.  It appears that the GetNamedPipeHandleStateW function called by NamedPipeClientStream.NumberOfServerInstances takes some lock that ReadFileW also holds while doing a synchronous read; as such, if the wrong interleaving of operations occurs, the queued work item that performs a read can end up blocking the assert check of NumberOfServerInstances from completing, and the test deadlocks.  The fix is simply to move the assert until after the write that satisifes the read.

2 years ago`LibraryImport` generator `AllowUnsafeBlocks` diagnostic (#72650)
Aaron Robinson [Sat, 23 Jul 2022 01:57:36 +0000 (18:57 -0700)]
`LibraryImport` generator `AllowUnsafeBlocks` diagnostic (#72650)

* LibraryImport generator AllowUnsafeBlocks diagnostic

2 years agoInclude libnethost.pdb in implementation packages (#72688)
Elinor Fung [Sat, 23 Jul 2022 01:19:14 +0000 (18:19 -0700)]
Include libnethost.pdb in implementation packages (#72688)

2 years agoAdd markdown readme for Microsoft.Extensions.DependencyModel (#72660)
MSDN.WhiteKnight [Sat, 23 Jul 2022 01:00:11 +0000 (06:00 +0500)]
Add markdown readme for Microsoft.Extensions.DependencyModel (#72660)

2 years agoFix debugger funceval deadlock (#72179)
Noah Falk [Fri, 22 Jul 2022 23:52:27 +0000 (16:52 -0700)]
Fix debugger funceval deadlock (#72179)

Fixes #60565

Visual Studio devs reported that debugger funcevals were deadlocking because the
PinnedHeapHandleTableCrst was held while threads were suspended. This change
refactors that code path so that the AllocateHandles() operation where the lock is held
gets split into two parts and the GC allocation where the debugger could suspend is
outside the region where the critical section is held.

In the old code the PinnedHeapHandleTable was synchronized by one of two different locks, either the AppDomainHandleTable lock or the GlobalStringLiteralMap. In the new code AppDomainHandleTable lock is renamed to PinnedHeapHandleTable lock and this lock is always what synchronizes the PinnedHeapHandleTable code. In the string literal code path the GlobalStringLiteralMap is taken first and the PinnedHeapHandleTable lock is taken second, but the PinnedHeapHandleTable is no longer reliant on that outer GlobalStringLiteralMap lock for correctness.

In terms of testing I can verify under a debugger that I can suspend in the GC allocation point and the PinnedHeapHandleTable lock isn't held. This doesn't of course prevent other locks from being held so at best it is a partial fix for the issue. Nobody had a known repro so I wasn't able to verify anything more specifically. I also confirmed the race cases on the InterlockedExchange paths worked how they were intended by forcing them with a native debugger.

2 years agoRespect ForceUTF8Encoding when encoding an X500DN
Kevin Jones [Fri, 22 Jul 2022 23:14:44 +0000 (19:14 -0400)]
Respect ForceUTF8Encoding when encoding an X500DN

The managed implementation did not respect the ForceUTF8Encoding flag when encoding a distinguished name. This changes the encoding to start respecting the flag, as Windows does.

2 years agoSupport ICU on Windows Server 2019 (#72656)
Tarek Mahmoud Sayed [Fri, 22 Jul 2022 23:10:48 +0000 (16:10 -0700)]
Support ICU on Windows Server 2019 (#72656)

2 years agoTighten nullable annotations on RegistryKey.GetValue (#72679)
Stephen Toub [Fri, 22 Jul 2022 21:48:03 +0000 (17:48 -0400)]
Tighten nullable annotations on RegistryKey.GetValue (#72679)

* Tighten nullable annotations on RegistryKey.GetValue

* Use nameof in attributes

2 years agoAdd X509AuthorityKeyIdentifierExtension
Jeremy Barton [Fri, 22 Jul 2022 21:45:53 +0000 (14:45 -0700)]
Add X509AuthorityKeyIdentifierExtension

Additionally fixes the recently added SubjectAltNames extension to use a shared OID instance.

2 years agoUtilize new C# support for nameof in attributes in same signature (#72686)
Stephen Toub [Fri, 22 Jul 2022 21:44:53 +0000 (17:44 -0400)]
Utilize new C# support for nameof in attributes in same signature (#72686)

nameof can now be used in attributes on and in method signatures to refer to parameter names in the same signature.

2 years agoChange PipeStream's sync I/O cancellation support to avoid blocking CancellationToken...
Stephen Toub [Fri, 22 Jul 2022 21:41:55 +0000 (17:41 -0400)]
Change PipeStream's sync I/O cancellation support to avoid blocking CancellationTokenSource.Cancel (#72612)

* Change PipeStream's sync I/O cancellation support to avoid blocking CancellationTokenSource.Cancel

In a degenerate case, where cancellation is requested between the cancellation being registered and the I/O being performed, and where the thread performing the I/O is delayed significantly, the thread calling CTS.Cancel to cancel the operation could be blocked waiting for the callback cancellation loop which is in turn waiting for the I/O to be performed.

This changes the implementation to not block Cancel by instead queueing the cancellation handling.

It also factors the whole implementation of the async-over-sync support into a helper class, setting us up to reuse it elsewhere as needed (and cleaning up the PipeStream code to avoid duplication).

* Address PR feedback

* Address PR feedback (and a few other tweaks)

2 years agoAdd support for static default interface methods (#72661)
Michal Strehovský [Fri, 22 Jul 2022 21:32:44 +0000 (06:32 +0900)]
Add support for static default interface methods (#72661)

We were only supporting default interface methods in the sense of non-abstract virtuals. We now also support overrides.

What's missing is support for diamond/reabstraction. I thin we need to make throwing stubs that we can dispatch to - it doesn't look like the strategy used in the VM (`callsiteCalloutHelper`) can be used for prejit. I don't want to increase the scope of this pull request, so we invalidate the entire method that has such dispatch.

2 years agoDisable ThrowDuringProcessLog_ShutsDownGracefully test (#72680)
Eric Erhardt [Fri, 22 Jul 2022 20:41:09 +0000 (14:41 -0600)]
Disable ThrowDuringProcessLog_ShutsDownGracefully test (#72680)

This test has been failing a few times a day. Disabling until it can be investigated to pass consistently.

See #71242

2 years agoFix DivRem bug (#72115)
Drew Kersnar [Fri, 22 Jul 2022 19:49:49 +0000 (14:49 -0500)]
Fix DivRem bug (#72115)

2 years agoAdd missing nullability annotation in CodeDom (#72532)
Dustin Campbell [Fri, 22 Jul 2022 19:22:12 +0000 (12:22 -0700)]
Add missing nullability annotation in CodeDom (#72532)

The `CodeTypeReference` constructors allow a `null` type name to be
provided, but one constructor was missed during annotation.

2 years agoDisable failing System.Text.Json tests on Android x86 and on Browser with threading...
Simon Rozsival [Fri, 22 Jul 2022 18:54:00 +0000 (20:54 +0200)]
Disable failing System.Text.Json tests on Android x86 and on Browser with threading enabled (#72664)

* Disable tests failing on Android x86

* Disable test projects timing out on multi-threaded Browser lanes

* Disable more tests on Android x86

* Replace conditional fact with active issue

* Fix build

* Disable 5 additional failing Android x86 tests

2 years agoPipeReaderStream.ReadInternal throws AggregateException unexpectedly (#70248)
Badre BSAILA [Fri, 22 Jul 2022 18:36:02 +0000 (20:36 +0200)]
PipeReaderStream.ReadInternal throws AggregateException unexpectedly (#70248)

* PipeReaderStream.ReadInternal throws AggregateException unexpectedly

* add unit test

* assert on error message

* Update src/libraries/System.IO.Pipelines/tests/PipeReaderStreamTests.nonnetstandard.cs

simplify task throwing exception

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoBump Intellisense package version to Preview6 (#72631)
Carlos Sanchez [Fri, 22 Jul 2022 18:08:29 +0000 (11:08 -0700)]
Bump Intellisense package version to Preview6 (#72631)

2 years agoFix Globalization tests (#72653)
Lakshan Fernando [Fri, 22 Jul 2022 16:05:57 +0000 (09:05 -0700)]
Fix Globalization tests (#72653)

* Fix Globalization tests

* enable test in rolling runs

2 years agoRemove wrong cgroups assert (#72372)
Jan Vorlicek [Fri, 22 Jul 2022 15:51:17 +0000 (17:51 +0200)]
Remove wrong cgroups assert (#72372)

* Remove wrong cgroups assert

When detecting the current cgroup version on Linux, checked and
debug builds assert when the filesystem type of /sys/fs/cgroup is
neither TMPFS_MAGIC nor CGROUP2_SUPER_MAGIC. This change removes
the assert and considers it as "no cgroup support".
Release builds already have this behavior.

Close #62960

* Update the nativeaot version too

2 years agoHTTP/3 Improved message for failing QUIC connection (#72374)
Corcodel Iulia [Fri, 22 Jul 2022 15:31:22 +0000 (18:31 +0300)]
HTTP/3 Improved message for failing QUIC connection (#72374)

* [#70949 issue] Made test and added inner exception for uninformative
message

* Apply suggestions from code review

Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
* Solving the rest of the coding review

* Update src/libraries/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.Http3.cs

Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
Co-authored-by: iuliaco <t-icorcodel@microsoft.com>
Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
2 years agoAdd `UnscopedRefAttribute` (#72499)
Aaron Robinson [Fri, 22 Jul 2022 14:48:56 +0000 (07:48 -0700)]
Add `UnscopedRefAttribute` (#72499)

2 years ago[NativeAOT] Some cleanup of assembly helpers in hijack area. (#72542)
Vladimir Sadov [Fri, 22 Jul 2022 14:44:21 +0000 (07:44 -0700)]
[NativeAOT] Some cleanup of assembly helpers in hijack area. (#72542)

* remove RhpReversePInvokeAttachOrTrapThread  (dead code)

* remove RhpWaitForGC

* removing some dead code

* remove unused extraStack parameter to PUSH_PROBE_FRAME

* make all working variants of RhpGcProbeHijack to have the same shape

* fix Unix build, tweak some comments

* check the trap flag in RhpGcProbeHijack

* add a stub for RhpGcStressHijack on Unix

* save flags for windows x64 should not have rdx

* not saving scratch registers on win-arm64

* PUSH_PROBE_FRAME on arm64

* couple comments

* make RhpGcProbeHijack responsible for setting PTFF_SAVE_  bits

* revert `RhpReversePInvokeAttachOrTrapThread2` change

* fix indentation

* made 32bit RhpGcStressHijack similar to 64bit counterparts
(as much as can be done without trying to compile and test)

* Renamed `RhpGcProbe` --> `RhpWaitForGC`

2 years agoDelete ConservativelyReportedRegion and CallingConventionConverterHelpers (#72659)
Jan Kotas [Fri, 22 Jul 2022 14:06:02 +0000 (07:06 -0700)]
Delete ConservativelyReportedRegion and CallingConventionConverterHelpers (#72659)

2 years agoTemplates outputs ejs instead of cjs (#71951)
Yusuke Yamada [Fri, 22 Jul 2022 13:18:15 +0000 (22:18 +0900)]
Templates outputs ejs instead of cjs (#71951)

2 years agoFix potential out-of-bounds array accesses in System.Data.Operators (#72654)
Stephen Toub [Fri, 22 Jul 2022 13:09:54 +0000 (09:09 -0400)]
Fix potential out-of-bounds array accesses in System.Data.Operators (#72654)

2 years ago[QUIC] Support for OpenSSL build of MsQuic on Windows (Attempt 2) (#72609)
Radek Zikmund [Fri, 22 Jul 2022 12:40:38 +0000 (14:40 +0200)]
[QUIC] Support for OpenSSL build of MsQuic on Windows (Attempt 2) (#72609)

* Initial OpenSSL MsQuic support

* Don't check Windows version when OpenSSL is used

* Update src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicApi.cs

Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
* Gracefully close the API handle before unloading the library

* Minor formatting change

* Update src/libraries/System.Net.Quic/src/System/Net/Quic/Internal/MsQuicApi.cs

Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
2 years agoFix #72614. (#72630)
Eirik Tsarpalis [Fri, 22 Jul 2022 11:08:44 +0000 (14:08 +0300)]
Fix #72614. (#72630)

2 years agoAdditional tests for Generics in System.Text.Json.SourceGeneration (#72449)
Ilya Pospelov [Fri, 22 Jul 2022 10:17:17 +0000 (13:17 +0300)]
Additional tests for Generics in System.Text.Json.SourceGeneration (#72449)

* generic types tests

* test nested generic class serialization

2 years agoSimplify AppModel addToProject settings (#72072)
Andy Gocke [Fri, 22 Jul 2022 08:22:41 +0000 (01:22 -0700)]
Simplify AppModel addToProject settings (#72072)

2 years agoFixes overwrite of last captured managed stack frame address in EventPipe stack trace...
Johan Lorensson [Fri, 22 Jul 2022 07:44:45 +0000 (09:44 +0200)]
Fixes overwrite of last captured managed stack frame address in EventPipe stack trace. (#72362)

When collecting stack frames in EventPipe, buffer manager buffer layout
depends on the struct layout of the compiler up until data gets
serialized into blocks and put into output stream following nettrace
format.

In the past, there was a 1:1 map between the data collected for a stack
trace and what was copied into buffer manager memory. Due to inefficiency,
wasting a lot of memory when having small stack traces, this was
optimized by https://github.com/dotnet/runtime/pull/68134, greatly
reducing overhead and improved EventPipe throughput.

That change started to use a different struct when capturing the
callstack compared to the layout written into buffer manager.
Since buffer manager memory still relies on compiler struct layout,
code must take that into account when copying stack data into
buffer manager memory, but the new optimized implementation didn't,
meaning that it fails in cases where compiler adds padding inside
EventPipeStackContentsInstance (done on 64-bit bit systems).
That in turn will write event payload, starting 4 bytes into last
captured stack frame causing issues for tools to symbolicate address,
but payload data will still be correct, since EventPipeEventInstance
keeps pointer to payload data, meaning most of the event will still be
correct, covering up the overwrite to only affect last managed stack
frame and only on 64-bit release builds.

Fix adjust the size calculation and make sure it takes any padding
added by compiler into the computation of EventPipeEventInstance size.

2 years agoFix HttpConnectionPool timers race on disposal (#72615)
Natalia Kondratyeva [Fri, 22 Jul 2022 06:24:51 +0000 (23:24 -0700)]
Fix HttpConnectionPool timers race on disposal (#72615)

Access _authorityExpireTimer and _altSvcBlocklistTimerCancellation under lock and check for disposed.

Fixes #66782.

2 years agoAdd GCDescs in front of MethodTable to dumps (#72658)
Mike McLaughlin [Fri, 22 Jul 2022 06:08:43 +0000 (23:08 -0700)]
Add GCDescs in front of MethodTable to dumps (#72658)

* Add GCDescs in front of MethodTable to dumps

* Make DacValidateMethodTable more bullet proof by DAC'ifing the MethodTable pointer (using PTR_MethodTable). On Windows,
SEH can catch the native AV exceptions but on Linux/MacOS this can crash lldb/SOS on invalid MT addresses.

This will also help with eestack/dumpstack crashing lldb also.

2 years ago[wasm] Return int from console template (#72623)
Radek Doulik [Fri, 22 Jul 2022 03:06:33 +0000 (05:06 +0200)]
[wasm] Return int from console template (#72623)

Also update the template tests to test that it propagates correctly as
an exit code from the node process.

2 years agoPort the doc changes to source (#72638)
Tarek Mahmoud Sayed [Fri, 22 Jul 2022 01:57:08 +0000 (18:57 -0700)]
Port the doc changes to source (#72638)

* Port the doc changes to source

* Address the feedback

* Update src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/DateOnlyConverter.cs

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Remove duplicated summary section

* reorder the doc elements

* reorder the remaining doc elements

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
2 years agoCorrect nullable annotation on ICustomTypeDescriptor.GetConverter (#72629)
Eric Erhardt [Fri, 22 Jul 2022 01:43:06 +0000 (19:43 -0600)]
Correct nullable annotation on ICustomTypeDescriptor.GetConverter (#72629)

The documentation, and even some of our own code, return null for this method. Correcting the nullable annotation to indicate that null can be returned.

Fix #69229

2 years agoClear list in Enumerable.Chunk prior to yielding (#72637)
Stephen Toub [Fri, 22 Jul 2022 01:09:02 +0000 (21:09 -0400)]
Clear list in Enumerable.Chunk prior to yielding (#72637)

To avoid the iterator keeping alive references unnecessarily.  If the consumer takes their time in processing the resulting array and nulls out values as they go, we don't want the list referenced by the enumerator still keeping those objects referenced.

2 years agoamend the LoongArch64-ABI for GCstress and NullableObject. (#72573)
Qiao Pengcheng [Fri, 22 Jul 2022 01:02:35 +0000 (09:02 +0800)]
amend the LoongArch64-ABI for GCstress and NullableObject. (#72573)

2 years agoDisable NoStapledOcsp test on Debian 10 for now. (#72634)
Jeremy Barton [Fri, 22 Jul 2022 00:38:08 +0000 (17:38 -0700)]
Disable NoStapledOcsp test on Debian 10 for now. (#72634)

2 years ago[mono][aot] Don't fail AOT for methods referencing fnptr classes. (#72574)
Zoltan Varga [Thu, 21 Jul 2022 23:32:50 +0000 (19:32 -0400)]
[mono][aot] Don't fail AOT for methods referencing fnptr classes. (#72574)

Really fixes https://github.com/dotnet/runtime/issues/72460.

2 years agoSync shared code from aspnetcore (#72588)
github-actions[bot] [Thu, 21 Jul 2022 23:32:33 +0000 (16:32 -0700)]
Sync shared code from aspnetcore (#72588)

2 years ago[main] Update dependencies from dotnet/arcade (#72178)
dotnet-maestro[bot] [Thu, 21 Jul 2022 22:26:17 +0000 (15:26 -0700)]
[main] Update dependencies from dotnet/arcade (#72178)

* Update dependencies from https://github.com/dotnet/arcade build 20220713.1

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22363.1

* Update dependencies from https://github.com/dotnet/arcade build 20220714.1

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22364.1

* Update dependencies from https://github.com/dotnet/arcade build 20220715.4

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22365.4

* Update dependencies from https://github.com/dotnet/arcade build 20220717.1

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22367.1

* Update dependencies from https://github.com/dotnet/arcade build 20220718.5

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22368.5

* Update dependencies from https://github.com/dotnet/arcade build 20220719.9

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22369.9

* Update dependencies from https://github.com/dotnet/arcade build 20220720.1

Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.XUnitExtensions
 From Version 7.0.0-beta.22362.1 -> To Version 7.0.0-beta.22370.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years ago[mono][aot] Pass -mattr=crc32 to opt/llc when sse4.2 is enabled and using llvm 14...
Zoltan Varga [Thu, 21 Jul 2022 21:14:58 +0000 (17:14 -0400)]
[mono][aot] Pass -mattr=crc32 to opt/llc when sse4.2 is enabled and using llvm 14. (#72579)

2 years agoRevert "Always use live host (#71725)" (#72628)
Andy Gocke [Thu, 21 Jul 2022 21:12:19 +0000 (14:12 -0700)]
Revert "Always use live host (#71725)" (#72628)

This reverts commit c4277b99ef2b623dca6ed2c1427890855e3deced.

2 years agoClarified documentation regarding building the Core_Root. (#72560)
Ivan Diaz Sanchez [Thu, 21 Jul 2022 21:01:45 +0000 (14:01 -0700)]
Clarified documentation regarding building the Core_Root. (#72560)

* Added a note emphasizing Libraries have to be built in Release mode to generate the Core_Root.

* Corrected a statement regarding libraries' configuration.

Co-authored-by: Seeker186 <101211595+Seeker186@users.noreply.github.com>
2 years agoSupport for RequiresAttributeMismatch testing (#72496)
Tlakaelel Axayakatl Ceja [Thu, 21 Jul 2022 20:47:55 +0000 (13:47 -0700)]
Support for RequiresAttributeMismatch testing (#72496)

The RequiresAttributeMismatch warnings were not being generated since one of the answers from the MultiFileSharedCompilatioModuleGroup was to generate Vtables from everything. The logic for checking for warning mismatch is gated by not having a vtable being generated so needed to create a copy of the MultiFileSharedCompilationModuleGroup for testing purposes. Adding testing also unveils some issues with the current way of producing warnings in NativeAOT that are addressed in this PR.

- Create a copy of the MultiFileSharedCompilationModuleGroup into the test infrastructure
- Default answer of ShouldProduceFullVTable to false in the TestInfraMultiFileSharedCompilationModuleGroup, otherwise, the logic for checking for mismatch in NativeAOT will not work as currently implemented.
- Property names don't need parenthesis, escape before they are added.
- Small fix when ExplicitInterface names are used, cannot rely on name starting with get_/set_ in all cases.
- Additional RUC warning check when a method is marked via DAM and is not TypeHierarchy marking
- Adds RequiresAttributeMismatch test file from linker (includes adding NativeAOT specific ProducedBy attributes)

2 years agoAvoid AsyncLocal read in Activity.set_Current when CurrentChanged isn't handled ...
Stephen Toub [Thu, 21 Jul 2022 20:38:29 +0000 (16:38 -0400)]
Avoid AsyncLocal read in Activity.set_Current when CurrentChanged isn't handled (#72621)

2 years agoAllow not finding attribute data for more cases that we don't care about (#72620)
Jeremy Koritzinsky [Thu, 21 Jul 2022 20:38:06 +0000 (13:38 -0700)]
Allow not finding attribute data for more cases that we don't care about (#72620)

* Allow not finding attribute data for more cases that we don't care about

This will fix the upstream repo intake of dotnet/runtime by allowing us to fall back to null for cases where Roslyn does things that we aren't expecting with the "ContainingSymbol" value.

* Update test

2 years ago[mono] Pass the pending exception correctly from interp_runtime_invoke (). (#72126)
Zoltan Varga [Thu, 21 Jul 2022 20:33:53 +0000 (16:33 -0400)]
[mono] Pass the pending exception correctly from interp_runtime_invoke (). (#72126)

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

2 years ago[RateLimiting] Fix test race with timer (#72118)
Brennan [Thu, 21 Jul 2022 20:08:47 +0000 (13:08 -0700)]
[RateLimiting] Fix test race with timer (#72118)

2 years ago[wasm] bump npm packages, fix lint errors (#72600)
Pavel Savara [Thu, 21 Jul 2022 19:07:14 +0000 (21:07 +0200)]
[wasm] bump npm packages, fix lint errors (#72600)

* bump npm packages, fix lint errors
* document

2 years agoAdd ease of use helpers in X.509
Jeremy Barton [Thu, 21 Jul 2022 18:38:24 +0000 (11:38 -0700)]
Add ease of use helpers in X.509

2 years agoAssert compiler diagnostics in UpgradeToRegexGeneratorAnalyzerTests and simplify...
Youssef Victor [Thu, 21 Jul 2022 18:32:51 +0000 (20:32 +0200)]
Assert compiler diagnostics in UpgradeToRegexGeneratorAnalyzerTests and simplify tests (#72580)

* Assert compiler diagnostics in UpgradeToRegexGeneratorAnalyzerTests

* Simplify tests

2 years agoSleep infinitely on secondary crashing threads (#72618)
Jan Kotas [Thu, 21 Jul 2022 18:19:56 +0000 (11:19 -0700)]
Sleep infinitely on secondary crashing threads (#72618)

Sleeping infinitely instead of continuing should be better for crash reporting reliability.

Also, change the crashing thread detection to use thread ID instead of Thread*. It is fixing bogus "Fatal error while logging another fatal error." message when the crash occurs without Thread* being setup.

2 years agoDisable NamedPipeTest_ServerInOut_ClientInOut_Synchronous test configuration (#72613)
Stephen Toub [Thu, 21 Jul 2022 18:11:54 +0000 (14:11 -0400)]
Disable NamedPipeTest_ServerInOut_ClientInOut_Synchronous test configuration (#72613)

* Disable NamedPipeTest_ServerInOut_ClientInOut_Synchronous test configuration

This variation was named pipes stream conformance tests was just introduced and appears to be unstable, resulting in multiple tests hanging frequently.

* Update PipeStreamConformanceTests.cs

2 years agoImprove RegexCharClass.Analyze for sets with subtraction (#72328)
Stephen Toub [Thu, 21 Jul 2022 18:11:29 +0000 (14:11 -0400)]
Improve RegexCharClass.Analyze for sets with subtraction (#72328)

* Improve RegexCharClass.Analyze for sets with subtraction

Character classes containing subtraction are currently skipped in RegexCharClass.Analyze as it depends on CanEasilyEnumerateSetContents, which in turn bails for sets with subtraction.  Most of the calls to CanEasilyEnumerateSetContents can't deal with subtraction as they require an exact answer (e.g. GetSetChars needs to enumerate the ranges to yield those and only those characters that match).  But Analyze is fine producing an overestimate, and since subtraction can only ever narrow the set of what's accepted, we can simply ignore subtraction in Analyze.  This is useful because RegexCompiler and source generator have multiple optimizations that kick in based on the results of Analyze.  For example, today the set `[a-z-[aeio]` would still produce a fall back path for non-ASCII, even though the ranges highlight that the only accepted values are ASCII... with this change, that fallback won't be needed.  Similarly, a set with subtraction but only Unicode ranges could now end up satisfying various optimizations, like using a 64-bit lookup table if the range of accepted characters is no larger than that.

* Add RegexCharClass.Analyze unit tests

Also improve Analyze to handle a few more cases

2 years agoFix TwoServerInstances_OnceDisposed_Throws test for non-overlapped I/O (#72617)
Stephen Toub [Thu, 21 Jul 2022 17:30:30 +0000 (13:30 -0400)]
Fix TwoServerInstances_OnceDisposed_Throws test for non-overlapped I/O (#72617)

2 years agoFix accidentally removed Add in TypeSpec.AddModifier (#72605)
Stephen Toub [Thu, 21 Jul 2022 17:28:18 +0000 (13:28 -0400)]
Fix accidentally removed Add in TypeSpec.AddModifier (#72605)

2 years agoFix minor triple slash comment (#72569)
Tarek Mahmoud Sayed [Thu, 21 Jul 2022 17:14:23 +0000 (17:14 +0000)]
Fix minor triple slash comment (#72569)

2 years agoFix x86 GCStress race with indirect calls before epilogs (#72592)
Jakob Botsch Nielsen [Thu, 21 Jul 2022 16:41:15 +0000 (18:41 +0200)]
Fix x86 GCStress race with indirect calls before epilogs (#72592)

For partially interruptible methods there is a mismatch between where GC
stress runs GCs and where normal return address hijacking would run GCs.
GC stress runs the GC on the first instruction after a call returns,
where there for partially interruptible methods is no GC info that says
to protect GC pointers in return registers. It means GC stress needs to
do some special work to figure out that these need to be protected.

The way it does that is the following:

* For direct call sites, in GCCoverageInfo::SprinkleBreakpoints it gets
  the target MD of each call site and places a special illegal
  instruction right after the call that the GC stress handler will use
  to figure out which (if any) registers have GC pointers that need
  protection

* For indirect call sites, in GCCoverageInfo::SprinkleBreakpoint it will
  first place an illegal instruction on the call instruction so that the
  GC stress handler will break there. Once the GC stress handler breaks,
  it computes the target address and gets the target MD from that, and
  then places the illegal instruction on the next instruction like
  above.

GCCoverageInfo::SprinkleBreakpoints runs right after jitting and should
therefore not race with anything. However, the GC stress handler can
race with any other thread accessing the same function. That makes the
latter problematic on x86 where unwinding reads the epilog code to work.
In this particular case thread A is about to unwind through the epilog
when thread B stops on an indirect call right before the epilog. Thread
B then overwrites the first instruction of the epilog, causing thread A
to unwind incorrectly.

UnwindStackFrame already has access to the GC stress saved code and is
actually already using it for other unwinding. To fix the issue, make it
use the saved code for unwinding epilogs as well.

Fix #68431

2 years ago[wasm] add new interop to the console template (#72375)
Pahontu Stefan-Alin [Thu, 21 Jul 2022 16:35:19 +0000 (19:35 +0300)]
[wasm] add new interop to the console template (#72375)

* first try for wasm console template

* removed unnecessary references

* modified initial .csproj file

* Delete console.csproj

* solved formatting and fixed failing test

* solved failing tests

* fixed styling

* simplified updating of Program.cs

* removed unnecessary files

* used string.replace instead of regex

Co-authored-by: Stefan Pahontu <t-spahontu@microsoft.com>
2 years agoClean up #nullable in source (#72568)
Stephen Toub [Thu, 21 Jul 2022 16:19:11 +0000 (12:19 -0400)]
Clean up #nullable in source (#72568)

We had dozens of uses of `#nullable disable` left in source in places we shouldn't have, resulting in lack of annotation in sources we'd declared NRT-enabled.  We also had dozens of use of `#nullable enable` in source it shouldn't have been in, resulting in us actually shipping public annotations in code we didn't fully review for that purpose (e.g. some types in CodeDom).  This cleans all of that up, removing unnecessary #nullables in the source.

This also now defaults test projects to `<Nullable>annotations</Nullable>`.  Test projects often include annotated files shared with product source, and while we generally don't require test projects be NRT-enabled, they can be tolerant of the annotations; we don't ship them, so we don't need to be concerned about what annotations show up on public types in test assemblies.

2 years agoAnnotating System.Formats.Asn1 library for Aot (#72533)
Lakshan Fernando [Thu, 21 Jul 2022 15:58:49 +0000 (08:58 -0700)]
Annotating System.Formats.Asn1 library for Aot (#72533)

* Annotating System.Formats.Asn1 library for Aot

* FB

* Update src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj

* Update src/libraries/System.Formats.Asn1/src/System.Formats.Asn1.csproj

* enabling the tests by exluding not supported scenarios

* changed the failing tests to be disabled under an active bug

* update the bug number

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years agoFix HttpStress build (#72601)
Anton Firszov [Thu, 21 Jul 2022 15:55:55 +0000 (17:55 +0200)]
Fix HttpStress build (#72601)

2 years agoAdd TranslateKey to PartitionedRateLimiter (#69407)
Brennan [Thu, 21 Jul 2022 15:53:04 +0000 (08:53 -0700)]
Add TranslateKey to PartitionedRateLimiter (#69407)

2 years agoAvoid empty segments from PipeReader.ReadAsync (#72536)
Brennan [Thu, 21 Jul 2022 15:51:28 +0000 (08:51 -0700)]
Avoid empty segments from PipeReader.ReadAsync (#72536)

2 years agoDisable long running ReadAsync_CancelPendingTask_ThrowsCancellationException tests...
Radek Zikmund [Thu, 21 Jul 2022 15:42:18 +0000 (17:42 +0200)]
Disable long running ReadAsync_CancelPendingTask_ThrowsCancellationException tests for some Http1 cases (#72596)

2 years agoJIT: hash lookup vn func before trying to optimize (#72576)
Andy Ayers [Thu, 21 Jul 2022 15:29:00 +0000 (08:29 -0700)]
JIT: hash lookup vn func before trying to optimize (#72576)

Always consult the func hash table before trying to optimize, and record the
optimized result in the hash table.

Also found a few more cases where we can defer work on a VN pair when the
liberal and conservative VNs match.

2 years agoWarn on trimming with COM hosting (built-in COM support) enabled (#72493)
Elinor Fung [Thu, 21 Jul 2022 14:02:41 +0000 (07:02 -0700)]
Warn on trimming with COM hosting (built-in COM support) enabled (#72493)

2 years agoEnable string properties evaluation of Length and Char[]. (#67028)
Ilona Tomkowicz [Thu, 21 Jul 2022 11:11:59 +0000 (13:11 +0200)]
Enable string properties evaluation of Length and Char[]. (#67028)

* Testcases.

* Fixed indexing property and length property.

* Fixed changes from https://github.com/dotnet/runtime/pull/67095 that I broke sometime when merging.

* Granted objectId to string: properties and methods on strings are evaluated the similarly as on objects.

* Removed the comments.

* Fixed EvaluateMethodsOnPrimitiveTypesReturningObjects on Firefox.

* Disabled firefox test https://github.com/dotnet/runtime/issues/70819.

* Fixed the test build error.

* Full names to fix the tests.

2 years ago[mono] Fix https://github.com/dotnet/runtime/issues/72519. (#72563)
Zoltan Varga [Thu, 21 Jul 2022 10:37:21 +0000 (06:37 -0400)]
[mono] Fix https://github.com/dotnet/runtime/issues/72519. (#72563)

2 years agoDo not assume return type ABIs match in `RETURN(CALL)` (#72285)
SingleAccretion [Thu, 21 Jul 2022 10:29:54 +0000 (13:29 +0300)]
Do not assume return type ABIs match in `RETURN(CALL)` (#72285)

* Do not assume calling conventions match

When importing GT_RETURN.

* Add a test

* Disable the test on Mono

2 years agoJIT: Move cpblk GC ref layout check back to lowering (#72516)
Jakob Botsch Nielsen [Thu, 21 Jul 2022 10:08:38 +0000 (12:08 +0200)]
JIT: Move cpblk GC ref layout check back to lowering (#72516)

The check in codegen runs only for arm64 but this check needs to happen
for arm32 as well. This moves the GC ref layout check back to lowering
and aligns it with xarch as well.

Fix #69976

2 years agoFix "cns".StartsWith bug (#72558)
Egor Bogatov [Thu, 21 Jul 2022 09:30:21 +0000 (11:30 +0200)]
Fix "cns".StartsWith bug (#72558)

2 years ago[main] Update dependencies from dotnet/linker (#72257)
dotnet-maestro[bot] [Thu, 21 Jul 2022 08:32:43 +0000 (01:32 -0700)]
[main] Update dependencies from dotnet/linker (#72257)

* Update dependencies from https://github.com/dotnet/linker build 20220714.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22362.3 -> To Version 7.0.100-1.22364.1

* Update dependencies from https://github.com/dotnet/linker build 20220715.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22362.3 -> To Version 7.0.100-1.22365.1

* Fix warning in lambda body

* Update dependencies from https://github.com/dotnet/linker build 20220718.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22362.3 -> To Version 7.0.100-1.22368.1

* Update dependencies from https://github.com/dotnet/linker build 20220719.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22362.3 -> To Version 7.0.100-1.22369.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sven Boemer <sbomer@gmail.com>