platform/upstream/dotnet/runtime.git
2 years agoSplit Codespaces configuration based on development scenarios (#74683)
Eric Erhardt [Tue, 20 Sep 2022 16:24:04 +0000 (11:24 -0500)]
Split Codespaces configuration based on development scenarios (#74683)

* Split libraries and wasm devcontainers

Codespaces allows for monorepo support now. So we can have different pre-builds for different dev environments.

Creating a "libraries" pre-build and a "wasm" pre-build devcontainer.

* Move devcontainer files into separate folders

* Path up a directory to the Dockerfile

* Split the Dockerfile so it can be customized per devcontainer

* Update Codespaces docs

* Respond to PR feedback

* Use the new open devcontainers path.

* Use the GH CLI feature instead of installing it ourselves

* Set hostRequirements for Codespaces

Developing in dotnet/runtime with a 2-core / 4GB ram machine doesn't work very well. Add a minimum of 4-core machine to the devcontainer spec.

Fix #75680

2 years agoFaster Vector128/64 compare on arm64 (#75864)
Egor Bogatov [Tue, 20 Sep 2022 15:55:50 +0000 (17:55 +0200)]
Faster Vector128/64 compare on arm64 (#75864)

2 years agoReplace XmlCharType.IsDigit with char.IsAsciiDigit (#75871)
Stephen Toub [Tue, 20 Sep 2022 15:41:04 +0000 (11:41 -0400)]
Replace XmlCharType.IsDigit with char.IsAsciiDigit (#75871)

2 years agoUpdating the initial capacity of the intrinsic TypeConverter dictionary (#75850)
Eric Erhardt [Tue, 20 Sep 2022 15:37:33 +0000 (10:37 -0500)]
Updating the initial capacity of the intrinsic TypeConverter dictionary (#75850)

We added 5 new intrinsic TypeConverters in https://github.com/dotnet/runtime/commit/367fe33ea0a25392980f44f76307e210813228fb but missed updating the dictionary capacity.

2 years agoFix servicing of coreclr nuget packages (#75884)
Viktor Hofer [Tue, 20 Sep 2022 15:06:45 +0000 (17:06 +0200)]
Fix servicing of coreclr nuget packages (#75884)

Fixes the failures in the 7.0.1 test servicing build:

```
/__w/1/s/.packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : No VersionSuffix was set. Ensure it is set before targets in packaging are ran. [/__w/1/s/src/coreclr/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj]
##[error].packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) No VersionSuffix was set. Ensure it is set before targets in packaging are ran.
/__w/1/s/.packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : No VersionSuffix was set. Ensure it is set before targets in packaging are ran. [/__w/1/s/src/coreclr/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj]
##[error].packages/microsoft.dotnet.build.tasks.packaging/7.0.0-beta.22416.1/build/Packaging.targets(800,5): error : (NETCORE_ENGINEERING_TELEMETRY=Build) No VersionSuffix was set. Ensure it is set before targets in packaging are ran.
```

2 years agoUse fixed version of dotnet for Spmi benchmark (#75888)
Kunal Pathak [Tue, 20 Sep 2022 13:28:44 +0000 (06:28 -0700)]
Use fixed version of dotnet for Spmi benchmark (#75888)

* fixed dotnet version

* comment everything except benchmarks

* Add comment

* Revert "comment everything except benchmarks"

This reverts commit 1a6ae318ee6a1fadce7b662b36e9cf206f1acf43.

2 years agoAdd definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h (#75860)
Sean Hall [Tue, 20 Sep 2022 09:08:11 +0000 (04:08 -0500)]
Add definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h (#75860)

* Add definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h.

* Move doc for hostfxr_get_dotnet_environment_info into hostfxr.h.

2 years agoAcceptAsync with existing Socket support on Unix, Review Changes (#74645)
Ahmet İbrahim AKSOY [Tue, 20 Sep 2022 08:56:23 +0000 (11:56 +0300)]
AcceptAsync with existing Socket support on Unix, Review Changes (#74645)

2 years agoFixing SpanHelpers.LastIndexOfAnyValueType to no longer create out of bounds GC refs...
Tanner Gooding [Tue, 20 Sep 2022 08:48:30 +0000 (01:48 -0700)]
Fixing SpanHelpers.LastIndexOfAnyValueType to no longer create out of bounds GC refs (#75857)

Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
2 years agoKeyChar should be preserved for Ctrl+Letter (#75853)
Adam Sitnik [Tue, 20 Sep 2022 08:46:29 +0000 (10:46 +0200)]
KeyChar should be preserved for Ctrl+Letter (#75853)

2 years ago[wasm] Add Vector128:ExtractMostSignificantBits (#75844)
Radek Doulik [Tue, 20 Sep 2022 06:55:31 +0000 (08:55 +0200)]
[wasm] Add Vector128:ExtractMostSignificantBits (#75844)

Implement `Vector128:ExtractMostSignificantBits` intrinsic. It is used in many places, so this should improve overall performance.

Also fix typo in i16x8 version.

The improvements are visible in the Json and Span measurements*:

|                      measurement |    before |     after |
| -------------------------------: | --------: | --------: |
|              Span, IndexOf bytes |  0.3733us |  0.0992us |
|              Span, IndexOf chars |  0.0031ms |  0.0027ms |
|   Json, non-ASCII text serialize |  1.1966ms |  0.2430ms |
| Json, non-ASCII text deserialize |  2.0456ms |  0.5030ms |
|            Json, small serialize |  0.0437ms |  0.0274ms |
|          Json, small deserialize |  0.0532ms |  0.0497ms |
|            Json, large serialize | 13.6972ms |  7.4649ms |
|          Json, large deserialize | 17.6993ms | 14.0079ms |

* The above was measured with the aot compiler temporary hack to avoid shared generics in Span.

2 years agoInitialize Volatile value (#74959)
Andrew Au [Tue, 20 Sep 2022 05:08:04 +0000 (22:08 -0700)]
Initialize Volatile value (#74959)

2 years agoUpdating inbox source generators to Roslyn 4.4 and removing polyfill approach (#75717)
Jose Perez Rodriguez [Tue, 20 Sep 2022 02:28:44 +0000 (19:28 -0700)]
Updating inbox source generators to Roslyn 4.4 and removing polyfill approach (#75717)

2 years agoFix querying L3 cache size on osx-x64 (#75854)
Filip Navara [Tue, 20 Sep 2022 01:47:12 +0000 (03:47 +0200)]
Fix querying L3 cache size on osx-x64 (#75854)

2 years agoJIT: move optOptimizeBools later in the phase list (#75842)
Andy Ayers [Tue, 20 Sep 2022 01:14:01 +0000 (18:14 -0700)]
JIT: move optOptimizeBools later in the phase list (#75842)

This transformation blocks assertion prop and RBO and does not enable any
global optimizations. So defer it until later, after all the optimization
phases have run.

2 years agoUse CommonPrefixLength for SetOf sort validation
Kevin Jones [Mon, 19 Sep 2022 21:36:09 +0000 (17:36 -0400)]
Use CommonPrefixLength for SetOf sort validation

2 years agoJIT: extend RBO partial inference to unsigned relops (#75804)
Andy Ayers [Mon, 19 Sep 2022 19:15:31 +0000 (12:15 -0700)]
JIT: extend RBO partial inference to unsigned relops (#75804)

RBO can now partially infer from a pair of unsigned relops or an unsigned
relop and an equality relop.

Fixes #65327.

2 years agoSmall diagnostics improvements to HostWriter (#75593)
Vitek Karas [Mon, 19 Sep 2022 17:43:49 +0000 (10:43 -0700)]
Small diagnostics improvements to HostWriter (#75593)

- Print out file permissions in octal (as per Linux standard)
- Actually print out error enum value when MachO processing fails

2 years agoJIT: Enhance metrics reported by superpmi diffs (#74584)
Jakob Botsch Nielsen [Mon, 19 Sep 2022 17:19:18 +0000 (19:19 +0200)]
JIT: Enhance metrics reported by superpmi diffs (#74584)

* Report the total number of contexts, minopts contexts and fullopts
  contexted processed
* Report number of successful and missing contexts
* Report asmdiffs and tpdiffs for minopts/fullopts separately

Fixes #70350
Contributes to #73506

2 years ago[main] Update dependencies from dotnet/linker (#75191)
dotnet-maestro[bot] [Mon, 19 Sep 2022 16:52:30 +0000 (12:52 -0400)]
[main] Update dependencies from dotnet/linker (#75191)

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22456.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22458.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22465.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22466.1

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22451.5 -> To Version 7.0.100-1.22469.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years ago[main] Update dependencies from dotnet/roslyn-analyzers dotnet/runtime dotnet/xharnes...
dotnet-maestro[bot] [Mon, 19 Sep 2022 15:46:37 +0000 (15:46 +0000)]
[main] Update dependencies from dotnet/roslyn-analyzers dotnet/runtime dotnet/xharness (#75605)

[main] Update dependencies from dotnet/roslyn-analyzers dotnet/runtime dotnet/xharness

2 years agoAdd doc for CET compatibility. (#75551)
Manish Godse [Mon, 19 Sep 2022 15:24:48 +0000 (08:24 -0700)]
Add doc for CET compatibility. (#75551)

* Add doc for CET compatibility.

* doc feedback

* fixing mdlint issue.

* adding 22H2 as the required windows version

2 years ago[mono][tests] Fix System.Reflection.Tests.ModuleTests.GetField failing test on ARMv6...
Milos Kotlar [Mon, 19 Sep 2022 15:15:09 +0000 (17:15 +0200)]
[mono][tests] Fix System.Reflection.Tests.ModuleTests.GetField failing test on ARMv6 and Android (#75458)

* push int64 instead of int32 on evaluation stack

2 years agoEnsure GenTree::isCommutativeHWIntrinsic works on Arm64 (#75818)
Tanner Gooding [Mon, 19 Sep 2022 14:35:34 +0000 (07:35 -0700)]
Ensure GenTree::isCommutativeHWIntrinsic works on Arm64 (#75818)

2 years agoFix grammatical error in #75831. (#75835)
Eirik Tsarpalis [Mon, 19 Sep 2022 14:01:39 +0000 (17:01 +0300)]
Fix grammatical error in #75831. (#75835)

2 years agoDelete unused code (#75814)
Adeel Mujahid [Mon, 19 Sep 2022 13:47:48 +0000 (16:47 +0300)]
Delete unused code (#75814)

* Delete unused code

* Fix casing of mscoree.idl

* Delete START/STOP_MD_PERF macros

2 years agoDelete some unused includes and files (#75805)
Jan Kotas [Mon, 19 Sep 2022 13:25:15 +0000 (06:25 -0700)]
Delete some unused includes and files (#75805)

2 years agoUpdate List.cs (#75831)
viveknuna [Mon, 19 Sep 2022 12:11:14 +0000 (17:41 +0530)]
Update List.cs (#75831)

* Update List.cs

The comment was misleading, It should be removing the item not the item from given index

* Update List.cs

Changing the comment based on the review comment

2 years agoJIT: Early expand vtable calls on ARM32 too (#75604)
Jakob Botsch Nielsen [Mon, 19 Sep 2022 09:42:49 +0000 (11:42 +0200)]
JIT: Early expand vtable calls on ARM32 too (#75604)

This test does not fail anymore for me locally, so we can simplify some
of the code around this.

2 years ago[wasm] hide interop delegates from intelisense (#75800)
Pavel Savara [Mon, 19 Sep 2022 06:55:22 +0000 (08:55 +0200)]
[wasm] hide interop delegates from intelisense (#75800)

2 years ago[Mono]Disable failing intrinsics tests for llvmaot CI lane, due to disabling LLVM...
Fan Yang [Mon, 19 Sep 2022 06:07:30 +0000 (02:07 -0400)]
[Mono]Disable failing intrinsics tests for llvmaot CI lane, due to disabling LLVM JIT (#75768)

* Disable failing tests

* CI: Library tests should run on library changes

- installer builds, and runtime tests also depend on this

* Disable all failing tests

* Disable the last 4 failing tests

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agofix behavior of JMC (#75783)
Thays Grazia [Mon, 19 Sep 2022 03:15:57 +0000 (00:15 -0300)]
fix behavior of JMC (#75783)

2 years agoNo need to try hijack/suspend GC threads (#75810)
Vladimir Sadov [Mon, 19 Sep 2022 01:55:13 +0000 (18:55 -0700)]
No need to try hijack/suspend GC threads (#75810)

* No need to try suspend GC threads

* Same change for CoreClr + some cleanup.

2 years agoSimplify windows version detection in vm (#75254)
Huo Yaoyuan [Sun, 18 Sep 2022 14:31:46 +0000 (22:31 +0800)]
Simplify windows version detection in vm (#75254)

* Simplify windows version detection in vm

* Update ifdef and include

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years ago[NativeAOT] Make conservative stack reporting configurable. (#75803)
Vladimir Sadov [Sun, 18 Sep 2022 05:42:48 +0000 (22:42 -0700)]
[NativeAOT] Make conservative stack reporting configurable. (#75803)

* Make conservative stack reporting configurable.

* formatting

* Update RhConfigValues.h

* Update gcrhenv.cpp

2 years ago[NativeAOT] QueryPerformanceCounter in Pal should use CLOCK_MONOTONIC (#75708)
Vladimir Sadov [Sun, 18 Sep 2022 00:11:12 +0000 (17:11 -0700)]
[NativeAOT] QueryPerformanceCounter in Pal should use CLOCK_MONOTONIC (#75708)

* monotonic clock

* move implementation to gcenv.unix

* revert changes to WindowsAPI.txt

* check for HAVE_CLOCK_MONOTONIC

* frequency should be in nanoseconds

2 years agoUpdating Vector*.IsHardwareAccelerated to be recursive (#69578)
Tanner Gooding [Sat, 17 Sep 2022 20:16:17 +0000 (13:16 -0700)]
Updating Vector*.IsHardwareAccelerated to be recursive (#69578)

* Updating Vector*.IsHardwareAccelerated to be recursive so it works in the debugger

* Adding tests validating indirect and direct invocation of get_IsHardwareAccelerated return the same value

* Ensure that Vector<T>.IsHardwareAccelerated supports being recursive

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Numerics.Vectors/tests/GenericVectorTests.cs

* Detect the one legal violation of the behaves the same rule for intrinsics in CoreLib
- The functions which detect if an intrinsic is actually available are allowed to have behavior which differs based on which intrinsics are available at runtime

* [mono] Intrinsify IsHardwareAccelerated in the interpreter.

* Add a fallback path for unhandled recursive intrinsics in System.Numerics

* Move the Vector.IsHardwareAccelerated handling into SimdAsHWIntrinsicInfo.lookupId

* Fixinng a compiler error due to an unresolved member

* Adjust the NI_IsSupported_Dynamic checks to be NAOT only

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: David Wrighton <davidwr@microsoft.com>
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
2 years agoEnsure that all paths of double.Hypot use the absolute value where required (#75776)
Tanner Gooding [Sat, 17 Sep 2022 20:15:14 +0000 (13:15 -0700)]
Ensure that all paths of double.Hypot use the absolute value where required (#75776)

* Adding a regression test covering dotnet/runtime#75651

* Ensure that all paths of double.Hypot use the absolute value where required

* Change were the regression tests for Hypot are exposed

2 years ago[wasm] Add workaround for msbuild issue in tests (#75743)
Ankit Jain [Sat, 17 Sep 2022 18:06:25 +0000 (14:06 -0400)]
[wasm] Add workaround for msbuild issue in tests (#75743)

2 years agoRemove unused file (#75777)
Kevin Jones [Sat, 17 Sep 2022 17:07:19 +0000 (13:07 -0400)]
Remove unused file (#75777)

2 years ago[NativeAOT] Fix building src/tests (#75781)
Austin Wise [Sat, 17 Sep 2022 17:06:07 +0000 (10:06 -0700)]
[NativeAOT] Fix building src/tests (#75781)

* [NativeAOT] Fix building src/tests

Fixes #75780

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years agoUse *_NOCTOR jit helpers version once class is initialized (#75785)
Kunal Pathak [Sat, 17 Sep 2022 16:28:49 +0000 (09:28 -0700)]
Use *_NOCTOR jit helpers version once class is initialized (#75785)

* use noctor version once class is initialized

* review feedback

2 years agoDon't set JitPath for coreclr test SPMI collections (#75765)
Andy Ayers [Sat, 17 Sep 2022 15:37:49 +0000 (08:37 -0700)]
Don't set JitPath for coreclr test SPMI collections (#75765)

Some coreclr tests run (or partially run) using the build SDK which
will have an incompatible jit GUID.

Fixes #75539.

2 years ago[wasm] fix missing managed stack trace on managed exceptions marshaled to JS (#75678)
Pavel Savara [Sat, 17 Sep 2022 12:21:41 +0000 (14:21 +0200)]
[wasm] fix missing managed stack trace on managed exceptions marshaled to JS (#75678)

* fix missing managed stack trace on managed exceptions marshaled to JS
* override `get stack`
* fix Firefox tests

2 years agoDon't propagate const TYP_REF as TYP_I_IMPL (#75661)
Egor Bogatov [Sat, 17 Sep 2022 02:29:28 +0000 (04:29 +0200)]
Don't propagate const TYP_REF as TYP_I_IMPL (#75661)

2 years agoDo not request type layout for RuntimeDetermined types (#75746)
Michal Strehovský [Fri, 16 Sep 2022 23:34:10 +0000 (08:34 +0900)]
Do not request type layout for RuntimeDetermined types (#75746)

#74123 broke compiling TechEmpower benchmarks with NativeAOT. We now crash with:

```
> ILCompiler.TypeSystem.dll!Internal.TypeSystem.RuntimeDeterminedFieldLayoutAlgorithm.ComputeInstanceLayout(Internal.TypeSystem.DefType defType, Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 19 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.ComputeInstanceLayout(Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 436 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.IsInt128OrHasInt128Fields.get() Line 150 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeAutoFieldLayout(Internal.TypeSystem.MetadataType type, int numInstanceFields) Line 483 C#
  ILCompiler.Compiler.dll!ILCompiler.CompilerMetadataFieldLayoutAlgorithm.ComputeInstanceFieldLayout(Internal.TypeSystem.MetadataType type, int numInstanceFields) Line 56 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeInstanceLayout(Internal.TypeSystem.DefType defType, Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 164 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.ComputeInstanceLayout(Internal.TypeSystem.InstanceLayoutKind layoutKind) Line 436 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.InstanceFieldSize.get() Line 165 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeFieldSizeAndAlignment(Internal.TypeSystem.TypeDesc fieldType, bool hasLayout, int packingSize, out bool layoutAbiStable, out bool fieldTypeHasAutoLayout, out bool fieldTypeHasInt128Field) Line 838 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.MetadataFieldLayoutAlgorithm.ComputeStaticFieldLayout(Internal.TypeSystem.DefType defType, Internal.TypeSystem.StaticLayoutKind layoutKind) Line 215 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.ComputeStaticFieldLayout(Internal.TypeSystem.StaticLayoutKind layoutKind) Line 473 C#
  ILCompiler.TypeSystem.dll!Internal.TypeSystem.DefType.GCStaticFieldSize.get() Line 302 C#
  ILCompiler.Compiler.dll!ILCompiler.DependencyAnalysis.NativeLayoutTemplateTypeLayoutVertexNode.GetStaticDependencies(ILCompiler.DependencyAnalysis.NodeFactory context) Line 997 C#
```

https://github.com/dotnet/runtime/blob/4cf1383c8458945b7eb27ae5f57338c10ed25d54/src/coreclr/tools/Common/TypeSystem/RuntimeDetermined/RuntimeDeterminedFieldLayoutAlgorithm.cs#L17-L19

I was not able to come up with a standalone repro case, but this fixes compiling the benchmark. I'm not clear why native layout operates on runtime determined forms, but what I'm doing here should have equivalent behaviors, except avoiding the problem that we can no longer compute layouts of runtime determined things in some obscure scenarios due to the new code.

2 years agoPad the perm table to avoid array out of bound (#75364)
Andrew Au [Fri, 16 Sep 2022 23:08:42 +0000 (16:08 -0700)]
Pad the perm table to avoid array out of bound (#75364)

2 years agoAdding zmmStateSupport and AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL ISAs...
DeepakRajendrakumaran [Fri, 16 Sep 2022 20:58:59 +0000 (13:58 -0700)]
Adding zmmStateSupport and  AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL ISAs. (#74113)

* Adding avx512StateSupport().

This adds the helper functions to check if avx512 functionality is supported.

* Adding AVX512F, AVX512CD, AVX512BW, AVX512DQ and AVX512VL ISAs.

* Updating JIT/EE Version Guid.

2 years agoFix edge cases of getting attribute data from syntax (#75727)
Jeremy Koritzinsky [Fri, 16 Sep 2022 19:53:33 +0000 (12:53 -0700)]
Fix edge cases of getting attribute data from syntax (#75727)

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoSimplify some `ADDR`-related code; fix one bug (#74274)
SingleAccretion [Fri, 16 Sep 2022 18:13:21 +0000 (21:13 +0300)]
Simplify some `ADDR`-related code; fix one bug (#74274)

* Always simplify "ADDR(IND(addr))" to "addr"

The goal is to disallow "ADDR(IND(...))" altogether.

* Simplify some "ADDR"-related code

* Fix an old importer bug

2 years agoFix return code in critical_finalization test (#75750)
Egor Bogatov [Fri, 16 Sep 2022 17:47:00 +0000 (19:47 +0200)]
Fix return code in critical_finalization test (#75750)

2 years agoUpdated test doc. (#75736)
Nathan Ricci [Fri, 16 Sep 2022 17:46:16 +0000 (13:46 -0400)]
Updated test doc. (#75736)

2 years ago[Android] Update DateTimeOffset.Now fast path routine (#75457)
Steve Pfister [Fri, 16 Sep 2022 17:45:13 +0000 (10:45 -0700)]
[Android] Update DateTimeOffset.Now fast path routine (#75457)

Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
2 years agoEnsure Max/Min for floating-point on x86/x64 are not handled as commutative (#75683)
Tanner Gooding [Fri, 16 Sep 2022 16:06:00 +0000 (09:06 -0700)]
Ensure Max/Min for floating-point on x86/x64 are not handled as commutative (#75683)

* Adding a regression test for sixlabors/imagesharp#2117

* Ensure Max/Min for floating-point on x86/x64 are not handled as commutative

* Applying formatting patch

2 years agoFree getline buffer after use (#74899)
Hyungju Lee [Fri, 16 Sep 2022 12:02:07 +0000 (21:02 +0900)]
Free getline buffer after use (#74899)

* Free getline buffer after use

* Apply Feedback

Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoFix wasm template README (#75696)
Yusuke Yamada [Fri, 16 Sep 2022 11:46:59 +0000 (20:46 +0900)]
Fix wasm template README (#75696)

* Fix typo
* Remove unnecessary dotnet run arguments

2 years ago[wasm] CI: Run all EAT tests on runtime pipeline (#75516)
Ankit Jain [Fri, 16 Sep 2022 02:24:22 +0000 (22:24 -0400)]
[wasm] CI: Run all EAT tests on runtime pipeline (#75516)

- this regressed recently, to run only smoke tests

2 years agoUse MemoryMappedFileAccess.Read when searching a memory mapped file (#67386)
Cédric Luthi [Fri, 16 Sep 2022 01:47:08 +0000 (03:47 +0200)]
Use MemoryMappedFileAccess.Read when searching a memory mapped file (#67386)

Since we're only interested in searching for a pattern inside a memory mapped file, explicitly specify `MemoryMappedFileAccess.Read` (instead of the default `MemoryMappedFileAccess.ReadWrite`) in order to avoid IO exceptions on Windows.

2 years agoRemove update to unit test for speech fix (#75732)
Jeremy Koritzinsky [Fri, 16 Sep 2022 00:08:08 +0000 (17:08 -0700)]
Remove update to unit test for speech fix (#75732)

2 years agoAdd RID for alpine-3.17 + alpine-{armv6,x86,s390x,ppc64le} (#75396)
Antoine Martin [Thu, 15 Sep 2022 22:42:12 +0000 (18:42 -0400)]
Add RID for  alpine-3.17 +  alpine-{armv6,x86,s390x,ppc64le} (#75396)

* Add RID for alpine-armv6, alpine-x86, alpine-s390x, alpine-ppc64le

* Add RID for alpine-3.17

2 years ago[NativeAOT] add support for CriticalFinalizerObject (#75662)
Austin Wise [Thu, 15 Sep 2022 22:33:51 +0000 (15:33 -0700)]
[NativeAOT] add support for CriticalFinalizerObject (#75662)

Test using mono/mono/tests/critical-finalizers.cs

fixes #75106

2 years agoFix Configuration.Binder for collection properties with no setters (#75689)
Eric Erhardt [Thu, 15 Sep 2022 21:53:19 +0000 (16:53 -0500)]
Fix Configuration.Binder for collection properties with no setters (#75689)

Binding to an IDictionary/ICollection/ISet in ConfigurationBinder with no setter was failing because we were returning too early.

Only returning early now if we were able to set the property, or if the interface is read-only.

Fix #75626

2 years agoUpdate fabricbot.json for Tellurium team to move items to a new organization project...
Steve Molloy [Thu, 15 Sep 2022 21:16:58 +0000 (14:16 -0700)]
Update fabricbot.json for Tellurium team to move items to a new organization project board. (#74480)

2 years agoFix FailFast logging message (#75685)
Eduardo Velarde [Thu, 15 Sep 2022 21:08:03 +0000 (14:08 -0700)]
Fix FailFast logging message (#75685)

2 years agoHandle a null szPname field (#75695)
Jeremy Koritzinsky [Thu, 15 Sep 2022 20:42:18 +0000 (13:42 -0700)]
Handle a null szPname field (#75695)

* Handle a null szPname field

* Always clear the span to ensure we have a null terminator in case the string is short

* Use null conditional access

* Add call to test to test scenario

2 years agoRemove unnecessary test property (#75692)
Dan Moseley [Thu, 15 Sep 2022 19:29:20 +0000 (13:29 -0600)]
Remove unnecessary test property (#75692)

2 years agoFix ILLink.Descriptors.Serialization.xml (#75688)
Ankit Jain [Thu, 15 Sep 2022 19:03:55 +0000 (15:03 -0400)]
Fix ILLink.Descriptors.Serialization.xml (#75688)

2 years agoTry re-enabling System.Transactions.Local tests on Arm64 (#75610)
Jan Kotas [Thu, 15 Sep 2022 18:16:41 +0000 (11:16 -0700)]
Try re-enabling System.Transactions.Local tests on Arm64 (#75610)

2 years agoRemove broken symlinks after building installers (#75654)
Jeremy Koritzinsky [Thu, 15 Sep 2022 17:12:10 +0000 (10:12 -0700)]
Remove broken symlinks after building installers (#75654)

2 years ago[wasm] Use sdk version `8.0.100-alpha.1.22463.23` (#75693)
Ankit Jain [Thu, 15 Sep 2022 17:05:42 +0000 (13:05 -0400)]
[wasm] Use sdk version `8.0.100-alpha.1.22463.23` (#75693)

.. because the latest one has net8.0 related changes, which breaks the
Wasm.Build.Tests currently.

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

2 years agoJIT: Print array types properly (#75676)
Jakob Botsch Nielsen [Thu, 15 Sep 2022 16:44:43 +0000 (18:44 +0200)]
JIT: Print array types properly (#75676)

* JIT: Print arrays properly

* Add another retry to eeGetMethodFullName

Try printing just the method name in case we cannot even print the class
name of the class owning a method.

2 years agoImplement List<T>.Slice (#75383)
Fred Silberberg [Thu, 15 Sep 2022 15:54:23 +0000 (08:54 -0700)]
Implement List<T>.Slice (#75383)

* Implement List<T>.Slice

Closes https://github.com/dotnet/runtime/issues/66773. I took the approach of just redirecting to GetRange, and using a Theory to make all direct GetRange tests run on both GetRange and Slice (and used list pattern syntax for the Slice version to make sure that's working end-to-end).

* PR feedback.

* Correct parameter names

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
2 years agoImplement an AppContext compatibility switch re-enabling reflection fallback in STJ...
Eirik Tsarpalis [Thu, 15 Sep 2022 15:38:55 +0000 (18:38 +0300)]
Implement an AppContext compatibility switch re-enabling reflection fallback in STJ source generators. (#75615)

* Implement an AppContext compatibility switch re-enabling reflection fallback in sourcegen.

* address feedback

2 years agoCI: Fix conditions for running mono, and coreclr jobs (#75645)
Ankit Jain [Thu, 15 Sep 2022 14:49:15 +0000 (10:49 -0400)]
CI: Fix conditions for running mono, and coreclr jobs (#75645)

2 years agodon't run RedirectedOutput_EnvVarSet_EmitsAnsiCodes when TERM is set but RemoteExecut...
Adam Sitnik [Thu, 15 Sep 2022 13:27:52 +0000 (15:27 +0200)]
don't run RedirectedOutput_EnvVarSet_EmitsAnsiCodes when TERM is set but RemoteExecutor is not supported (#75664)

2 years agoAvoid unnecessary overflow check during div/mod on AArch64 (#75272)
SwapnilGaikwad [Thu, 15 Sep 2022 13:09:14 +0000 (14:09 +0100)]
Avoid unnecessary overflow check during div/mod on AArch64 (#75272)

2 years agoAdjust the lpParent of "adopted" child loops (#75218)
Kunal Pathak [Thu, 15 Sep 2022 13:02:03 +0000 (06:02 -0700)]
Adjust the lpParent of "adopted" child loops (#75218)

* Fix the lpParent of child loop that was adopted earlier

* Add test case

* Properly fix the loop table

Fix the loop table after loop removal such that no loop's links (lpParent, lpChild, lpSibling) points to the removed loop.

* fix release errors

2 years agoUse determinism instead of timing in HashAlgorithm cancellation tests
Jeremy Barton [Thu, 15 Sep 2022 01:10:12 +0000 (18:10 -0700)]
Use determinism instead of timing in HashAlgorithm cancellation tests

2 years agoDisable test for x86 (#75624)
Dan Moseley [Thu, 15 Sep 2022 00:12:35 +0000 (18:12 -0600)]
Disable test for x86 (#75624)

* Disable test for x86

* Another

2 years agoCheck for null keys in DSA/RSAKeyValue
Kevin Jones [Wed, 14 Sep 2022 23:28:01 +0000 (19:28 -0400)]
Check for null keys in DSA/RSAKeyValue

2 years agoRevert "Pass resource items for VS generated authoring (#75462)" (#75632)
Larry Ewing [Wed, 14 Sep 2022 19:20:13 +0000 (14:20 -0500)]
Revert "Pass resource items for VS generated authoring (#75462)" (#75632)

This reverts commit 3a51ad518a7973b3f9b5692ce7950e98ca7e3c47.

2 years agoOnly widen short local stores (#74685)
SingleAccretion [Wed, 14 Sep 2022 18:40:39 +0000 (21:40 +0300)]
Only widen short local stores (#74685)

* Only widen 2 byte wide local stores

// Widening byte -> int:
//
// Zero     : 3 -> 4/2
// Non-Zero : 3 -> 6
//
// Notable: only the "reused zero" case can become better.
//
// Widening short -> int:
//
// Zero     : 5 -> 4/2
// Non-Zero : 5 -> 6 (no 0x66 prefix)
//
// Notable: the zero (common) case is always better, while
// for the non-zero case we only regress by one byte and
// get rid of the prefix.

* Perhaps this...?

* Delete the widening from LA64

On LA64, all instructions have the same size
of 4 bytes, so there is no point to widening.

* Remove the DNER check

No point.

* ARM/64 lowering

No point in widening on ARM64.

2 years agoFix extraneous parens in EnsureSuccessStatusCode message (#75575)
Stephen Toub [Wed, 14 Sep 2022 17:03:52 +0000 (13:03 -0400)]
Fix extraneous parens in EnsureSuccessStatusCode message (#75575)

2 years agoFixed assembly load check on default config apply (#75533)
Yoh Deadfall [Wed, 14 Sep 2022 15:42:02 +0000 (18:42 +0300)]
Fixed assembly load check on default config apply (#75533)

* Fixed assembly load check on default config apply

Assembly.Load doesn't not return if the specified assembly cannot be found or loaded, but the code configuring default hosting expected that it a non-fallible operation.

2 years agoFix running WebAssembly Browser App from VS (#75384)
Thays Grazia [Wed, 14 Sep 2022 15:26:13 +0000 (12:26 -0300)]
Fix running WebAssembly Browser App from VS (#75384)

* trying to fix 75356

* Trying to fix for running from VS and from command line

* Remove unused spaces

* Fix again

* Addressing @radical comments

* OutputPath can be missing the rid during the evaluation

* more cleanup

* Replacing NormalizeDirectory with  [System.IO.Path]::Combine

* [wasm] Add tests for running templates outside project directory

* Add tests for browser template

* Disable failing test

.. which is failing because the WBT is still using net7.0 on `main`,
thus using the 7.0 targets, which don't have the fix yet.

We can enable this once the fix is merged for 7.0 .

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agoGroup trimming-related smoke tests (#75592)
Michal Strehovský [Wed, 14 Sep 2022 12:45:24 +0000 (21:45 +0900)]
Group trimming-related smoke tests (#75592)

Fewer test assemblies -> less stuff to compile -> faster test runs.

2 years agoRe-enable multimodule testing (#75590)
Michal Strehovský [Wed, 14 Sep 2022 12:15:21 +0000 (21:15 +0900)]
Re-enable multimodule testing (#75590)

Resolves #66191.

I no longer see the warning or the link.exe failure. This likely was a link.exe bug like I suspected in the issue based on available evidence.

Of course we also regressed multimodule mode so I'm fixing that too.

2 years ago[wasm-mt] Disable and fix remaining failing tests on Browser with multi-threading...
Simon Rozsival [Wed, 14 Sep 2022 11:47:42 +0000 (13:47 +0200)]
[wasm-mt] Disable and fix remaining failing tests on Browser with multi-threading and perf tracing enabled (#75286)

* Disable failing tests that make HTTP requests

* Fix eventpipe sample test

* Add missing issue links

* Bump pthread pool size for tests

* Disable failing test

* Increase pthread pool size for CI

* Try using diagnostics mock for the browser-eventpipe sample in Release mode on CI

* Update active issue link

* TMP add debugging information for CI

* Revert "TMP add debugging information for CI"

This reverts commit 1e5c88e131373eb1fd3e553071b2ceb21dce764b.

* Decrease pthread pool size to just 8

* [wasm] samples: use WasmXHarnessArgs so we can get the --web-server-use-cop argument

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agofix debug assert around string literals (#75576)
Egor Bogatov [Wed, 14 Sep 2022 10:36:39 +0000 (12:36 +0200)]
fix debug assert around string literals (#75576)

2 years agoConsolidate System.Private.Xml test projects (#75499)
Stephen Toub [Wed, 14 Sep 2022 09:08:24 +0000 (05:08 -0400)]
Consolidate System.Private.Xml test projects (#75499)

* Consolidate System.Private.Xml test projects

We currently have almost 30 test projects underneath System.Private.Xml\tests in various levels of nested directories.  This makes it challenging to appropriately run all of the System.Private.Xml tests when making any changes to anything in S.P.Xml, and it makes it all but impossible to get meaningful code coverage information, which in turns significantly lowers our confidence about any changes being made to the library.

This PR consolidates almost all of them into a single System.Private.Xml.Tests projects.  It is a mostly mechanical change, adding all of the relevant files to the single .csproj and deleting the individual csproj files.  In some cases I added more specific namespaces to deal with conflicts.  In others multiple projects were including the same files containing [Facts] and parameterizing them via statics that were supplied by individual files built only into the relevant projects; I fixed those by making the [Fact]s into [Theory]s and passing in all the relevant state.  I also had to fix up some cases where tests were mutating global state that then conflicted with other tests.

This explicitly does not:
- Clean up any test code beyond the minimal necessary to get this to compile.  Many of these tests are old and crusty and worthy of a complete rewrite, but I restrained myself.
- Move or rename any files around.
- Try to enable parallelization of the tests.  That’d be good to do at some point to help with test execution time, but I didn’t want to change any tests beyond what was necessary.

I did run the fixer to remove unnecessary usings, as I’d added some usings as part of mechanically fixing this without paying attention to whether they were necessary or not.

There are just two test projects that remain separate: one for trimming, and one for serialization that runs some of the same tests but with a different compilation constant set for its build.

* Fix XLinq tests

* Fix handling of AllowDefaultResolver switch

* Fix test failure on Linux

2 years ago[NativeAOT] Implements eager finalization of weak references (#75436)
Vladimir Sadov [Wed, 14 Sep 2022 08:04:46 +0000 (01:04 -0700)]
[NativeAOT] Implements eager finalization of weak references (#75436)

* HasEagerFinalizerFlag

* EETypeFlagsEx

* comments

* Simplify WeakReference<T>

* Reconcile nongeneric WeakReference with changes in WeakReference<T>

* a few touch ups

* adjusted comment

* fix mono build

* make GCC happy

* simple PR feedback.

* HasEagerFinalizer is not a typesystem concept

* do not call Name twice

* reorder bits

* combined flags on the managed side

* combined Flags on the native side

* fix pedantic build error on unix

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* More suggestions from the PR

* fixed a confusing comment

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years ago[wasm][debugger] Indexing with expression (#75524)
Ilona Tomkowicz [Wed, 14 Sep 2022 06:49:25 +0000 (08:49 +0200)]
[wasm][debugger] Indexing with expression  (#75524)

* Support for simple mathematical expressions + tests.

* A bit more complex expressions.

* Applied @radical's suggestions.

* [wasm][debugger] Add another test for EvaluateIndexingByExpressionContainingUnknownIdentifier

* [wasm][debugger] Add a broken case of indexing with string accessor

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agoAssert fat pointers aligned to MinimumFunctionAlignment (#75574)
Michal Strehovský [Wed, 14 Sep 2022 04:06:49 +0000 (13:06 +0900)]
Assert fat pointers aligned to MinimumFunctionAlignment (#75574)

The alignment changed in #75264, but it's important this is always at least MinimumFunctionAlignment no matter the platform because that's how we distinguish fat pointers from real pointers. This assert is obviously true on every platform we support right now.

2 years agoPass resource items for VS generated authoring (#75462)
github-actions[bot] [Wed, 14 Sep 2022 03:18:01 +0000 (20:18 -0700)]
Pass resource items for VS generated authoring (#75462)

Co-authored-by: Jacques Eloff <joeloff@users.noreply.github.com>
2 years ago[wasm][debugger] fixing setting a breakpoint in an invalid IL offset after hotreload...
Thays Grazia [Wed, 14 Sep 2022 02:32:25 +0000 (23:32 -0300)]
[wasm][debugger] fixing setting a breakpoint in an invalid IL offset after hotreload (#75561)

* fixing setting a breakpoint in an invalid IL offset

* addressing @radical comments

* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoSDBHelper.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* addressing @radical comments

* addressing @radical comments

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agoload quic early to prevent interaction with tests (#75488)
Tomas Weinfurt [Wed, 14 Sep 2022 00:06:24 +0000 (17:06 -0700)]
load quic early to prevent interaction with tests (#75488)

* load quic early to prevent interaction with tests

* update Debian10 image for x64

* rever helix change

* feedback from review

* remove quic reference

* Update src/libraries/System.Net.Security/tests/FunctionalTests/TestHelper.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2 years agoJIT: fix incorrect scale in genCreateAddrMode + no-opt (#75433)
Egor Bogatov [Tue, 13 Sep 2022 22:56:09 +0000 (00:56 +0200)]
JIT: fix incorrect scale in genCreateAddrMode + no-opt (#75433)

2 years agoRemove Visual Studio 2019 as required (#75558)
James S. Wang [Tue, 13 Sep 2022 22:08:53 +0000 (18:08 -0400)]
Remove Visual Studio 2019 as required (#75558)

2 years agoSimplify and fix the Int128 *, /, and % logic (#75470)
Tanner Gooding [Tue, 13 Sep 2022 21:54:15 +0000 (14:54 -0700)]
Simplify and fix the Int128 *, /, and % logic (#75470)

* Simplify and fix the Int128 *, /, and % logic

* Apply suggestions from code review

Co-authored-by: tfenise <tfenise@live.com>
* Fixing some code comments

Co-authored-by: tfenise <tfenise@live.com>
2 years ago[main] Update dependencies from dotnet/icu dotnet/hotreload-utils dotnet/llvm-project...
dotnet-maestro[bot] [Tue, 13 Sep 2022 21:10:31 +0000 (21:10 +0000)]
[main] Update dependencies from dotnet/icu dotnet/hotreload-utils dotnet/llvm-project (#75522)

[main] Update dependencies from dotnet/icu dotnet/hotreload-utils dotnet/llvm-project