platform/upstream/dotnet/runtime.git
18 months agoFix JIT pipeline issues with instantiation (#82512)
Juan Hoyos [Thu, 23 Feb 2023 10:02:22 +0000 (02:02 -0800)]
Fix JIT pipeline issues with instantiation (#82512)

18 months agoReplace RichNav with Code Index (#82088)
Alexander Köplinger [Thu, 23 Feb 2023 09:50:06 +0000 (10:50 +0100)]
Replace RichNav with Code Index (#82088)

RichNav is now known as Code Index: https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/28554/Index-Your-Repo

The separate AzDO feed in nuget.config is not needed anymore which should make restore a bit faster.

Note that there's currently an error due to new MSBuild binlog version which is tracked by https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1746670/, so we decided to disable the pipeline for now.

18 months ago[jiterp] Fix stelem_ref not doing a type check (#82507)
Katelyn Gadd [Thu, 23 Feb 2023 04:26:35 +0000 (20:26 -0800)]
[jiterp] Fix stelem_ref not doing a type check (#82507)

Jiterpreter's implementation of stelem_ref wasn't doing a type check, now it does (via a C helper)

18 months agoAnnotation changes only (part 2) (#82388)
Maoni Stephens [Thu, 23 Feb 2023 04:22:59 +0000 (20:22 -0800)]
Annotation changes only (part 2) (#82388)

+ change the per heap/global fields to their detailed categories
+ fixed incorrect comments for fields like full_gc_approach_event
+ moved some fields are only used for segments under #ifndef USE_REGIONS
+fixed some fields that were mistakenly marked as methods from my last annotation PR (I forgot that some fields' declarations have '(' in them so my parser treated them as methods, eg, VOLATILE(size_t) n_eph_soh)
+ got rid of useless comments for these fields
+ got rid of useless fields

18 months agoDeduplicate platform lists in BuildIntegration (#82395)
Adeel Mujahid [Thu, 23 Feb 2023 04:15:17 +0000 (06:15 +0200)]
Deduplicate platform lists in BuildIntegration (#82395)

* Deduplicate platform lists in BuildIntegration

* Use exact matches in switch expression

* Treat linux-musl as linux like before

18 months agoDon't run non-wasm test lanes for jiterpreter-only changes (#82510)
Katelyn Gadd [Thu, 23 Feb 2023 03:18:50 +0000 (19:18 -0800)]
Don't run non-wasm test lanes for jiterpreter-only changes (#82510)

Don't run non-wasm lanes for jiterpreter-only changes. The C files are guarded with HOST_BROWSER

18 months ago[mono][jit] Refactor SIMD type detection. (#82419)
Zoltan Varga [Thu, 23 Feb 2023 03:18:22 +0000 (22:18 -0500)]
[mono][jit] Refactor SIMD type detection. (#82419)

* [mono][jit] Refactor SIMD type detection.

Add a mini_get_simd_type_info () function to return the element type/number of elements for SIMD types.
Use it to simplify a bunch of code.

* Remove unused mono_simd_simplify_indirection () function.

* Remove Vector2 and Vector3 code, its unused and incorrect.

18 months agoProposed host runtime delegate for loading an assembly (#82138)
Elinor Fung [Thu, 23 Feb 2023 01:44:03 +0000 (17:44 -0800)]
Proposed host runtime delegate for loading an assembly (#82138)

Doc for proposed hosting API for loading an assembly - two new delegate types:
- `hdt_load_assembly`: load assembly from path
- `hdt_load_assembly_bytes`: load assembly from byte array

18 months agoRefactor Logging.Console configure options (#82254)
Eric Erhardt [Wed, 22 Feb 2023 20:28:11 +0000 (14:28 -0600)]
Refactor Logging.Console configure options (#82254)

- Use nameof instead hard-coded strings
- Move the configuration binding code to the options class. This allows the configure method to be virtual and only need a single ConsoleFormatterOptions class.
- Minor cleanup

18 months agoRemove unused skip flag (#82471)
Milos Kotlar [Wed, 22 Feb 2023 19:49:09 +0000 (20:49 +0100)]
Remove unused skip flag (#82471)

18 months agoRevert update dependencies from dotnet/roslyn (#82466)
Juan Hoyos [Wed, 22 Feb 2023 18:45:18 +0000 (10:45 -0800)]
Revert update dependencies from dotnet/roslyn (#82466)

Reverts version bump component of #81164

This PR caused heavy managed build regressions hitting all PR builds. See #82458 and #76454

18 months agoFix loop hoisting float var profitability calculation (#82352)
Bruce Forstall [Wed, 22 Feb 2023 18:44:23 +0000 (11:44 -0700)]
Fix loop hoisting float var profitability calculation (#82352)

Treat SIMD as float vars.

18 months agoFix issues with EH in unexecuted loops (#82329)
Bruce Forstall [Wed, 22 Feb 2023 18:43:09 +0000 (11:43 -0700)]
Fix issues with EH in unexecuted loops (#82329)

Fix two problems with code in loops that are determined to not execute
that have exception handling clauses:
1. Be more specific in loop unrolling to avoid unrolling even zero-count
loops (which causes the loop to be removed) if there is a block in the
loop with a different handler region than the handler region of the "top"
block. This should only kick in for x86, where handlers are not extracted
as funclets.
2. In Value Numbering, before actually value numbering nodes,
`optComputeLoopSideEffectsOfBlock()` walks all the blocks of all top-level
loops collecting data. Unfortunately, it sets the Value Number of certain
nodes as a way to pass information "up the tree" during processing. Presumably
these "fake" value numbers actually get replaced during actual value numbering
for the tree. However, when we go to actually value number the IR, we only
walk reachable blocks. Thus, in some cases, we would end up with a top-level
"fake" value number on an unreachable statement root, thus leading
`fgDebugCheckExceptionSets()` to check the tree and assert. To fix this,
at the end of the `optComputeLoopSideEffectsOfBlock()`, clear the VN in case
it was previously set.

Fixes #81675

18 months agoFix unbalanced bracket in GenTree output (#82332)
Bruce Forstall [Wed, 22 Feb 2023 18:42:44 +0000 (11:42 -0700)]
Fix unbalanced bracket in GenTree output (#82332)

18 months agoShare test cases for NativeAOT (#82216)
Tlakaelel Axayakatl Ceja [Wed, 22 Feb 2023 18:38:54 +0000 (10:38 -0800)]
Share test cases for NativeAOT (#82216)

Remove Mono.Linker.Tests.Cases and Mono.Linker.Tests.Cases.Expectations from NativeAOT and reuse the ones in illink
Update some of the NativeAOT tests
Disable tests that have not been triaged in nativeAOT
Add the capability to IgnoreTests only for certain configurations
Sync tests between illink and NativeAOT and apply fixes when necessary to make them work

18 months ago[main] Update dependencies from dotnet/arcade (#82342)
dotnet-maestro[bot] [Wed, 22 Feb 2023 17:23:59 +0000 (11:23 -0600)]
[main] Update dependencies from dotnet/arcade (#82342)

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

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 8.0.0-beta.23115.1 -> To Version 8.0.0-beta.23117.2

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

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 8.0.0-beta.23115.1 -> To Version 8.0.0-beta.23118.1

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

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 8.0.0-beta.23115.1 -> To Version 8.0.0-beta.23120.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
18 months ago[wasi] Add `WasiAppBuilder` task (#82126)
Ankit Jain [Wed, 22 Feb 2023 16:29:04 +0000 (11:29 -0500)]
[wasi] Add `WasiAppBuilder` task (#82126)

* Address review feedback from @pavelsavara

18 months agoRevert changes in libunwind vendor directory (#82473)
Adeel Mujahid [Wed, 22 Feb 2023 15:39:25 +0000 (17:39 +0200)]
Revert changes in libunwind vendor directory (#82473)

18 months ago[mono][aot] Enable dedup on tvOS device + arm64 simulators (#82403)
Milos Kotlar [Wed, 22 Feb 2023 14:20:42 +0000 (15:20 +0100)]
[mono][aot] Enable dedup on tvOS device + arm64 simulators (#82403)

* Enable dedup on ioslike platforms (tvOS device + arm64 simulators)

18 months ago[jiterp] Inline some performance-sensitive operations into traces (#82469)
Katelyn Gadd [Wed, 22 Feb 2023 12:48:07 +0000 (04:48 -0800)]
[jiterp] Inline some performance-sensitive operations into traces (#82469)

Inline getchr, strlen, and getitem_span into traces
Use offsetof to compute more offsets used by the jiterpreter instead of hand computing them

18 months ago[LoongArch64] redesign the compare and condition-branch. (#82426)
Qiao Pengcheng [Wed, 22 Feb 2023 10:41:06 +0000 (05:41 -0500)]
[LoongArch64] redesign the compare and condition-branch. (#82426)

* [LoongArch64] redesign the compare and condition-branch.

* delelet the unused GT_TEST* nodes.

18 months agoFix DBI loading problem on Linux (#82461)
Mike McLaughlin [Wed, 22 Feb 2023 07:27:54 +0000 (23:27 -0800)]
Fix DBI loading problem on Linux (#82461)

* Fix DBI loading problem on Linux

Part of PR https://github.com/dotnet/runtime/pull/81573 needed to be undone to build libmscordbi.so without
any undefined symbols from the DAC. The DAC_PAL_RegisterModule, etc. stubs I recommended didn't work and DBI
could not be loaded by SOS because of missing exports.

The double pass at the libraries from the `target_link_libraries(mscordbi ${COREDBI_LIBRARIES} ${COREDBI_LIBRARIES})`
cmake file needed to be restored. The stubs were not needed after that.

* Fix clang16 build problems

18 months agoAdd pool provider template reference (#82452)
Juan Hoyos [Wed, 22 Feb 2023 06:45:12 +0000 (22:45 -0800)]
Add pool provider template reference (#82452)

Use template to determine pool provider to use.

The provider can't be expanded in the pipeline-with-resources step as the expansion breaks once global variables are consolidated. All variables end up in the global scope correctly, but several expansion points are expanded before assignment - particularly the ones at the pipeline scope - meaning that several parameters derived from them are empty and cause issues in further expansion decisions.

18 months agoUpdate Microsoft.DiaSymReader.Native from 16.9.0-beta1.21055.5 to 16.11.23-beta1...
Juan Hoyos [Wed, 22 Feb 2023 06:44:13 +0000 (22:44 -0800)]
Update Microsoft.DiaSymReader.Native from 16.9.0-beta1.21055.5 to 16.11.23-beta1.23063.1 (#82188)

18 months agocorehost: derive fallback rid from output rid. (#82163)
Tom Deseyn [Wed, 22 Feb 2023 04:57:34 +0000 (05:57 +0100)]
corehost: derive fallback rid from output rid. (#82163)

18 months agoFormat host tracing for deps parsing for easier reading (#82333)
Elinor Fung [Wed, 22 Feb 2023 01:23:48 +0000 (17:23 -0800)]
Format host tracing for deps parsing for easier reading (#82333)

18 months agoRemove invalid internal attribute which causes warnings (#82398)
Vitek Karas [Wed, 22 Feb 2023 00:42:00 +0000 (16:42 -0800)]
Remove invalid internal attribute which causes warnings (#82398)

The invalid attribute name is a valid test, but the smoke tests don't have the infra to validate warnings.
So producing the warning there is just noise in the build.

Once we port over all linker tests this will be validated by those. Specifically https://github.com/dotnet/runtime/blob/0fe8bd36734b31e80abebf28380656fc18734645/src/tools/illink/test/Mono.Linker.Tests.Cases/LinkAttributes/LinkerAttributeRemoval.xml.

18 months ago[mono] Use more idiomatic cmake style (#82182)
Aleksey Kliger (λgeek) [Tue, 21 Feb 2023 23:36:34 +0000 (18:36 -0500)]
[mono] Use more idiomatic cmake style (#82182)

Make mono's build use a slightly more idiomatic `cmake` style:
* One `project()` per subdirectory, rather than just in `mini`
* toplevel `add_subdirectory` for each subdirectory
* specify sources relative to the current project source dir, rather than using `addprefix` to relativize everything from `mini`
* use object libraries for each logical grouping.  Set compile definitions, link libraries, etc on the object libraries.
* Have the final toplevel exes and shared libs (in mini; and components - when components are built to shared libs) pull in the object libraries. When building a static libmonosgen-2.0.a, pull in all the obejct libraries' objects to make a complete archive.

Doesn't untangle `src/mono/mono/components`  from `src/mono/moni/mini` yet, although things could be grouped better there too.

* make eglib into a cmake object library

   The goal is to use the cmake targets instead of _sources and _headers variables as well as to use the cmake add_subdirectory commands to bring in parts of the build

* make mono/utils into a cmake object library

* make sgen into a cmake object library

* make metadata into a cmake object library

* set MONO_DLL_EXPORT when building the object libraries

* add eglib_api target

   unlike eglib_objects, this one can be added by executables and static or shared libraries without pulling in the eglib sources.  This is what we want for dynamic runtime components, static interpreter and icall table libs, etc

* when building a static library, include all the ojects

   otherwise it would only include the mini objects - it's not transitive

* nit use target_compile_definitions for sgen

* log profiler links eglib objects, not just headers

* set project languages to C

   except for mini where we also enable CXX under some conditions (LLVM or ICU, or browser wasm)

* fix darwin framework builds

* fix for older cmake

   can't have sources directly on add_library(target INTERFACE ...)

* fix windows build

* remove unneeded define

   it's set later in the cmake file already

18 months agoReplace `SafeLocalAllocHandle` in `System.Net.HttpListener` (#82411)
xtqqczze [Tue, 21 Feb 2023 22:35:27 +0000 (22:35 +0000)]
Replace `SafeLocalAllocHandle` in `System.Net.HttpListener` (#82411)

18 months agoAdd LoaderAllocator as a dac/sos concept (#82437)
Lee Culver [Tue, 21 Feb 2023 21:44:01 +0000 (13:44 -0800)]
Add LoaderAllocator as a dac/sos concept (#82437)

* Add LoaderAllocator as a dac/sos concept

- DacpModuleData: Repurposed two unused fields to produce the module's LoaderAllocator and ThunkHeap.  The LoaderAllocator often will be the same as the SystemDomain's, except in the case of collectable assemblies.
- Added the way to get the direct LoaderAllocator address from an AppDomain.
- Added a new way to enumerate the heaps associated with a LoaderAllocator in a future-proof way.  Now when the implementation of CLR changes to add, remove, or rename/repurpose an existing heap, we can still produce the right diagnostic data without needing to ship a new interface.

This does expose LoaderAllocators as a new concept to the dac, but the original design of hiding them actually causes a lot more problems than it solves.

For example, the SystemDomain and AppDomain share the same LoaderAllocator and associated heaps...but that implementation detail is opaque to something like ClrMD or SOS (and was different on desktop CLR, so it's tough to take a dependency on that detail).  This means things like !eeheap would dutifully double report heap ranges and sizes.

We also now need to know AppDomain's LoaderAllocator address to compare to DacpModuleData's to see if we should enumerate that module's heaps or not.

* Assign kinds, don't use _countof

- Add missing assignment to pKinds.
- Don't use _countof because non MSVC compilers don't like it

* Make LoaderHeapCount's usage more obvious

* Use ARRAY_SIZE()

18 months agoExpose missing BinaryPrimitives APIs (#82310)
Tanner Gooding [Tue, 21 Feb 2023 20:35:33 +0000 (12:35 -0800)]
Expose missing BinaryPrimitives APIs (#82310)

* Expose missing BinaryPrimitives APIs

* Fix the BinaryPrimitives doc comments to match the actual documentation

* Use newer BinaryPrimitives APIs where applicable

18 months agoFix GetHashCode implementation for InterproceduralState (#82431)
Vitek Karas [Tue, 21 Feb 2023 19:27:09 +0000 (11:27 -0800)]
Fix GetHashCode implementation for InterproceduralState (#82431)

This is a port of https://github.com/dotnet/linker/pull/3163 to runtime repo.

18 months ago[RISC-V] others except coreclr (#82382)
Dong-Heon Jung [Tue, 21 Feb 2023 18:43:20 +0000 (03:43 +0900)]
[RISC-V] others except coreclr (#82382)

* [RISCV-V] others except coreclr

- Successfully cross-build for RISC-V.
- Run A simple application "helloworld"
- Fail a test in clr.paltest

* Add risc-v

* Put riscv64 to the last

18 months agoAdd test that uses the host's fallback RID (#82076)
Elinor Fung [Tue, 21 Feb 2023 16:49:46 +0000 (08:49 -0800)]
Add test that uses the host's fallback RID (#82076)

18 months agoConsole.Unix: fix escape sequence for setting title on 'screen' TERM. (#82340)
Tom Deseyn [Tue, 21 Feb 2023 13:19:41 +0000 (14:19 +0100)]
Console.Unix: fix escape sequence for setting title on 'screen' TERM. (#82340)

18 months agoFix generic parameter data flow validation in NativeAOT (#82392)
Vitek Karas [Tue, 21 Feb 2023 10:04:36 +0000 (02:04 -0800)]
Fix generic parameter data flow validation in NativeAOT (#82392)

[This is a revert of a revert of #81532 with additional fixes for #81779]

This reworks how generic parameter data flow validation is done in the NativeAOT compiler.

Previously generic data flow was done from generic dictionary nodes. Problem with that approach is that there's no origin information at that point. The warnings can't point to the place where the problematic instantiation is in the code - we only know that it exists.
Aside from it being unfriendly for the users, it means any RUC or suppressions don't work on these warnings the same way they do in linker/analyzer.

This change modifies the logic to tag the method as "needs data flow" whenever we spot an instantiation of an annotated generic in it somewhere.
Then the actual validation/marking is done from data flow using the trim analysis patterns.

The only exception to this is generic data flow for base types and interface implementations, that one is done on the EEType nodes.

Note that AOT implements a much more precise version of the generic data flow validation as compared to linker/analyzer. See the big comment at the beginning of `GenericParameterWarningLocation.cs` for how that works.

Due to an issue with DependencyInjection, this change also implements a behavior where if a method or field is reflection accessible, the compiler will perform generic argument data flow on all types in the signature of the method/field (which it normally wouldn't do). See #81358 for details about the issue and discussions on the fix approach.

Due to the DI behavior described above, there's also the problem with nested generics. If a nested generic applies annotation on a specific type and this whole thing is done from within a DI, the compiler will not apply the annotation, since it doesn't see the type being used anywhere for real. See #81779 for detailed description of the issue. The fix for this is to extend the "needs data flow analysis" logic to look into generic arguments recursively and finding any annotation then triggers the data flow processing of the calling code. Then in that processing when applying generic argument data flow, do so recursively over all generic parameters.

Test changes:
Adds the two tests from linker which cover this functionality.

Change the test infra to use token to compare message origins for expected warnings. Consistently converting generic types/methods into strings across two type systems is just very difficult - the tokens are simple and reliable.

Changes the tests to avoid expecting specific generic types/methods formatting in the messages - again, it's too hard to make this consistent without lot of effort. And the tests don't really need it.

Adds a test for marking behavior related to generic argument data flow. This is to catch issues like #81779.

Adds a smoke test which has a simplified version of the DI problem from https://github.com/dotnet/runtime/issues/81358.

Fixes https://github.com/dotnet/runtime/issues/77455
Fixes https://github.com/dotnet/runtime/issues/75898
Fixes #81358
Fixes #81779

18 months agoSPMI: Indent details sections via CSS (#82375)
Jakob Botsch Nielsen [Tue, 21 Feb 2023 08:58:51 +0000 (09:58 +0100)]
SPMI: Indent details sections via CSS (#82375)

18 months ago[main] Update dependencies from dotnet/roslyn (#81164)
dotnet-maestro[bot] [Tue, 21 Feb 2023 08:13:55 +0000 (09:13 +0100)]
[main] Update dependencies from dotnet/roslyn (#81164)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>
18 months ago[mono] Disable few quaternion intrinsics (#82410)
Radek Doulik [Tue, 21 Feb 2023 07:51:05 +0000 (08:51 +0100)]
[mono] Disable few quaternion intrinsics (#82410)

* Disable few quaternion intrinsics

For * and / operators as these are not the same as vector operations.
Opened https://github.com/dotnet/runtime/issues/82408 to implement
correct ones in future.

* Change comparison order

18 months ago[mono][wasm] Fix ldftn in AOT mode, it should return a ftndesc. (#82282)
Zoltan Varga [Tue, 21 Feb 2023 05:46:41 +0000 (00:46 -0500)]
[mono][wasm] Fix ldftn in AOT mode, it should return a ftndesc. (#82282)

* [mono][wasm] Fix ldftn in AOT mode, it should return a ftndesc.

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

* Reenable tests.

18 months agoBuild test tree with partial trimming (#82157)
Michal Strehovský [Tue, 21 Feb 2023 03:39:23 +0000 (12:39 +0900)]
Build test tree with partial trimming (#82157)

Some tests are not compatible with trimming. There are some that fail if they can't find things they need. There are also some that reflection-interate over test methods and will happily succeed if they don't find any test methods.

18 months agoRemove fixed test from issues.targets (#82378)
Michal Strehovský [Tue, 21 Feb 2023 03:37:55 +0000 (12:37 +0900)]
Remove fixed test from issues.targets (#82378)

Fixed in #82346.

18 months ago[mono][wasi] Bump wasmtime to 5.0.0 (#82390)
Zoltan Varga [Tue, 21 Feb 2023 00:38:54 +0000 (19:38 -0500)]
[mono][wasi] Bump wasmtime to 5.0.0 (#82390)

18 months agoFix link to container image in linux instructions (#82409)
Evgeniy [Tue, 21 Feb 2023 00:28:36 +0000 (03:28 +0300)]
Fix link to container image in linux instructions (#82409)

I suppose head of the URL was redondant — gave me "docker: invalid refence format" when I tried the original command, and worked fine when I removed the first "mcr.microsoft.com/dotnet-buildtools/prereqs:"

18 months ago[Continuation] - Enable the fundamentals behind libraries tests compiled via Crossgen...
Ivan Diaz Sanchez [Mon, 20 Feb 2023 23:07:30 +0000 (15:07 -0800)]
[Continuation] - Enable the fundamentals behind libraries tests compiled via Crossgen2 (#80946)

* Added the documentation regarding the new libraries test modes.

* Enable the fundamentals behind libraries tests compiled via crossgen2.

* Fixed a typo with SINGLE_FILE_TEST_RUNNER.

* Addressed review comments.

* Restored an accidentally deleted comment.

* Fixed wrong Crossgen2 path and added comment with link to an important tracking SDK bug.

18 months agoMake more progress on IDE0044 ("Make field readonly") (#82356)
Stephen Toub [Mon, 20 Feb 2023 22:15:14 +0000 (17:15 -0500)]
Make more progress on IDE0044 ("Make field readonly") (#82356)

* Make more progress on IDE0044 ("Make field readonly")

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
18 months agoUse ArgumentOutOfRangeException throw helpers in a few more places (#82357)
Stephen Toub [Mon, 20 Feb 2023 22:14:59 +0000 (17:14 -0500)]
Use ArgumentOutOfRangeException throw helpers in a few more places (#82357)

* Use ArgumentOutOfRangeException throw helpers in a few more places

* Fix a few tests to expect AOORE

18 months agoOptimize ReplaceLineEndings (#81630)
Miha Zupan [Mon, 20 Feb 2023 21:27:04 +0000 (22:27 +0100)]
Optimize ReplaceLineEndings (#81630)

* Optimize ReplaceLineEndings

* PR feedback

18 months agoSPMI: Include example diffs in markdown summary (#82364)
Jakob Botsch Nielsen [Mon, 20 Feb 2023 20:58:35 +0000 (21:58 +0100)]
SPMI: Include example diffs in markdown summary (#82364)

This adds up to 3 improvement and 3 regression example diffs to the
markdown summary for each collection. The examples are picked to be the
highest percentage wise improvements and regressions with a limit on the
total size of the diff to avoid too much text in the diffs.

---------

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
18 months ago[QUIC] Improved logic of listener AcceptConnection (#82261)
Marie Píchová [Mon, 20 Feb 2023 20:11:49 +0000 (21:11 +0100)]
[QUIC] Improved logic of listener AcceptConnection (#82261)

* Slow connection handshakes do not stall any connections in accept queue.

* Listener tests

* PR feedback

* Test fix attempt

18 months agoFix unitialized local in impCastClassOrIsInstToTree (#82348)
Egor Bogatov [Mon, 20 Feb 2023 14:42:44 +0000 (15:42 +0100)]
Fix unitialized local in impCastClassOrIsInstToTree (#82348)

18 months agoRevert "Revert Allow some intrinsics in Tier0" (#82354)
Egor Bogatov [Mon, 20 Feb 2023 14:00:07 +0000 (15:00 +0100)]
Revert "Revert Allow some intrinsics in Tier0" (#82354)

18 months agoUnify type instantiations in reflection emit (#81518)
Buyaa Namnan [Mon, 20 Feb 2023 10:31:48 +0000 (02:31 -0800)]
Unify type instantiations in reflection emit (#81518)

18 months agoUpdate NativeAOT build integration targets to include ioslike platforms (#82086)
Milos Kotlar [Mon, 20 Feb 2023 09:09:49 +0000 (10:09 +0100)]
Update NativeAOT build integration targets to include ioslike platforms (#82086)

* Adjust Native AOT build integration targets to include ioslike platforms

* Exclude <NativeFramework Include=GSS /> for tvOS[simulator]

* Exclude System.Globalization.Native and System.Security.Cryptography.Native.OpenSsl for iOS platforms

* Exclude System.Globalization.Native and System.Security.Cryptography.Native.OpenSsl for iOSLike platforms
---------

Co-authored-by: Filip Navara <filip.navara@gmail.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
18 months agoTiny speedup to HasGenericVirtualMethods (#82383)
Michal Strehovský [Mon, 20 Feb 2023 08:06:59 +0000 (17:06 +0900)]
Tiny speedup to HasGenericVirtualMethods (#82383)

This avoids materializing/resolving non-virtual methods.

18 months ago[main] Update dependencies from dotnet/llvm-project dotnet/icu dotnet/xharness dotnet...
dotnet-maestro[bot] [Mon, 20 Feb 2023 03:29:46 +0000 (21:29 -0600)]
[main] Update dependencies from dotnet/llvm-project dotnet/icu dotnet/xharness dotnet/runtime-assets (#82206)

* Update dependencies from https://github.com/dotnet/llvm-project build 20230214.1

runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 14.0.0-alpha.1.23113.3 -> To Version 14.0.0-alpha.1.23114.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20230213.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Data.Common.TestData , System.Drawing.Common.TestData , System.Formats.Tar.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 8.0.0-beta.23110.1 -> To Version 8.0.0-beta.23113.1

* Update the min and max warnings with the debugging fixes

* Update dependencies from https://github.com/dotnet/icu build 20230216.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-preview.2.23113.1 -> To Version 8.0.0-preview.2.23116.1

* Update dependencies from https://github.com/dotnet/xharness build 20230217.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.23113.1 -> To Version 1.0.0-prerelease.23117.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Andy Gocke <andy@commentout.net>
18 months agoUpdate dependencies from https://github.com/dotnet/roslyn-analyzers build 20230217...
dotnet-maestro[bot] [Mon, 20 Feb 2023 03:23:57 +0000 (21:23 -0600)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230217.2 (#82343)

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.5-beta1.23116.1 -> To Version 3.3.5-beta1.23117.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
18 months agoEnable EventPipe when EventSource is enabled (#82200)
Lakshan Fernando [Mon, 20 Feb 2023 02:51:15 +0000 (18:51 -0800)]
Enable EventPipe when EventSource is enabled (#82200)

18 months agoConvert a few more byte[]s to u8s (#82358)
Stephen Toub [Mon, 20 Feb 2023 00:58:55 +0000 (19:58 -0500)]
Convert a few more byte[]s to u8s (#82358)

18 months agoFix ISOSDacInterface::TraverseLoaderHeap (#82371)
Lee Culver [Mon, 20 Feb 2023 00:02:23 +0000 (16:02 -0800)]
Fix ISOSDacInterface::TraverseLoaderHeap (#82371)

* Revert "Fix sos.eeheap's LoaderCodeHeap sizes (#67885)"

This reverts commit 1ad94b3487b4a3a88ed71d1ccc5b9d04384718f0.

* Define ISOSDacInterface13

* Implement ISOSDacInterface13

* Enumerate the vtable_heap in DacDbiInterfaceImpl::EnumerateMemRangesForLoaderAllocator

* Increase bounds check

18 months agoRefactor computing lvaLongVars/lvaFloatVars (#82331)
Bruce Forstall [Sun, 19 Feb 2023 19:20:18 +0000 (12:20 -0700)]
Refactor computing lvaLongVars/lvaFloatVars (#82331)

Compute them before loop hoisting, where they are actually used,
not at the beginning of value numbering.

18 months agoDisable bigevent test under GCStress (#82353)
Bruce Forstall [Sun, 19 Feb 2023 19:18:35 +0000 (12:18 -0700)]
Disable bigevent test under GCStress (#82353)

Tracking: https://github.com/dotnet/runtime/issues/82251

18 months agoClean up hex formatting, vectorize Guid.TryFormat for UTF8 (#81666)
Egor Bogatov [Sun, 19 Feb 2023 10:06:54 +0000 (11:06 +0100)]
Clean up hex formatting, vectorize Guid.TryFormat for UTF8 (#81666)

18 months agoKeep side effects in impOptimizeCastClassOrIsInst (#82346)
Egor Bogatov [Sun, 19 Feb 2023 08:14:07 +0000 (09:14 +0100)]
Keep side effects in impOptimizeCastClassOrIsInst (#82346)

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
18 months agoOptimize JIT_ClassProfile32 (#82014)
Egor Bogatov [Sat, 18 Feb 2023 21:46:56 +0000 (22:46 +0100)]
Optimize JIT_ClassProfile32 (#82014)

18 months agoRemove unused block flags (#82330)
Bruce Forstall [Sat, 18 Feb 2023 20:36:57 +0000 (13:36 -0700)]
Remove unused block flags (#82330)

BBF_VISITED and BBF_CHANGED were unused; remove them.

Reordered the flags a bit to put related flags together.

18 months agoStop setting DOTNET_JitStress in a couple of newly added tests (#82341)
Jakob Botsch Nielsen [Sat, 18 Feb 2023 20:05:09 +0000 (21:05 +0100)]
Stop setting DOTNET_JitStress in a couple of newly added tests (#82341)

Workaround #82164.

Runtime_81585 did not need any stress mode to repro, and the other one
needs only STRESS_FOLD.

18 months agoRevert "update alpine test images" (#82309)
Marie Píchová [Sat, 18 Feb 2023 08:58:19 +0000 (09:58 +0100)]
Revert "update alpine test images" (#82309)

* Revert "update alpine test images (#81841)"

This reverts commit 82c891831b373b17c659fed036743e3652dda54d.

* Update eng/pipelines/libraries/helix-queues-setup.yml

* Update eng/pipelines/libraries/helix-queues-setup.yml

18 months agoFix FnPtrTypeDesc::GetManagedClassObject (#82325)
Jan Kotas [Sat, 18 Feb 2023 03:16:55 +0000 (19:16 -0800)]
Fix FnPtrTypeDesc::GetManagedClassObject (#82325)

* Fix FnPtrTypeDesc::GetManagedClassObject

The code was missing support for allocating RuntimeType objects on frozen heap

Fixes #82252

* Revert "Disable System.Reflection.Tests.TypeDelegatorTests.FunctionPointers (#82321)"

This reverts commit 473e278471c08b862b8ea631aa0fd65eb78757e1.

18 months agoImplementation of Lemire's nearly divisionless method (#79790)
Morten Larsen [Sat, 18 Feb 2023 03:00:06 +0000 (04:00 +0100)]
Implementation of Lemire's nearly divisionless method (#79790)

* Lemire implementation

* Cleanup

* Article reference

* Fix

* Fixes

* Comment out implementation specific tests in Xoshiro_AlgorithmBehavesAsExpected

* Fix

* Reenable sufficient checks for Xoshiro_AlgorithmBehavesAsExpected

* Fix

* Add third party notice

* Resolve comments

* Resolve comments

* Resolve comments

* Resolve comments

* Refactor implementation to separate class

* Typo fix

* stephentoub's refactor

* Reverting NextInt64 on Xoshiro128

* Adjust test

* Update src/libraries/System.Private.CoreLib/src/System/Random.Xoshiro128StarStarImpl.cs

---------

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
18 months ago[MONO] Implement GC.AddMemoryPressure in Mono (#82121)
Nathan Ricci [Sat, 18 Feb 2023 01:15:50 +0000 (20:15 -0500)]
[MONO] Implement GC.AddMemoryPressure in Mono (#82121)

Implementation of AddMemoryPressure in Mono

18 months agoDisable System.Reflection.Tests.TypeDelegatorTests.FunctionPointers (#82321)
Bruce Forstall [Sat, 18 Feb 2023 00:17:34 +0000 (17:17 -0700)]
Disable System.Reflection.Tests.TypeDelegatorTests.FunctionPointers (#82321)

Disable this failing test on CoreCLR.

Tracking: https://github.com/dotnet/runtime/issues/82252

18 months ago[JIT] LclMorph `GT_IND(GT_LCL_VAR_ADDR)` => `GT_CAST(GT_LCL_VAR)` narrow-cast only...
Will Smith [Fri, 17 Feb 2023 23:19:40 +0000 (15:19 -0800)]
[JIT] LclMorph `GT_IND(GT_LCL_VAR_ADDR)` => `GT_CAST(GT_LCL_VAR)` narrow-cast only (#81454)

* Experiment with folding IND(GT_LCL_VAR_ADDR)

* Fix assertion

* Remove duplicate code

* Handling long types

* Handling long types

* Handling long types

* Handling long types

* Trying to fix build

* Trying to fix build

* Trying to fix builds

* Added IndirTransform::CastOfLclVar

* Fixing build

* Some formatting

* Skip isDef

* Formatting

* Fixed AV

* Enable long

* Renamed CastOfLclVar to NarrowCastOfLclVar

* Trying out wide-cast ind(lcl_var_addr) => cast(lcl_var)

* Formatting

* Remove widening

* Added a comment. Added disasm tests.

* Fixing tests

* Rename NarrowCastOfLclVar to NarrowCast

* Feedback

* Feedback

* Update src/coreclr/jit/lclmorph.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
---------

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
18 months agoFix for issue #80350 tracking runtime deficiencies in the presence of static virtual...
Tomáš Rylek [Fri, 17 Feb 2023 23:01:13 +0000 (00:01 +0100)]
Fix for issue #80350 tracking runtime deficiencies in the presence of static virtual method reabstraction (#80987)

This change fixes the issue #80350 that uncovered several
inconsistencies in the CoreCLR runtime w.r.t. static virtual methods.
In particular, reabstraction (declaring an abstract explicit override
of a static virtual method in a derived interface) turned out to be
causing runtime issues. As part of the change I'm also fixing the
reabstraction unit test svm_diamondshape as it turns out Roslyn emits
the method flags in a slightly different manner than I originally
expected in the hand-written IL test. Based on discussion with the
Mono team I have had to temporarily disable the svm_diamondshape
test on Mono before the correct fix is found.

Thanks

Tomas

18 months agoRemove some remnants of multi-module support (#82046)
Elinor Fung [Fri, 17 Feb 2023 21:53:52 +0000 (13:53 -0800)]
Remove some remnants of multi-module support  (#82046)

- `Module::GetModuleRef` always returns `mdFileNil`
- `Module::m_FileReferencesMap` only ever stored/returned the module itself

18 months agoUpdate dependencies from https://github.com/dotnet/roslyn-analyzers build 20230216...
dotnet-maestro[bot] [Fri, 17 Feb 2023 21:47:10 +0000 (15:47 -0600)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230216.1 (#82295)

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.3.5-beta1.23111.1 -> To Version 3.3.5-beta1.23116.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
18 months agoAdd new proposed API to Ancillary.Interop (#81063)
Jackson Schuster [Fri, 17 Feb 2023 20:27:27 +0000 (12:27 -0800)]
Add new proposed API to Ancillary.Interop (#81063)

Updates the VTableStubGenerator to use the latest version of the proposed API.

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
18 months agoDirectory.Build.props: define RuntimeConfiguration before it's used. (#82302)
Tom Deseyn [Fri, 17 Feb 2023 18:56:12 +0000 (19:56 +0100)]
Directory.Build.props: define RuntimeConfiguration before it's used. (#82302)

18 months agoFix runtime-community pipeline (#82265)
Adeel Mujahid [Fri, 17 Feb 2023 18:00:25 +0000 (20:00 +0200)]
Fix runtime-community pipeline (#82265)

18 months agoRemove range check in VSB.Append(char) (#82264)
Miha Zupan [Fri, 17 Feb 2023 17:37:42 +0000 (18:37 +0100)]
Remove range check in VSB.Append(char) (#82264)

18 months ago[wasm] Disable function pointer tests on browser (#82285)
Marek Fišera [Fri, 17 Feb 2023 17:12:50 +0000 (18:12 +0100)]
[wasm] Disable function pointer tests on browser (#82285)

18 months ago[mono][aot] Enable dedup by default for iOS (#81319)
Milos Kotlar [Fri, 17 Feb 2023 15:48:41 +0000 (16:48 +0100)]
[mono][aot] Enable dedup by default for iOS (#81319)

* Enable dedup in HelloiOS app

* Disable call transformation for MONO_PATCH_INFO_METHOD as some callees require initialization

* Fix build warnings

* Enable dedup by default for ios

18 months agoThe path of androd_sdk was changed. (#82256)
Thays Grazia [Fri, 17 Feb 2023 15:19:35 +0000 (12:19 -0300)]
The path of androd_sdk was changed. (#82256)

18 months agoRemove iossimulator_x86 from helix-queues-setup.yml (#82244)
Alexander Köplinger [Fri, 17 Feb 2023 12:28:21 +0000 (13:28 +0100)]
Remove iossimulator_x86 from helix-queues-setup.yml (#82244)

Forgot this one in https://github.com/dotnet/runtime/pull/81965

18 months agoInstall native dependencies on all Apple OS in CI (#82263)
Adeel Mujahid [Fri, 17 Feb 2023 12:19:43 +0000 (14:19 +0200)]
Install native dependencies on all Apple OS in CI (#82263)

18 months agoFix ds-ipc-pal-socket.c Windows build. (#77840)
Johan Lorensson [Fri, 17 Feb 2023 10:37:11 +0000 (11:37 +0100)]
Fix ds-ipc-pal-socket.c Windows build. (#77840)

Mainly build on mobile platforms, but beneficial if it works on Windows in order to test Mono TCP/IP EventPipe transport.

18 months ago[wasm] Better support for automated tests in jiterpreter; more opcodes (#82281)
Katelyn Gadd [Fri, 17 Feb 2023 06:13:48 +0000 (22:13 -0800)]
[wasm] Better support for automated tests in jiterpreter; more opcodes (#82281)

* [jiterp] Move enter_jiterpreter into a helper function, and call it immediately after compiling traces
This allows running tests under jiterp with hitcount=1 and tiering off
* Implement CONV_R_UN opcodes
* Implement INTRINS_ORDINAL_IGNORE_CASE_ASCII
* Remove the safepoint from tier_enter_jiterpreter, do it in traces instead

18 months ago[fabricbot] Treat needs-area-label as an area for Eric/Jeff (#82279)
Jeff Handley [Fri, 17 Feb 2023 02:10:39 +0000 (18:10 -0800)]
[fabricbot] Treat needs-area-label as an area for Eric/Jeff (#82279)

18 months agoFix disposing root X.509 certificate prematurely for OCSP stapling (#82116)
Kevin Jones [Fri, 17 Feb 2023 00:34:41 +0000 (19:34 -0500)]
Fix disposing root X.509 certificate prematurely for OCSP stapling (#82116)

In SslStreamCertificateContext, don't dispose of the root cert if it's about to be handed to the AddRootCert PAL call,
which was the high-level cause of a segfault when handling certificate chains of length 2 in OCSP Stapling on Linux.

This change additionally guards against disposed certificates in the OCSP Stapling retriever (disabling the feature
instead of segfaulting), and adds tests to ensure that we don't regress 2-cert chains in the future.

18 months ago[iOS] Disable additional sourcegenerator tests (#82184)
Steve Pfister [Fri, 17 Feb 2023 00:15:19 +0000 (19:15 -0500)]
[iOS] Disable additional sourcegenerator tests (#82184)

These aren't necessary to run on mobile targets, so skip them.

18 months agoFix clr build on illumos-x64 (#82183)
Adeel Mujahid [Thu, 16 Feb 2023 23:46:07 +0000 (01:46 +0200)]
Fix clr build on illumos-x64 (#82183)

* Fix clr build on illumos-x64

* Keep in sync with codeman

* Use CPUID_XXX

18 months ago[SuperFileCheck] Added verification when using 'FULL-LINE-NEXT'. Fixing ARM64 compari...
Will Smith [Thu, 16 Feb 2023 23:30:31 +0000 (15:30 -0800)]
[SuperFileCheck] Added verification when using 'FULL-LINE-NEXT'. Fixing ARM64 comparison tests. (#82135)

* Added SuperFileCheck verification when using 'FULL-LINE-NEXT'. Fixing ARM64 comparison disasm tests.

* Update Program.cs

* Update src/tests/JIT/opt/Compares/compares.cs

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
* Update compares.cs

* Update compares.cs

* Update compares.cs

* Update compares.cs

* Update compares.cs

* Update compares.cs

---------

Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
18 months agoHold temporary keychain refs for certificates imported with X509Certificate2Collectio...
Filip Navara [Thu, 16 Feb 2023 23:20:42 +0000 (00:20 +0100)]
Hold temporary keychain refs for certificates imported with X509Certificate2Collection.Import

This corrects the reference counting for temporary keychains when using X509Certificate2Collection.Import,
both releasing a ref that is no longer needed, and adding a ref to the new/target keychain to prevent that
keychain from being deleted too soon.

18 months agoMark DivRem with RequiresPreviewFeatures (#82221)
Kunal Pathak [Thu, 16 Feb 2023 21:09:51 +0000 (13:09 -0800)]
Mark DivRem with RequiresPreviewFeatures (#82221)

* Add back DivRem in ref

* Remove fakelib from test projects

* Mark APIs with RequiresPreviewFeatures

* Revert compatibility changes in SPC

18 months agoAdd reflection introspection support for function pointers (#81006)
Steve Harter [Thu, 16 Feb 2023 20:39:53 +0000 (14:39 -0600)]
Add reflection introspection support for function pointers (#81006)

18 months ago[mono][interp] Initialize il_offset for allocated basic blocks (#82242)
Vlad Brezae [Thu, 16 Feb 2023 20:10:45 +0000 (22:10 +0200)]
[mono][interp] Initialize il_offset for allocated basic blocks (#82242)

Multiple areas of the interpreter expect all basic blocks to have an associated il_offset. During bblock reorder optimization, we were allocating a new bblock without initializing it with the offset of the preceding bblock.

18 months agoAdd copyright info to eventpipe files (#82232)
Lakshan Fernando [Thu, 16 Feb 2023 19:04:07 +0000 (11:04 -0800)]
Add copyright info to eventpipe files (#82232)

18 months agoMark .overrides from marked methods in a copy assembly (#82197)
Jackson Schuster [Thu, 16 Feb 2023 19:00:53 +0000 (11:00 -0800)]
Mark .overrides from marked methods in a copy assembly (#82197)

Fixes #81746

Static abstract interface methods that aren't used are expected to be removed, and any references to them in the metadata of the overriders are expected to be removed in SweepStep. However, overrides may come from a 'copy' assembly, so their metadata won't get swept at all. We would still remove the static abstract method, but would leave the reference to it in the overrider's metadata, creating invalid metadata.

This fixes the issue by making sure all methods referenced in the .overrides metadata of method X are marked if method X is in a copy assembly, where previously we would postpone marking the .overrides if the base was static abstract.

18 months agoJIT: fix some asserts in profile incorporation and reconstruction (#82196)
Andy Ayers [Thu, 16 Feb 2023 18:54:00 +0000 (10:54 -0800)]
JIT: fix some asserts in profile incorporation and reconstruction (#82196)

If we're instrumenting a Tier0 method with partial compilation enabled, we may
see divergence between the instrumentation plan phase (which runs before
importation) and the instrumentation phase (which runs after), because the
importer may have altered flow at partial compilation points. Tolerate this.

If we're instrumenting a Tier1 OSR method whose first block is a self-loop,
we may not see a pseudo-edge from the OSR entry to the method's first block
in the profile reconstruction model, because they are the same block.
Tolerate this.

Fixes #82128.

18 months agoAdd cmake check for ioclt prototype (#82173)
Adeel Mujahid [Thu, 16 Feb 2023 18:21:36 +0000 (20:21 +0200)]
Add cmake check for ioclt prototype (#82173)

* Add cmake check for ioclt prototype

* .