platform/upstream/dotnet/runtime.git
14 months agoIntegrate HttpClientFactory and metrics (#86888)
James Newton-King [Mon, 7 Aug 2023 16:08:11 +0000 (00:08 +0800)]
Integrate HttpClientFactory and metrics (#86888)

* Integrate HttpClientFactory and metrics

* React to rebase

* Fix tests

* PR feedback

* Clean up

* Fix tests

14 months agoImprove duplicate assembly resolving (#89958)
Mike Voorhees [Mon, 7 Aug 2023 16:06:20 +0000 (12:06 -0400)]
Improve duplicate assembly resolving (#89958)

`GetAssembly` opens a new assembly and stream every time it is called and keeps them open for the duration of the run.

`RootAssemblyFile.LoadAssemblyFile` sort of handled an already loaded assembly, but it left a new `AssemblyDefinition` instance and `MemoryStream` open every time it happened.

`CacheAssembly` was easy to make a mistake with.   Forget to do the delicate dance that `RootAssemblyFile.LoadAssemblyFile` goes to already loaded assemblies and you can easily overwrite an already cached assembly.  Guard against mistakes rather than quitely overwriting the assembly that was already cached.

Why force callers of `CacheAssembly` to check if something is cached already?  Handle that case internally.

With these changes the logic in `RootAssemblyFile.LoadAssemblyFile` is simplified and an extra copy of the assembly is no longer left open in the scenario where an assembly is specified multiple times.

14 months agoFix wasm perf setup (#90093)
Jiri Cincura ↹ [Mon, 7 Aug 2023 15:02:30 +0000 (17:02 +0200)]
Fix wasm perf setup (#90093)

* Fixes bash expansion of ${this.version()}.

14 months agoAdd JsonSerializerOptions.MakeReadOnly(bool) overload. (#90013)
Eirik Tsarpalis [Mon, 7 Aug 2023 10:57:35 +0000 (13:57 +0300)]
Add JsonSerializerOptions.MakeReadOnly(bool) overload. (#90013)

14 months agoAdd `JsonNode.ParseAsync` public API (#90006)
DoctorKrolic [Mon, 7 Aug 2023 10:52:08 +0000 (13:52 +0300)]
Add `JsonNode.ParseAsync` public API (#90006)

* Add `JsonNode.ParseAsync` public API

* Regenerate ref assemblies

* Change implementation to use unrented document

14 months agoImprove test failure messages (#89967)
Mike Voorhees [Mon, 7 Aug 2023 07:42:42 +0000 (03:42 -0400)]
Improve test failure messages (#89967)

14 months agoCheck for <framework_name>.deps.json when enumerating framework paths (#90035)
Elinor Fung [Mon, 7 Aug 2023 05:06:59 +0000 (22:06 -0700)]
Check for <framework_name>.deps.json when enumerating framework paths (#90035)

This adds a check for the framework's .deps.json instead of just the existence of the directory. To avoid extra file checks in the normal/happy path (where all framework version folder are valid), when resolving, it only does the check after resolving the best version match. And if that version directory isn't valid, it tries resolving again without it.

14 months ago[mono][aot] Use g_strcasecmp () to check whenever aot input assemblies are loaded...
Zoltan Varga [Mon, 7 Aug 2023 00:18:07 +0000 (20:18 -0400)]
[mono][aot] Use g_strcasecmp () to check whenever aot input assemblies are loaded from the correct location. (#90065)

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

14 months agoTimeProvider GetLocalNow enhancement (#90066)
Weihan Li [Sun, 6 Aug 2023 22:07:22 +0000 (06:07 +0800)]
TimeProvider GetLocalNow enhancement (#90066)

Co-authored-by: Tarek Mahmoud Sayed <tarekms@microsoft.com>
14 months agoFix an assert and clean up a codegen issue (#90067)
Tanner Gooding [Sun, 6 Aug 2023 21:38:50 +0000 (14:38 -0700)]
Fix an assert and clean up a codegen issue (#90067)

14 months agoSPMI: Capture EE API exceptions in getNewHelper, and simplify the API shape a bit...
Jakob Botsch Nielsen [Sun, 6 Aug 2023 21:09:54 +0000 (23:09 +0200)]
SPMI: Capture EE API exceptions in getNewHelper, and simplify the API shape a bit (#89852)

We have various tests where getNewHelper throws an EE exception, so
capture these and rethrow them as part of SPMI.

It would be nice with a more general approach to this (conceptually all
EE APIs could throw exceptions), but this at least handles it for our
own libraries.

Contributes to #47540 and #47546.

Also clean up the API shape of getNewHelper slightly, since this requires
a JIT-EE GUID change anyway; the only used member of the token is the class,
so pass a class handle instead. The second parameter was also removed.

14 months agoFix CompositeChangeToken & CancellationTokenSource deadlock (#90078)
Rik Steenkamp [Sun, 6 Aug 2023 17:07:56 +0000 (19:07 +0200)]
Fix CompositeChangeToken & CancellationTokenSource deadlock (#90078)

14 months agoAdd note about creating arrays using newobj (#90070)
Jan Kotas [Sun, 6 Aug 2023 15:05:28 +0000 (08:05 -0700)]
Add note about creating arrays using newobj (#90070)

Contributes to #90038

14 months agoRename area-ILVerification to area-Tools-ILVerification (#89698)
Jan Kotas [Sun, 6 Aug 2023 15:04:35 +0000 (08:04 -0700)]
Rename area-ILVerification to area-Tools-ILVerification (#89698)

* Rename area-ILVerification to area-Tools-ILVerification

Fixes #89693

* Update src/coreclr/tools/ILVerify/README.md

Co-authored-by: Kevin Jones <vcsjones@github.com>
14 months ago[RISCV] Store 2*XLEN ValueType half in Reg and half on stack when only A7 available...
VincentWu [Sun, 6 Aug 2023 11:29:39 +0000 (21:29 +1000)]
[RISCV] Store 2*XLEN ValueType half in Reg and half on stack when only A7 available (#90072)

* update makefile

* add format file

* use mul inst instead of emulate mul
process stack size larger than imm32

* emit get_throw_trampoline

* mono_riscv_throw_exception

* fix error of stack trace

* test case

* output inst idiv
fix mono_riscv_emit_branch_exc

* implement mono_arch_get_throw_corlib_exception

* fix rdiv

* move ArgOnStack arg at prologue
lowering OP_XOR_IMM&OP_IXOR_IMM

* fix emit_imm

* test imm

* update test case

* use swich to process return value

* fix unwind inst def_cfa

* fmt

* lowering OP_LMUL_IMM

* make file for webapiclient

* lowerng&output
- OP_FCONV_TO_I8
- OP_LXOR_IMM
- OP_ISHR

* lowerng&output
- relaxed_nop
- float_cle
- long_shl
- OP_ICONV_TO_R_UN
- OP_LCONV_TO_I2
- OP_FBGE
- OP_IDIV_IMM

* fix this_pointer in vcall with valuetype returned
- The ABI specify that If the reture value would have been passed by reference, the caller will allocates memory for the return value, and passes the address as an implicit first parameter.
- The Mono will treat first parameter as this_pointer reference to `mono_vcall_trampoline()`.  They are conflict a bit.

* process param type: ArgVtypeOnStack & ArgVtypeByRef

* lowering OP_LCONV_TO_I2

* OP_IREM_UN_IMM
OP_ATOMIC_LOAD_U1
OP_IREM_UN_IMM

* fix output of OP_IREM & OP_IREM_UN
OP_IREM -> riscv_remw
OP_IREM_UN -> riscv_remuw

* use `lw` to load u4 value on the stack
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#integer-calling-convention

* optmise lw+zext -> lwu

* fix patch_full
use mono_riscv_emit_loadu to emit lwu
fix rem

* fix `mono_arch_build_imt_trampoline` when `item->is_equals==false`

* FIXME: reg got crashed wetween `this` and return ref

* fix `mono_arch_build_imt_trampoline`

* float_sub & float_div

* OP_FNEG,OP_LADD_OVF,OP_FBEQ, OP_COND_EXC_OV

* fix mono_arch_emit_outarg_vt

* process ArgVtypeOnStack in emit_move_args

* add sample status

* fix valid imm check of OP_L.*_IMM

* OP_LCONV_TO_R_UN

* update

* fix the param order stored o stack

* fix the param size of MONO_TYPE_I & MONO_TYPE_U when RV64

* add test task for makefile

* update .clang-format

* fmt

* fix merge

* fix

* set cfa for callee saved regs

* fix the position of param passed by stack

* toll-calculator

* fix

* OP_FADD & OP_LCONV_TO_OVF_I

* ArgOnStackR8

* OP_FBLE

* check need needs_emulation for D&F

* mixins-with-interfaces

* OP_LXOR_IMM

* get_delegate_virtual_invoke_impl

* fix OP_ADDCC

* fix get_delegate_virtual_invoke_impl

* endfilter

* update

* update test file

* test ArgVtypeByRef

* fix VT arg of ArgVtypeByRef

* fix return value of valueType

* OP_FBGE & OP_FBLE for OP_RCOMPARE

* update

* lowering OP_FCONV_TO_I2

* lowering OP_RCONV_TO_I2

* OP_ATOMIC_ADD_I8

* OP_COND_EXC_IGT and OP_LCONV_TO_OVF_I4

* update

* fix add_valuetype

* update

* process param types of ArgVtypeInMixed

* update

* atomic_store_i8

* update

* fix divuw

* update

* rcall

* update testcase

* OP_FBNE_UN

* OP_FCONV_TO_I8

* update

* update test

* update

* clean

* remove changes

* fmt

* clean

14 months agoFix mono's Wsingle-bit-bitfield-constant-conversion (#90068)
Adeel Mujahid [Sun, 6 Aug 2023 11:28:08 +0000 (14:28 +0300)]
Fix mono's Wsingle-bit-bitfield-constant-conversion (#90068)

* Fix mono's Wsingle-bit-bitfield-constant-conversion

* Address CR feedback

14 months agoRecover some lost EH performance on Unix amd64 (#90033)
Jan Vorlicek [Sun, 6 Aug 2023 10:07:55 +0000 (12:07 +0200)]
Recover some lost EH performance on Unix amd64 (#90033)

* Improve EH performance on Unix amd64

Few months ago, a change to enable AVX512 on Unix was merged in.
That change has enlarged the CONTEXT structure significantly and
it was found that it has caused 6..17% regressions in exception handling
microbenchmarks.

This change gets some of the lost performance back by adding custom
copy constructor and assignment operator to the CONTEXT structure
and preventing copying of the AVX / AVX512 stuff if the source
context doesn't have it. I have observed 3..9% gain on my machine.

Close #84308

* Fix gcc build and size for non-xstate case

* Fix yet another gcc break

* Fix build break

* Revert the gcc fixes and disable the warning

The zeroing of CONTEXT structure is used at too many places and
it is valid, so rather than trying to modify all the places by
using placement new, just disable the warning for gcc.

14 months ago[wasm] Fix startup without emcc -g option (#89872)
Katelyn Gadd [Sat, 5 Aug 2023 21:09:13 +0000 (14:09 -0700)]
[wasm] Fix startup without emcc -g option (#89872)

When compiling without the emcc -g switch, the "env" module becomes "a", which caused startup to break.
Co-authored-by: Pavel Savara <pavelsavara@microsoft.com>
14 months agoDo not suppress inlining of random threadstatics (#90055)
Vladimir Sadov [Sat, 5 Aug 2023 14:57:33 +0000 (07:57 -0700)]
Do not suppress inlining of random threadstatics (#90055)

14 months agoRe-enable some JIT tests (#89739)
Aman Khalid [Sat, 5 Aug 2023 06:15:42 +0000 (23:15 -0700)]
Re-enable some JIT tests (#89739)

* JIT/opt/ObjectStackAllocation/ObjectStackAllocationTests/ for Crossgen
* JIT/Regression/JitBlue/Runtime_34170/Runtime_34170/ for Crossgen ARM32

14 months agoMove the background marking of UOH objects inside more space lock (#86802)
Andrew Au [Fri, 4 Aug 2023 22:54:06 +0000 (15:54 -0700)]
Move the background marking of UOH objects inside more space lock (#86802)

14 months agoMake sure all new GCDacVars are reported only for v2 (#90043)
Andrew Au [Fri, 4 Aug 2023 22:53:05 +0000 (15:53 -0700)]
Make sure all new GCDacVars are reported only for v2 (#90043)

14 months agoDelete dangling thread session states (#89955)
Tom McDonald [Fri, 4 Aug 2023 22:42:51 +0000 (18:42 -0400)]
Delete dangling thread session states (#89955)

* Delete dangling thread session states

Co-Authored-By: Johan Lorensson <lateralusx.github@gmail.com>
* Update ep-session.c

---------

Co-authored-by: David Mason <davmason@microsoft.com>
Co-authored-by: Johan Lorensson <lateralusx.github@gmail.com>
14 months agoIntroducing TimeZoneInfo.GetSystemTimeZones(bool skipSorting) (#89985)
Tarek Mahmoud Sayed [Fri, 4 Aug 2023 22:27:20 +0000 (15:27 -0700)]
Introducing TimeZoneInfo.GetSystemTimeZones(bool skipSorting) (#89985)

14 months agoImprove reliability of HttpRequestError.NameResolutionError (#89948)
Anton Firszov [Fri, 4 Aug 2023 22:03:01 +0000 (00:03 +0200)]
Improve reliability of HttpRequestError.NameResolutionError (#89948)

* map TryAgain to NameResolutionError

* Quic: always resolve DNS in managed code

* oops

* ignore ScopId when comparing ipv6 endpoints in tests

* do not reuse QuicAddr

* Skip NameResolutionError() test on Windows7

14 months agoFix HttpListener path parsing for trailing % (#90028)
Miha Zupan [Fri, 4 Aug 2023 21:52:04 +0000 (23:52 +0200)]
Fix HttpListener path parsing for trailing % (#90028)

14 months agoSPMI: Restore CORINFO_CALL_INFO stub lookup correctly (#90016)
Jakob Botsch Nielsen [Fri, 4 Aug 2023 21:42:50 +0000 (23:42 +0200)]
SPMI: Restore CORINFO_CALL_INFO stub lookup correctly (#90016)

SPMI was not restoring the runtimeLookupFlags/runtimeLookupArgs of the
embedded CORINFO_LOOKUP_KIND, leaving them set to garbage. This would
cause misses when replaying getReadyToRunHelper where those members are
used as the key.

14 months agoRevert "Disable MonitoringIsEnabled with issue 75302 (#75306)" (#89966)
Mark Plesko [Fri, 4 Aug 2023 21:32:52 +0000 (14:32 -0700)]
Revert "Disable MonitoringIsEnabled with issue 75302 (#75306)" (#89966)

Appears to have been fixed by #74959

Fixes #75302

This reverts commit a174882750130433b03afcf8ac30318c2fbc527f

14 months ago[wasm] CI: Don't trigger non-wasm runtime tests when wasm-test-runner (#89957)
Ankit Jain [Fri, 4 Aug 2023 21:21:07 +0000 (17:21 -0400)]
[wasm] CI: Don't trigger non-wasm runtime tests when wasm-test-runner (#89957)

.. changes. There is a separate subset `wasm_runtimetests` for
triggering wasm runtime tests. So, `runtimetests` subset used by
non-wasm jobs should ignore wasm-test-runner changes.

14 months ago[wasm][wbt] Split WBT classes to speed up CI job execution. (#89926)
Ilona Tomkowicz [Fri, 4 Aug 2023 21:18:47 +0000 (23:18 +0200)]
[wasm][wbt] Split WBT classes to speed up CI job execution. (#89926)

IcuSharding and BuildPublish on Blazor always take the longest. I split them more or less into equal test count per class (~20 in icu, ~10 in build publish).

This PR changes the times on wbt linux CI when we split into BuldPublish and BuildPublishDefaultTemplate:
Build time: ~1,5min -> ~1,5min
Run time: ~53min -> ~45min
Original time values taken from build [20230802.154](https://dev.azure.com/dnceng-public/public/_build/results?buildId=361726) with 495 301 tests.

It's fine but the BuildPublish is the only test that keeps running till the end, around 30th minute all the other wbt are done already, so trying the 3-file split approach:
- BuildPublishTestsFromWasmTemplate,
- BuildPublishTestsFromBlazorTemplate (the same test set as BuildPublishDefaultTemplate, just renamed to better describe the contents) and
- BuildPublish,

each <10 tests.
Build time: ~1,5min -> ~1,5min
Run time: ~53min -> 53 min - it seems 3 files split did not work as expected, @radical, it might be an outliner ~~but in this situation it does not look worthy to merge the changes~~.
[build 20230804.3](https://dev.azure.com/dnceng-public/public/_build/results?buildId=363212&view=logs&jobId=9c08ee28-c5cd-54b8-6ae3-9fcb797291cc&j=0b2e5ab0-105d-5e21-8497-262338385634)
Okay, on the re-run it's already fine, [35 min as expected](https://dev.azure.com/dnceng-public/public/_build/results?buildId=363553&view=logs&jobId=10714551-d8dc-5291-8d0a-07fdfc20529c&j=1fa93050-f528-55d3-a351-f8bf9ce5adbf&t=a9f1a437-3b59-5900-1137-ec6cae9a530c).

On windows it changed ~60min -> 42 min.

14 months agoUse the same tracked contexts for event pipe and ETW in nativeaot (#89902)
Elinor Fung [Fri, 4 Aug 2023 18:48:56 +0000 (11:48 -0700)]
Use the same tracked contexts for event pipe and ETW in nativeaot (#89902)

- Make tracking for event pipe and ETW enabled/status use the same contexts
- Switch to using the .NET ETW provider GUIDs instead of .NET Native
- Implement ep_rt_providers_validate_all_disabled (uses the contexts)

14 months agoAvoid extra console write for clearing on Unix (#89026)
Stephen Toub [Fri, 4 Aug 2023 18:17:04 +0000 (14:17 -0400)]
Avoid extra console write for clearing on Unix (#89026)

* Avoid extra console write for clearing on Unix

* Fix ordering from original PR

* Add test that the data we defined is expected

14 months agoUpdate the event used for the tiered compilation background thread (#89972)
Koundinya Veluri [Fri, 4 Aug 2023 17:53:11 +0000 (10:53 -0700)]
Update the event used for the tiered compilation background thread (#89972)

Updated the event to use `ClrEventStatic` instead of `ClrEvent`, as the former is intended for global variables and does not have a destructor. There may be a possibility for races with the destructor in shutdown scenarios.

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

14 months agouse approved SocketAddress API instead of direct internal access (#89841)
Tomas Weinfurt [Fri, 4 Aug 2023 17:38:29 +0000 (10:38 -0700)]
use approved SocketAddress API instead of direct internal access (#89841)

* use approved SocketAddress API instead of internal access

* feedback

* cleanup

14 months agoFix PermuteVar32x16x2 optimization (#90005)
Egor Bogatov [Fri, 4 Aug 2023 16:09:20 +0000 (18:09 +0200)]
Fix PermuteVar32x16x2 optimization (#90005)

14 months ago[workloads] Use native arm64 aot compilers for iOS, tvOS, maccatalyst, and android...
Steve Pfister [Fri, 4 Aug 2023 16:01:04 +0000 (09:01 -0700)]
[workloads] Use native arm64 aot compilers for iOS, tvOS, maccatalyst, and android where possible (#89961)

As a result of https://github.com/dotnet/runtime/pull/89027 and https://github.com/dotnet/runtime/pull/74715, we can now build native arm64 cross compilers on linux and macos. This change adds the right references to the workload manifest so that they can be installed with maui and the mobile SDK's.

win-arm64 is the only arm64 platform left and that is a work in progress.

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

Fixes https://github.com/dotnet/maui/issues/4476

14 months agoRework on 88919 as suggested by @vitek-karas (#89960)
Thays Grazia [Fri, 4 Aug 2023 15:01:44 +0000 (12:01 -0300)]
Rework on 88919 as suggested by @vitek-karas (#89960)

14 months ago[browser] doc feedback (#89951)
Pavel Savara [Fri, 4 Aug 2023 14:44:27 +0000 (16:44 +0200)]
[browser] doc feedback (#89951)

14 months agoAdd test for TypeIdentifierAttribute (#89882)
Steve Harter [Fri, 4 Aug 2023 14:28:06 +0000 (09:28 -0500)]
Add test for TypeIdentifierAttribute (#89882)

14 months agoMatch IsUnwindable and GetReturnAddressHijackInfo conditions (#89998)
Filip Navara [Fri, 4 Aug 2023 13:41:50 +0000 (15:41 +0200)]
Match IsUnwindable and GetReturnAddressHijackInfo conditions (#89998)

14 months agoRevert "For perf, use the new ConstructorInvoker APIs for ActivatorUtilities.CreateFa...
Jan Kotas [Fri, 4 Aug 2023 13:15:47 +0000 (06:15 -0700)]
Revert "For perf, use the new ConstructorInvoker APIs for ActivatorUtilities.CreateFactory (#89573)" (#89992)

This reverts commit c41696644436d6ba8d7bc6f06b20273d99d8dc70.

14 months ago[mono][ios] Disable failing eventpipe gcdump test on apple mobile platforms (#90002)
Milos Kotlar [Fri, 4 Aug 2023 13:11:20 +0000 (15:11 +0200)]
[mono][ios] Disable failing eventpipe gcdump test on apple mobile platforms (#90002)

* Disable failing eventpipe test on apple mobile platforms

* Add tracking issue

14 months agoLight up for newer arm64 hardware capabilities (#89991)
Jan Kotas [Fri, 4 Aug 2023 12:36:56 +0000 (05:36 -0700)]
Light up for newer arm64 hardware capabilities (#89991)

Fixes #89937

14 months ago[nativeaot][ios] Improve Native AOT test coverage on apple mobile platforms (#89301)
Milos Kotlar [Fri, 4 Aug 2023 11:44:05 +0000 (13:44 +0200)]
[nativeaot][ios] Improve Native AOT test coverage on apple mobile platforms (#89301)

* Enable TestLinqExpressions test

* Test maccatalyst job on Native AOT

* Test other smoke runtime tests on Native AOT

* Add tracking issue for disabled tests

14 months agoMove Microsoft.NET.WebAssembly.WebCil into tasks (#89999)
Viktor Hofer [Fri, 4 Aug 2023 10:42:53 +0000 (12:42 +0200)]
Move Microsoft.NET.WebAssembly.WebCil into tasks (#89999)

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

Repo task projects need to reside under src/tasks as the
TasksConfiguration property applies to these projects. By having a
referenced task project outside of src/tasks, it's easy to get
binclashes because of a project being built for different configurations
(Debug vs Release).

14 months agoRoll Ubuntu 18.04 queue to 22.04 (#89995)
Drew Scoggins [Fri, 4 Aug 2023 09:35:11 +0000 (02:35 -0700)]
Roll Ubuntu 18.04 queue to 22.04 (#89995)

14 months agoExclude NETFramework targets file during source build (#89974)
Eric StJohn [Fri, 4 Aug 2023 06:49:30 +0000 (23:49 -0700)]
Exclude NETFramework targets file during source build (#89974)

14 months agoMake ImplementsInterfaceOfSelf more precise for canonical subtypes (#89969)
Jan Kotas [Fri, 4 Aug 2023 05:50:54 +0000 (22:50 -0700)]
Make ImplementsInterfaceOfSelf more precise for canonical subtypes (#89969)

Fixes #89918

14 months agoMake marshaller types specific to each scenario (#89894)
Jackson Schuster [Fri, 4 Aug 2023 04:08:23 +0000 (21:08 -0700)]
Make marshaller types specific to each scenario (#89894)

Make the marshaller types for the test interfaces only include the necessary methods for each scenario to catch any generated code that uses a method from another scenario

14 months agoTry Vector128 before Vector (#89797)
Larry Ewing [Fri, 4 Aug 2023 03:58:04 +0000 (22:58 -0500)]
Try Vector128 before Vector (#89797)

14 months agoFix trimming issue in the cpuid test (#89989)
Michal Strehovský [Fri, 4 Aug 2023 03:35:57 +0000 (12:35 +0900)]
Fix trimming issue in the cpuid test (#89989)

14 months agoAdd diagnostic when the size of an array that is marshalled to the callee is an ...
Jackson Schuster [Fri, 4 Aug 2023 03:21:24 +0000 (20:21 -0700)]
Add diagnostic when the size of an array that is marshalled to the callee is an 'out' parameter. (#89827)

14 months agoMove ThrowForHR to start of NotifyForSuccessFulInvoke (#89970)
Jackson Schuster [Fri, 4 Aug 2023 03:18:35 +0000 (20:18 -0700)]
Move ThrowForHR to start of NotifyForSuccessFulInvoke (#89970)

14 months agoDon't generate symbols if user doesn't want them (#89840)
Michal Strehovský [Fri, 4 Aug 2023 03:13:21 +0000 (12:13 +0900)]
Don't generate symbols if user doesn't want them (#89840)

This has two changes:

* Stop looking at `DebugSymbols` property. It doesn't look like the SDK actually looks at this (anymore?) either. Setting this to false still produces managed symbols. The only thing that works is setting `DebugType`.
* Don't generate DBG file if debugging symbols are not generated. The user expectation when debugging symbols are disabled is that they don't get the extra file on disk. The DBG file would still have debug information for the native runtime. We may or may not run objcopy to strip symbols.

I considered also running objcopy when StripSymbols is set to false but DebugType is set to none like we discussed in #88780 but maybe that goes too far - I'd expect users would only set StripSymbols to a non-default value in case they e.g. don't want to install objcopy and we'd need yet another property to say "no really don't run objcopy". So I made this orthogonal to that.

14 months agoPrefer vectorized ProbabilisticMap over Latin1CharSearchValues (#89981)
Miha Zupan [Fri, 4 Aug 2023 02:22:50 +0000 (04:22 +0200)]
Prefer vectorized ProbabilisticMap over Latin1CharSearchValues (#89981)

14 months agoforward innerException's error code to retryable HttpRequestException (#89963)
Anton Firszov [Thu, 3 Aug 2023 23:36:41 +0000 (01:36 +0200)]
forward innerException's error code to retryable HttpRequestException (#89963)

If we are doing a retry because of a protocol error, or some other HttpIOException, we should forward the error code to the retryable HttpRequestException

14 months ago[HTTP Metrics] Shorter version tags (#89959)
Anton Firszov [Thu, 3 Aug 2023 23:33:07 +0000 (01:33 +0200)]
[HTTP Metrics] Shorter version tags (#89959)

Addressing https://github.com/dotnet/runtime/pull/89809#discussion_r1283541867

14 months ago[wasm] WBT: Use project ids that are safe for use as identifiers (#89945)
Ankit Jain [Thu, 3 Aug 2023 22:49:59 +0000 (18:49 -0400)]
[wasm] WBT: Use project ids that are safe for use as identifiers (#89945)

* [wasm] WBT: Use project ids that are safe for use as identifiers

For every test project, a random id is used which is
`Path.GetRandomFileName()`. In some cases this `id` gets used in a
generated C/C# source file, and that can cause failures.

For example the following fails with:

```
blz_checkfingerprinting_Release_zqkzgkui.ref/Program.cs(3,48): error CS1001: Identifier expected [/root/helix/work/workitem/e/wbt/blz_checkfingerprinting_Release_zqkzgkui.ref/blz_checkfingerprinting_Release_zqkzgkui.ref.csproj]
blz_checkfingerprinting_Release_zqkzgkui.ref/Program.cs(3,48): error CS1002: ; expected [/root/helix/work/workitem/e/wbt/blz_checkfingerprinting_Release_zqkzgkui.ref/blz_checkfingerprinting_Release_zqkzgkui.ref.csproj]
blz_checkfingerprinting_Release_zqkzgkui.ref/Program.cs(3,51): error CS1031: Type expected [/root/helix/work/workitem/e/wbt/blz_checkfingerprinting_Release_zqkzgkui.ref/blz_checkfingerprinting_Release_zqkzgkui.ref.csproj]
```

because the id, `blz_checkfingerprinting_Release_zqkzgkui.ref`, was used
as a namespace (line 3).

```
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using blz_checkfingerprinting_Release_zqkzgkui.ref;
```

Fix up the generated random ids to make them safer. The code is taken
from `WasmAppBuilder/ManagedToNativeGenerator.cs`.

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

* Apply the same for wasi

14 months ago[wasm] Remove hardcoded references to `net8.0` from WasmApp*targets (#89699)
Ankit Jain [Thu, 3 Aug 2023 22:49:19 +0000 (18:49 -0400)]
[wasm] Remove hardcoded references to `net8.0` from WasmApp*targets (#89699)

Look for `System.Runtime.dll` to find the runtime pack directory with the assemblies, so we don't need to figure out the tfm for the path.
- Cannot use `System.Private.CoreLib.dll` because that is in `native/` instead of `lib/net8.0`
- Cannot use `RuntimePackAsset` because in many places that item isn't available.
  - AOT on helix where we run only the wasm targets on the proxy project.
  - Runtime tests which currently dump all the assemblies, and other bits into a single directory, not following the directory structure of a runtime pack. This also means the `RuntimePackAsset` cannot easily be synthesized.

With lots of feedback from @viktorhofer
Fixes https://github.com/dotnet/runtime/issues/79109 .

14 months agoDynamic events (#89371)
Andrew Au [Thu, 3 Aug 2023 22:39:57 +0000 (15:39 -0700)]
Dynamic events (#89371)

14 months agoFix build race condition in ILLink.Tasks (#89949)
Sven Boemer [Thu, 3 Aug 2023 22:20:16 +0000 (15:20 -0700)]
Fix build race condition in ILLink.Tasks (#89949)

Avoid copying props/targets to the same output
location for different TFMs. Instead copy them to
the build output in a TFM-specific directory, and
import the targets from that directory when needed.

14 months agoRemove Runtime composite package from being built. (#89946)
Manish Godse [Thu, 3 Aug 2023 21:56:33 +0000 (14:56 -0700)]
Remove Runtime composite package from being built. (#89946)

* Remove Runtime composite package from being built.

* delete now unused projects.

14 months agoFix `LocalBuilder.IsPinned` always returning `false` on CoreCLR runtime (#89411)
Hamish Arblaster [Thu, 3 Aug 2023 21:44:07 +0000 (07:44 +1000)]
Fix `LocalBuilder.IsPinned` always returning `false` on CoreCLR runtime (#89411)

14 months agoHide GetTypeInfo
Huo Yaoyuan [Thu, 3 Aug 2023 21:28:25 +0000 (05:28 +0800)]
Hide GetTypeInfo

14 months agoSplit off system libraries into a separate ItemGroup (#89916)
Michal Strehovský [Thu, 3 Aug 2023 21:19:25 +0000 (06:19 +0900)]
Split off system libraries into a separate ItemGroup (#89916)

Should help with https://github.com/dotnet/runtime/pull/88294#issuecomment-1663268829.

14 months agoExpect ThrowForHR to throw Exception on nativeAOT (#89939)
Jackson Schuster [Thu, 3 Aug 2023 20:19:56 +0000 (13:19 -0700)]
Expect ThrowForHR to throw Exception on nativeAOT (#89939)

14 months agoDisable objc_msgSend stubs in clang (#89932)
Alexander Köplinger [Thu, 3 Aug 2023 19:35:59 +0000 (21:35 +0200)]
Disable objc_msgSend stubs in clang (#89932)

Applies the same fix as https://github.com/xamarin/xamarin-macios/pull/16231.

We recently started seeing the same issue in our runtime builds, see https://github.com/dotnet/runtime/issues/89925. This is because the AzDO build machines use Xcode 14 now but the Helix machines are still using Xcode 13 so linking an Xcode-14-built static library fails.

This happens in e.g. libSystem.Native.a or libSystem.Globalization.Native.a (the two libraries where we're using Objective-C).

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

14 months agoPass through ComWrappers based objects to COM type descriptor (#89887)
Jeremy Kuhne [Thu, 3 Aug 2023 19:22:53 +0000 (12:22 -0700)]
Pass through ComWrappers based objects to COM type descriptor (#89887)

WinForms hosts the the COM type descriptor. It has been updated to work with ComWrappers based objects- adding the check for them in TypeDescriptor.

There are hard dependencies on Windows in the current implementation. We can potentially update to conditionalize these. https://github.com/dotnet/winforms/issues/9291 tracks.

There is no automated test as it would require adding a dependency upstream to WinForms.

14 months agoAdjust DNS metrics (#89813)
Anton Firszov [Thu, 3 Aug 2023 19:02:33 +0000 (21:02 +0200)]
Adjust DNS metrics (#89813)

Adjust DNS metrics according to https://github.com/lmolkova/semantic-conventions/blob/dotnet8-metrics/docs/dotnet/dotnet-dns-metrics.md

14 months agoAdd the interop tags to the "add to the AppModel project" automation (#89221)
Jeremy Koritzinsky [Thu, 3 Aug 2023 18:50:08 +0000 (11:50 -0700)]
Add the interop tags to the "add to the AppModel project" automation (#89221)

14 months agoFix isIPAdjusted setting during exception handling (#89930)
Jan Vorlicek [Thu, 3 Aug 2023 18:36:16 +0000 (20:36 +0200)]
Fix isIPAdjusted setting during exception handling (#89930)

* Fix isIPAdjusted setting during exception handling

The CrawlFrame::isIPAdjusted flag is set to true for all frames
when handling software exceptions. That is not correct, as the IP is not
adjusted in those cases.

I've also cleaned up the values the flag is set to at various places to
use the real type of the member, which is `bool`. It was being set to
TRUE / FALSE or even 0 / 1 at some places.

As a related cleanup, I've removed the FRAME_ATTR_OUT_OF_LINE flag as it
was never set anywhere and still was being tested at few places.

* Add regression test

14 months agopreserve TargetHostName even if we do not send it out via SNI (#89289)
Tomas Weinfurt [Thu, 3 Aug 2023 18:13:59 +0000 (11:13 -0700)]
preserve TargetHostName even if we do not send it out via SNI (#89289)

* preserve TargetHostName even if we do not send it out via SNI

* Update src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
* quic

* test

---------

Co-authored-by: campersau <buchholz.bastian@googlemail.com>
14 months agoRemove any triggers. (#89947)
Parker Bibus [Thu, 3 Aug 2023 17:40:54 +0000 (10:40 -0700)]
Remove any triggers. (#89947)

14 months agoFix race condition in JsonSerializerOptions initialization. (#89935)
Eirik Tsarpalis [Thu, 3 Aug 2023 17:07:32 +0000 (20:07 +0300)]
Fix race condition in JsonSerializerOptions initialization. (#89935)

14 months agoAdjust System.Net.Http metrics (#89809)
Anton Firszov [Thu, 3 Aug 2023 17:06:55 +0000 (19:06 +0200)]
Adjust System.Net.Http metrics (#89809)

Adjust System.Net.Http metrics naming and semantics according to the outcome of the discussion in lmolkova/semantic-conventions#1

14 months ago[main] Update dependencies from dotnet/source-build-reference-packages dotnet/arcade...
dotnet-maestro[bot] [Thu, 3 Aug 2023 17:04:55 +0000 (19:04 +0200)]
[main] Update dependencies from dotnet/source-build-reference-packages dotnet/arcade dotnet/emsdk (#89858)

* Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20230731.3

Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 8.0.0-alpha.1.23266.3 -> To Version 8.0.0-alpha.1.23381.3

* Update SourceBuildPrebuiltBaseline.xml

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

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

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

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
14 months agoTrigger a rebuild if ILC command line changes (#89911)
Michal Strehovský [Thu, 3 Aug 2023 16:40:02 +0000 (01:40 +0900)]
Trigger a rebuild if ILC command line changes (#89911)

Incremental build wouldn't consider things like `OptimizationPreference` property changing as a thing that should trigger a rebuild. I feel like this is more a MSBuild bug, but it has been like this for a long time.

Turns out we can use `WriteIlcRspFileForCompilation` target as a sentinel:

* Run the target always. We only actually write out the file if it's different (`WriteOnlyWhenDifferent` is already set to `true`).
* ILC execution already specifies the RSP as one of its inputs. So if the RSP is more recent than the output, it will trigger a build.

Fixes #88725.

14 months ago[browser] high level documentation of WASM features (#89469)
Pavel Savara [Thu, 3 Aug 2023 16:04:57 +0000 (18:04 +0200)]
[browser] high level documentation of WASM features (#89469)

Co-authored-by: Katelyn Gadd <kg@luminance.org>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
14 months ago[main] Update dependencies from dotnet/roslyn (#89903)
dotnet-maestro[bot] [Thu, 3 Aug 2023 15:39:22 +0000 (10:39 -0500)]
[main] Update dependencies from dotnet/roslyn (#89903)

* Update dependencies from https://github.com/dotnet/roslyn build 20230802.9

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23402.8 -> To Version 4.8.0-1.23402.9

* Update dependencies from https://github.com/dotnet/roslyn build 20230802.10

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23402.8 -> To Version 4.8.0-1.23402.10

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

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23402.8 -> To Version 4.8.0-1.23403.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
14 months ago[wasm] WBT: Fix up AppTest tests to fix missed testing cases (#89833)
Ankit Jain [Thu, 3 Aug 2023 15:32:07 +0000 (11:32 -0400)]
[wasm] WBT: Fix up AppTest tests to fix missed testing cases (#89833)

* [wasm] Update WBT AppTests to use the common infrastructure for building, and running apps

* [wasm] WasmApp.targets - add $(WasmAssemblyExtension)

* AppTests should respect UseWebcil

* Fix tests to work for no-webcil case

14 months agofix Accept assert (#89901)
Tomas Weinfurt [Thu, 3 Aug 2023 14:53:17 +0000 (07:53 -0700)]
fix Accept assert (#89901)

14 months ago[NativeAOT] macOS/iOS: Emit simple compact unwinding information (#88724)
Filip Navara [Thu, 3 Aug 2023 14:50:32 +0000 (16:50 +0200)]
[NativeAOT] macOS/iOS: Emit simple compact unwinding information (#88724)

* Generate compact unwind sequence for methods with frame and no saved registers

* Store prolog length in LSDA data when compact unwinding is used

* Remove prolog length, detect prologs from instruction stream

* Update comments

14 months agoTie llvm to emsdk's version (#89865)
Matt Mitchell [Thu, 3 Aug 2023 14:00:30 +0000 (07:00 -0700)]
Tie llvm to emsdk's version (#89865)

* Tie llvm to emsdk's version
This avoids incoherency that will cause the .NET build drop to be too large to fit on the staging pipeline disk.

* Update to latest emsdk flow

---------

Co-authored-by: Larry Ewing <lewing@microsoft.com>
14 months agoRemove duplicated argument (#89912)
Milena Hristova [Thu, 3 Aug 2023 13:41:35 +0000 (15:41 +0200)]
Remove duplicated argument (#89912)

14 months agoDisable failing outerloop tests and fix a build issue in MonoAOTCompiler (#89922)
Alexander Köplinger [Thu, 3 Aug 2023 13:25:55 +0000 (15:25 +0200)]
Disable failing outerloop tests and fix a build issue in MonoAOTCompiler (#89922)

See https://github.com/dotnet/runtime/issues/89921 for the test failures.

Additionally, the Android build was failing while compiling an AOT test due to this error:

```
/__w/1/s/artifacts/bin/Android.Device_Emulator.Aot.Test/Release/net8.0/android-x64/AppBundle/modules.c:51:6: error: no previous prototype for function 'register_aot_modules' [-Werror,-Wmissing-prototypes]
void register_aot_modules ()
     ^
```

This is because we turned on `-Werror=missing-prototypes` in https://github.com/dotnet/runtime/pull/89197 but the MonoAOTCompiler didn't emit a function prototype in modules.c

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

14 months agoFix binder gen nullability issue wrt binding ref type members (#89900)
Layomi Akinrinade [Thu, 3 Aug 2023 13:03:49 +0000 (06:03 -0700)]
Fix binder gen nullability issue wrt binding ref type members (#89900)

14 months agoFor perf, use the new ConstructorInvoker APIs for ActivatorUtilities.CreateFactory...
Steve Harter [Thu, 3 Aug 2023 12:31:31 +0000 (07:31 -0500)]
For perf, use the new ConstructorInvoker APIs for ActivatorUtilities.CreateFactory (#89573)

14 months ago[Mono] Fix deadlock during gcdump when using interp full AOT fallback. (#89726)
Johan Lorensson [Thu, 3 Aug 2023 11:06:22 +0000 (13:06 +0200)]
[Mono] Fix deadlock during gcdump when using interp full AOT fallback. (#89726)

GC thread doing gcdump will dump the EventPipe events after world
has restarted but before releasing GC lock. There was one case
where we logged a bulk type during that face where a type didn't
have its finalizer data initialized and at the same time main thread
running interpreter held loader lock and tried to acquire GC lock,
that triggers a deadlock since the GC thread (still holding the GC lock)
would trigger logic to initialize the finalizer data, but that in turn
requires the GC lock.

Fix delays the fire of GC dump events until after we completed GC.
All GC dump events have been cached into a temp file and will be
written into EventPipe, the only potential issue with this is that
we keep vtable pointers in cache that will be resolved when emitting
EventPipe event, after releasing GC lock, but since we currently
won't unload vtables, that is not an issue, but needs to be addressed
if/when we implement ability to unload vtables. We would then need
to root the vtables while stored in temporary cache.

Commit also enable GC dump test on Mono platforms.

14 months agoFix handling ThreadAbortException at the end of catch (#89781)
Jan Vorlicek [Thu, 3 Aug 2023 07:53:20 +0000 (09:53 +0200)]
Fix handling ThreadAbortException at the end of catch (#89781)

* Fix handling ThreadAbortException at the end of catch

After the catch handler for ThreadAbortException exits, the
exception needs to be rethrown immediatelly. This change
makes that work.

* arm64 stuff

* Enable arm

* Fix macOS x64 and enable one ControlledExecutionTest path for Unix

* Update src/coreclr/vm/amd64/redirectedhandledjitcase.S

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Fix macOS x64

The non-local label was preventing unwinding through \stub\()_RspAligned

---------

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
14 months agoFix IsFixupPrecodeByASM and StubPrecode::IsStubPrecodeByASM (#89899)
Jan Vorlicek [Thu, 3 Aug 2023 07:42:20 +0000 (09:42 +0200)]
Fix IsFixupPrecodeByASM and StubPrecode::IsStubPrecodeByASM (#89899)

These functions use memcmp that can internally be optimized
by vectorization. It can thus read more bytes than necessary
for the purpose of this function. In edge cases it can end up
reading from unmapped memory and crashing with access violation.

The fix is to compare the data byte by byte and early out as soon
as a mismatch is found.

14 months agoSpecify callback calling convention for callbacks on Windows x86 causes crashes on...
Johan Lorensson [Thu, 3 Aug 2023 07:25:34 +0000 (09:25 +0200)]
Specify callback calling convention for callbacks on Windows x86 causes crashes on Mono. (#89571)

Fixes #88992. Explicit specify callback calling convention on Windows x86.

CoreCLR runtime build uses stdcall while Mono uses cdecl (default). If a native runtime function takes a reverse pivnoke callback, this difference will cause issues for Mono on Windows x86 since reverse pinvoke callbacks have stdcall on Windows x86, but callbacks have been prototyped to use the calling convention setup in build.

Since CoreCLR already uses stdcall on Windows x86 this change won't change anything, while on Mono it will fixes the crashes observed in #8892.

14 months agoImprove zlib defenses on mono (#89898)
Levi Broderick [Thu, 3 Aug 2023 06:38:13 +0000 (23:38 -0700)]
Improve zlib defenses on mono (#89898)

- Mono defines HOST_WIN32, not CLR_CMAKE_HOST_WIN32
- Follow same pattern from src\native\eventpipe\CMakeLists.txt

14 months ago[PERF] Setup scheduled once a day runs rather than constant runs (#89884)
Parker Bibus [Thu, 3 Aug 2023 05:48:11 +0000 (22:48 -0700)]
[PERF] Setup scheduled once a day runs rather than constant runs  (#89884)

14 months ago[wasm] Fix condition to use latest chrome for testing (#89890)
Ankit Jain [Thu, 3 Aug 2023 04:55:20 +0000 (00:55 -0400)]
[wasm] Fix condition to use latest chrome for testing (#89890)

* [wasm] Fix condition to use latest chrome for testing
* [wasm] CI: Trigger WBT on changes in ProvisioningVersions.props

* [wasm] runtime: Fix creating the stack trace for a ManagedError

With the latest chrome (`115.*`) the following code in
`runtime/marshal.ts` fails because `this.superStack.value` is no longer
available:

```js
    getSuperStack() {
        if (this.superStack) {
            return this.superStack.value;
        }
        return super.stack; // this works on FF
    }
```

This causes the final error to not have the original managed error
message, and also have a `"undefined"` at the end of the string.

Truncated error missing the native part of the stack, and the message:
```
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.ThrowFromJSExport(String message)
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.__Wrapper_ThrowFromJSExport_271731536(JSMarshalerArgument* __arguments_buffer)
undefined
```

With the fix:
```
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.ThrowFromJSExport(String message)
   at System.Runtime.InteropServices.JavaScript.Tests.JavaScriptTestHelper.__Wrapper_ThrowFromJSExport_817705034(JSMarshalerArgument* __arguments_buffer)
Error: -t-e-s-t-
    at sr (http://127.0.0.1:60345/_framework/dotnet.runtime.js:3:33284)
    at Br (http://127.0.0.1:60345/_framework/dotnet.runtime.js:3:42679)
    at http://127.0.0.1:60345/_framework/dotnet.runtime.js:3:40825
    at Module.catch1stack (http://127.0.0.1:60345/JavaScriptTestHelper.mjs:132:9)
    at http://127.0.0.1:60345/_framework/dotnet.runtime.js:3:36627
    at mr (http://127.0.0.1:60345/_framework/dotnet.runtime.js:3:37821)
    at do_icall (http://127.0.0.1:60345/_framework/dotnet.native.wasm:wasm-function[221]:0x19711)
    at do_icall_wrapper (http://127.0.0.1:60345/_framework/dotnet.native.wasm:wasm-function[108]:0x157bc)
    at mono_interp_exec_method (http://127.0.0.1:60345/_framework/dotnet.native.wasm:wasm-function[101]:0x9c92)
    at interp_runtime_invoke (http://127.0.0.1:60345/_framework/dotnet.native.wasm:wasm-function[141]:0x16cd7)
```

Thanks to @kg for the fix.

14 months agoRebaseline failing pri0 tests (#89835)
Michal Strehovský [Thu, 3 Aug 2023 02:32:33 +0000 (11:32 +0900)]
Rebaseline failing pri0 tests (#89835)

* We don't throw PNSE for unguarded HW intrinsic use. We could translate illegal instruction to PNSE but it feels too big of a hammer. We could do something more sophisticated such as disassemble the instruction and compare with "known problematic" ones. But it doesn't feel worth the effort.
* Non-zero lower bounds are not supported.
* Corner case weird enums like `enum Foo : double { }` are not supported.

14 months agoEscape both CR and LF in IL disassembler (#89886)
Michal Strehovský [Thu, 3 Aug 2023 02:10:29 +0000 (11:10 +0900)]
Escape both CR and LF in IL disassembler (#89886)

Noticed this because lines were off with `--ildump`.

14 months ago[wasm][debugger] Fix failed to fetch debugger MT tests (#89737)
Thays Grazia [Thu, 3 Aug 2023 02:02:27 +0000 (23:02 -0300)]
[wasm][debugger] Fix failed to fetch debugger MT tests (#89737)

* Run the tests in debug mode to get more information.

* Adding log messages

* Fix build

* Adding more messages

* Adding more logs

* Removing task.delay.

* Reducing maxParallelDownloads

* Adding more messages

* Fix compilation

* Trying to fix CI.

* Setting the maxParallelDownloads to 10.

14 months agoFix analysis issue in LDTOKEN dependencies (#89757)
Michal Strehovský [Thu, 3 Aug 2023 00:29:40 +0000 (09:29 +0900)]
Fix analysis issue in LDTOKEN dependencies (#89757)

This was found in Pri0 testing. The LDTOKEN data structures didn't have enough information for generic method instantiation arguments. The Pri0 test was around generic virtual methods, but this is a more general issue so adding an extra test for that.

I'm also changing how `NodeFactory.ReflectedMethod` works - it will now require being called with canonical things explicitly (and asserts if it isn't) instead of canonicalizing behind the scenes. This was obscuring the problem.

14 months agoClarifications in botr gc section (#89888)
Mark Plesko [Thu, 3 Aug 2023 00:16:34 +0000 (17:16 -0700)]
Clarifications in botr gc section (#89888)

14 months ago[main] Update dependencies from dotnet/roslyn (#89860)
dotnet-maestro[bot] [Thu, 3 Aug 2023 00:08:17 +0000 (19:08 -0500)]
[main] Update dependencies from dotnet/roslyn (#89860)

* Update dependencies from https://github.com/dotnet/roslyn build 20230802.2

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23401.10 -> To Version 4.8.0-1.23402.2

* Update dependencies from https://github.com/dotnet/roslyn build 20230802.3

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23401.10 -> To Version 4.8.0-1.23402.3

* Update dependencies from https://github.com/dotnet/roslyn build 20230802.4

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23401.10 -> To Version 4.8.0-1.23402.4

* Update dependencies from https://github.com/dotnet/roslyn build 20230802.8

Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.8.0-1.23401.10 -> To Version 4.8.0-1.23402.8

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>