platform/upstream/dotnet/runtime.git
14 months agoAdd NonGC documentation (#90206)
Egor Bogatov [Mon, 14 Aug 2023 08:01:24 +0000 (10:01 +0200)]
Add NonGC documentation (#90206)

14 months ago[QUIC] Merge 7.0 fix (#90228)
Marie Píchová [Mon, 14 Aug 2023 07:19:10 +0000 (09:19 +0200)]
[QUIC] Merge 7.0 fix (#90228)

* Merge pull request #90173 from vseanreesermsft/internal-merge-7.0-2023-08-08-1042

Merging internal commits for release/7.0

* Consume MsQuic release package on Win

---------

Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Natalia Kondratyeva <knatalia@microsoft.com>
14 months ago[mono][arm64] Fixed passing/receiving hfa structures with fixed buffers. (#90502)
Zoltan Varga [Mon, 14 Aug 2023 05:13:21 +0000 (00:13 -0500)]
[mono][arm64] Fixed passing/receiving hfa structures with fixed buffers. (#90502)

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

14 months agoEnable nullable on Hosting.Systemd (#90495)
Eric Erhardt [Sun, 13 Aug 2023 21:01:25 +0000 (15:01 -0600)]
Enable nullable on Hosting.Systemd (#90495)

- Passing null into the hosting lifetimes' loggerFactory parameters would result in a NRE

Contributes to #90400

14 months agoFixing COM Aggregation and XAML reference tracking on .NET AOT (#90283)
Manodasan Wignarajah [Sun, 13 Aug 2023 20:18:10 +0000 (13:18 -0700)]
Fixing COM Aggregation and XAML reference tracking on .NET AOT (#90283)

* Add initial changes for COM Aggregation and XAML reference tracking in AOT

* Fix dependency list to avoid allocations

* Fix issues with finalizer races and issues with allocating memory during GC

* Add COM weak reference support

* PR feedback on separating reference tracker object fields.

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
14 months agoFix TimeProvider Test (#90448)
Tarek Mahmoud Sayed [Sun, 13 Aug 2023 16:41:52 +0000 (09:41 -0700)]
Fix TimeProvider Test (#90448)

14 months agoDisable OneLocBuild in runtime-official.yml (#90480)
Alexander Köplinger [Sun, 13 Aug 2023 12:27:44 +0000 (14:27 +0200)]
Disable OneLocBuild in runtime-official.yml (#90480)

It is blocking the official build: https://github.com/dotnet/runtime/issues/90466

14 months agoLocalized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 224132...
dotnet bot [Sun, 13 Aug 2023 11:49:47 +0000 (04:49 -0700)]
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2241323 (#89414)

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2228738

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2229389

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2230534

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2231640

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2233112

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2234217

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2235989

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2236160

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2236693

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2238073

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2240179

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2241002

* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2241178

---------

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
14 months agoRun trimming tests for global.json changes (#90451)
Sven Boemer [Sun, 13 Aug 2023 02:50:54 +0000 (19:50 -0700)]
Run trimming tests for global.json changes (#90451)

14 months ago[wasm] Add more blazor tests for InvariantGlobalization (#90440)
Ankit Jain [Sun, 13 Aug 2023 02:50:19 +0000 (22:50 -0400)]
[wasm] Add more blazor tests for InvariantGlobalization (#90440)

* [wasm] build-packages make target - build all the required packages for wbt

* WBT: Add more tests for blazor+InvariantGlobalization

* Fix test

14 months ago[wasm] Suggest installing the workload when publishing a blazor project (#90471)
Ankit Jain [Sun, 13 Aug 2023 02:49:47 +0000 (22:49 -0400)]
[wasm] Suggest installing the workload when publishing a blazor project (#90471)

14 months ago[wasm][debugger] Disable some tests on Firefox (#90347)
Thays Grazia [Sat, 12 Aug 2023 23:28:52 +0000 (20:28 -0300)]
[wasm][debugger] Disable some tests on Firefox (#90347)

* Do not run this test on Firefox

* Disable other test

14 months ago[wasm] Don't build samples in parallel on CI (#90470)
Ankit Jain [Sat, 12 Aug 2023 23:25:58 +0000 (19:25 -0400)]
[wasm] Don't build samples in parallel on CI (#90470)

Prompted by failures described in https://github.com/dotnet/dnceng/issues/450

14 months ago[NativeAOT] Do not use private APIs on iOS/macOS (#90430)
Filip Navara [Sat, 12 Aug 2023 18:54:12 +0000 (20:54 +0200)]
[NativeAOT] Do not use private APIs on iOS/macOS (#90430)

* Use custom implementation of _dyld_find_unwind_sections on Apple
platforms since it's a private API and it blocks uploads to TestFlight,
iOS App Store, and Mac App Store.

* Link against local ICU libraries on iOS-like platforms

* Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets

* Add comment

* Update src/coreclr/nativeaot/Runtime/unix/UnwindHelpers.cpp

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

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
14 months agoFix condition for setting if symbol is a file in native AOT publish targets (#90438)
Elinor Fung [Sat, 12 Aug 2023 17:51:21 +0000 (10:51 -0700)]
Fix condition for setting if symbol is a file in native AOT publish targets (#90438)

14 months agoruntime: fix variable null check (#89920)
Павел Харьков [Sat, 12 Aug 2023 15:58:33 +0000 (18:58 +0300)]
runtime: fix variable null check (#89920)

Fixed error when _hashtableContentsToEnumerate is null.
It appears always when using 'Length' property when variable is null.
Also reduced nesting.

14 months ago[main] Update dependencies from dotnet/arcade dotnet/emsdk (#90461)
dotnet-maestro[bot] [Sat, 12 Aug 2023 14:39:49 +0000 (16:39 +0200)]
[main] Update dependencies from dotnet/arcade dotnet/emsdk (#90461)

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

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

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

Dependency coherency updates

runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-arm64.Microsoft.NETCore.Runtime.ObjWriter,runtime.osx-x64.Microsoft.NETCore.Runtime.ObjWriter,runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools,runtime.osx-x64.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-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk,runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools,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
 From Version 16.0.5-alpha.1.23401.4 -> To Version 16.0.5-alpha.1.23408.1 (parent: Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months ago[workloads] Remove experimental off of librarybuilder workload (#90410)
Steve Pfister [Sat, 12 Aug 2023 13:20:54 +0000 (06:20 -0700)]
[workloads] Remove experimental off of librarybuilder workload (#90410)

14 months agoJIT: Prevent generic context runaway during inlining of polymorphic recursive methods...
Jakob Botsch Nielsen [Sat, 12 Aug 2023 12:12:53 +0000 (14:12 +0200)]
JIT: Prevent generic context runaway during inlining of polymorphic recursive methods (#90306)

The inliner heuristics do not take into account that inlining methods
causes type/method loading of the generic context. After #88749 this can
quickly cause significant resources to be consumed as part of inlining
when polymorphic recursion is involved (the blow-up can be exponential,
as we see in the failing test under jitstress).

This PR adds another safe-guard to the recursive inlining check in terms
of a complexity limit on the generic context of the inline candidate.

Fix #90144

14 months agoRemove all use of <Nullable>annotations</Nullable> (#90401)
Stephen Toub [Sat, 12 Aug 2023 03:41:47 +0000 (23:41 -0400)]
Remove all use of <Nullable>annotations</Nullable> (#90401)

* Remove all use of <Nullable>annotations</Nullable>

We've inadvertently shipped multiple libraries with incorrect nullable reference type annotations because:
a) Their ref assemblies aren't actually being shipped, and/or
b) Their src projects using `<Nullable>annotations</Nullable>`

`<Nullable>annotations</Nullable>` means "I'm nullable annotated but don't validate them", which means consumers of these libraries see annotations that we haven't thoughtfully added or reviewed.

This removes all use of it and gets us back to a place where we're only shipping nullable annotations for libraries where we've done the work to ensure they're correct.  We can subsequently finish annotating these stragglers.

* Don't disable LibraryImportGenerator when nullable is disabled

* Add #nullable enable to LibraryImportAttribute file for polyfill scenarios.

* Disable LibraryImportGenerator on ILCompiler.TypeSystem.Tests assemblies.
Convert a DllImport in HostWriter that now gets the polyfill experience.

---------

Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
14 months agoAdd DiagnosticDescriptorHelper to set HelpURI for generator / analyzer diagnostics...
Eric StJohn [Sat, 12 Aug 2023 03:25:37 +0000 (20:25 -0700)]
Add DiagnosticDescriptorHelper to set HelpURI for generator / analyzer diagnostics (#90353)

* Add DiagnosticDescriptorHelper

Create a helper method that formats and sets the helpLink for
DiagnosticDescriptors

* Add HelpLinkUris to ILLink

* Handle different DiagnosticCategories

14 months ago[workloads] Add telemetry for mobile and wasm workloads (#90208)
Steve Pfister [Sat, 12 Aug 2023 01:49:21 +0000 (18:49 -0700)]
[workloads] Add telemetry for mobile and wasm workloads (#90208)

This change adds CLI telemetry for common mobile and wasm scenarios.

Total app size is another element we plan on tracking and that will be added in a follow up.

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

14 months agoUpdate Versions.props (#90425)
Jackson Schuster [Sat, 12 Aug 2023 01:17:11 +0000 (18:17 -0700)]
Update Versions.props (#90425)

14 months agoPrefix type names with global and use static TypeSyntax and NameSyntax instead of...
Jackson Schuster [Fri, 11 Aug 2023 23:54:43 +0000 (16:54 -0700)]
Prefix type names with global and use static TypeSyntax and NameSyntax instead of Parse(Type)Name (#90339)

* Prefix type names with global and use static TypeSyntax and NameSyntax instead of Parse(Type)Name

14 months agoSupport Exposing new Metric properties using EventSource (#90417)
Tarek Mahmoud Sayed [Fri, 11 Aug 2023 23:29:23 +0000 (16:29 -0700)]
Support Exposing new Metric properties using EventSource (#90417)

14 months ago[wasm] Fix builds for blazor app + InvariantGlobalization=true (#90432)
Ankit Jain [Fri, 11 Aug 2023 23:06:31 +0000 (19:06 -0400)]
[wasm] Fix builds for blazor app + InvariantGlobalization=true (#90432)

The following commit caused workload to be required for a blazor app
when `InvariantGlobalization==true`, but this is not required.

```
commit 26ae09784c16dfa6707cd73eca2aeb00a28741d0
Author: Ankit Jain <radical@gmail.com>
Date:   Thu Aug 10 23:39:10 2023 -0400

    [wasm] Fix up conditions to trigger relink, and require `wasm-tools` workload (#89754)
```

And this broke some sdk tests.

14 months agoAllow reference types for pinned GC.AllocateArray() (#89293)
jthorborg [Fri, 11 Aug 2023 21:50:26 +0000 (23:50 +0200)]
Allow reference types for pinned GC.AllocateArray() (#89293)

* Relaxing constraints of System.GC.AllocateArray<T>.

It's now possible to allocate pinned and default-initialized arrays that contain references.

Fix #48703

* Adding coverage of GC.AllocateArray with ref types.

Added a test that pins a reference type array and resolves references to indices with pointer arithmetic, checking that modifications are visible back in the original array.

Test #48703

* Mono/NativeAOT relaxing of System.GC.AllocateArray<T>.

* Relaxed GC.AllocateUninitializedArray for ref types as well.

This was done by deferring reference types to GC.AllocateArray to avoid potential memory issues with the GC + uninitialized memory. The API only promises to avoid initialization if possible, anyway.
Refactored tests to parametrically exercise these new relaxed constraints.

* Simplifiy conditionals in AllocateUninitializedArray.

Relying on internal implementation zeroing refs if necessary.

* Also simplify path for NativeOAT.

Mono already piggybacks on the AllocateArray path anyway.

* Simplify pinning paths.

All conditional paths in GC.Allocate*Array now handle pinning unconditionally out of the main branch.

* Don't use `var` if type name doesn't exist explicitly on right-hand side

* PR feedback for using terse method tables and JIT intrinsics for GC array allocation that should be slightly faster.

* Changed EmbeddedValueType and added comment.

After a longer discussion, settled on a slightly augmented suggestion that isn't as controversial as the prior one.

* Fixing signature for `RhAllocateNewArray` in NativeAOT to directly use a `MethodTable*`

* Adding explicit structlayout to silence warning for EmbeddedValueType in GCTests, and improved the comment.

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
14 months agoFix session-local named mutex compat issue (#90342)
Koundinya Veluri [Fri, 11 Aug 2023 21:34:40 +0000 (14:34 -0700)]
Fix session-local named mutex compat issue (#90342)

- A previous change that was serviced back changed session-local named mutexes to be user-specific by restricting the permissions of the session directories and files under them, and adding the sticky bit to some directoires. A compat issue arose from that change, as the session directories have the session ID in their name and session IDs can be reused between different users. The current plan that we have discussed is to revert the change and service back the revert, which also restores the intended behavior, and offer user-specific mutexes as a new feature in a future .NET that would satisfy some user scenarios in a better way.
- This PR reverts the previous change (first commit) and restores one change from the previous change (second commit) to improve backward compatibility due to differences in permissions for session directories before and after the change
- Fixes https://github.com/dotnet/runtime/issues/80619

14 months agoUsing stackalloc instead of new byte[x] on Streams (#88303)
Poppyto [Fri, 11 Aug 2023 21:30:50 +0000 (23:30 +0200)]
Using stackalloc instead of new byte[x] on Streams (#88303)

* first XOR Linq implemetation

* replace classic allocation by stack allocation for ReadByte

* replace classic allocation by stack allocation for ReadByte & WriteByte

* replace classic allocation by stack allocation for ReadByte/CopyToAsync

* add missing ConfigureAwait(false) on ReadAsync

* replace classic allocation by stack allocation for ReadByte/WriteByte

* Revert "first XOR Linq implemetation"

This reverts commit 449fddec66b3311866dc1e57c07ad7127e8039ff.

* indent fix

* rollback stackalloc on async methods

* missing char

* fix ConfigureAwait

* rollback ReadByte optim (degrade perfs)

* variablename fix

* missing comment

* rollback Stream allocations

* missing arguments

* add Write(ReadOnlySpan<byte>) method

* better initialize Span

* add CRLF

* resolve comments

* simplification call method Write

* Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonEncodingStreamWrapper.cs

replace Span by ReadOnlySpan

Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com>
* remove trailing whitespace

* Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonEncodingStreamWrapper.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonEncodingStreamWrapper.cs

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

Co-authored-by: Michał Petryka <35800402+MichalPetryka@users.noreply.github.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
14 months agoReduce contention for Datacontract Serialization (#73893)
Daniel Svensson [Fri, 11 Aug 2023 21:30:06 +0000 (23:30 +0200)]
Reduce contention for Datacontract Serialization (#73893)

* Use ConcurrentDictionary to avoid lock contention when serializing using DataContractSerializer

* Improve concurrency for GetId

* Prevent allocating multiple slots in s_dataContractCache for the same typeHandle

* Use RuntimeTypeHandle as key in dictionary

* add readonly

* Remove usage of lazy

* revert whitespace changes

* Use RuntimeTypeHandle.Value as key instead of RuntimeTypeHandle

* Apply same perf improvement to JDCS; Remove Int/TypeHandleRef silliness that we no longer need.

---------

Co-authored-by: Steve Molloy <smolloy@microsoft.com>
14 months agoImprove System.Text.Json configuration list debugging (#90411)
Eirik Tsarpalis [Fri, 11 Aug 2023 20:33:38 +0000 (23:33 +0300)]
Improve System.Text.Json configuration list debugging (#90411)

* Improve debugging for configuration lists.

* Add missing DebuggerBrowsable.Never annotations.

* Add DebuggerBrowsableState.Never to a few internal getters that may throw.

* Simplify JsonPropertyInfo DebuggerDisplay

* Ensure debugger display matches API name.

14 months agoEnable Automatic Reference Counting (ARC) for Objective-C code that needs it (#90379)
Alexander Köplinger [Fri, 11 Aug 2023 20:11:22 +0000 (22:11 +0200)]
Enable Automatic Reference Counting (ARC) for Objective-C code that needs it (#90379)

We noticed that ARC isn't enabled for System.Globalization.Native code but we aren't properly doing manual memory management by calling `release`.

Enable ARC for the System.Globalization.Native ObjC code so it is handled automatically by the compiler.
Disable it for System.Native code since that one is less complex and we can manually manage it.

We need to wrap all public entrypoints to the library in `@autoreleasepool` blocks so that the releasing of autoreleased objects occurs at the end of the block, rather than at some undetermined point in the future (and we don't even know if we have an autorelease pool in the thread).

14 months ago[ios][tests] Run functional tests with Mono and Native AOT on Helix (#87773)
Milos Kotlar [Fri, 11 Aug 2023 19:34:28 +0000 (21:34 +0200)]
[ios][tests] Run functional tests with Mono and Native AOT on Helix (#87773)

This PR adds support for Native AOT compilation on Helix. It improves test coverage for Mono and Native AOT by running functional tests on Helix. The proxy project is updated with Native AOT props and apple build targets are updated to support Native AOT compilation. Additionally, it simplifies the sample app by utilizing the shared Apple targets.

14 months agoRevert "Update perf run yaml with changes for crank on helix (#90368)" (#90424)
Ankit Jain [Fri, 11 Aug 2023 19:16:47 +0000 (15:16 -0400)]
Revert "Update perf run yaml with changes for crank on helix (#90368)" (#90424)

This reverts commit bbe40f8cbffe47f685bc50d4cb1a6d4535c68a4d.

This caused perf pipeline runs to break. But https://github.com/dotnet/performance/pull/3251 from @caaavik-msft, along with this revert will fix the issue.

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

14 months agoUse generated version files when printing/tracing host version info (#90273)
Elinor Fung [Fri, 11 Aug 2023 19:03:05 +0000 (12:03 -0700)]
Use generated version files when printing/tracing host version info (#90273)

- Use `VER_PRODUCTVERSION_STR` / `sccsid` from generated `_version.(h|c)` for version and commit info (for tracing)
- Use `RuntimeProductVersion` for version from header generated by `GenerateRuntimeVersionFile`
- Remove `HOST_*_PKG_VER` defines and script arguments for passing that info around

14 months agoDon't fallback to PNSE, and give a more descriptive error message. (#88804)
Steve Molloy [Fri, 11 Aug 2023 18:55:17 +0000 (11:55 -0700)]
Don't fallback to PNSE, and give a more descriptive error message. (#88804)

* Don't fallback to PNSE, and give a more descriptive error message.

* CodeGeneratorConversionException is internal. Wrap it before re-throwing.

* Update src/libraries/System.Private.Xml/src/System/Xml/Serialization/Compilation.cs

Fixing comment about lack of compiler at runtime

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update Compilation.cs

Remove conditional code that was not needed.

---------

Co-authored-by: Matt Connew <mconnew@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
14 months ago[browser] Allow JS modules to be injected as pre-loaded assets (#90392)
Pavel Savara [Fri, 11 Aug 2023 18:34:52 +0000 (20:34 +0200)]
[browser] Allow JS modules to be injected as pre-loaded assets (#90392)

Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
14 months ago[browser] bind JS methods to minified WASM imports (#90145)
Pavel Savara [Fri, 11 Aug 2023 18:33:46 +0000 (20:33 +0200)]
[browser] bind JS methods to minified WASM imports (#90145)

14 months agoDisable LLVM AOT ARM64 lane (#90413)
Jo Shields [Fri, 11 Aug 2023 18:21:10 +0000 (14:21 -0400)]
Disable LLVM AOT ARM64 lane (#90413)

14 months ago[mono] Enabled tests failing previously on fullaot (#90280)
Vlad-Alexandru Ionescu [Fri, 11 Aug 2023 17:54:58 +0000 (19:54 +0200)]
[mono] Enabled tests failing previously on fullaot (#90280)

* Enabled tests

---------

Signed-off-by: Vlad <vladionescu1399@gmail.com>
Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com>
14 months agoDelete duplicative fallback paths from Ascii (#90390)
Stephen Toub [Fri, 11 Aug 2023 17:21:20 +0000 (13:21 -0400)]
Delete duplicative fallback paths from Ascii (#90390)

* Delete duplicative fallback paths from Ascii

GetIndexOfFirstNonAsciiChar has four different paths it takes: one for Vector512/256, one for Ssse2/AdvSimd, one for Vector128, and one for everything else. But the Vector512/256 path is capable of both Vector128 and scalar, which obsoletes the default fallback case which uses `Vector<T>` and a scalar path.  We can entirely delete the "_Default" path, and consolidate the calls to the Vector512/256/128/scalar path.

GetIndexOfFirstNonAsciiByte is similar.  Its "_Default" doesn't use `Vector<T>`, but it's still duplicative and deletable.

* Address PR feedback

14 months agoFix Vector512 rightshift (#89339)
Michał Petryka [Fri, 11 Aug 2023 17:15:48 +0000 (19:15 +0200)]
Fix Vector512 rightshift (#89339)

* Fix Vector512 rightshift

Fixes #89338

* Adding tests covering the Vector shift operators

* Ensure Unsafe.Read/Write are marked intrinsic

* Workaround a separate bug on Arm64

* Mark the new vector shift tests with ActiveIssue where relevant

---------

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
14 months agoReplace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128 (#90391)
Stephen Toub [Fri, 11 Aug 2023 16:56:30 +0000 (12:56 -0400)]
Replace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128 (#90391)

* Replace Utf16Utility.GetPointerToFirstInvalidChar fallback with Vector128

The else block will only be used on platforms where `Vector<T>` is 128-bit, so just use Vector128 explicitly.

* Address PR feedback

14 months agoSupport breakpoints on AVX-512 instructions (#89705)
Bruce Forstall [Fri, 11 Aug 2023 16:55:57 +0000 (09:55 -0700)]
Support breakpoints on AVX-512 instructions (#89705)

* Update debugger AMD64 disassembly tables

Regenerate with gdb 12. Fix various bugs in the table generation,
such as due to incorrect ModRM/reg escape handling, and new instructions.

* Remove 3DNow! table support

* Remove obsolete AMD XOP encoding support

* Update walker for new tables

Especially, removed 3DNow, XOP.

Also, update README.md

* Remove special-case XOP instructions

* Remove unused InstrForm

Due to removing XOP instructions

* Remove another removed InstrForm

* Support EVEX encoding

* Add more logging for patch decode; handle 64-byte memory in patch

* Support EVEX embedded broadcast

* Update comment about EVEX `disp8*N` addressing

* Fix build

14 months agoUse crossplat vectors in GetPointerToFirstInvalidChar (#90373)
Egor Bogatov [Fri, 11 Aug 2023 16:29:34 +0000 (18:29 +0200)]
Use crossplat vectors in GetPointerToFirstInvalidChar (#90373)

14 months ago[mono] Enable floats in Vector128::ExtractMostSignificantBits on arm64 and amd64...
Matous Kozak [Fri, 11 Aug 2023 15:25:14 +0000 (17:25 +0200)]
[mono] Enable floats in Vector128::ExtractMostSignificantBits on arm64 and amd64 (#90304)

* ExtractMSB arm64 support

* Move arm64 specific code into ifdef

14 months ago[mono] Support function pointer reflection introspection API (#89712)
Ivan Povazan [Fri, 11 Aug 2023 15:23:53 +0000 (17:23 +0200)]
[mono] Support function pointer reflection introspection API (#89712)

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

14 months agoEnsure GetPESectionBlock uses its cache (#90369)
Eric StJohn [Fri, 11 Aug 2023 15:05:24 +0000 (08:05 -0700)]
Ensure GetPESectionBlock uses its cache (#90369)

14 months agoUpdate dependencies from https://github.com/dotnet/emsdk build 20230811.1 (#90389)
dotnet-maestro[bot] [Fri, 11 Aug 2023 14:57:30 +0000 (10:57 -0400)]
Update dependencies from https://github.com/dotnet/emsdk build 20230811.1 (#90389)

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

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agoDo not generate internal archives (#90050)
Matt Mitchell [Fri, 11 Aug 2023 14:27:57 +0000 (07:27 -0700)]
Do not generate internal archives (#90050)

* Do not generate internal archives

14 months ago[mono] Cleanup DISABLED_FEATURES variable (#90375)
Alexander Köplinger [Fri, 11 Aug 2023 14:22:40 +0000 (16:22 +0200)]
[mono] Cleanup DISABLED_FEATURES variable (#90375)

We haven't populated it since moving to the cmake-based build system a couple years ago so it probably isn't worth doing now either.

14 months agoMake Analyzer crashes a warning (#90358)
Eric StJohn [Fri, 11 Aug 2023 13:27:06 +0000 (06:27 -0700)]
Make Analyzer crashes a warning (#90358)

* Make Analyzer crashes a warning

* Suppress AD0001 where it fails

* Suppress AD0001 in other CoreLibs

14 months agoRework SnakeCase/KebabCase naming policies to closer match Json.NET's (#90316)
Eirik Tsarpalis [Fri, 11 Aug 2023 11:18:11 +0000 (14:18 +0300)]
Rework SnakeCase/KebabCase naming policies to closer match Json.NET's (#90316)

* Rework JsonNamingPolicy.SnakeCase/KebabCase to match Json.NET semantics.

* Alternative implementation that handles digits properly but doesn't trim non-alphanumeric characters.

* Refactor to switch statement

* add non-ascii letter test case

* Address feedback

* Add support for surrogate pair capitalization

* Revert "Add support for surrogate pair capitalization"

This reverts commit c1c5d1c8a039235a14caa0f02c7e97d1f696634c.

* Add surrogate pair unit tests

* Address more feedback

* Address feedback and add a few more test cases.

* Add more surrogate pair tests

* Add unpaired surrogate testing

14 months agoMake getStaticFieldContent less conservative for struct with gc fields (#90162)
Egor Bogatov [Fri, 11 Aug 2023 09:20:04 +0000 (11:20 +0200)]
Make getStaticFieldContent less conservative for struct with gc fields (#90162)

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
14 months agoUpdate perf run yaml with changes for crank on helix (#90368)
Cameron Aavik [Fri, 11 Aug 2023 09:09:00 +0000 (19:09 +1000)]
Update perf run yaml with changes for crank on helix (#90368)

14 months agoAdded ArrayBufferWriter<T>.ResetWrittenCount() (#88009)
Alexander Radchenko [Fri, 11 Aug 2023 08:52:59 +0000 (14:52 +0600)]
Added ArrayBufferWriter<T>.ResetWrittenCount() (#88009)

Co-authored-by: David Cantú <dacantu@microsoft.com>
14 months agoAdd missing GTF_DEBUG_NODE_MORPHED (#90355)
Egor Bogatov [Fri, 11 Aug 2023 07:00:23 +0000 (09:00 +0200)]
Add missing GTF_DEBUG_NODE_MORPHED (#90355)

14 months ago[RISC-V] Fix Shuffling Thunks part 1 (#90266)
Tomasz Sowiński [Fri, 11 Aug 2023 06:52:04 +0000 (08:52 +0200)]
[RISC-V] Fix Shuffling Thunks part 1 (#90266)

* [RISC-V] Fix failing cases with delegates passing a struct with 2 longs as argument (test16833.cs -> TestMRB1, TestMRB5)

Fix emits a stack shuffle entry when we run out of general purpose registers, analogous to loongarch64.

* [RISC-V] Fix comment, inter-register mov doesn't take an immediate.

* [RISC-V] Remove unused EmitLoadStoreRegPairImm methods

* [RISC-V] Fix offset encoding in sd instruction

Co-authored-by: Dong-Heon Jung <clamp03@gmail.com>
---------

Co-authored-by: Dong-Heon Jung <clamp03@gmail.com>
14 months ago[main] Update dependencies from 8 repositories (#90014)
dotnet-maestro[bot] [Fri, 11 Aug 2023 05:52:58 +0000 (22:52 -0700)]
[main] Update dependencies from 8 repositories (#90014)

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

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.23402.2 -> To Version 8.0.0-beta.23403.7

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

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

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

* Update dependencies from https://github.com/dotnet/runtime build 20230806.6

Microsoft.DotNet.ILCompiler , Microsoft.NET.ILLink.Tasks , Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
 From Version 8.0.0-rc.1.23401.3 -> To Version 8.0.0-rc.1.23406.6

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

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-rc.1.23381.1 -> To Version 8.0.0-rc.1.23407.2

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

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

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

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

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

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

* Update dependencies from https://github.com/dotnet/cecil build 20230807.2

Microsoft.DotNet.Cecil
 From Version 0.11.4-alpha.23374.2 -> To Version 0.11.4-alpha.23407.2

* Fix.

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

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.23402.2 -> To Version 8.0.0-beta.23408.6

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23381.1 -> To Version 1.0.0-beta.23407.1 (parent: Microsoft.DotNet.Arcade.Sdk

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

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 8.0.0-rc.1.23381.1 -> To Version 8.0.0-rc.1.23407.2

* Update dependencies from https://github.com/dotnet/runtime-assets build 20230808.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.23401.1 -> To Version 8.0.0-beta.23408.1

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

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.23402.2 -> To Version 8.0.0-beta.23409.5

Dependency coherency updates

Microsoft.DotNet.XliffTasks
 From Version 1.0.0-beta.23381.1 -> To Version 1.0.0-beta.23408.1 (parent: Microsoft.DotNet.Arcade.Sdk

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

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

* Use PackageDownload not PackageReference for JitTools in SuperFileCheck.csproj

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
Co-authored-by: Jo Shields <directhex@apebox.org>
14 months agoFix for #89645, stack overflow in Crossgen2 (#90229)
Tomáš Rylek [Fri, 11 Aug 2023 05:37:52 +0000 (07:37 +0200)]
Fix for #89645, stack overflow in Crossgen2 (#90229)

After David Wrighton's refactoring of type loadability check
in #89415 we started seeing stack overflow in Crossgen2 compilation
of the outerloop test

Loader/classloader/generics/regressions/DD117522/Test.csproj

This is because the test is a negative test that exercises runtime
behavior in the presence of a non-loadable type with recursive
definition. David's stricter descent into the type ends up in an
infinite recursion when presented with this invalid type.

I haven't found any easy way to incorporate the additional check
for recursive types into the loadability algorithm - in fact I'm
not even sure whether that's generally doable.

As a very simple way to protect against the infinite recursion
I propose adding a heuristic limit for the type analysis stack
size. I assume the proposed value 1024 to be more than enough for
both Crossgen2 and NativeAOT, if it's realistic that NativeAOT can
encounter deeper types than this, I can make the check specific
for Crossgen2.

Fixes: #89645

14 months agoEnable R2R for NarrowUtf16ToAscii / WidentAsciiToUtf16 (#90361)
Stephen Toub [Fri, 11 Aug 2023 04:27:27 +0000 (00:27 -0400)]
Enable R2R for NarrowUtf16ToAscii / WidentAsciiToUtf16 (#90361)

* Enable R2R for Narrow/WidentAscii

* Delete dead Vector<T> code paths

14 months agoAdd metrics configuration APIs (#90201)
Chris Ross [Fri, 11 Aug 2023 04:08:52 +0000 (21:08 -0700)]
Add metrics configuration APIs (#90201)

14 months ago[wasm] Fix up conditions to trigger relink, and require `wasm-tools` workload (#89754)
Ankit Jain [Fri, 11 Aug 2023 03:39:10 +0000 (23:39 -0400)]
[wasm] Fix up conditions to trigger relink, and require `wasm-tools` workload (#89754)

- Trigger relinking (`WasmBuildNative=true`) if:
   - `WasmNativeStrip=false`
   - `WasmEnableSIMD=false`
   - `WasmEnableExceptionHandling=false`
   - The above are in addition to the existing conditions

- Also, trigger "workload required" when:
   - `WasmNativeStrip=false`
   - `WasmEnableExceptionHandling=true`
   - `InvariantGlobalization=true`
   - `InvariantTimeZone=true`
   - The above are in addition to the existing conditions

- Rationalize `WasmNativeDebugSymbols`, and `WasmNativeStrip`
- `WasmNativeDebugSymbols` will cause symbols to be included
  (essentially `-g`)
- `WasmNativeStrip` will cause these to be stripped with `wasm-opt
  --strip-dwarf ...`

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

14 months agoExpose the RequiresLocationAttribute (#89870)
Tanner Gooding [Fri, 11 Aug 2023 02:10:11 +0000 (19:10 -0700)]
Expose the RequiresLocationAttribute (#89870)

* Expose the RequiresLocationAttribute

* Add a basic test for RequiresLocationAttribute

14 months agoMark AddBinaryFormattedResource obsolete (#90346)
Eric StJohn [Fri, 11 Aug 2023 01:46:21 +0000 (18:46 -0700)]
Mark AddBinaryFormattedResource obsolete (#90346)

14 months agoonly slice SocketAddress on success operation (#90284)
Tomas Weinfurt [Fri, 11 Aug 2023 01:28:36 +0000 (18:28 -0700)]
only slice SocketAddress on success operation (#90284)

* only slice SocketAddress on success operation

* null

* completed

* feedback

* feedback

14 months agoAdd support fo MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR in set_var for debugger-agent ...
JC [Fri, 11 Aug 2023 01:07:36 +0000 (21:07 -0400)]
Add support fo MONO_DEBUG_VAR_ADDRESS_MODE_VTADDR in set_var for debugger-agent (#90330)

14 months ago[iOS] Fix iOS nativeaot runtime test build (#90327)
Steve Pfister [Fri, 11 Aug 2023 00:13:42 +0000 (17:13 -0700)]
[iOS] Fix iOS nativeaot runtime test build (#90327)

In https://github.com/dotnet/runtime/pull/89869, the call to the AppleAppBuilderTask passed an item for `NativeDependencies` as opposed to a property. The change wasn't reflected in the runtime test build.proj, so the built test app wasn't being sent in.

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

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

14 months ago[mono][tasks] Generate uncompressed mibc files (#90336)
Mitchell Hwang [Thu, 10 Aug 2023 23:40:39 +0000 (19:40 -0400)]
[mono][tasks] Generate uncompressed mibc files (#90336)

14 months agoList unsupported architectures in area-owners (#90128)
Eric StJohn [Thu, 10 Aug 2023 21:42:42 +0000 (14:42 -0700)]
List unsupported architectures in area-owners (#90128)

14 months agoSupport new Options attributes in the Runtime (#90275)
Tarek Mahmoud Sayed [Thu, 10 Aug 2023 19:49:30 +0000 (12:49 -0700)]
Support new Options attributes in the Runtime (#90275)

14 months ago[WASM] Add ILStrip task to wasm app build process (#88926)
Fan Yang [Thu, 10 Aug 2023 19:45:07 +0000 (15:45 -0400)]
[WASM] Add ILStrip task to wasm app build process (#88926)

* Add ILStrip task to wasm app build process

* Make it work for wasm app building workflow

* Interp: stop inlining stripped methods. ILStrip: set code size to zero for tiny methods

* [mono][aot] Avoid adding some methods to the compiled method file.

* Methods which have 'deopt' set can enter the interpreter during EH.
* Methods which have 'interp_entry_only' set are AOTed, but the AOT
  code is only used to enter the interpreter.

* Only trim the methods that interpreter is able to call the aot'ed verion of it

* Add default value and documentation for WASMStripIL

* Move jit_call_can_be_supported to interp.c

* Minor format fix

* Add a test

* For testing

* Fix typo

* Skip TestUtilities Reference

* Address review feedback

* Change it to true

* Change name to trimming eligible

* Remove testing

* Address review feedback

* Address review feedback from Kate

* Add a var for llvm_only

---------

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
14 months agoExplicitly set SizeConst = 1 and remove the warning suppression (#90174)
Jeremy Koritzinsky [Thu, 10 Aug 2023 18:31:40 +0000 (11:31 -0700)]
Explicitly set SizeConst = 1 and remove the warning suppression (#90174)

14 months agoFix NoLinkedOuput having the wrong base attribute type. (#90256)
Mike Voorhees [Thu, 10 Aug 2023 18:25:46 +0000 (14:25 -0400)]
Fix NoLinkedOuput having the wrong base attribute type. (#90256)

This led to `[NoLinkedOutput]` being left in the `input` assembly

14 months agoReport a diagnostic for return types with HResult-like named structures and provide...
Jeremy Koritzinsky [Thu, 10 Aug 2023 18:14:13 +0000 (11:14 -0700)]
Report a diagnostic for return types with HResult-like named structures and provide a code-fix to do the correct marshalling (#90282)

14 months agoImprove codegen in impStringEqualsOrStartsWith (#90288)
Egor Bogatov [Thu, 10 Aug 2023 18:08:58 +0000 (20:08 +0200)]
Improve codegen in impStringEqualsOrStartsWith (#90288)

14 months agoFix perf jobs param (#90215)
Milos Kotlar [Thu, 10 Aug 2023 18:05:58 +0000 (20:05 +0200)]
Fix perf jobs param (#90215)

14 months agoDisable CodeQL on runtime-official.yml (#90329)
Alexander Köplinger [Thu, 10 Aug 2023 18:02:52 +0000 (20:02 +0200)]
Disable CodeQL on runtime-official.yml (#90329)

We have a separate pipeline for it and it is breaking official builds at the moment.

14 months ago[mono][llvm] Fix an assertion when a method doesn't set its return value vreg. (...
Zoltan Varga [Thu, 10 Aug 2023 17:29:46 +0000 (13:29 -0400)]
[mono][llvm] Fix an assertion when a method doesn't set its return value vreg. (#90294)

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

14 months ago[mono][llvm] Use the OP_MEMMOVE opcode instead of calling the managed memcpy method...
Zoltan Varga [Thu, 10 Aug 2023 17:29:32 +0000 (13:29 -0400)]
[mono][llvm] Use the OP_MEMMOVE opcode instead of calling the managed memcpy method when compiling with LLVM. (#90097)

LLVM can emit optimized code when the length ends up being a constant.

14 months agoRemove unsafe code and make scheme parsing faster in Uri (#90087)
Miha Zupan [Thu, 10 Aug 2023 17:10:21 +0000 (19:10 +0200)]
Remove unsafe code and make scheme parsing faster in Uri (#90087)

* Remove unsafe code and make scheme parsing faster in Uri

* Reduce the number of range checks

* Switch loop to IndexOf

14 months agoFlow the IMeterFactory to SocketsHttpHandler on Mobile (#90298)
Miha Zupan [Thu, 10 Aug 2023 17:08:35 +0000 (19:08 +0200)]
Flow the IMeterFactory to SocketsHttpHandler on Mobile (#90298)

14 months agoRestored Crossgen2's optimizations in CoreCLR builds and reenabled the poisoning...
Ivan Diaz Sanchez [Thu, 10 Aug 2023 16:14:51 +0000 (09:14 -0700)]
Restored Crossgen2's optimizations in CoreCLR builds and reenabled the poisoning tests since the problem has been addressed. (#90278)

14 months ago[ComInterfaceGenerator] Add implementation and test for CallerAllocateBufferType...
Jackson Schuster [Thu, 10 Aug 2023 16:13:51 +0000 (11:13 -0500)]
[ComInterfaceGenerator] Add implementation and test for CallerAllocateBufferType parameters (#90263)

14 months agoEnable isolates storage tests on maccatalyst (#90150)
Meri Khamoyan [Thu, 10 Aug 2023 15:45:21 +0000 (19:45 +0400)]
Enable isolates storage tests on maccatalyst (#90150)

14 months agoEliminate cancellation deadlock in RateLimiter implementations (#90285)
Brennan [Thu, 10 Aug 2023 15:28:45 +0000 (08:28 -0700)]
Eliminate cancellation deadlock in RateLimiter implementations (#90285)

14 months agoMark Microsoft.NetCore.Platforms as non-shipping (#90297)
Viktor Hofer [Thu, 10 Aug 2023 15:15:41 +0000 (17:15 +0200)]
Mark Microsoft.NetCore.Platforms as non-shipping (#90297)

The full RID graph is frozen and won't change anymore. Mark the Microsoft.NETCore.Platforms nuget package as non-shipping as only the sdk repository still requires it.

Contributes to https://github.com/dotnet/runtime/issues/90000

14 months ago[LoongArch64] Fix the `la.local` between the JIT_PatchedCodeStart (#90143)
Qiao Pengcheng [Thu, 10 Aug 2023 15:03:22 +0000 (23:03 +0800)]
[LoongArch64] Fix the `la.local` between the JIT_PatchedCodeStart (#90143)

* [LoongArch64] Fix the `la.local` between the JIT_PatchedCodeStart
and the JIT_PatchedCodeLast for the upstream's LA-compiler-bugs.

* Also update the `g_GCShadowEnd`.

* amend the code for CRs.

14 months ago[browser] make cachedResourcesPurgeDelay configurable (#90264)
Pavel Savara [Thu, 10 Aug 2023 14:40:17 +0000 (16:40 +0200)]
[browser] make cachedResourcesPurgeDelay configurable (#90264)

14 months agoFor perf, use the new ConstructorInvoker APIs for ActivatorUtilities.CreateFactory...
Steve Harter [Thu, 10 Aug 2023 14:01:48 +0000 (09:01 -0500)]
For perf, use the new ConstructorInvoker APIs for ActivatorUtilities.CreateFactory (#90119)

14 months agoUpdate dependencies from https://github.com/dotnet/roslyn-analyzers build 20230807...
dotnet-maestro[bot] [Thu, 10 Aug 2023 13:58:47 +0000 (09:58 -0400)]
Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20230807.1 (#90146)

Microsoft.CodeAnalysis.Analyzers , Microsoft.CodeAnalysis.NetAnalyzers
 From Version 3.11.0-beta1.23405.1 -> To Version 3.11.0-beta1.23407.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months agomake Https_MultipleRequests_TlsResumed Linux specific (#90286)
Tomas Weinfurt [Thu, 10 Aug 2023 13:47:29 +0000 (06:47 -0700)]
make Https_MultipleRequests_TlsResumed Linux specific (#90286)

14 months agoJIT: Remove an overeager assert (#90302)
Jakob Botsch Nielsen [Thu, 10 Aug 2023 13:01:51 +0000 (15:01 +0200)]
JIT: Remove an overeager assert (#90302)

Physical promotion invokes `fgForwardSubStatement`, providing its own
liveness information, meaning that early liveness is no longer the only
source of liveness information in this function. This made it possible
to hit an assert when early liveness was disabled via
`DOTNET_JitEnableEarlyLivenessRange`.

Remove the overeager assert and leave it up to the caller to ensure that
there is valid liveness information (`GTF_VAR_DEATH`) when forward sub
is invoked.

Fix #90295

14 months agoRemove EnableNativeEventPipe property (#90274)
Lakshan Fernando [Thu, 10 Aug 2023 12:16:51 +0000 (05:16 -0700)]
Remove EnableNativeEventPipe property (#90274)

14 months agoFix intrinsics test failure log messages (#90267)
Jakob Botsch Nielsen [Thu, 10 Aug 2023 12:12:45 +0000 (14:12 +0200)]
Fix intrinsics test failure log messages (#90267)

14 months agoAdd additional filter capabilities to dotnet-pgo tool. (#89853)
Johan Lorensson [Thu, 10 Aug 2023 11:06:11 +0000 (13:06 +0200)]
Add additional filter capabilities to dotnet-pgo tool. (#89853)

Mono adopted PGO in .net7 as a replacement for a
solution called profiled AOT in mono/mono used by Android
SDK. In the replaced solution there was a concept of
a stop trigger, meaning that the user could collect methods
up to a stop trigger (a method name) meaning that the
profiled AOT image would only include methods up to that point.

When using EventPipe and nettrace there is limited ability to
get the same fine grained control over what methods that ends
up in the nettrace file. dotnet-monitor includes ways to stop
tracing if it hits for example a specific method, but due to the
nature of EventPipe, there could still be additional methods added
to the trace when closing session. dotnet-trace currently don't offer
any ability to do something similar, but if implemented, it
would probably come with the same limitations as dotnet-monitor.

Adding better filter capabilities to dotnet-pgo would add additional
capabilities, giving users more control on what methods that gets
included into the generated mibc file. That would give Mono's
profiled AOT better control to include methods up to a stop trigger.

dotnet-pgo alread had capabilities to include events based on timestamp
interval. This commit extends that to select the lower/upper timestamp
based on a regular expression matching methods. This commit also
adds capabilities to add a method include/exclude filters using regular
expression, giving users fine grained control on what methods to
include/exclude in the generated mibc file.

The additional filter capabilities could be used by Android SDK to
for example create a mibc file including all methods up to Main,
replacing the stop trigger features used in old profiled AOT solution.

---------

Co-authored-by: mdh1418 <mitchhwang1418@gmail.com>
14 months agoLsra JitStressRegs mode SpillAlways fixes (#89720)
Kunal Pathak [Thu, 10 Aug 2023 11:05:46 +0000 (04:05 -0700)]
Lsra JitStressRegs mode SpillAlways fixes (#89720)

* fix few scenarios for spillAlways()

* Include JitStressRegs=0x800

* Revert "Include JitStressRegs=0x800"

This reverts commit 170233235b3e24530386f48569a3e6f9d1de2b70.

14 months ago[mono] Adding support for Vector128::ExtractMostSignificantBits intrinsics on amd64...
Matous Kozak [Thu, 10 Aug 2023 08:47:51 +0000 (10:47 +0200)]
[mono] Adding support for Vector128::ExtractMostSignificantBits intrinsics on amd64 (#89997)

* Extract MSB amd64

* add SSSE3 check

14 months agoReport exception type name in Http metrics (#90221)
Miha Zupan [Thu, 10 Aug 2023 06:53:34 +0000 (08:53 +0200)]
Report exception type name in Http metrics (#90221)

* Report exception type name in Http metrics

* Mention 'Unknown' in a comment instead

14 months agoFix "Passed test" output
Mark Plesko [Thu, 10 Aug 2023 06:45:43 +0000 (23:45 -0700)]
Fix "Passed test" output