platform/upstream/dotnet/runtime.git
2 years agoDelete reachable Debug.Fail in regex generator codefix (#72534)
Youssef Victor [Wed, 20 Jul 2022 22:22:57 +0000 (00:22 +0200)]
Delete reachable Debug.Fail in regex generator codefix (#72534)

* Delete reachable Debug.Fail in regex generator codefix

* Simplify test

* Add test for local constant

* Address feedback

2 years ago[mono] ThisCall with no arguments is invalid (#72495)
Aaron Robinson [Wed, 20 Jul 2022 22:17:24 +0000 (15:17 -0700)]
[mono] ThisCall with no arguments is invalid (#72495)

* [mono] ThisCall with no arguments is invalid

* Disable test on llvmfullaot

2 years agoUpdate DebuggerDisplay for metadata types & JsonSerializerOptions (#72524)
Eirik Tsarpalis [Wed, 20 Jul 2022 21:39:00 +0000 (00:39 +0300)]
Update DebuggerDisplay for metadata types & JsonSerializerOptions (#72524)

* Update DebuggerDisplay for metadata types & JsonSerializerOptions

* address feedback

2 years agoFix finding attribute data for syntax for assembly/module symbols (#72535)
Jeremy Koritzinsky [Wed, 20 Jul 2022 21:05:24 +0000 (14:05 -0700)]
Fix finding attribute data for syntax for assembly/module symbols (#72535)

2 years agoAdd missing <returns> documentation to NonCryptographicHashAlgorithm
Jeremy Barton [Wed, 20 Jul 2022 20:56:34 +0000 (13:56 -0700)]
Add missing <returns> documentation to NonCryptographicHashAlgorithm

2 years agoGenerate SerializeHandler as an instance method (#72510)
Michal Strehovský [Wed, 20 Jul 2022 20:39:01 +0000 (05:39 +0900)]
Generate SerializeHandler as an instance method (#72510)

Fixes #61448.

2 years ago[wasm] Dev loop incremental build fixups (#72502)
Aleksey Kliger (λgeek) [Wed, 20 Jul 2022 19:51:02 +0000 (15:51 -0400)]
[wasm] Dev loop incremental build fixups (#72502)

1. Look for changes to `*.ts` files in subdirectories, now that we
have code in subdirectories in `src/mono/wasm/runtime`

2. Write the rollup `--environment` argument to a file in
artifacts/obj and use it as an input to the `BuildWithRollup` target.
That will cause wasm.proj to re-run rollup if we pass different values
for properties that affect the environment.  Some of those values are
used as const inputs to rollup tree-shaking and can affect the final
contents of dotnet.js

2 years agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 189216...
dotnet bot [Wed, 20 Jul 2022 19:25:58 +0000 (12:25 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1892163 (#72508)

2 years agoFix for m_alignpad == 0 assertion failure (#72475)
Mukund Raghav Sharma (Moko) [Wed, 20 Jul 2022 19:03:24 +0000 (12:03 -0700)]
Fix for m_alignpad == 0 assertion failure (#72475)

* Added fix for m_alignpad == 0 assertion failure

* Improved logging

* Replaced logging with StressLog and tested to make sure the values show up

2 years agoUpdate llvm-libunwind from v9.0.0 to v14.0.6 (#72442)
Adeel Mujahid [Wed, 20 Jul 2022 18:46:31 +0000 (21:46 +0300)]
Update llvm-libunwind from v9.0.0 to v14.0.6 (#72442)

* Delete src/native/external/llvm-libunwind

* Add LLVM libunwind-14.0.6

* Apply all patches from 3719058

* Disable DynamicGenerics tests

* Update llvm-libunwind-version.txt

* Revert "Disable DynamicGenerics tests"

This reverts commit ef0164fd669626343c73972f62d0a15e0dd9ffd9.

* make the codeOffset check in parseFDEInstructions end-inclusive

* Update src/native/external/llvm-libunwind-version.txt

Co-authored-by: vsadov <8218165+VSadov@users.noreply.github.com>
2 years agofix typos (#72515)
Pavel Savara [Wed, 20 Jul 2022 18:26:01 +0000 (20:26 +0200)]
fix typos (#72515)

2 years agoUpdate /// comments for new InteropServices APIs (#72473)
Aaron Robinson [Wed, 20 Jul 2022 18:24:10 +0000 (11:24 -0700)]
Update /// comments for new InteropServices APIs (#72473)

* Update /// for official documentation.

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
2 years ago[iOS] Use different tvOS helix queue for PR's (#72467)
Steve Pfister [Wed, 20 Jul 2022 17:51:15 +0000 (10:51 -0700)]
[iOS] Use different tvOS helix queue for PR's (#72467)

Up until now, we have used a single tvOS queue for all pipelines. This has lead to frequent timeouts because there simply aren't enough devices to handle spikes in traffic. We will now make use of two queues, one for runtime (PR's) and one for runtime-extra-platforms (scheduled jobs, manual runs). Since we are only running System.Runtime tests on PR's, we should see PR timeouts much less.

2 years ago[NativeAot] Fixing Resources.Reader and ComponentModel tests (#72497)
Lakshan Fernando [Wed, 20 Jul 2022 16:01:41 +0000 (09:01 -0700)]
[NativeAot] Fixing Resources.Reader and ComponentModel tests (#72497)

* Fixing Resources.Reader and ComponentModel tests

* enable the tests in proj file

* FB

2 years agoEnable cancellation for anonymous pipes and non-async named pipes on Windows (#72503)
Stephen Toub [Wed, 20 Jul 2022 15:18:48 +0000 (11:18 -0400)]
Enable cancellation for anonymous pipes and non-async named pipes on Windows (#72503)

* Enable cancellation for anonymous pipes and non-async named pipes on Windows

Although ReadAsync, WriteAsync, and WaitForConnectionAsync on pipes all accept a CancellationToken, that token is only usable on Windows for canceling an in-flight operation when the pipe is using overlapped I/O.  If the pipe was created for non-overlapped I/O, as is the case for anonymous pipes and can be the case for named pipes, the token stops being useful for anything other than an up-front cancellation check.

This change fixes that by using CancelSynchronousIo to cancel the synchronous I/O performed as part of these async operations, which are implemented as async-over-sync (queueing to the thread pool a work item that performs the synchronous I/O).

(The Unix implementation already supports cancellation in these situations.)

* Address PR feedback (tweak comments)

2 years agoCompare symbols instead of fully qualified name (#72507)
Youssef Victor [Wed, 20 Jul 2022 14:33:55 +0000 (16:33 +0200)]
Compare symbols instead of fully qualified name (#72507)

2 years agoMark b311420 test GC Stress incompatible on all platforms (#72444)
Jakob Botsch Nielsen [Wed, 20 Jul 2022 14:15:19 +0000 (16:15 +0200)]
Mark b311420 test GC Stress incompatible on all platforms (#72444)

Fix #71593

2 years agoRemove hard-coded RunAnalyzer property in JSImportGenerator (#72487)
Michael Simons [Wed, 20 Jul 2022 13:23:31 +0000 (08:23 -0500)]
Remove hard-coded RunAnalyzer property in JSImportGenerator (#72487)

2 years agoFix pri1 test build (#72520)
Jakob Botsch Nielsen [Wed, 20 Jul 2022 12:53:36 +0000 (14:53 +0200)]
Fix pri1 test build (#72520)

2 years agoEnsure metadata originating from converters is surfaced while JsonTypeInfo is mutable...
Eirik Tsarpalis [Wed, 20 Jul 2022 11:49:13 +0000 (14:49 +0300)]
Ensure metadata originating from converters is surfaced while JsonTypeInfo is mutable. (#72483)

2 years ago[Android] Fix some System.Net tests (#71385)
Simon Rozsival [Wed, 20 Jul 2022 09:49:36 +0000 (11:49 +0200)]
[Android] Fix some System.Net tests (#71385)

* Implement IncludeNetworkSecurityConfig

* Use IncludeNetworkSecurityConfig

* Fix tests

* Remove active issue attributes

* Rename certificate file

* Revert unnecessary changes

* TMP: re-throw caught exception to reveal more information in logs

* Revert "TMP: re-throw caught exception to reveal more information in logs"

This reverts commit 039d051d6ac60c1c3f1baf37b0c06872f87cac84.

* TMP: add and update res folders until they are merged into runtime-assets

* Fix System.Net.Requests tests

* Re-enable System.Net.Http functional tests

* Try fixing failing test

* Skip failing test

* Add missing using

* Remove temporary test data

* Relax exception type assertion for Android

* Code cleanup

* Fix test failures in System.Net.WebSockets.Client.Tests

* Remove active issue attribute

* Remove most explicit usages of the server certificate custom validation callback in tests

* Fix several tests

* Remove weird condition

* Code clean-up

* Remove unrelated active issue attributes

* Turn ActiveIssue attributes into permanent SkipOnPlatform

* Update explanation for SkipOnPlatform

* Revert partial fix and keep active issue

* Keep active issue for android x64 and x86

* Remove invalid attribute

* Fix test on Browser

* Allow all certificates by default

* Fix build

* Fix http client handler factory on Browser

* Skip failing test

* Fix net48 build

* Revert unintentional change in WinHttpHandler tests

* Avoid using unsupported property on Browser

* Remove unnecessary default value

* Avoid using unsupported property on Browser

2 years agoUpdate NuGet reference versions (#72451)
Jakob Botsch Nielsen [Wed, 20 Jul 2022 08:13:25 +0000 (10:13 +0200)]
Update NuGet reference versions (#72451)

These references were still pulling in Newtonsoft.Json 9.0.1 causing
governance problems.

Also update a Microsoft.Build.Tasks.Core reference to use our defined
property for it.

2 years ago[mono][jit] Fix an infinite loop in the abcrem pass. (#72213)
Zoltan Varga [Wed, 20 Jul 2022 04:04:47 +0000 (00:04 -0400)]
[mono][jit] Fix an infinite loop in the abcrem pass. (#72213)

* [mono][jit] Fix an infinite loop in the abcrem pass.

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

* Add a test.

2 years agoAdd X509 SAN extension and RFC6125 MatchesHostname (#72304)
Jeremy Barton [Wed, 20 Jul 2022 03:43:07 +0000 (20:43 -0700)]
Add X509 SAN extension and RFC6125 MatchesHostname (#72304)

* Add X509 SAN extension and RFC6125 MatchesHostname

* Address feedback

* Make macOS happy

* Make macOS happier

* Small test enhancements

* Add new X.509 extensions into CryptoConfig tests

* Apply feedback

* Clarify the position on SRV-ID and URI-ID matching in API docs and tests
* Add some more IPv6 tests
* Delete a now-redundant test
* Change a dead if to an assert.

2 years ago[libs] Add EventSourceSupport to CountersTest (#72484)
Mitchell Hwang [Wed, 20 Jul 2022 03:37:55 +0000 (23:37 -0400)]
[libs] Add EventSourceSupport to CountersTest (#72484)

2 years agoMove UnsupportedOSPlatform from class to methods for MD5 and HMACMD5 (#72488)
Kevin Jones [Wed, 20 Jul 2022 03:37:02 +0000 (23:37 -0400)]
Move UnsupportedOSPlatform from class to methods for MD5 and HMACMD5 (#72488)

* Move UnsupportedOSPlatform from class to methods for MD5 and HMACMD5

* Code review feedback

2 years agoUpdate recursive resource load message (#72480)
Dan Moseley [Wed, 20 Jul 2022 03:35:57 +0000 (21:35 -0600)]
Update recursive resource load message (#72480)

* Update recursive resource load message

* simplify

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

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* break

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoFix PAL GetFullPathNameA test3 (#72492)
Jan Vorlicek [Wed, 20 Jul 2022 03:34:19 +0000 (05:34 +0200)]
Fix PAL GetFullPathNameA test3 (#72492)

This test had a missing path separator character.

2 years agoAdding rust tests for match boundaries (#72490)
Jose Perez Rodriguez [Wed, 20 Jul 2022 02:25:58 +0000 (21:25 -0500)]
Adding rust tests for match boundaries (#72490)

2 years agoAdd analyzer for validating NativeMarshallingAttribute and parameters of CustomMarsha...
Jeremy Koritzinsky [Wed, 20 Jul 2022 02:21:45 +0000 (19:21 -0700)]
Add analyzer for validating NativeMarshallingAttribute and parameters of CustomMarshallerAttribute (#72299)

* Remove unused resource strings

* Update analyzer to check for correct usage of NativeMarshallingAttribute and MarshalUsingAttribute

* Fix a few bugs in the nested generics handling. Move all generic resolution into specialized functions in ManualTypeMarshallingHelper.

Enable using a marshaller entry-point type that has marshallers for more than one managed type.

* Split the NativeMarshallingAttribute analyzer and the CustomMarshallerAttribute analyzer into separate analyzers.

Add more tests for more generic arity scenarios.

* PR feedback and add a test to the generator suite to validate that the generator can use the improved generics handling.

* Rename tests and reword comment.

2 years agoRe-enable test that passes locally (#72491)
Jeremy Koritzinsky [Wed, 20 Jul 2022 02:20:59 +0000 (19:20 -0700)]
Re-enable test that passes locally (#72491)

Re-enable the test that was disabled against https://github.com/dotnet/runtime/issues/64419. It looks like one of the many layout fixes this release already fixed this test locally.

Fixes #64419

2 years agoHandle blittable byref returns in built-in marshalling (#72433)
Jan Kotas [Wed, 20 Jul 2022 01:22:04 +0000 (18:22 -0700)]
Handle blittable byref returns in built-in marshalling (#72433)

Fixes #72316

2 years agoFix Configuration Binder Test with WASM and Trimming (#72485)
Tarek Mahmoud Sayed [Wed, 20 Jul 2022 00:57:30 +0000 (00:57 +0000)]
Fix Configuration Binder Test with WASM and Trimming (#72485)

2 years ago[mono][aot] Avoid an assert when encoding fnptr classes. (#72479)
Zoltan Varga [Wed, 20 Jul 2022 00:23:25 +0000 (20:23 -0400)]
[mono][aot] Avoid an assert when encoding fnptr classes. (#72479)

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

2 years agoDon't run optJumpThreading when fgCurBBEpochSize != (fgBBNumMax + 1) (#72440)
Egor Bogatov [Tue, 19 Jul 2022 22:46:21 +0000 (00:46 +0200)]
Don't run optJumpThreading when fgCurBBEpochSize != (fgBBNumMax + 1) (#72440)

2 years agoConvert tar header struct to class (#72472)
Carlos Sanchez [Tue, 19 Jul 2022 22:33:22 +0000 (15:33 -0700)]
Convert tar header struct to class (#72472)

* Make TarHeader a class.

* Make TarHeader sealed.
Simplify return value of async methods (one value instead of tuple).
Use nullability where TarHeader is returned or out'd.
Move method to get correct entry type to TarHelpers. Reuse it in TarEntry conversion constructor.

* Adjust nullability of non-common header string fields.

* Update comment of TryGetNextHeader, since it's now static.

* Merge TarHeader constructors into a single one with defaults.

* Make TryGetNextEntryHeader signature similar to the async version. This will help with de-duplication in the next PR.

Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
2 years agoNative AOT runtime changes for multiple package conflict (#72346)
Lakshan Fernando [Tue, 19 Jul 2022 22:16:48 +0000 (15:16 -0700)]
Native AOT runtime changes for multiple package conflict (#72346)

* Native AOT runtime changes for multiple package conflict

* Partial FB fixes

2 years agoGuard against unreachable remote server in Sockest TelemetryTest (#72446)
Miha Zupan [Tue, 19 Jul 2022 22:14:48 +0000 (15:14 -0700)]
Guard against unreachable remote server in Sockest TelemetryTest (#72446)

2 years agoCorrectly find the node to fix in regex generator codefix (#72079)
Youssef Victor [Tue, 19 Jul 2022 21:52:24 +0000 (23:52 +0200)]
Correctly find the node to fix in regex generator codefix (#72079)

Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
2 years agoStrip localized System.CommandLine resources from CoreCLR tools (#72478)
Jan Kotas [Tue, 19 Jul 2022 21:37:25 +0000 (14:37 -0700)]
Strip localized System.CommandLine resources from CoreCLR tools (#72478)

2 years agoAdd missing docs for RegexRunner.Scan (#72453)
Stephen Toub [Tue, 19 Jul 2022 19:38:35 +0000 (15:38 -0400)]
Add missing docs for RegexRunner.Scan (#72453)

2 years agoAdd missing docs for PeriodicTimer (#72454)
Stephen Toub [Tue, 19 Jul 2022 19:38:24 +0000 (15:38 -0400)]
Add missing docs for PeriodicTimer (#72454)

2 years agoAdd missing System.Timers.Timer docs (#72455)
Stephen Toub [Tue, 19 Jul 2022 19:38:13 +0000 (15:38 -0400)]
Add missing System.Timers.Timer docs (#72455)

2 years agoMake PhysicalFileProvider polling more resilient to IO exceptions (#72462)
David Cantú [Tue, 19 Jul 2022 18:33:00 +0000 (13:33 -0500)]
Make PhysicalFileProvider polling more resilient to IO exceptions (#72462)

2 years agoAvoid adding an HttpClient.Timeout message to ConnectTimeout exceptions (#72274)
Miha Zupan [Tue, 19 Jul 2022 17:42:31 +0000 (10:42 -0700)]
Avoid adding an HttpClient.Timeout message to ConnectTimeout exceptions (#72274)

* Avoid adding an HttpClient.Timeout message to ConnectTimeout exceptions

* Avoid wrapping unknown OCEs as well

* Update comment

Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
2 years agoRevert "Support OpenSSL-based MsQuic on Windows (#72262)" (#72456)
Natalia Kondratyeva [Tue, 19 Jul 2022 17:30:16 +0000 (10:30 -0700)]
Revert "Support OpenSSL-based MsQuic on Windows (#72262)" (#72456)

This reverts commit 3e5f0c1a62be4f6aa315443d208b1640799a9deb.

2 years ago[wasm][debugger] Removed duplicated testcases as a follow-up for #70560 (#71827)
Ilona Tomkowicz [Tue, 19 Jul 2022 16:59:08 +0000 (18:59 +0200)]
[wasm][debugger] Removed duplicated testcases as a follow-up for #70560 (#71827)

* Renaming.

* Remoe duplicated testcases.

* Added missing awaits.

* Testing expressions with spaces, fixed indentation

* Applied @radical's comments.

2 years agoClean up of tests from V1/V2 marshaller shape split (#72392)
Elinor Fung [Tue, 19 Jul 2022 16:18:58 +0000 (09:18 -0700)]
Clean up of tests from V1/V2 marshaller shape split (#72392)

2 years agoWorking Windows image for HttpStress and SslStress (#72271)
Anton Firszov [Tue, 19 Jul 2022 16:13:08 +0000 (18:13 +0200)]
Working Windows image for HttpStress and SslStress (#72271)

2 years ago[QUIC] Fixed disabled receives if buffer gets drained before RECEIVE returns (#72439)
Marie Píchová [Tue, 19 Jul 2022 16:00:17 +0000 (18:00 +0200)]
[QUIC] Fixed disabled receives if buffer gets drained before RECEIVE returns (#72439)

* Fixed disabled receives if buffer gets drained before RECEIVE returns

* Feedback

2 years ago[iOS] Bump simulator test queues to use MacOS 12 (#72384)
Steve Pfister [Tue, 19 Jul 2022 14:55:40 +0000 (07:55 -0700)]
[iOS] Bump simulator test queues to use MacOS 12 (#72384)

2 years agoJIT: Avoid using type info from GDV guesses during import (#72376)
Jakob Botsch Nielsen [Tue, 19 Jul 2022 14:54:18 +0000 (16:54 +0200)]
JIT: Avoid using type info from GDV guesses during import (#72376)

We can only use this type information after they have been expanded and
if we are on the happy path.

Fix #72363

2 years agoExpand API documentation of contract customization APIs. (#72388)
Eirik Tsarpalis [Tue, 19 Jul 2022 14:39:18 +0000 (17:39 +0300)]
Expand API documentation of contract customization APIs. (#72388)

* Expand API documentation of contract customization APIs.

* Address feedback

* Address feedback

* Fix handling of JsonPolymorphismOptions resolution in JsonTypeInfoKind.None

2 years agoBlock Matrix4x4CreateFromAxisAngleTest test on NativeAOT (#72437)
Michal Strehovský [Tue, 19 Jul 2022 14:36:14 +0000 (23:36 +0900)]
Block Matrix4x4CreateFromAxisAngleTest test on NativeAOT (#72437)

2 years ago#60582 enable ExtractToDirectoryExtension_Unicode on ios/tvos (#72091)
Meri Khamoyan [Tue, 19 Jul 2022 12:59:02 +0000 (16:59 +0400)]
#60582 enable ExtractToDirectoryExtension_Unicode on ios/tvos (#72091)

* #60582 enable ExtractToDirectoryExtension_Unicode on ios/tvos

2 years ago#65560 Added FileCreateCaseSensitive for ios/tvos simulators (#71948)
Meri Khamoyan [Tue, 19 Jul 2022 12:58:29 +0000 (16:58 +0400)]
#65560 Added FileCreateCaseSensitive for ios/tvos simulators (#71948)

* #65560 added FileCreateCaseSensitive parameter for ios/tvos simulator

2 years agoEnsure reflection-based metadata instantiations unwrap TargetInvocationException...
Eirik Tsarpalis [Tue, 19 Jul 2022 10:33:10 +0000 (13:33 +0300)]
Ensure reflection-based metadata instantiations unwrap TargetInvocationException. (#72397)

* Ensure reflection-based metadata instantiations unwrap TargetInvocationException.

* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/DefaultJsonTypeInfoResolver.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years ago[QUIC] Listener AcceptConnectionAsync propagates errors from failed handshake (#72390)
Marie Píchová [Tue, 19 Jul 2022 10:29:41 +0000 (12:29 +0200)]
[QUIC] Listener AcceptConnectionAsync propagates errors from failed handshake (#72390)

* Propagate exception from handshake to the caller of AcceptConnectionAsync

* ThrowsAnyAsync -> ThrowsAsync for QuicException since there's no hierarchy anymore

* Added tests

* Feedback

2 years agoAdd an area-owners.json file. Remove unused area. Format MD table. (#72309)
Jeff Handley [Tue, 19 Jul 2022 09:15:28 +0000 (02:15 -0700)]
Add an area-owners.json file. Remove unused area. Format MD table. (#72309)

* Add an area-owners.json file. Remove unused area. Format MD table.

* Update docs/area-owners.json

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
2 years agoJIT: Remove GTF_CALL_M_UNMGD_THISCALL and badcode on thiscall with 0 args (#71882)
Jakob Botsch Nielsen [Tue, 19 Jul 2022 08:53:09 +0000 (10:53 +0200)]
JIT: Remove GTF_CALL_M_UNMGD_THISCALL and badcode on thiscall with 0 args (#71882)

Fix #71874

2 years agoLinker to NativeAOT sync (#71485)
Vitek Karas [Tue, 19 Jul 2022 08:19:48 +0000 (01:19 -0700)]
Linker to NativeAOT sync (#71485)

This brings changes from the linker repo to ilc roughly as of a week ago. This required some non-trivial changes to the code either already in ilc or the one coming from linker:
* Port of CompilerGeneratedState
  * Modify it to use lock free hashtable (since it's a global cache and thus needs to be thread safe)
  * In ILC it requires to operate on generic definitions of everything - so add asserts and code to guarantee this
  * It's not a static class anymore, so pass the instance around as necessary
  * Requires IL access, so needs ILProvider on input
* Cyclic dependency between Logger and CompilerGeneratedState, one needs the instance of the other to work. For now solved by setting it through a property on CompilerGeneratedState
* Split of ReflectionMethodBodyScanner into AttributeDataFlow and GenericParameterDataFlow - mostly direct port from linker
  * The AttributeDataFlow works slightly differently in ilc so adopted the code there
* Changes to DiagnosticContext
  * Can selectively disable Trim, AOT, Single-File diagnostics - used to correctly apply RUC, RDC and RAF suppressions
* Improve handling of RUC and similar warnings in ReflectionMarker
* Added ILOffset to MessageOrigin
  * Even though we already store file/column, the ILOffset is necessary since we use the MessageOrigin as a key in dictionary for recorded patterns and thus we need a way to make the origin unique for each callsite (and file/line/column might not be unique or if there's no PDB those will be null anyway).
* Enable Equality/HashCode implementation on MessageOrigin, still no CompareTo since we don't need it for anything right now.

2 years agoUse TlsAlertMessage enum to make exception messages more readable (#72370)
Radek Zikmund [Tue, 19 Jul 2022 07:00:06 +0000 (09:00 +0200)]
Use TlsAlertMessage enum to make exception messages more readable (#72370)

2 years agoAllow IL scanner's dependency graph be GC'd (#72430)
Michal Strehovský [Tue, 19 Jul 2022 05:40:44 +0000 (14:40 +0900)]
Allow IL scanner's dependency graph be GC'd (#72430)

We don't need to keep the graph in the memory once we're done scanning.

Verified it gets collected now by adding a finalizer to `ILScanNodeFactory` and having it print something. It didn't get collected previously. If I'm measuring it right, it was rooting about 17 MB of objects in memory on a hello world.

2 years agoMove llvm-libunwind to src/native/external (#72418)
Adeel Mujahid [Tue, 19 Jul 2022 05:39:59 +0000 (08:39 +0300)]
Move llvm-libunwind to src/native/external (#72418)

2 years agoBlock SaveWmfAsPngDoesntChangeImageBoundaries (#72416)
Michal Strehovský [Tue, 19 Jul 2022 05:36:02 +0000 (14:36 +0900)]
Block SaveWmfAsPngDoesntChangeImageBoundaries (#72416)

2 years ago[mono][aot] Fix the adding of generic instances referenced by gshared methods. (...
Zoltan Varga [Tue, 19 Jul 2022 05:12:21 +0000 (01:12 -0400)]
[mono][aot] Fix the adding of generic instances referenced by gshared methods. (#72377)

These methods store their data in a MONO_PATCH_INFO_GSHARED_METHOD_INFO which was not handled properly.

2 years agoAdd ObjectDisposedException.ThrowIf XML comments (#72411)
Stephen Toub [Tue, 19 Jul 2022 03:49:45 +0000 (23:49 -0400)]
Add ObjectDisposedException.ThrowIf XML comments (#72411)

* Add ObjectDisposedException.ThrowIf XML comments

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
2 years agoRemove unnecessary call to Path.GetTempPath (#72414)
Eric Erhardt [Tue, 19 Jul 2022 03:47:08 +0000 (21:47 -0600)]
Remove unnecessary call to Path.GetTempPath (#72414)

This line was leftover after https://github.com/dotnet/runtime/commit/6de7147b9266d7730b0d73ba67632b0c198cb11e.

2 years agoFix typo (#72398)
Jan Kotas [Tue, 19 Jul 2022 03:46:23 +0000 (20:46 -0700)]
Fix typo (#72398)

Also, add test that would catch it.

2 years agoScan calli dependencies (#72413)
Jan Kotas [Tue, 19 Jul 2022 03:44:41 +0000 (20:44 -0700)]
Scan calli dependencies (#72413)

Contributes to #72316

2 years ago[NativeAOT] thread suspension on Unix (#71187)
Vladimir Sadov [Tue, 19 Jul 2022 03:20:40 +0000 (20:20 -0700)]
[NativeAOT] thread suspension on Unix (#71187)

* missing pieces

* fixes

* pThreadToHijack

* NATIVE_CONTEXT

* at safe point

* enable TestConcurrentIsBackgroundProperty

* couple tweaks

* fixes after rebasing

* temporarily do not handle multireg returns

* support single reg return hijack

* disable return hijacking for ARM64

* enable safe point suspend

* enable multireg

* make gcc happy

* fixws for win-x64

* Do not wait for Unhijack.

* crude check for VirtualUnwind issue in inline suspend and some tweaks

* disable hijacking on ARM64/UNIX

* preserve  xmm1

* IsUnwindable check

* detect not-unwindable code, at least the most common cases.

* IsUnwindable tweaks

* detect epilogs

* hijack in epilogues.

* PR feedback (refactoring)

* Check the trap flag in `HijackCallback`  (optimization)

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* PR feedback (refactor/renames)

* handle "int 3" as not unwindable, not hijackable.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years agoLimit core-count to 8 (#72396)
Kunal Pathak [Tue, 19 Jul 2022 03:18:49 +0000 (20:18 -0700)]
Limit core-count to 8 (#72396)

2 years agoConfigurationBinder handles ISet<> (#68133)
Steve Dunn [Tue, 19 Jul 2022 02:58:31 +0000 (03:58 +0100)]
ConfigurationBinder handles ISet<> (#68133)

2 years agoSupport guaranteed unmarshal for stateless collection marshalling (#72205)
Elinor Fung [Mon, 18 Jul 2022 22:06:53 +0000 (15:06 -0700)]
Support guaranteed unmarshal for stateless collection marshalling (#72205)

- Handle guaranteed unmarshal for stateless collection marshalling (`AllocateContainerForManagedElementsFinally`)
- Add tests for guaranteed unmarshal for stateless and stateful collection marshalling

2 years agoEnable CopyConstructorMarshaler after #71792 fix (#72383)
Kunal Pathak [Mon, 18 Jul 2022 21:18:40 +0000 (14:18 -0700)]
Enable CopyConstructorMarshaler after #71792 fix (#72383)

2 years agoFix error handling for COM initialization failures during thread startup (#72353)
Jan Kotas [Mon, 18 Jul 2022 19:42:36 +0000 (12:42 -0700)]
Fix error handling for COM initialization failures during thread startup (#72353)

Fixes #72352

2 years ago[wasm][tests][eat] Enabling tests related to custom attributes. (#72359)
Ilona Tomkowicz [Mon, 18 Jul 2022 19:32:46 +0000 (21:32 +0200)]
[wasm][tests][eat] Enabling tests related to custom attributes. (#72359)

2 years agoRemove npm audit call in CI (#72386)
Larry Ewing [Mon, 18 Jul 2022 19:08:41 +0000 (14:08 -0500)]
Remove npm audit call in CI (#72386)

2 years ago[QUIC] API changes follow up (#72366)
Marie Píchová [Mon, 18 Jul 2022 19:01:08 +0000 (21:01 +0200)]
[QUIC] API changes follow up (#72366)

* Comments

* CanRead and CanWrite take into account whether the side is closed or not.

* PeerCertificate test

* Reverted CanRead/CanWrite; comments; tests for QuicStream task properties; fixed behavior of ResettableValueTaskSource

* Log if certificate is not selected

2 years agoUtilize ProtocolException for HTTP/2 in HttpStress (#72034)
Anton Firszov [Mon, 18 Jul 2022 18:52:27 +0000 (20:52 +0200)]
Utilize ProtocolException for HTTP/2 in HttpStress (#72034)

2 years agoAlways use live host (#71725)
Andy Gocke [Mon, 18 Jul 2022 18:27:40 +0000 (11:27 -0700)]
Always use live host (#71725)

Eliminates package dependency on the host during build and test. This change adds steps to various build
pipelines to build the host where they wouldn't before. It also stops us from building the Microsoft.NETCore.{DotnetHost,DotNetHostPolicy,DotNetHostResolver}, since those weren't necessary beyond this internal usage.

2 years agoFix incorrect none_no value when NUMA node is undefinied in distribute_other_procs...
piotrzl1989 [Mon, 18 Jul 2022 16:37:51 +0000 (18:37 +0200)]
Fix incorrect none_no value when NUMA node is undefinied in distribute_other_procs (#67008) (#69082)

Thanks for your contribution.

2 years ago[PERF][MAUI] Add Maui runs for net7.0 (#71979)
Parker Bibus [Mon, 18 Jul 2022 16:30:02 +0000 (11:30 -0500)]
[PERF][MAUI] Add Maui runs for net7.0 (#71979)

* Part 1 of adding Net7.0: Duplicated building work and added the names in the obvious places they needed to be.

* Add net6 versions of android and iOS scenarios, removing Mono ones from them since we are not building mono for net6

* Finished duplicating net6 versions of stuff in perf.yml and perf-job.yml (Section that redownloads jobs for perf running)

* Renamed runtimetype to mobile for net6 stuff. Adding file copying to the setup files so mono is not copied for net6. Updated the runkind for net6 runs.

* Fix dependency names.

* Undo renaming of the build artifacts.

* Setup target and prop files for net6 and set them for the net6 pipeline.

* Added back in dotnet version download to download the latest version, and added specific dotnet calls back into the build perf maui apps.

* Remove mono startup testing from android net6 mobile testing.

* Lowered the number of BlazorMaui iOS startup iterations from 7 to 5.

* Set version to one in preview.6 to match the net7.0 versions used in rollback file.

* Add setting the result in the blazor ios device startup runs.

* Make the downloaded version more clear by adding Net6 to Net6 app download versions.

2 years agoRemove unnecessary cast for num elements expression (#72302)
Elinor Fung [Mon, 18 Jul 2022 16:26:28 +0000 (09:26 -0700)]
Remove unnecessary cast for num elements expression (#72302)

2 years agoApply all patches
Adeel [Mon, 18 Jul 2022 03:04:42 +0000 (06:04 +0300)]
Apply all patches

Extracted changes from:

* https://github.com/dotnet/corert/commit/a48e1a6702d3678e7de02d36bd689b0c96fddeaa
* https://github.com/dotnet/corert/commit/c6571c6eb7b99afec7d69cd5f52fb3c5058a2e3c
* https://github.com/dotnet/corert/commit/e6ff5433da6027767eb87d7e0891bacddd87645a
* https://github.com/dotnet/corert/commit/4009f5aa449933468487c430a452fe81494f6d46
* https://github.com/dotnet/corert/commit/94f2d8ea3943f7e90cda86ae7b7cb47d3da5a53a
* https://github.com/dotnet/corert/commit/753c19b595773f4fabbba09ef184385324271d45
* https://github.com/dotnet/corert/commit/3d25db5b1c010346bbc480a20646c80ea413492f
* https://github.com/dotnet/corert/commit/3d25db5b1c010346bbc480a20646c80ea413492f
* https://github.com/dotnet/corert/commit/1bd9c3c2472e656d7e2c90b2c8273e99469faf05
* https://github.com/dotnet/corert/commit/b65389a856901b93d8d75851341a79b17ca5e745
* https://github.com/dotnet/corert/commit/d56451ee402459a23ff28fe1eff672d131468580
* https://github.com/dotnet/corert/commit/b059615c47caf5e06a694fa5e846504a808919a5
* https://github.com/dotnet/corert/commit/b059615c47caf5e06a694fa5e846504a808919a5
* https://github.com/dotnet/corert/commit/8157d14c1d82f1dbdb90e654dbc5cacdd74319e7
* https://github.com/dotnet/corert/commit/fd57cf11b863f9478788e5435fd4b92883a08b23
* https://github.com/dotnet/corert/commit/f528e70ce0df27c8609df1c68f3c942c63f1b1d4
* https://github.com/dotnet/corert/commit/ccda70afb67ca55e297e68f8e96a10a903dcbee4
* https://github.com/dotnet/corert/commit/180a175405d76c83e48499a3eebabb952f7133d2
* https://github.com/dotnet/corert/commit/f2526602b0fd2897f9c0cbc637c322c8a167eb80
* https://github.com/dotnet/corert/commit/f2526602b0fd2897f9c0cbc637c322c8a167eb80
* https://github.com/dotnet/corert/commit/68d8ec9e7796865884ab281120ec220bcb284b3e
* https://github.com/dotnet/corert/commit/c01d95a7524173d7622d29b5da0a04fd0446dc32
* https://github.com/dotnet/corert/commit/7f8470d5fc2a86312504972827bd7037471430a4
* https://github.com/dotnet/corert/commit/2dfab60ad1c3d0fe0241b5e2503fb3f8d33e4c22

* https://github.com/dotnet/runtimelab/commit/a89d3cb93c8e872372acb9540c5c1eacc420f45b
* https://github.com/dotnet/runtimelab/commit/07bf6d387ef7d336a06273b8c71805ffc083a1bc
* https://github.com/dotnet/runtimelab/commit/ad25495073466f13deee296360c8c54ec50b8089
* https://github.com/dotnet/runtimelab/commit/11e915e72bef322e53590e10298e8534c815e9f0
* https://github.com/dotnet/runtimelab/commit/666e35a0286bc7a154ad616e4842c44273345430
* https://github.com/dotnet/runtimelab/commit/9a766d3ae49e332bdc6c6545f5d2f02570cf97e2

* https://github.com/dotnet/runtime/commit/3ea30ed321949d238bf97534a2a8cbabf580f238

Co-authored-by: RalfKornmannEnvision <ralf.kornmann@envision-entertainment.de>
Co-authored-by: FabianNitsche <ifab@freenet.de>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Co-authored-by: Sergey Ignatov <sergign60@mail.ru>
Co-authored-by: Morgan Brown <morganbr@users.noreply.github.com>
Co-authored-by: John Doe <github.john.doe@outlook.com>
Co-authored-by: Ivan Arishchenko <36693675+iarischenko@users.noreply.github.com>
Co-authored-by: Andrii Kurdiumov <kant2002@gmail.com>
2 years agoAdd llvm-libunwind v9.0.0
Adeel [Mon, 18 Jul 2022 03:02:24 +0000 (06:02 +0300)]
Add llvm-libunwind v9.0.0

2 years agoRemove nativeaot/libunwind for rebaselining
Adeel [Mon, 18 Jul 2022 02:50:17 +0000 (05:50 +0300)]
Remove nativeaot/libunwind for rebaselining

2 years ago[wasm] Fix failing CI test, and misc fixes (#72293)
Ankit Jain [Mon, 18 Jul 2022 14:48:51 +0000 (10:48 -0400)]
[wasm] Fix failing CI test, and misc fixes (#72293)

* Emit exit code also when a process fails in MonoAOTCompiler, and InstallWorkloadFromArtifacts

* [wasm] host: Use a simple console formatter to emit the output without

.. any prefixes, but still using the logger.

* [wasm] host: Try to find path for the js engine

* [wasm] Host: ensure process event handlers have completed before exiting

2 years ago[wasm] Move interop project refs to common place (#72367)
Radek Doulik [Mon, 18 Jul 2022 14:38:32 +0000 (16:38 +0200)]
[wasm] Move interop project refs to common place (#72367)

So that all the wasm samples have access to the new interop

2 years agoAllocate MsQuicSafeHandle._traceId lazily (#72360)
Radek Zikmund [Mon, 18 Jul 2022 14:00:30 +0000 (16:00 +0200)]
Allocate MsQuicSafeHandle._traceId lazily (#72360)

2 years ago[HTTP/3] Add tests - HttpVersionPolicy.RequestVersionOrHigher (#72357)
Radek Zikmund [Mon, 18 Jul 2022 13:59:59 +0000 (15:59 +0200)]
[HTTP/3] Add tests - HttpVersionPolicy.RequestVersionOrHigher (#72357)

2 years agoSupport OpenSSL-based MsQuic on Windows (#72262)
Radek Zikmund [Mon, 18 Jul 2022 13:59:11 +0000 (15:59 +0200)]
Support OpenSSL-based MsQuic on Windows (#72262)

* 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>
Co-authored-by: Marie Píchová <11718369+ManickaP@users.noreply.github.com>
2 years agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 188456...
dotnet bot [Mon, 18 Jul 2022 12:25:51 +0000 (05:25 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1884564 (#72303)

2 years agoDisabled remaining Tar tests that are failing. (#72355)
Ilona Tomkowicz [Mon, 18 Jul 2022 11:22:59 +0000 (13:22 +0200)]
Disabled remaining Tar tests that are failing. (#72355)

2 years agoDo not consider single-reg bitcasts multi-reg nodes (#72020)
SingleAccretion [Mon, 18 Jul 2022 09:43:53 +0000 (12:43 +0300)]
Do not consider single-reg bitcasts multi-reg nodes (#72020)

* Fix an ARM codegen bug

* Do not consider single-reg bitcasts multi-reg nodes

* Add a test

2 years agoGenerate fewer type loader templates (#72350)
Michal Strehovský [Mon, 18 Jul 2022 09:02:30 +0000 (18:02 +0900)]
Generate fewer type loader templates (#72350)

2 years agoImprove reliability of some SafeHandle creations (#72341)
Stephen Toub [Mon, 18 Jul 2022 02:17:16 +0000 (22:17 -0400)]
Improve reliability of some SafeHandle creations (#72341)

* Improve reliability of some SafeHandle creations

Use the new Marshal.InitHandle to support creating the SafeHandle instance before the native call and then storing the handle after, as is done implicitly as part of interop calls that return SafeHandles.  Also replace some existing such SetHandle methods with Marshal.InitHandle.

* Update WaitSubsystem.Unix.cs

Add InteropServices namespace

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
2 years agoDelete unused field (#72318)
Jan Kotas [Mon, 18 Jul 2022 01:42:31 +0000 (18:42 -0700)]
Delete unused field (#72318)

2 years ago[main] Update dependencies from dotnet/roslyn-analyzers dotnet/msquic (#72319)
dotnet-maestro[bot] [Mon, 18 Jul 2022 00:30:21 +0000 (20:30 -0400)]
[main] Update dependencies from dotnet/roslyn-analyzers dotnet/msquic (#72319)

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220715.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22362.3 -> To Version 7.0.0-preview1.22365.1

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

System.Net.MsQuic.Transport
 From Version 7.0.0-alpha.1.22359.1 -> To Version 7.0.0-alpha.1.22365.1

* Update dependencies from https://github.com/dotnet/msquic build 20220716.1

System.Net.MsQuic.Transport
 From Version 7.0.0-alpha.1.22359.1 -> To Version 7.0.0-alpha.1.22366.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agofix assert in ssl options clone (#72326)
Tomas Weinfurt [Sun, 17 Jul 2022 14:02:19 +0000 (07:02 -0700)]
fix assert in ssl options clone (#72326)

* fix assert in ssl options clone

* add CertificateChainPolicy

* remove extra assert