Ilona Tomkowicz [Thu, 7 Apr 2022 08:33:10 +0000 (10:33 +0200)]
[debugger][wasm] ValueTypeClass refactoring. (#63626)
* Refactoring.
* Added null-indexing check.
* Cleaning ValueTypeClass.
* Moving public method below private fields.
* Applied @radical's comments about readonly fields and method names simplification.
* Rename and correct switch case error.
Switch case should be based on GetValues result, not GetValueTypeClass.
Jeremy Koritzinsky [Thu, 7 Apr 2022 04:53:41 +0000 (21:53 -0700)]
Various fixes for merged test runners on Mono (#67665)
Stephen Toub [Thu, 7 Apr 2022 02:11:06 +0000 (22:11 -0400)]
Remove _caseInsensitive field from RegexInterpreter (#67681)
Jeff Handley [Wed, 6 Apr 2022 23:11:30 +0000 (16:11 -0700)]
System.Runtime no longer needs to enable preview features (#67162)
* System.Runtime no longer needs to enable preview features
* Remove diagnostic suppression around VirtualStaticsInInterfaces
* Remove remaining CA2252 suppressions for VirtualStaticsInInterfaces
Petteri Stenius [Wed, 6 Apr 2022 23:06:38 +0000 (02:06 +0300)]
Fix System.DirectoryServices.Protocols to work on Linux (#67338)
Co-authored-by: Petteri Stenius <petteri.stenius@gmail.com>
Jakob Botsch Nielsen [Wed, 6 Apr 2022 23:04:26 +0000 (01:04 +0200)]
Revert "Enable MSVC standard conformance for JIT sources (#67608)" (#67674)
This reverts commit
548bb581b632b40c8caf1aa39514590b7b183926.
Nikola Milosavljevic [Wed, 6 Apr 2022 22:56:24 +0000 (15:56 -0700)]
Add libssl3 dependency (#67658)
Jeremy Koritzinsky [Wed, 6 Apr 2022 22:47:40 +0000 (15:47 -0700)]
Pin Roslyn version for generators in .NET 7 ref pack (#67599)
Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
dotnet-maestro[bot] [Wed, 6 Apr 2022 21:00:24 +0000 (17:00 -0400)]
[main] Update dependencies from dotnet/linker (#67581)
* Update dependencies from https://github.com/dotnet/linker build
20220404.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22204.1
* Update dependencies from https://github.com/dotnet/linker build
20220405.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22205.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Eirik Tsarpalis [Wed, 6 Apr 2022 20:26:25 +0000 (21:26 +0100)]
Disable HandleCollectionsAsync for OSX x64 (#67662)
Maryam Ariyan [Wed, 6 Apr 2022 20:01:57 +0000 (16:01 -0400)]
Allow access to child providers in ChainedConfigurationProvider (#67610)
Jakob Botsch Nielsen [Wed, 6 Apr 2022 19:32:39 +0000 (21:32 +0200)]
Enable MSVC standard conformance for JIT sources (#67608)
The JIT sources pretty much already compiled under this mode except for
one thing that could just be fixed by removing the code. This will catch
some obvious bugs, like passing 'false' as a pointer.
Zoltan Varga [Wed, 6 Apr 2022 19:22:46 +0000 (21:22 +0200)]
[mono][llvm] Remove support for llvm 9.x, the 11.x support is stable … (#67277)
* [mono][llvm] Remove support for llvm 9.x, the 11.x support is stable enough.
* Use llvm 11.x APIs in some places.
* Remove cmake support for llvm 9.x as well.
AlekseyTs [Wed, 6 Apr 2022 13:54:22 +0000 (06:54 -0700)]
Proposed changes to ECMA 335 for checked user-defined operators (#66714)
C# now supports defining `checked` variants of the following user-defined operators so that users can opt into or out of overflow behavior as appropriate:
* The `++` and `--` unary operators [§11.7.14](https://github.com/dotnet/csharpstandard/blob/draft-v6/standard/expressions.md#11714-postfix-increment-and-decrement-operators) and [§11.8.6](https://github.com/dotnet/csharpstandard/blob/draft-v6/standard/expressions.md#1186-prefix-increment-and-decrement-operators).
* The `-` unary operator [§11.8.3](https://github.com/dotnet/csharpstandard/blob/draft-v6/standard/expressions.md#1183-unary-minus-operator).
* The `+`, `-`, `*`, and `/` binary operators [§11.9](https://github.com/dotnet/csharpstandard/blob/draft-v6/standard/expressions.md#119-arithmetic-operators).
* Explicit conversion operators.
Motivation:
There is no way for a user to declare a type and support both checked and unchecked versions of an operator. This makes it hard to port various algorithms to use the proposed `generic math` interfaces exposed by the libraries team. Likewise, this makes it impossible to expose a type such as `Int128` or `UInt128` without the language simultaneously shipping its own support to avoid breaking changes.
This change adds names for the new checked operators to the specification.
Stephen Toub [Wed, 6 Apr 2022 13:01:14 +0000 (09:01 -0400)]
Disable RegexExperiment tests
These were accidentally left enabled.
Radek Zikmund [Wed, 6 Apr 2022 10:35:17 +0000 (12:35 +0200)]
Disable System.Net.Quic.Tests.QuicStreamTests.WriteAsync_LocalAbort_Throws (#67638)
Contributes to #67612
Stephen Toub [Wed, 6 Apr 2022 10:27:00 +0000 (06:27 -0400)]
Change Regex UnicodeCategoryRanges to use spans (#67576)
* Change Regex UnicodeCategoryRanges to use spans
This avoids the overhead of allocating this data in large byte arrays.
* Clean up after merge
Stephen Toub [Wed, 6 Apr 2022 10:24:22 +0000 (06:24 -0400)]
Improve handling of more common Regex sets (#67365)
- Today for a set like [\r\n], we'll emit a comparison that compares the char to each of '\r' and '\n', but for a set like [^\r\n], we end up falling back to emitting a lookup table. With this PR, we simply use the existing support for the non-negating case, just negating the result.
- Today for a set like [\p{IsGreek}\p{IsGreekExtended}] that ends up being two ranges, we'll fall back to our lookup table. With this PR, we'll emit it as two range checks.
- Today for a set like [A-Za-z], we'll fall back to our lookup table. As a special case of two-range support, with this PR we'll now recognize that these ranges are just one bit flip away from each other, and we'll employ the normal ASCII casing to do a single range comparison against the input or'd with a mask.
- Today as a fallback, we employ a lookup table stored in a string; this requires a bounds check, dereferencing the string object, doing the math to find the right index, doing the math to find the right bit, etc. With this PR, for sets composed only of ranges where the exclusiveMax - inclusiveMin <= 64, with this PR we'll now emit it as a lookup into a ulong that's done in a branchless fashion and is much faster.
- It appears to be relatively common for folks to use [\d\D], [\w\W], or [\s\S] as a simple way of saying "match anything"; RegexOptions.Singleline changes '.' to mean this as well. We already have special handling for '.' with Singleline as "AnyClass"... this just normalizes those other common representations into the same shape so that everyhing else recognizes them accordingly.
- Today when we see an AnyClass, we emit a nonsense comparison that always results in true (or false for negations); that's because, for a while, the expression given to the matching routine may have had side effects. There are no longer side effects, though, so it's ok to just emit "true" or "false" directly and make the operation cheaper.
- For every optimization we have in MatchCharacterClass, we should always be able to handle negation trivially.
- Handle character classes composed of multiple UnicodeCategories. This helps with composed categories, like \p{N}.
- Fix hard-coded char class strings for \W and \S. There are multiple ways to invert a RegexCharClass string: you can invert the whole string by just setting the invert flag, or you can invert all the individual components, e.g. if the string is composed of only categories, invert each category. The hardcoded string the parser uses when you write \W simply sets the negated bit, but this causes problems if \W is used as [\W], because then the individual components are added into a larger set that doesn't have negation set. And that means \W and [\W] result in different strings, which means any place we special-case the string for \W, we don't recognize [\W]. The same applies to \S. This commit changes the hardcoded string for \W and \S to use the more canonical form. Also, the implementation generally uses "set" and "class" interchangeably, but when specifying the ECMA-related strings, it uses "set" to actually mean "ranges", which is very confusing. I've changed them.
Katelyn Gadd [Wed, 6 Apr 2022 09:27:12 +0000 (02:27 -0700)]
Introduce write barriers in wasm bindings, migrate to ref/out params, add gc safe regions (#65994)
Introduce write barriers in key parts of the wasm bindings and migrate most code to use ref/out parameters instead of passing raw managed pointers as arguments or return values.
Introduced MonoObjectRef typescript type and corresponding 'R' signature char (for 'ref/out object')
Marked various old/unsafe code as deprecated
Fixed some incorrect rooting in websocket APIs
Introduced 'volatile' attribute on various C pointers in the bindings
Added GC unsafe/safe regions in key parts of the C bindings
Expanded exported APIs
Adam Sitnik [Wed, 6 Apr 2022 09:07:44 +0000 (11:07 +0200)]
log entire content to see which assertion fails (#67586)
* add AssertExtensions.Eqal(string, string) that logs entire content if provided strings are not equal
* log entire content to see which assertion fails
Radek Zikmund [Wed, 6 Apr 2022 08:08:50 +0000 (10:08 +0200)]
Add CipherSuitesPolicy support for MsQuic (#67239)
* Add CipherSuitesPolicy support for MsQuic
* Add tests
* Code review feedback
* Fix test
Stephen Toub [Wed, 6 Apr 2022 02:58:43 +0000 (22:58 -0400)]
Re-enable a few Regex source generator tests (#67585)
Jose Perez Rodriguez [Wed, 6 Apr 2022 02:25:24 +0000 (19:25 -0700)]
Changing the logic for how we deal with RegexOptions.IgnoreCase matching. (#67184)
* Changing the logic for how we deal with RegexOptions.IgnoreCase
matching.
* Addressing first round of feedback
* Addressing more feedback.
* - Ensure that Backreferences use the same case behavior that the casing table does when using IgnoreCase.
- Addressing more feedback.
* Apply suggestions from code review
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Address more feedback
* Fix allocation regression for patterns with a lot of ascii letters
* Skip few tests in Browser and .NET Framework
* Skip one more test that shouldn't be ran on wasm
* Address more PR Feedback
* More feedback
* Skip tests that are failing in NLS-globalization queues
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Andrii Kurdiumov [Wed, 6 Apr 2022 00:51:22 +0000 (06:51 +0600)]
Use ComSmartPtr in tests (#67584)
* Use ComSmartPtr in tests
See https://github.com/dotnet/winforms/pull/6743#discussion_r837019661 for discussion
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Steve Pfister [Tue, 5 Apr 2022 22:50:29 +0000 (18:50 -0400)]
[iOS] Disable OptionsMonitorTest.TestCurrentValueDoesNotAllocateOnceValueIsCached (#67613)
Created a tracking issue so that it can be fixed at a later date and not block the extra-platforms rolling build.
https://github.com/dotnet/runtime/issues/67611
Aleksey Kliger (λgeek) [Tue, 5 Apr 2022 20:45:16 +0000 (16:45 -0400)]
[tests] Re-enable generic math Create tests on iOS (#67542)
Fixes https://github.com/dotnet/runtime/issues/61920
Fixed by https://github.com/dotnet/runtime/pull/66739
Jeremy Koritzinsky [Tue, 5 Apr 2022 19:50:43 +0000 (12:50 -0700)]
Move tests that touch the network to outerloop only for infra-stability reasons (#67593)
* Move tests that touch the network to outerloop only for infra-stability reasons
* PR feedback
Koundinya Veluri [Tue, 5 Apr 2022 19:41:30 +0000 (12:41 -0700)]
Disable deleting call counting stubs (#67563)
It's currently incompatible with the W^X changes, and there's another rare issue that may cause a crash when checking if a precode target is a jump stub.
Memory impact on x64:
Calling and tiering up ~10 K empty methods causes the following amount of memory to remain.
Methods with stubs: 10139
Memory usage: ~876 KB
Memory usage per method with stub: ~88.5 B
Committed memory at the end after GC: ~9.5 MB
On a larger test case that compiles Roslyn sources 16 times in the same process, the numbers are similar.
Methods with stubs: 22141
Memory usage: ~1913 KB
Memory usage per method with stub: ~88.5 B
Committed memory at the end after GC: 90-95 MB
It should be possible to reduce the leaked memory per method with stub from ~88.5 B to about 10-16 B depending on architecture in the future if necessary.
- Fixes https://github.com/dotnet/runtime/issues/66924
- Fixes https://github.com/dotnet/runtime/issues/66424
Andy Gocke [Tue, 5 Apr 2022 19:06:34 +0000 (12:06 -0700)]
Revert "Publish crossgen as AOT if supported by the target platform (#65948)" (#67590)
This reverts commit
0d1e04ba2a9ebc9d21a7f65db00407dd0056b547.
Elinor Fung [Tue, 5 Apr 2022 18:26:09 +0000 (11:26 -0700)]
Update error message for runtime not found (#67564)
Jakob Botsch Nielsen [Tue, 5 Apr 2022 17:05:35 +0000 (19:05 +0200)]
Fix too wide constant stores to parameters on macOS (#67336)
Fix #67331
Radek Zikmund [Tue, 5 Apr 2022 13:54:35 +0000 (15:54 +0200)]
[QUIC] Call SendResettableCompletionSource.CompleteException in AbortWrite (#67341)
* Call SendResettableCompletionSource.CompleteException in AbortWrite
* Add test
* fixup! Add test
* Use loop to make the test more robust
Aleksey Kliger (λgeek) [Tue, 5 Apr 2022 02:02:34 +0000 (22:02 -0400)]
Don't pass --minimize to Xcode 13.3 dsymutil (#67543)
* Don't pass --minimize to Xcode 13.3 dsymutil
Fixes https://github.com/dotnet/runtime/issues/66770
New xcode command line tools dropped support for the `--minimize` option (which
is now the default).
The related LLVM change is https://github.com/llvm/llvm-project/commit/
5d07dc897707f877c45cab6c7e4b65dad7d3ff6d
* fix build with older Xcodes
use a list of options, not a single option with a space in it
Co-authored-by: Kevin Jones <vcsjones@github.com>
Bruce Forstall [Tue, 5 Apr 2022 00:43:03 +0000 (17:43 -0700)]
Don't force `TieredCompilation=0` for SuperPMI replay job (#67489)
Use whatever flags already are baked into the SuperPMI collection.
Ankit Jain [Tue, 5 Apr 2022 00:19:35 +0000 (20:19 -0400)]
Disable `Microsoft.Extensions.Hosting.WindowsServices.Tests` for (#67550)
* Disable `Microsoft.Extensions.Hosting.WindowsServices.Tests` for
.. non-windows platforms.
* UseWindowsServiceTests: Mark the test as windows only
* Fix build
Tanner Gooding [Mon, 4 Apr 2022 22:40:36 +0000 (15:40 -0700)]
Updating the generic math interfaces according to the last API review (#67453)
* Create INumberBase and allow Complex to implement it
* Move DivRem to only be available for IBinaryInteger
* Split apart various floating-point interfaces for better extensibility
* Annotate the generic math interfaces to implement on BigInteger and Complex
* Moving various generic math interfaces into the System.Numerics namespace
* Split various generic math interfaces into their own file for easier discoverability
* IParseable -> IParsable
* Update ISignedNumber and IUnsignedNumber to be "marker" interfaces
* PI -> Pi and IEEERemainder -> Ieee754Remainder
* Removing the various TInteger constraints in favor of using int where feasible
* Moving IDivisionOperators and ISpanFormattable down to INumberBase
* Moving CopySign, IsNegative, MaxMagnitude, and MinMagnitude down to INumber
* Create<TOther> -> CreateChecked<TOther>
* Updating various generic math tests
* Update src/libraries/System.Private.CoreLib/src/System/Numerics/INumber.cs
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
* Fixing the reference assembly for System.Numerics.Complex
* Removing generic math support from System.Numerics.Complex until the trimming issue can be resolved
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
Aaron Robinson [Mon, 4 Apr 2022 20:50:23 +0000 (13:50 -0700)]
Disable some interop tests on Win-ARM32 (#67553)
Ankit Jain [Mon, 4 Apr 2022 20:14:13 +0000 (16:14 -0400)]
[wasm][debugger] Some test fixes (#67373)
* [wasm] Bump timeout for debugger tests to 30mins, to accomodate EvaluateOnCallFrameTests
* [wasm][debugger] statically init App.static_method_table
`debugger-driver.html` has a `App.init` function (called from `onDotnetReady`)
that init's `App.static_method_table`. But this function can
race with a test, which might call `invoke_static_method`, and that
would fail because `App.static_method_table` is not defined yet.
* Improve logging slightly to help debug random failures
* Update line numbers in tests
Ankit Jain [Mon, 4 Apr 2022 19:44:41 +0000 (15:44 -0400)]
Revert "[main] Update dependencies from dotnet/linker (#67381)" (#67539)
This reverts commit
a0f7927c0ce4cfa8d1c832e70461b0145389a8be.
It broke wasm builds: https://github.com/dotnet/runtime/pull/67381
devsko [Mon, 4 Apr 2022 18:28:28 +0000 (20:28 +0200)]
Concatenate multiple cookies with semicolon (#67455)
* Concatenate cookies with semicolon
* Restore tests that run on .NET Framework
* Change Cookie header to Custom
* PR feedback
Michal Strehovský [Mon, 4 Apr 2022 16:41:37 +0000 (01:41 +0900)]
Make handling of invalid code more robust (#67524)
* Call `EnsureLoadableMethod` from scanner, same as we do in JitInterface.
* Make scan/compile diffing less sensitive to differences caused by invalid IL.
Michal Strehovský [Mon, 4 Apr 2022 16:30:33 +0000 (01:30 +0900)]
Fix handling of makeref/refvalue in generic code (#67523)
* Fix handling of makeref/refvalue in generic code
Found in Pri0 tests. We didn't have any coverage for TypedReference in smoke tests.
* Update Generics.cs
Viktor Hofer [Mon, 4 Apr 2022 15:25:52 +0000 (17:25 +0200)]
Fix parent test folder name (#67528)
Marcelo M. Maciel [Mon, 4 Apr 2022 12:44:14 +0000 (09:44 -0300)]
Updated branch name, from master to main. (#67522)
madelson [Mon, 4 Apr 2022 11:59:23 +0000 (07:59 -0400)]
Avoid pre-allocating large arrays in some scenarios for Enumerable.Chunk (#67210)
* Avoid pre-allocating large arrays in some scenarios for Enumerable.Chunk().
Fix #67132
* Switch Chunk() to use List-based implementation.
See discussion here:
https://github.com/dotnet/runtime/pull/67210#discussion_r836561697
* Address feedback from https://github.com/dotnet/runtime/pull/67210/files
Egor Bogatov [Mon, 4 Apr 2022 09:46:30 +0000 (12:46 +0300)]
JIT: Optimize unused array allocations (#67205)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tom McDonald [Mon, 4 Apr 2022 09:39:25 +0000 (02:39 -0700)]
Disable tests/profiler/eventpipe/eventpipe on JIT stress runs (#66473)
Michal Strehovský [Mon, 4 Apr 2022 04:14:58 +0000 (13:14 +0900)]
Align nodes when `!SupportsRelativePointers` (#67516)
Tomáš Rylek [Sun, 3 Apr 2022 22:44:48 +0000 (00:44 +0200)]
Consistently use AssemblyName in execution script generator (#67449)
Before this change the execution script generator arbitrarily
referred to "InputAssemblyName", "AssemblyName" and
"MSBuildProjectName" w.r.t. names of the scripts and the
executables. This is unfortunate because for merged
ILPROJ projects we need to adjust the assembly name during build.
This simple change makes the scripts consistently refer to
AssemblyName everywhere.
Thanks
Tomas
Egor Bogatov [Sun, 3 Apr 2022 19:16:00 +0000 (22:16 +0300)]
[arm64] Addressing modes for SIMD (#67490)
SingleAccretion [Sun, 3 Apr 2022 18:13:34 +0000 (21:13 +0300)]
Stop using CLS_VAR on x86 (#67335)
Adeel Mujahid [Sun, 3 Apr 2022 16:51:57 +0000 (19:51 +0300)]
Cleanup fp registers assignments from arm64 path (#65629)
Anders Abel [Sun, 3 Apr 2022 16:43:05 +0000 (18:43 +0200)]
Tests for altered references for SignedXml (#67501)
- Fix Null ref on non-existing reference. This is in line with how
the old code worked, it returned false on CheckSignature but didn't
throw on load.
Dan Moseley [Sun, 3 Apr 2022 16:15:44 +0000 (10:15 -0600)]
Skip check of Notepad title on Win 11 (#67495)
Jan Kotas [Sun, 3 Apr 2022 13:52:36 +0000 (06:52 -0700)]
Cleanup legacy interop in System.Security.Principal.Windows (#67479)
Replace Marshal.PtrToStructure and similar methods with unmanaged pointers. Fixes a few AOT compatibility warnings.
dotnet-maestro[bot] [Sun, 3 Apr 2022 08:21:23 +0000 (10:21 +0200)]
[main] Update dependencies from dotnet/linker (#67381)
* Update dependencies from https://github.com/dotnet/linker build
20220330.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22180.1
* Update dependencies from https://github.com/dotnet/linker build
20220331.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22181.1
* Update dependencies from https://github.com/dotnet/linker build
20220401.3
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22178.1 -> To Version 7.0.100-1.22201.3
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Bruce Forstall [Sun, 3 Apr 2022 03:34:31 +0000 (20:34 -0700)]
Fix loop cloning of array of struct with array field (#67130)
Loop cloning needs to parse what morph creates from GT_INDEX nodes
to determine if there are array accesses with bounds checks that
could potentially be optimized. For jagged array access, this can
be a "comma chain" of bounds checks and array element address expressions.
For a case where an array of structs had a struct field, such as
`ValueTuple<int[], int>[]`, cloning was confusing the expression
`a[i].Item1[j]` for the jagged array access `a[i][j]`.
The fix here is to keep track of the type of the `GT_INDEX` node that is
being morphed, in the `GT_BOUNDS_CHECK` node that is created for it.
(This is the only thing cloning parses, to avoid the need to parse
the very complex trees morph can create.) This type is then checked
when parsing the "comma chain" trees. If a non-`TYP_REF` is found (such
as a `TYP_STRUCT` in the above example), no more levels of array indexing
are considered. (`TYP_REF` is what an array object would have, for a jagged
array.)
Fixes #66254.
SingleAccretion [Sun, 3 Apr 2022 03:23:28 +0000 (06:23 +0300)]
Allow null-based ARR_ADDRs (#67486)
We can sometimes see trees like "ARR_ADDR(long 0)" that are the
result of morph's folding logic.
In general it does not seem great to allow folding of BYREFs
into LONGs like that, but it is also not incorrect per-se.
Stephen Toub [Sat, 2 Apr 2022 20:24:37 +0000 (16:24 -0400)]
Add {ReadOnly}Span ctor (internal for now) that takes a ref and no length (#67447)
* Add {ReadOnly}Span ctor (internal for now) that takes an in and no length
* Address PR feedback
* Fix native references to _pointer
madelson [Sat, 2 Apr 2022 19:01:35 +0000 (15:01 -0400)]
Change ConfigurationBinder to avoid reading properties unnecessarily. (#66723)
Co-authored-by: Stephen Halter <halter73@gmail.com>
Wraith [Sat, 2 Apr 2022 18:51:26 +0000 (19:51 +0100)]
build: fix corehost.proj dac injection unquoted path (#67467)
* add quotes around dotnet path
* address feedback
Marie Píchová [Sat, 2 Apr 2022 15:48:06 +0000 (17:48 +0200)]
Fixed msquic method that's become void (#67481)
dotnet bot [Sat, 2 Apr 2022 14:34:54 +0000 (07:34 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 1696596 (#67463)
Eirik Tsarpalis [Sat, 2 Apr 2022 14:30:26 +0000 (15:30 +0100)]
Remove invalid assertion (#67482)
Michal Strehovský [Sat, 2 Apr 2022 10:29:22 +0000 (19:29 +0900)]
Don't consider ShadowMethods reflectable (#67421)
Fixes #65612. This regression was exposed in #62891 - we had a mismatch between what methods are considered reflectable during scanning vs during optimized compilation due to extra array being injected for reflectable `params` methods on instantiated generic types.
There are two potential fixes - either expand the set of methods considered reflectable during scanning, or limit the number of methods considered reflectable in optimized compilation. It doesn't look like we need the expanded set, so going with a restriction instead. The CI may prove me otherwise, so keeping an open mind about this.
Egor Bogatov [Sat, 2 Apr 2022 10:19:06 +0000 (13:19 +0300)]
Disable cast profiling (#67460)
Tomáš Rylek [Sat, 2 Apr 2022 09:25:50 +0000 (11:25 +0200)]
Infra fixes for bugs uncovered by testing of the JIT/Methodical merged tests (#67393)
* Move copying of merged wrapper native components to copynative step
* Move export of test exclusion file before ILLink changing CORE_ROOT
* Fix file mode for test execution bash scripts
* Add out-of-proc test folders to Helix work item payloads
* Fix Helix publishing in the presence of out-of-process tests
* Use a marker file triggered off of a project property to determine which files to skip running the Mono AOT compiler on (some tests fail at AOT time, so we need this to work around that limitation)
* Pass runtimeVariant to the Core_Root construction for the test exclusion list creation
* Don't write the output element when there's no test output. This causes issues with Helix test uploading.
* Write xunit results the way xharness expects to read them for wasm so we correctly report failures and don't report a test harness failure.
* Fix GeneratedTestRunner to build.
* Fix copying native wrappers for merged test runners.
Pre-emptively mark another test as RequiresProcessIsolation as I stumbled upon it while fixing this
* Fix copying of native test components to merged wrapper outputs
Due to Pri0 / Pri1 test grouping we may end up building the
wrapper in a different group than its components. Make sure that
we populate all native components of merged wrapper dependencies
before we copy them over to the merged wrapper output folder.
* Exclude wasm support files.
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
Mukund Raghav Sharma [Sat, 2 Apr 2022 08:37:19 +0000 (01:37 -0700)]
Removed the hard heap limit heap balancing logic for regions + UOH and fixed infinite retries in case at the LOH boundary (#67406)
* Removed the hard heap limit heap balancing logic for uoh and fixed inifite retries
* Addressed feedback - refactored region checking directives
* Removed all instances of hard_limit_exceeded_p as it is no longer needed
Bruce Forstall [Sat, 2 Apr 2022 03:40:16 +0000 (20:40 -0700)]
Disable GitHub_35821 on arm64 (#67472)
Tracking: https://github.com/dotnet/runtime/issues/66921
Bruce Forstall [Sat, 2 Apr 2022 03:39:42 +0000 (20:39 -0700)]
Disable readytorun/coreroot_determinism test on GCStress due to test failure (#67468)
Tracking: https://github.com/dotnet/runtime/issues/58699
Bruce Forstall [Sat, 2 Apr 2022 03:39:24 +0000 (20:39 -0700)]
Disable ArrBoundBinaryOp under GCStress due to failure (#67469)
Tracking: https://github.com/dotnet/runtime/issues/66279
Aaron Robinson [Sat, 2 Apr 2022 02:49:01 +0000 (19:49 -0700)]
Update System.Runtime.InteropServices.cs (#67466)
Remove `ObsoleteAttribute` from COM interop values.
judilsteve [Sat, 2 Apr 2022 01:29:06 +0000 (09:29 +0800)]
Detect systemd when inside a container. (#67288)
* Detect systemd when inside a container.
Modify IsSystemdService to function correctly
for containerised services.
Fix #67203
Adds conditional compilation to fall back
to Process.GetCurrentProcess().Id when
Environment.ProcessId is not available.
* Apply suggestions from code review
The minimum supported .NETCoreApp version in the repository is 6.0, so just using NETCOREAPP.
Co-authored-by: james <judilsteve>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
SingleAccretion [Sat, 2 Apr 2022 00:20:52 +0000 (03:20 +0300)]
More XARCH `PUTARG_STK` CQ improvements (#67400)
* Dissolve structs into primitives for PUTARG_STK
The primary benefit of this change is "free" support for
complex addressing modes, which is always desirable when
we are loading a primitive (as opposed to the large struct
case, where we would not want to use the 3-operand LEA
in a loop, but instead cache the address in a register).
The additional (future) benefit is that we will no longer
need to mark the source local as DNER, once LCL_VAR sources
for struct PUTARG_STKs are supported.
* Contain PUTARG_STK sources for "push [mem]"
Tomáš Rylek [Fri, 1 Apr 2022 23:26:52 +0000 (01:26 +0200)]
Ignore execution scripts under merged wrappers (#67452)
Today logic for emitting the legacy XUnit wrappers is based on
scanning the test output tree for execution scripts (sh / cmd);
we however need to emit execution scripts even in the presence of
merged wrappers in case of tests requiring project isolation.
This change filters these tests out so that they don't end up
creating a spurious legacy XUnit test wrapper.
Thanks
Tomas
Jeremy Barton [Fri, 1 Apr 2022 23:13:19 +0000 (16:13 -0700)]
Use the stapled OCSP response from TLS on Linux, when available
Based on (non-exhaustive) testing, chain builds from a Let's Encrypt issued certificate have
the following characteristics:
* Live OCSP request required (uncached/unstapled): 577ms
* OCSP response retrieved from cache (unstapled): 183ms
* OCSP response utilized from TLS stapling (bypasses cache): 182ms
In both cached and stapled the revocation portion was about 39ms.
(The revocation mode was ExcludeRoot, the CRL pertaining to the intermediate was cached for all three measurements.)
If the OCSP response was stapled (and the math worked out OK on it) then we completely ignore the OCSP cache.
While it could potentially be useful to update the cache if the stapled response was newer, the extra I/O of doing
the "newer" test didn't feel justified at this time.
github-actions[bot] [Fri, 1 Apr 2022 22:26:17 +0000 (15:26 -0700)]
Sync shared code from aspnetcore (#67456)
Anders Abel [Fri, 1 Apr 2022 22:11:08 +0000 (00:11 +0200)]
Improve support for multiple enveloped signatures in the same SignedXml document
This should improve the experience when working with complex SAML tokens.
Marie Píchová [Fri, 1 Apr 2022 21:26:31 +0000 (23:26 +0200)]
[QUIC] Update to msquic 2 (#67383)
* Update to msquic 2, test and code fixes
* feedback
* Fixed more HTTP/3 bugs
* updated fedora image to contain the newest msquic
* Better test debugging, fixed some timeouts
* feedback
* Return some msquic calls into a lock
Egor Bogatov [Fri, 1 Apr 2022 21:25:56 +0000 (00:25 +0300)]
Rely on PGO for isinst/castclass (#65922)
Maksym Koshovyi [Fri, 1 Apr 2022 20:40:47 +0000 (23:40 +0300)]
[Group 5] Enable nullable annotations for `Microsoft.Extensions.Configuration.Xml` (#67178)
Maksym Koshovyi [Fri, 1 Apr 2022 19:51:27 +0000 (22:51 +0300)]
[Group 6] Enable nullable annotations for Microsoft.Extensions.Logging.Configuration (#67174)
SingleAccretion [Fri, 1 Apr 2022 19:35:27 +0000 (22:35 +0300)]
Use a simpler representation for array addresses after morph (#64581)
* Do not copy flags in ADDR/COMMA opt
We only need to update the side effects, and
gtUpdateNodeSideEffects already takes care of that.
Will avoid copying GTF_NO_CSE unnecessarily.
No diffs.
* Add GT_ARR_ADDR
* Generate ARR_ADDR in morph
* gtSetEvalOrder tuning
* Delete the ArrayInfo map
* Delete GTF_IND_ARR_INDEX
* Make ARR_ADDR non-null
This preserves the non-faultness annotation for the parent
indir when ADDR(IND(ARR_ADDR)) -> ARR_ADDR folding happends.
* Simplify the array address parsing
We don't need the field sequence or the complex parsing.
A few diffs because previos code didn't handle COMMAs.
(The new code doesn't either, but they are skipped
automatically by the optComputeLoopSideEffectsOfBlock).
* Clean ParseArrayAddress up
Move it to GenTreeArrAddr, stop using ArrayInfo.
* More ParseArrayAddress cleanup
FldSeq no loger expected or needed. We will be
attaching it to ARR_ADDR directly in the future.
* Delete index labeling
And associated code. No longer needed, and we
will use a different mechanism for ARR_ADDR.
No diffs.
* Delete the last pseudo-field
No longer needed...
* Delete ArrayInfo
* Fix formatting
Vlad Brezae [Fri, 1 Apr 2022 19:27:49 +0000 (22:27 +0300)]
[mono] Fix static virtual calls to generic methods from gshared code (#66739)
* [mono] Fix static virtual calls to generic methods from gshared code
When the resolved method from the vtable is generic, we need to inflate it.
For example, in the gshared method we are calling on `Interface.InterfaceMethod<int> ()` (the type argument can either be fixed or determined based on the gshared method's context), and this method is resolved to generic method `Class.InterfaceMethod<T> ()`. We then need to inflate the method and resolve `T` to `int`.
* Enable tests
* [mono][interp] Fix calls to static virtual methods via delegates
* [mono][aot] Fix constrained + ldftn
* [mono][gsharing] Fix constrained + ldftn from gshared method
We can'd determine at compile time the static method if the constrained_class is a generic parameteri. We defer the computation of the method at runtime, in a similar fashion with calls.
* Disable test suite on android
It hits an issue in the android test runner
Carlos Sanchez [Fri, 1 Apr 2022 19:05:42 +0000 (12:05 -0700)]
Bump Intellisense to Preview2 (#67396)
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Larry Ewing [Fri, 1 Apr 2022 18:51:56 +0000 (13:51 -0500)]
Revert "[mono][workload] Add workloads for win-arm64 using emulation again" (#67450)
This reverts commit
eaa1f05dae0075a4709264b637f36e0f557cc2bb.
Maksym Koshovyi [Fri, 1 Apr 2022 18:43:38 +0000 (21:43 +0300)]
[Group 4] Enable nullable annotations for `Microsoft.Extensions.Logging.EventLog` (#67200)
Andy Gocke [Fri, 1 Apr 2022 17:22:28 +0000 (10:22 -0700)]
Publish crossgen as AOT if supported by the target platform (#65948)
Publishes crossgen as an AOT binary on Windows+Linux x64+ARM64, otherwise publishes as an R2R single file.
Closes #60016
Jeremy Koritzinsky [Fri, 1 Apr 2022 17:08:23 +0000 (10:08 -0700)]
Make the cross-component build just another invocation of the build-runtime script (#67108)
Tarek Mahmoud Sayed [Fri, 1 Apr 2022 16:26:33 +0000 (09:26 -0700)]
Fix IsPrefix and IsSuffix with ignored characters (#67370)
dotnet-maestro[bot] [Fri, 1 Apr 2022 16:05:58 +0000 (12:05 -0400)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220330.6 (#67382)
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22174.1 -> To Version 7.0.0-preview1.22180.6
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Steve Pfister [Fri, 1 Apr 2022 14:35:22 +0000 (10:35 -0400)]
[iOS] Enable some previously skipped tests (#65652)
Enabling because the underlying issues appear to have been fixed.
https://github.com/dotnet/runtime/issues/56085
https://github.com/dotnet/runtime/issues/52460
Krzysztof Wicher [Fri, 1 Apr 2022 13:35:48 +0000 (15:35 +0200)]
clean up JsonTypeInfo constructor (#67430)
Eirik Tsarpalis [Fri, 1 Apr 2022 09:47:46 +0000 (10:47 +0100)]
Refactor JsonSerializer metadata reading infrastructure (#67183)
* Refactor metadata reading infrastructure.
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Object/ObjectConverter.cs
Jakob Botsch Nielsen [Fri, 1 Apr 2022 06:56:03 +0000 (08:56 +0200)]
Optimize `ValueNumStore::GetVNFunc` (#67395)
`ValueNumStore::GetVNFunc` is very hot, in fact so hot that it shows up
right at the top in a profile of SPMI over libraries.pmi, next to
`fgMorphSmpOp`. Instead of copying all args just return a pointer to the
arguments which allows all the cases to be unified and makes the
function small enough for MSVC to inline it.
Most of the work here is to make sure we do not end up with undefined
behavior. I also removed some of the duplication by using a templated
struct for func apps instead of the old VNDefFuncNArg.
Windows x64 SPMI over libraries.pmi:
PIN before:
329991512865
PIN after:
326098430289 (-1.19%)
David Cantú [Fri, 1 Apr 2022 06:00:28 +0000 (23:00 -0700)]
Use ROS<byte> instead of byte[] where it makes sense on S.S.C.Cose (#66741)
* Use ROS<byte> instead of byte[] on S.S.C.Cose
* Add TrySign and improve Sign implementation to use less byte[]
* Add TrySign tests
* Address using scope feedback
* Address src feedback
* Refactor tests to avoid duplicated ones
* Remove invalid asserts in Crypto code
* Fix 'new()' without the type on the left-hand side
* Fix ThreadStatic issues in tests
* * Don't use ArrayPool in SignCore
* Add comment describing reusability of encoded protected headers
* Cache toBeSigned
* Don't cache toBeSigned for detached content
* Address nits in tests
Viktor Hofer [Fri, 1 Apr 2022 05:49:32 +0000 (07:49 +0200)]
Bring back direct dependencies on System.Runtime.CompilerServices.Unsafe for other tfms than net7.0 (#67385)
* Add dependency on Unsafe package
With the removal of the Unsafe package, a few projects regressed which
previously had a direct dependency on the latest version of Unsafe
(6.0.0) by now depending on the transitive Unsafe dependency of i.e.
System.Memory which is a very old version (4.5.*).
Fixing those projects to declare the direct dependency again.
* Cleanup
Michal Strehovský [Fri, 1 Apr 2022 05:34:34 +0000 (14:34 +0900)]
Re-baseline Pri-0 tests with NativeAOT (#67412)
Michal Strehovský [Fri, 1 Apr 2022 05:33:57 +0000 (14:33 +0900)]
Don't produce unnecessary default interface methods (#67409)
Found this because it was asserting in one of the Pri-0 tests. We were trying to generate a special instantiating stub for an interface type that was not a dynamic interface castable implementation. I'm adding a regression test too because it has a visible outside behavior besides the assert.
Steve Pfister [Thu, 31 Mar 2022 23:11:09 +0000 (19:11 -0400)]
Add RemoteExecutor check in TestWaitForExitValidation (#67397)
https://github.com/dotnet/runtime/pull/64860 added a TestWaitForExitValidation test that would fail when run on platforms that did not support RemoteExecutor.
This change adds a `ConditionalTheory` to make sure that doesn't happen.