platform/upstream/dotnet/runtime.git
12 months agoJIT: Don't use addressing modes for volatile loads for gc types (#70794)
Egor Bogatov [Sat, 29 Jul 2023 19:04:01 +0000 (21:04 +0200)]
JIT: Don't use addressing modes for volatile loads for gc types (#70794)

12 months agoRename UnrollEqualsStartsWIth to UnrollEqualsStartsWith (#89656)
Marc Brooks [Sat, 29 Jul 2023 18:27:31 +0000 (13:27 -0500)]
Rename UnrollEqualsStartsWIth to UnrollEqualsStartsWith  (#89656)

12 months ago[browser] Clean-up typescript code imported from Blazor (#89435)
Marek Fišera [Sat, 29 Jul 2023 16:45:05 +0000 (18:45 +0200)]
[browser] Clean-up typescript code imported from Blazor (#89435)

12 months agoUpdate dependencies from https://github.com/dotnet/arcade build 20230728.2 (#89668)
dotnet-maestro[bot] [Sat, 29 Jul 2023 16:38:49 +0000 (09:38 -0700)]
Update dependencies from https://github.com/dotnet/arcade build 20230728.2 (#89668)

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.23377.1 -> To Version 8.0.0-beta.23378.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
12 months agoDisable MacCatalyst too in PalCreateDump.cpp (#89665)
Alexander Köplinger [Sat, 29 Jul 2023 11:09:12 +0000 (13:09 +0200)]
Disable MacCatalyst too in PalCreateDump.cpp (#89665)

12 months ago [nodejs][http] remove active issue 86326 (#89588)
Pavel Savara [Sat, 29 Jul 2023 10:36:58 +0000 (12:36 +0200)]
 [nodejs][http] remove active issue 86326 (#89588)

12 months agoEnable new analyzer CA1868: 'Unnecessary call to 'Contains' for sets' and fix finding...
Mario Pistrich [Sat, 29 Jul 2023 07:41:35 +0000 (09:41 +0200)]
Enable new analyzer CA1868: 'Unnecessary call to 'Contains' for sets' and fix findings (#89652)

12 months ago[browser] Integrate DevServer into WasmAppHost (#88985)
Marek Fišera [Sat, 29 Jul 2023 06:24:06 +0000 (08:24 +0200)]
[browser] Integrate DevServer into WasmAppHost (#88985)

12 months agoFix ABI and Interop issues with InlineArray types (#89519)
Jeremy Koritzinsky [Sat, 29 Jul 2023 03:47:49 +0000 (20:47 -0700)]
Fix ABI and Interop issues with InlineArray types (#89519)

12 months agoRemove _isBlocked constraint from StreamReader.Peek() (#89609)
David Cantú [Sat, 29 Jul 2023 02:21:36 +0000 (21:21 -0500)]
Remove _isBlocked constraint from StreamReader.Peek() (#89609)

* Remove _isBlocked constraint from StreamReader.Peek()

* Use DelegateStream instead of introducing a new Stream impl

12 months agoUse new name of the ignorelist switch. (#89643)
Jeremy Koritzinsky [Sat, 29 Jul 2023 01:18:17 +0000 (18:18 -0700)]
Use new name of the ignorelist switch. (#89643)

12 months ago[main] Update dependencies from dotnet/arcade dotnet/xharness dotnet/runtime-assets...
dotnet-maestro[bot] [Sat, 29 Jul 2023 00:45:45 +0000 (19:45 -0500)]
[main] Update dependencies from dotnet/arcade dotnet/xharness dotnet/runtime-assets dotnet/emsdk dotnet/hotreload-utils dotnet/llvm-project (#89628)

* Update dependencies from https://github.com/dotnet/arcade build 20230727.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.23376.1 -> To Version 8.0.0-beta.23377.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23370.1 -> To Version 8.0.0-prerelease.23377.1

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

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.23360.1 -> To Version 8.0.0-beta.23377.2

* Update dependencies from https://github.com/dotnet/emsdk build 20230727.1

Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport
 From Version 8.0.0-rc.1.23375.3 -> To Version 8.0.0-rc.1.23377.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20230727.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 8.0.0-alpha.0.23374.1 -> To Version 8.0.0-alpha.0.23377.1

* Update dependencies from https://github.com/dotnet/llvm-project build 20230728.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.Mono.LLVM.Sdk , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.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.Mono.LLVM.Sdk , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.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.JIT.Tools , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx-x64.Microsoft.NETCore.Runtime.ObjWriter , 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 16.0.5-alpha.1.23376.2 -> To Version 16.0.5-alpha.1.23378.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
12 months agoTag events with thread specific information (#89516)
Lakshan Fernando [Fri, 28 Jul 2023 22:41:11 +0000 (15:41 -0700)]
Tag events with thread specific information (#89516)

* Tagging events with thread specific information

* FB

* Update src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.cpp

Co-authored-by: Elinor Fung <elfung@microsoft.com>
* Remove stale comments

---------

Co-authored-by: Elinor Fung <elfung@microsoft.com>
12 months agoRemove _NoLogging methods from VM (#89641)
Jasper [Fri, 28 Jul 2023 21:42:28 +0000 (23:42 +0200)]
Remove _NoLogging methods from VM  (#89641)

* Remove getIX_NoLogging

* Remove GetModule_NoLogging

* Remove IsRestored_NoLogging

* Remove GetOffset_NoLogging

* Remove GetMethodTable_NoLogging

* Remove HasClass[OrMethod]Instantiation_NoLogging

* Remove GetNumVirtuals_NoLogging

* Remove GetWriteableData[ForWrite]_NoLogging

* Remove GetMemberDef_NoLogging

* Remove GetApproxEnclosingMethodTable_NoLogging

* Remove GetTypeDefRid_NoLogging

* Remove GetCl_NoLogging

* Rename GetClass_NoLogging and remove old GetClassWithPossibleAV

* Update src/coreclr/vm/methodtable.h

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
12 months agoSPMI: Do not consider BADCODE as a replay failure (#89626)
Jakob Botsch Nielsen [Fri, 28 Jul 2023 20:59:14 +0000 (22:59 +0200)]
SPMI: Do not consider BADCODE as a replay failure (#89626)

BADCODE should not be bucketed as a replay failure since it is expected
as a result of some patterns of illegal IL. Considering it a replay
failure does not allow us to differentiate it from JIT bugs (such as a
JIT crash).

12 months ago[browser] dispose more JS proxies (#89559)
Pavel Savara [Fri, 28 Jul 2023 20:56:05 +0000 (22:56 +0200)]
[browser] dispose more JS proxies (#89559)

12 months agoRemove unused var (#89648)
Fan Yang [Fri, 28 Jul 2023 20:05:36 +0000 (16:05 -0400)]
Remove unused var (#89648)

12 months agoAdd some checks for merged test groups (#89521)
Mark Plesko [Fri, 28 Jul 2023 18:39:19 +0000 (11:39 -0700)]
Add some checks for merged test groups (#89521)

- CLRTest.Execute.Batch.targets
  - Fix CLRTestExecutionArguments (allows passing a filter argument to <mergedgroup>.cmd
  - Fix indenting in generated script
- XUnitWrapperGenerator
  - Move some generated code into (shared) ITestInfo.cs
  - Also display exception on stdout on failure
  - Add check that projects in merged test groups don't contain entry points
    - Can be a sign of code that is expected to run but won't be
    - Or can be a [Fact]/etc-less entry point in a ReqProcIso project but would then need to be fixed if ReqProcIso were removed
- Directory.Build.targets
  - Run XUnitWrapperGenerator on test projects in merged groups
  - Can't simply replace the conditional because we have XUnit-style tests outside of merged groups
- Update tests to conform to above checks plus a bit of opportunistic cleanup

12 months agoSet load prefix for apple mobile runtime tests (#89572)
Milos Kotlar [Fri, 28 Jul 2023 18:28:15 +0000 (20:28 +0200)]
Set load prefix for apple mobile runtime tests (#89572)

12 months agoEnsure built-in converters can skip JSON values when invoked via custom converters...
Eirik Tsarpalis [Fri, 28 Jul 2023 17:33:11 +0000 (20:33 +0300)]
Ensure built-in converters can skip JSON values when invoked via custom converters in async deserialization. (#89637)

12 months agoFix collection deserialization in polymorphic objects. (#89635)
Eirik Tsarpalis [Fri, 28 Jul 2023 17:32:48 +0000 (20:32 +0300)]
Fix collection deserialization in polymorphic objects. (#89635)

12 months ago[mono][sgen] Log also size of reserved empty major blocks (#88825)
Vlad Brezae [Fri, 28 Jul 2023 17:21:08 +0000 (20:21 +0300)]
[mono][sgen] Log also size of reserved empty major blocks (#88825)

12 months agoGen0 Budget counter (#89412)
Andrew Au [Fri, 28 Jul 2023 17:12:12 +0000 (10:12 -0700)]
Gen0 Budget counter (#89412)

12 months agoImplement IKeyedServiceProvider interface on ServiceProviderEngineScope (#89509)
Natalia Kondratyeva [Fri, 28 Jul 2023 16:53:51 +0000 (17:53 +0100)]
Implement IKeyedServiceProvider interface on ServiceProviderEngineScope (#89509)

* Implement IKeyedServiceProvider interface

* Add more tests

12 months agoRe-enable event tracing feature on NativeAOT/iOS and fix PalCreateDump.cpp build...
Filip Navara [Fri, 28 Jul 2023 15:57:07 +0000 (17:57 +0200)]
Re-enable event tracing feature on NativeAOT/iOS and fix PalCreateDump.cpp build (#89627)

12 months agoDon't include empty prefix with EnvironmentVariablesConfigurationProvider (#89612)
James Newton-King [Fri, 28 Jul 2023 15:39:20 +0000 (23:39 +0800)]
Don't include empty prefix with EnvironmentVariablesConfigurationProvider (#89612)

12 months agoAdd explicit conversion of call args (#89428)
Milos Kotlar [Fri, 28 Jul 2023 13:29:12 +0000 (15:29 +0200)]
Add explicit conversion of call args (#89428)

12 months ago[mono][jit] Enabled Ctor, Set_Item and Get_Item Vector4 intrinsics for miniJIT on...
Vlad-Alexandru Ionescu [Fri, 28 Jul 2023 12:13:51 +0000 (15:13 +0300)]
[mono][jit] Enabled Ctor, Set_Item and Get_Item Vector4 intrinsics for miniJIT on ARM64 (#89501)

* Enabled rest of V4 intrinsics

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
* Added support for non-constant index

Signed-off-by: Vlad <vladionescu1399@gmail.com>
---------

Signed-off-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
Signed-off-by: Vlad <vladionescu1399@gmail.com>
Co-authored-by: Vlad - Alexandru Ionescu <vlad-alexandruionescu@Vlads-MacBook-Pro-5.local>
12 months ago[mono] Fix second pass of MarshallingPInvokeScanner with metadata-free DLLs (#89555)
Jan Dupej [Fri, 28 Jul 2023 09:24:36 +0000 (11:24 +0200)]
[mono] Fix second pass of MarshallingPInvokeScanner with metadata-free DLLs (#89555)

* Fix second pass of marshalling scanner to also tolerate metadata-free PEs.

* Assembly name is now checked only when metadata are present.

12 months agoEnsure marshal-ilgen is included. (#89564)
Jan Dupej [Fri, 28 Jul 2023 09:09:42 +0000 (11:09 +0200)]
Ensure marshal-ilgen is included. (#89564)

12 months agoMake a copy of 'clrjit' binary for use in SuperPMI collect to avoid heap errors when...
Will Smith [Fri, 28 Jul 2023 08:23:31 +0000 (01:23 -0700)]
Make a copy of 'clrjit' binary for use in SuperPMI collect to avoid heap errors when the same 'clrjit' binary is used (#89473)

* Make a copy of 'clrjit' binary for use in SuperPMI collect to avoid heap errors when the same 'clrjit' binary is used

* Feedback

* Feedback

12 months agoFix ProfileEnter / ProfileLeave (#88134)
Jan Vorlicek [Fri, 28 Jul 2023 07:54:14 +0000 (09:54 +0200)]
Fix ProfileEnter / ProfileLeave (#88134)

* Fix ProfileEnter / ProfileLeave

These two functions can be entered in preemptive mode for
UnmanagedCallersOnly methods and also on thread that was not known to
runtime. This change switches to cooperative mode if the thread is known
to runtime and early outs when the thread was not known.

* Add runtime thread setup if it doesn't exist

* Undo the thread struct setup for ProfileLeave

12 months agoFix issue with being able to MakeGenericMethod methods on generic types (#89615)
Michal Strehovský [Fri, 28 Jul 2023 07:10:59 +0000 (16:10 +0900)]
Fix issue with being able to MakeGenericMethod methods on generic types (#89615)

The guarantees that one can always `MakeGeneric` instances over reference types should extend to generic methods on generic types.

We were previously not able to guarantee this, but #83438 made this possible.

12 months ago[RISC-V] Enable TLS field access optimization (#89561)
Tomasz Sowiński [Fri, 28 Jul 2023 06:58:17 +0000 (08:58 +0200)]
[RISC-V] Enable TLS field access optimization (#89561)

12 months agoadding clrgc variant with regions enabled (#89129)
Manish Godse [Fri, 28 Jul 2023 05:50:40 +0000 (22:50 -0700)]
adding clrgc variant with regions enabled (#89129)

* adding clrgc variant with regions enabled

* only build regions for 64 bit platforms

* rename to clrgcexp for experimental

12 months agoRemove extraneous quotation marks and other doc fixes (#89528)
Genevieve Warren [Fri, 28 Jul 2023 02:45:53 +0000 (19:45 -0700)]
Remove extraneous quotation marks and other doc fixes (#89528)

* Remove extraneous quotation marks

* Update GC.CoreCLR.cs

12 months agoAdd more doc comments that were missing (#89597)
Jeremy Koritzinsky [Fri, 28 Jul 2023 02:05:12 +0000 (19:05 -0700)]
Add more doc comments that were missing (#89597)

12 months agoNativeAOT createdump fork/exec for crash dump generation (#89203)
Mike McLaughlin [Fri, 28 Jul 2023 01:58:42 +0000 (18:58 -0700)]
NativeAOT createdump fork/exec for crash dump generation (#89203)

* NativeAOT createdump fork/exec for crash dump generation

Port the .NET Core createdump fork/exec code to NativeAOT.

Add src/native/inc/generatedumpflags.h. Remove dup definitions of this enum.

Move and port clrconfignocache.h from src/coreclr/inc to src/native/inc/.

* Add building more command line arguments for signal number, etc.

Fix some build problems.

* Code review feedback - use RhConfig instead of clrconfignocache.h

* Fix string buffer length

* Fix nativeaot test failures. Added crash buffer address to debug header contract

* Generate a core dump on unhandled SIGSEGV/SIGFPE

Add PalCreateDump.h with all the public functions.

* Build and pass an EXCEPTION_RECORD for Linux like it was done for Windows. The next step is to pass the address of it to createdump.

* Pass exception record address to createdump

* Add special diagnostic info memory region

Contains the exception record address for Native AOT crashes.

12 months ago[wasm][debugger] Fix test failing on firefox (#89607)
Ankit Jain [Fri, 28 Jul 2023 01:48:32 +0000 (21:48 -0400)]
[wasm][debugger] Fix test failing on firefox (#89607)

Do not send `SetJustMyCode` on firefox, as it does not support this
setting.

On-behalf-of: @thaystg

12 months agoFix arm64 line numbers in stacktraces (#89604)
Jan Vorlicek [Fri, 28 Jul 2023 00:15:18 +0000 (02:15 +0200)]
Fix arm64 line numbers in stacktraces (#89604)

In some cases, the line numbers in stack traces on arm64 and possibly
other architectures can be wrong. This is due to the previous adjustment
of the code address for the frame not being recognized by the IL offset
extraction code, which adjusts it again unnecessarily.

12 months ago[wasm] WBT - add some debug bits to collect information on a rare failure (#89584)
Ankit Jain [Thu, 27 Jul 2023 21:58:25 +0000 (17:58 -0400)]
[wasm] WBT - add some debug bits to collect information on a rare failure (#89584)

.. failure, where `Program.cs` fails to compile. In such a case make the
project contents available in the logs.

Issue: https://github.com/dotnet/runtime/issues/86533

12 months ago[main] Update dependencies from dotnet/runtime dotnet/llvm-project dotnet/arcade...
dotnet-maestro[bot] [Thu, 27 Jul 2023 21:39:35 +0000 (21:39 +0000)]
[main] Update dependencies from dotnet/runtime dotnet/llvm-project dotnet/arcade dotnet/icu dotnet/emsdk dotnet/hotreload-utils dotnet/cecil (#89299)

[main] Update dependencies from dotnet/runtime dotnet/llvm-project dotnet/arcade dotnet/icu dotnet/emsdk dotnet/hotreload-utils dotnet/cecil
- Coherency Updates:
  - Microsoft.DotNet.XliffTasks: from 1.0.0-beta.23368.1 to 1.0.0-beta.23374.1 (parent: Microsoft.DotNet.Arcade.Sdk)

 - Merge remote-tracking branch 'upstream/main' into darc-main-7846c1a8-68cb-40c2-bee3-00bd61fd1810

 - Change the llvm warning limits

12 months agoUpdate dependencies from https://github.com/dotnet/roslyn build 20230723.1 (#89382)
dotnet-maestro[bot] [Thu, 27 Jul 2023 20:48:45 +0000 (15:48 -0500)]
Update dependencies from https://github.com/dotnet/roslyn build 20230723.1 (#89382)

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.7.0-3.23366.1 -> To Version 4.7.0-3.23373.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
12 months agoAvoid boxing in Enum.HasFlag in Tier0 (#89348)
Egor Bogatov [Thu, 27 Jul 2023 20:31:18 +0000 (22:31 +0200)]
Avoid boxing in Enum.HasFlag in Tier0 (#89348)

Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com>
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
12 months agoImprove serialization error message when IsReflectionEnabledByDefault is turned off...
Eirik Tsarpalis [Thu, 27 Jul 2023 20:16:12 +0000 (21:16 +0100)]
Improve serialization error message when IsReflectionEnabledByDefault is turned off. (#89578)

* Improve serialization error message when IsReflectionEnabledByDefault is turned off.

* Update trimming tests

12 months agoUpdate `RuntimeEnvironment.GetSystemVersion()` (#89575)
Aaron Robinson [Thu, 27 Jul 2023 20:05:21 +0000 (13:05 -0700)]
Update `RuntimeEnvironment.GetSystemVersion()` (#89575)

This API is now emitting a valid version in alignment with
https://github.com/dotnet/runtime/issues/28788.
---------
Co-authored-by: Stephen Toub <stoub@microsoft.com>
12 months ago[wasm][debugger]Trying to improve CI performance for debugger-tests (#89525)
Thays Grazia [Thu, 27 Jul 2023 19:48:11 +0000 (16:48 -0300)]
[wasm][debugger]Trying to improve CI performance for debugger-tests  (#89525)

* Trying to improve CI performance for debugger-tests to avoid the crashes and the timeouts.

* Fixing one test and setting just my code TRUE as default.

* Fix compilation

* Fixing tests

* Fixing test behavior and adding comments suggested by @radical

12 months agoMake host tests use HostWriter to create apphost to test (#89523)
Elinor Fung [Thu, 27 Jul 2023 19:07:39 +0000 (12:07 -0700)]
Make host tests use HostWriter to create apphost to test (#89523)

12 months agoOnly register System.Diagnostics section on net7 and later (#89535)
Eric StJohn [Thu, 27 Jul 2023 18:46:47 +0000 (11:46 -0700)]
Only register System.Diagnostics section on net7 and later (#89535)

12 months agoFix #88628. (#89569)
Eirik Tsarpalis [Thu, 27 Jul 2023 17:58:37 +0000 (18:58 +0100)]
Fix #88628. (#89569)

12 months agoFixing the new V512 logic to properly negate the mask checks (#89522)
Tanner Gooding [Thu, 27 Jul 2023 17:50:56 +0000 (10:50 -0700)]
Fixing the new V512 logic to properly negate the mask checks (#89522)

* Fixing the new V512 logic to properly negate the mask checks

* Adding regression tests for dotnet/runtime#89512

12 months agoUpdate description of DOTNET_JitStressProcedureSplitting (#89576)
Aman Khalid [Thu, 27 Jul 2023 17:17:25 +0000 (13:17 -0400)]
Update description of DOTNET_JitStressProcedureSplitting (#89576)

When the JitStressProcedureSplitting mode was first implemented, we decided to
skip functions with exception handling, since we hadn't decided how to handle
cold EH funclets just yet. But for about a year now, JitStressProcedureSplitting has worked
with functions with EH funclets (see Compiler::fgDetermineFirstColdBlock), so its description
in jitconfigvalues.h should reflect this.

12 months agoJIT: Handle half accesses for SIMDs in local morph (#89520)
Jakob Botsch Nielsen [Thu, 27 Jul 2023 17:07:25 +0000 (19:07 +0200)]
JIT: Handle half accesses for SIMDs in local morph (#89520)

While it's not generally expected that halves can be accessed directly (ending
up with LCL_FLD), it sometimes happens in some of the SW implementations of
Vector256/Vector512 methods. In rare cases the JIT still falls back to these
even with there is HW acceleration. In those cases we want to avoid DNER'ing the
involved locals, so expand the existing recognition with these patterns.

Also add a check to the existing SIMD16 -> SIMD12 to verify the source is a
SIMD16.

Fix #85359
Fix #89456

Some size wise regressions are expected, which come down to

- A large number of similar looking tests end up now enregistering some locals
  that cause new upper half saves/restores to be required. This accounts for
  most of the size-wise regressions.
- The expansions often do not result in smaller code because loading/storing the
  halves directly from/to stack is smaller code than the vector equivalent with
  extraction/insertion.

Many of the regressions are in SW implementations of Vector256/Vector512 methods
that we usually do not expect to see called with HW acceleration supported.

12 months agoJIT: Set some limits in gtSplitTree stress testing (#89560)
Jakob Botsch Nielsen [Thu, 27 Jul 2023 17:05:52 +0000 (19:05 +0200)]
JIT: Set some limits in gtSplitTree stress testing (#89560)

These limits are hit only by the CseTest and ManyFields tests over all
our SPMI collections.

Fix #88028

12 months agoFix opt-cross-module using non version safe tokens (#89481)
David Wrighton [Thu, 27 Jul 2023 16:47:28 +0000 (09:47 -0700)]
Fix opt-cross-module using non version safe tokens (#89481)

* Fix issue where in some cases the compiler would generate references using tokens from modules not in the current module set.

Also add an assert to detect cases where this might happen

* Update src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ModuleTokenResolver.cs

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
* Sigh. Missed another issue with the one line refactor

---------

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
12 months agouse FindPython to also locate python3 (#89546)
Tomas Weinfurt [Thu, 27 Jul 2023 16:03:50 +0000 (09:03 -0700)]
use FindPython to also locate python3 (#89546)

12 months ago[Mono] Look for Native Signal SIMD Context (#89467)
Fan Yang [Thu, 27 Jul 2023 16:03:37 +0000 (12:03 -0400)]
[Mono] Look for Native Signal SIMD Context (#89467)

* Find Navtive Signal SIMD Context

* Fix coding format

* Set fregs to 0 when SIMD registers were not found

12 months agoTry to improve EventSource_ParallelRequests_LogsNewConnectionIdForEachRequest reliabi...
Miha Zupan [Thu, 27 Jul 2023 15:58:47 +0000 (17:58 +0200)]
Try to improve EventSource_ParallelRequests_LogsNewConnectionIdForEachRequest reliability (#89192)

Closes #89035.

12 months agoRemove `AssemblyMetadata(".NETFrameworkAssembly", "")` attributes (#89490)
Michal Strehovský [Thu, 27 Jul 2023 14:55:19 +0000 (23:55 +0900)]
Remove `AssemblyMetadata(".NETFrameworkAssembly", "")` attributes (#89490)

* Remove `AssemblyMetadata(".NETFrameworkAssembly", "")` attributes

This is likely a .NET Native leftover that is currently (ironically) breaking .NET Native. This attribute indicates to the .NET Native compiler that the assembly can be trimmed.

We're currently setting this on assemblies that no longer carry RD.XML to make this safe. Without this attribute, the assembly will be treated like any other and not trimmed.

Fixes #44697.

* Delete mention of the attribute in docs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
12 months ago[HttpClientFactory] Add tests for all simple SocketsHttpHandler properties (#89202)
Natalia Kondratyeva [Thu, 27 Jul 2023 14:51:43 +0000 (15:51 +0100)]
[HttpClientFactory] Add tests for all simple SocketsHttpHandler properties (#89202)

* Add tests for all simple SocketsHttpHandler properties

* Fix typo

12 months agoSetting RequiredMemberAttribute usage as inherited. (#89418)
Maksim Golev [Thu, 27 Jul 2023 14:38:06 +0000 (18:38 +0400)]
Setting RequiredMemberAttribute usage as inherited. (#89418)

* fix(86031): Processing "RequiredMemberAttribute" by whole type hierarchy.

* fix(86031): Optimization of calculation for RequiredMemberAttribute checking requirements.

* feat(86031): Adding additional tests for inheritance with required modifiers.

* fix(86031): Fix invalid number conversion for early existed tests.

* fix(86031): Fixes of formatting.

* fix(86031): Removing FluentAssertions dependency.

* Update src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.targets

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

---------

Co-authored-by: Maksim Golev <mgolev@htc-cs.ru>
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
12 months agoImprove default cross compiler state (#88917)
Jo Shields [Thu, 27 Jul 2023 14:31:37 +0000 (10:31 -0400)]
Improve default cross compiler state (#88917)

* Move AOT variable setting to BuildMonoCross target

* Ensure a value for AotHostOS/AotHostArchitecture if not specified

* improve wasm windows special-case

12 months ago[Mono] Fix for EventPipe ep_rt_temp_path_get off by 1 issue. (#89438)
Johan Lorensson [Thu, 27 Jul 2023 14:04:42 +0000 (16:04 +0200)]
[Mono] Fix for EventPipe ep_rt_temp_path_get off by 1 issue. (#89438)

* Fix Mono ep_rt_temp_path_get off by 1 issue.

* Add native EventPipe test for ep_rt_temp_path_get.

* Fix build error.

12 months agoEnsure System.Text.Json SG diagnostics don't use Location values from referenced...
Eirik Tsarpalis [Thu, 27 Jul 2023 12:13:27 +0000 (13:13 +0100)]
Ensure System.Text.Json SG diagnostics don't use Location values from referenced assemblies. (#89518)

12 months agoUse RecursiveDir property to create app bundle for Helix (#89508)
Milos Kotlar [Thu, 27 Jul 2023 12:00:29 +0000 (14:00 +0200)]
Use RecursiveDir property to create app bundle for Helix (#89508)

12 months agoEnable - should be already fixed. (#89551)
Ilona Tomkowicz [Thu, 27 Jul 2023 11:59:47 +0000 (13:59 +0200)]
Enable - should be already fixed. (#89551)

12 months agoExtractMSB arm64 LLVM + refactor mini JIT op codes (#89431)
Matous Kozak [Thu, 27 Jul 2023 10:54:54 +0000 (12:54 +0200)]
ExtractMSB arm64 LLVM + refactor mini JIT op codes (#89431)

12 months ago[browser][http] test and compatibility improvements (#89504)
Pavel Savara [Thu, 27 Jul 2023 09:50:38 +0000 (11:50 +0200)]
[browser][http] test and compatibility improvements (#89504)

12 months agoRemove illink test workaround for removed declaring type (#89529)
Sven Boemer [Thu, 27 Jul 2023 09:10:34 +0000 (02:10 -0700)]
Remove illink test workaround for removed declaring type (#89529)

12 months agoJIT: Set method context for delegate GDV (#89499)
Jakob Botsch Nielsen [Thu, 27 Jul 2023 08:47:55 +0000 (10:47 +0200)]
JIT: Set method context for delegate GDV (#89499)

Instead of passing through the IL context, update the method context to
be the exact method that were recorded in the delegate (which will
include the full instantiation).

Also do a bit of clean up.

Fix #89495

12 months agoRemove unused suppressions for System.Linq.Expressions (#89524)
Eric StJohn [Thu, 27 Jul 2023 07:36:50 +0000 (00:36 -0700)]
Remove unused suppressions for System.Linq.Expressions (#89524)

12 months agoFlush the gclog after GC (#88222)
Andrew Au [Thu, 27 Jul 2023 05:26:32 +0000 (22:26 -0700)]
Flush the gclog after GC (#88222)

12 months agoEnsure that `EqualsAny(x & y, Zero)` uses the right `GenCondition` (#89544)
Tanner Gooding [Thu, 27 Jul 2023 05:03:12 +0000 (22:03 -0700)]
Ensure that `EqualsAny(x & y, Zero)` uses the right `GenCondition` (#89544)

* Adding more tests covering specialzied vector comparisons against zero

* Ensure that `EqualsAny(x & y, Zero)` uses the right `GenCondition`

12 months agoIUnknown is also valid for IClassFactory (#89540)
Aaron Robinson [Thu, 27 Jul 2023 04:08:48 +0000 (21:08 -0700)]
IUnknown is also valid for IClassFactory (#89540)

12 months agoDisable networking in XML resolver in AOT compilers (#89489)
Michal Strehovský [Thu, 27 Jul 2023 03:31:53 +0000 (12:31 +0900)]
Disable networking in XML resolver in AOT compilers (#89489)

Use the switch introduced in #84169. The AOT compilers don't need this. Speeds up the build by a couple seconds because we no longer compile garbage. Shrinks size of ilc.exe from 15.2 MB to 11.1 MB.

One the Native AOT side, this will only kick in once we update the SDK used to build the repo to something that has this (RC1?). On the crossgen2 side this takes effect immediately.

12 months agoFix hits for additional case added to analyzer CA2249 (#89542)
Carlos Sánchez López [Thu, 27 Jul 2023 02:29:08 +0000 (19:29 -0700)]
Fix hits for additional case added to analyzer CA2249 (#89542)

12 months agoTrim trailing space (#89541)
Andrew Au [Thu, 27 Jul 2023 01:49:10 +0000 (18:49 -0700)]
Trim trailing space (#89541)

12 months agoFix hits for new analyzer CA1862 (#89539)
Carlos Sánchez López [Thu, 27 Jul 2023 01:33:39 +0000 (18:33 -0700)]
Fix hits for new analyzer CA1862 (#89539)

12 months agohandle QUIC_STATUS_ADDRESS_NOT_AVAILABLE (#89362)
Tomas Weinfurt [Thu, 27 Jul 2023 00:16:37 +0000 (17:16 -0700)]
handle QUIC_STATUS_ADDRESS_NOT_AVAILABLE (#89362)

* handle QUIC_STATUS_ADDRESS_NOT_AVAILABLE

* Update src/libraries/System.Net.Quic/src/System/Net/Quic/Interop/msquic.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>
12 months agoCheck for dotnet.dll when enumerating SDK paths (#89333)
Elinor Fung [Wed, 26 Jul 2023 22:32:59 +0000 (15:32 -0700)]
Check for dotnet.dll when enumerating SDK paths (#89333)

The host treats the existence of a versioned folder under sdk as a valid SDK path. We've seen this cause confusion as users can end up in this state without their knowledge (for example, uninstall leaves an empty folder - which would normally be harmless, except when we try to use it as a valid SDK).

This adds a check for dotnet.dll instead of just the existence of the directory.

12 months agoFix TraceSwitch to synchronize the Value and Level properties (#89278)
Tarek Mahmoud Sayed [Wed, 26 Jul 2023 21:36:33 +0000 (14:36 -0700)]
Fix TraceSwitch to synchronize the Value and Level properties (#89278)

12 months ago[LoongArch64] fix the compiling errors within the CLFS linux (#89422)
Qiao Pengcheng [Wed, 26 Jul 2023 21:00:34 +0000 (05:00 +0800)]
[LoongArch64] fix the compiling errors within the CLFS linux (#89422)

* [LoongArch64] fix the compiling errors after
the linux-kernel and llvm had supported the LoongArch.

* amend code for CR.

* fix the error for code formate.

12 months agoImprove case-insensitive prefix extraction in Regex (#89449)
Stephen Toub [Wed, 26 Jul 2023 20:29:06 +0000 (16:29 -0400)]
Improve case-insensitive prefix extraction in Regex (#89449)

I hit this when writing a benchmark I expected to work well and found that it didn't. In .NET 8 we now extract a prefix to search for even if it's OrdinalIgnoreCase, but we weren't skipping over zero-width assertions, which meant a simple search like "\bword\b" with IgnoreCase would not find the text "word".

12 months agoImprove Http test timeout exception information (#89505)
Miha Zupan [Wed, 26 Jul 2023 19:54:38 +0000 (21:54 +0200)]
Improve Http test timeout exception information (#89505)

* Improve Http test timeout exception information

* Fix TestHelper references

12 months agoAvoid some rune iteration in GetEncodedTruncatedBytesFromString (#89458)
Stephen Toub [Wed, 26 Jul 2023 17:59:24 +0000 (13:59 -0400)]
Avoid some rune iteration in GetEncodedTruncatedBytesFromString (#89458)

When the Zip/TarArchive is using UTF8 as an encoding, it iterates through all the runes in the input to determine how much of the encoded text it can fit in the specified limit. We don't need to do that in the common case where the input is guaranteed to fit because the maximum length of a UTF8 payload is under the specified max.

12 months ago[browser] enable mono_gc_is_critical_method for MT build (#88735)
Pavel Savara [Wed, 26 Jul 2023 17:55:30 +0000 (19:55 +0200)]
[browser] enable mono_gc_is_critical_method for MT build (#88735)

12 months agoSPMI: Fix a couple of replay/record bugs (#89443)
Jakob Botsch Nielsen [Wed, 26 Jul 2023 17:29:32 +0000 (19:29 +0200)]
SPMI: Fix a couple of replay/record bugs (#89443)

* Avoid mutating constrained token in CEEInfo::getCallInfo

For certain calls the EE would modify the constrained token passed to
getCallInfo. This token is an in-argument, and SPMI does not expect it
to be modified. Fix the EE to make a local copy when it needs to mutate
it.

* SPMI: Fix treatment of CORINFO_FLG_BAD_INLINEE during replay

- Save union of method attributes set by the JIT from
  recSetMethodAttribs calls
- Fix bit handling in repGetMethodAttribs
- Add the same method attribs handling to repGetCallInfo that
  repGetMethodAttribs has

This fixes an issue where we could have recorded an old result of
getCallInfo without CORINFO_FLG_DONT_INLINE set. If the JIT then calls
repSetMethodAttribs(CORINFO_FLG_BAD_INLINEE) this would not be reflected
in subsequent calls to getCallInfo, causing possible misses.

12 months agoAdd System.IO.Packaging test that checks with reflection that the ZipArchiveEntry...
Carlos Sánchez López [Wed, 26 Jul 2023 16:58:31 +0000 (09:58 -0700)]
Add System.IO.Packaging test that checks with reflection that the ZipArchiveEntry general purpose bit flag unicode value is unset. (#88978)

12 months agoSet the CORINFO_EH_CLAUSE_SAMETRY on CORINFO_EH_CLAUSE (#88072)
Jan Vorlicek [Wed, 26 Jul 2023 16:48:32 +0000 (18:48 +0200)]
Set the CORINFO_EH_CLAUSE_SAMETRY on CORINFO_EH_CLAUSE (#88072)

* Set the CORINFO_EH_CLAUSE_SAMETRY on CORINFO_EH_CLAUSE

This change makes setting the `CORINFO_EH_CLAUSE_SAMETRY` on
`CORINFO_EH_CLAUSE` to happen for coreclr to. It is a prerequisity for the
port of exception handling from nativeaot to coreclr and it is a noop on
coreclr with the old exception handling.

* Fix comments

* Add clr-abi note and r2rdump support for the flag

* Fix markdown LINT error

* Update docs/design/coreclr/botr/clr-abi.md

* Update docs/design/coreclr/botr/clr-abi.md

* Update the ABI doc

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
12 months agoFix STJ source gen support for System.BinaryData. (#89454)
Eirik Tsarpalis [Wed, 26 Jul 2023 15:54:13 +0000 (16:54 +0100)]
Fix STJ source gen support for System.BinaryData. (#89454)

* Fix STJ source gen support for System.BinaryData.

* remove redundant sealed keyword from converter overrides

* Generate compatibility suppressions

* Add comment to compatibility suppressions

12 months ago[HTTP] Catch and ignore exception from an external server (#89452)
Marie Píchová [Wed, 26 Jul 2023 14:29:36 +0000 (16:29 +0200)]
[HTTP] Catch and ignore exception from an external server (#89452)

* Catch and ignore exception from an external server

* Update src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.RemoteServer.cs

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Fixed framework build

---------

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
12 months agoAdd test case for RavenDB's AV issue (#89493)
Egor Bogatov [Wed, 26 Jul 2023 14:17:12 +0000 (16:17 +0200)]
Add test case for RavenDB's AV issue (#89493)

12 months ago[wasm][debugger] Adding test for #42421 (#89395)
Thays Grazia [Wed, 26 Jul 2023 14:04:04 +0000 (11:04 -0300)]
[wasm][debugger] Adding test for #42421 (#89395)

* Adding test for #42421

* Remove pdb to simulate the same scenario that a customer has.

* Fix tests that have a different behavior without system.private.corelib.pdb

12 months ago[wasm] Do not set -msimd128 in the default rsp (#89433)
Radek Doulik [Wed, 26 Jul 2023 12:58:58 +0000 (14:58 +0200)]
[wasm] Do not set -msimd128 in the default rsp (#89433)

* [wasm] Do not set -msimd128 in the default rsp

This is the first part of changes to make wasm/SIMD optional again,
https://github.com/dotnet/runtime/issues/89302

* Feedback

* Feedback

* Update the tests, we force relink with SIMD disabled now

12 months ago[mono] MarshalingPInvokeScanner tolerates DLLs without metadata (#89430)
Jan Dupej [Wed, 26 Jul 2023 11:48:29 +0000 (13:48 +0200)]
[mono] MarshalingPInvokeScanner tolerates DLLs without metadata (#89430)

* Acquire MetadataReader under try.

* Logging failed metadata access.

* Update src/tasks/MonoTargetsTasks/MarshalingPInvokeScanner/MarshalingPInvokeScanner.cs

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
---------

Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
12 months agoFix outerloop.yml (#89497)
Alexander Köplinger [Wed, 26 Jul 2023 11:39:39 +0000 (13:39 +0200)]
Fix outerloop.yml (#89497)

12 months agoGenerates a guid for activity id (#88838)
Lakshan Fernando [Wed, 26 Jul 2023 09:19:09 +0000 (02:19 -0700)]
Generates a guid for activity id (#88838)

* Fixes the way activity id is generated

* FB

* FB

* FB

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* letting each library specify the config.h

* Add needed constants to minipalconfig

* triggering random constants in configure.cmake

* FB

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
12 months ago[Android] Enable skipped networking tests (#89232)
Šimon Rozsíval [Wed, 26 Jul 2023 09:12:08 +0000 (11:12 +0200)]
[Android] Enable skipped networking tests (#89232)

12 months agoUse proper context in initClass for GDV (#87847)
Egor Bogatov [Wed, 26 Jul 2023 08:42:30 +0000 (10:42 +0200)]
Use proper context in initClass for GDV (#87847)

Co-authored-by: David Wrighton <davidwr@microsoft.com>
12 months agoFix issue references in ConvertToLibraryImportAnalyzerTests (#89225)
Jeremy Koritzinsky [Wed, 26 Jul 2023 00:02:55 +0000 (17:02 -0700)]
Fix issue references in ConvertToLibraryImportAnalyzerTests (#89225)