1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00
Commit graph

135237 commits

Author SHA1 Message Date
Rich Lander
ed044bd35c
Add cross-linking between files (#105884) 2024-08-02 13:10:19 -07:00
Ahmet Ibrahim Aksoy
f59a05e007
[HTTP/2] Move away marking idle/non-idle from HttpConnectionPool (#105876)
* Move away marking idle/non-idle from HttpConnectionPool

* Fix comment
2024-08-02 20:28:15 +02:00
github-actions[bot]
d9fc0f14a5
Sync shared code from aspnetcore (#105765)
Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>
Co-authored-by: Andrew Casey <amcasey@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
2024-08-02 10:49:24 -07:00
Andy Gocke
3e572e9d09
Allow muxer behind Windows symlink (#99576)
The current logic for the muxer (dotnet.exe) doesn't resolve through symlinks
on Windows. For instance, it looks next to the entry point path for things like
hostfxr. This means that you cannot use a symlink to dotnet.exe, as it will look
next to your symlink for the runtime, rather than next to the target of the symlink.

This PR fixes the problem just for the muxer. To do so, it introduces a new API:
fullpath. The existing realpath API has the behavior of always resolving symlinks
on Unix, and never resolving symlinks on Windows. The new `fullpath` API replicates
this behavior, while the old `realpath` API is changed to always resolve symlinks on
both Unix and Windows. Then, the realpath API is used in appropriate places when
resolving paths relative to the muxer to guarantee resolving through symlinks on
all platforms.

Fixes #83314
2024-08-02 09:10:13 -07:00
Alan Hayward
3250965915
ARM64-SVE: Fix API summary blocks (#105864) 2024-08-02 11:24:02 -04:00
Aman Khalid
f4c4399c49
JIT: Fix overzealous assert in CodeGen::genSSE42Intrinsic (#105833) 2024-08-02 15:04:41 +00:00
Sun Lijun
2edae0f23a
[LoongArch64] Fix the case 'ReadyToRunHelperId.ResolveVirtualFunction' in LoongArch64ReadyToRunHelperNode.cs. (#105858) 2024-08-02 06:32:36 -07:00
Marek Fišera
fd99ad5002
[browser] Disable InterpPGO test (#105874) 2024-08-02 15:16:56 +02:00
Vlad Brezae
ac898195da
[mono][interp] Remove short branches (#105386)
* [mono][interp] Make all branch super instructions operate on long offsets

Previously they were all short branches without long counterparts. This was buggy and awkward because we tried to compute early conservatively whether a branch is short or long, at superins generation time. The conditions would always hold and we had no fallback if the branch didn't turn out to actually be short. Having a long offset for these branches should have negligible perf impact.

* [mono][wasm] Fix jiterp for branch superins

* [mono][interp] Don't compute native offset estimate during super ins pass

We generate superins without caring if the branch is long or short since the superinstructions use a long offset now.

* [mono][interp] Completely remove short branches

They don't seem to have any benefit at the expense of a lot of code and added complexity.
2024-08-02 15:20:27 +03:00
Stephen Toub
02de2dfea7
Revert "Use IndexOf for bounded loops in a regex (#101899)" (#105735)
This reverts commit 08e0f8954f.
2024-08-02 07:13:25 -04:00
Stephen Toub
c0252d1714
Use ArgumentNullException.ThrowIfNull in more places (#105380) 2024-08-02 07:08:41 -04:00
Michal Strehovský
e60db076d7
Emit instantiated types as external references if possible (#105816)
Fixes #105397.

The repro case hits an interesting problem in native layout - we emit the `IEnumerable<IEnumerable<double?>>` type as a constructed type, however the components of it are only generated as necessary. Because native layout expresses it as a decomposed instantiation, we're not able to find the type because the component of it is not constructed and we don't really keep track of those.

This can be fixed by simply not generating types as composed out of various components.
2024-08-02 09:48:54 +02:00
Aaron Robinson
30b34e6d7b
Convert exception throwing JIT helpers to managed code. (#105671)
* Change JIT helper definition macro to encode BinderMethodID.
Remove CorInfoHelpSig and replace with BinderMethodID in macros.
Convert start up loading of managed JIT helpers to lazy model.

* Remove the early start-up registration of managed JIT helpers.

* Narrowly permit type loading in SPCL during eager fixup for R2R images.
2024-08-01 19:33:04 -07:00
Parker Bibus
280f2a0c60
[PERF] Update Android App Maui rollback generation (#105763)
Move Maui workload installation until after we have performance installed so we have versions available, and use the performance repos versions and python files to generate the rollback.json.
2024-08-01 14:34:08 -07:00
Will Smith
1337553ef2
JIT: Fix assignment for test 105484 (#105834)
* Fix assignment

* fix no-warn
2024-08-01 13:18:33 -07:00
Pavel Savara
0e8db73b8d
[wasi] wasi:http + WasiHttpHandler (#103752)
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
2024-08-01 22:05:55 +02:00
Will Smith
c0a31c5233
Fix test that uses SVE intrinsic (#105831) 2024-08-01 12:26:01 -07:00
Thays Grazia
9fe8c95c89
[mono][debugger] Fixing AV on accessing source_file_list that is NULL (#105781)
* Fixing AV on accessing source_file_list that is NULL
2024-08-01 14:25:57 -03:00
SwapnilGaikwad
be32947d32
ARM64-SVE: Add missing tests for LoadVector*() (#105703) 2024-08-01 12:52:37 -04:00
Tanner Gooding
ae30cbaf99
Allow explicitly implemented ISimdVector APIs to be handled as intrinsic (#104983)
* Allow explicitly implemented ISimdVector APIs to be handled as intrinsic

* Apply formatting patch
2024-08-01 09:11:05 -07:00
Will Smith
ffacda56ac
JIT: Fixed assertion on IsUnusedValue when creating ConditionalSelect nodes around SVE methods (#105730)
* Fixed assertion on IsUnusedValue when creating ConditionalSelect nodes around SVE methods

* Added regression test

* Try/catch

* Make private

* Update Runtime_105484.cs
2024-08-01 08:26:02 -07:00
Jo Shields
c59543c5c0
Remove support for older LLVM versions, and re-order linker flags (#105110)
* Remove support for older LLVM versions, and re-order linker flags

We have generally tried to support linking multiple versions of LLVM
within our git tree. Every new LLVM version moves symbols around between
libraries, and as a result, every new version of LLVM requires different
linker flags to build. The command line tool `llvm-config` should tell
you the exact flags you need, but it is a problem for us when
cross-compiling to rely on this, and as a result, we transcribe
the result of various llvm-config outputs directly into Mono's
CMakeLists.txt.

In an effort to support multiple versions of LLVM, flags common between
all supported versions were kept in one place, then the version-specific
flags appended afterwards. And this has worked fine for years. However:

1. Whilst we only link with `lld`, it is common for contributors and
   source-build to link with `gold`, `bfd`, or some other GNU-flavoured
   linker, where library order is essential
2. The list of common libraries to link has remained unchanged for
   years, but the symbol intra-dependencies may have changed a long time
   ago, so common symbol order cannot be assumed to remain valid between
   LLVM versions

This has resulted in a long-standing problem for people using e.g.
Debian or Ubuntu or GitHub CodeSpaces, rather than always building
with one of our dockerfiles representing our "real" build environment,
when targeting platforms which use Mono and link LLVM.

* Bumping clang and llvm - make docs less ambiguous. (#105401)

* Bump main to RC1 (#105338)

* Update SDK to preview 6 (#104696)

* Update SDK to preview 6

* Update Shared.csproj

Fix `error NU1903: Package 'System.Text.Json' 8.0.0 has a known high severity vulnerability`

* Fix with existing version.

---------

Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>

* Change DefaultMaximumErrorResponseLength to KB from Byte (#105396)

* Change DefaultMaximumErrorResponseLength to KB from Byte

* Handle overflow

* Review feedback

* Fix warning for MakeGenericType annotation mismatch (#104921)

Fixes warning code when a generic type whose type parameters have DAM
annotations is used with MakeGenericType, over a type that doesn't
have matching annotations.

The code IL2070 used to mention the 'this' argument. Instead it should
have been IL2071 which mentions the generic argument as the cause of
the mismatch. Similar for MakeGenericMethod with IL2090 and IL2091.

* Set GCStressIncompatible on GenericContext tests (#104686)

Co-authored-by: Vladimir Sadov <vsadov@microsoft.com>

* Add runtime config parameter to force ijwhost to load assemblies in an isolated context (#105337)

* Add support for isolated load context in LoadInMemoryAssemblyInContext by passing -1 as loadContext
* Have ijwhost check a runtime config parameter to determine if it should run in an isolated load context
* Added test for ijwhost isolated load context runtime config option

* [RISC-V] Fix passing float and uint arguments in VM (#105021)

* Add tests

* Fix passing float and uint arguments in VM

* Change test lib name so it doesn't clash with managed DLL on Windows

* Fix platform analyzer attribute order for MacCatalyst (#105409)

We need to make sure the attribute for MacCatalyst comes _after_ the iOS one due to how MacCatalyst is a superset of iOS: https://learn.microsoft.com/en-us/dotnet/standard/analyzers/platform-compat-analyzer#platform-inclusion

This caused an error in aspnetcore in the latest dependency flow because the analyzer thought AesGcm is _only_ supported on MacCatalyst:
> error CA1416: (NETCORE_ENGINEERING_TELEMETRY=Build) This call site is reachable on all platforms. 'AesGcm.Decrypt(ReadOnlySpan<byte>, ReadOnlySpan<byte>, ReadOnlySpan<byte>, Span<byte>, ReadOnlySpan<byte>)' is only supported on: 'maccatalyst' 13.0 and later.

* Use correct `ExceptionArgument` value in  `System.IO.Pipelines` (#105418)

* Remove zlib from requirements script and instruction files (#105419)

* Remove zlib from requirements instructions

* Remove zlib from native requirements installation script

* Revert "Remove zlib from requirements script and instruction files (#105419)" (#105449)

This reverts commit 3ec6286e99.

* Ensure that WaitForPendingFinalizers has seen the expected Full GC count (#105289)

* Ensure that WaitForPendingFinalizers has seen the expected Full GC

* NativeAOT and some renames

* a testcase

* make the test not unsafe and make OuterLoop

* Use unsigned math when comparing collection ticks

* cast the diff to int when comparing gc ticks

* Migrate to zlib-ng, part 3: Remove zlib and zlib-intel source code and license mentions (second attempt) (#105371)

* Remove zlib/
* Remove zlib-intel/
* Remove third party notice
* Remove patches
* Remove version txts
* Remove cgmanifest.json entries
* Remove installer third party notice
* Update docs
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* [browser] Trigger relink on `EmccMaximumHeapSize` change (#105027)

* Edit test + trigger relink.

* Remove logging to speed up the test + decrease loop runs to prevent "Browser has been disconnected" error.

* Feedback - properties are not bool-only anymore.

* Fix: workload needed when heap size set.

---------

Co-authored-by: Larry Ewing <lewing@microsoft.com>

* Delete erroneous Socket test (#105448)

* Pull the python dependency from the EmsdkVersion where possible (#105437)

* Use `BinaryPrimitives` more in the ILCompiler (#105404)

* JIT: use VNVisitReachingVNs in IsVNNeverNegative (#105197)

* Set xunit env var to not print output for passing tests (#105392)

* Set xunit env var to not print output for passing tests

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

* Update xunit.console.targets

* Update xunit.console.targets

* Some more automated C# modernization in corelib (#105151)

* Fix IDE0056 on corelib (indexing can be simplified)

* Fix IDE (null check can be simplified)

* Fix IDE0078 (use pattern matching)

* Fix IDE0019 (use pattern matching)

* Fix IDE0066 (use switch expression)

* Fix IDE0250 (struct can be made readonly)

* Fix nullability warning and address PR feedback

* Address PR feedback and revert a downlevel change

* Wrap any `?? throw new`s that go beyond 120 characters

* Fix ECMA 355 Partition download links (#105454)

On https://github.com/dotnet/runtime/blob/main/docs/project/dotnet-standards.md the Partition with Notes download links using HTTP protocol fail to download in Chrome:

>Mixed Content: The site at 'https://github.com/' was loaded over a secure connection, but the file at 'https://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20I.pdf' was redirected through an insecure connection. This file should be served over HTTPS. See https://blog.chromium.org/2020/02/protecting-users-from-insecure.html for more details.

(It might be reasonble for somebody else to followup fixing all domains on all pages with regex `\(http://([.a-z0-9-]+)` replacing with `(https://$1`, but I didn't test each blog site supports HTTPS.)

* Add swiftcall signature check for `mono_class_try_get_swift_error_class` (#105408)

* Add signature check for swiftcall

* Handle null values for swift_error_ptr

* Enable NativeAOT runtime tests on MacCatalyst (#102882)

This PR updates the CLRTest.Execute.Bash.targets file to set the apple run command for MacCatalyst. The command apple just-run used on Apple mobile is not permitted, and apple test requires the a test runner. Additionally, it is necessary to locate Info.plist in the Contents/ directory and the binary in Contents/MacOS/ within the bundle.

---------

Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>

* Resolving an antigen failure (#105260)

* Resolving an antigen failure

* Fix method accessibility so xunit doesn't complain

* Support field access on GetType() of T constrained to be Enum (#105351)

Adds trimming support for instance.GetType().GetFields(), where
instance is a variable of type `T` that is constrained to System.Enum.

This includes a change to have ILLink's TypeProxy track a
TypeReference instead of TypeDefinition, which was necessary to allow
TypeProxy to represent a generic parameter.

Note that this only supports the specific case where `GetType()` is
called on a variable of type `T` that is constrained to `Enum`. A
variable of type `Enum` is not supported, so the following will still
warn:


```csharp
static void M(Enum v) {
    v.GetType().GetFields();
}
```

* Update mono to support shuffle for constant inputs (#105299)

* Support mono creating xconst in a few more places

* Update mono to support shuffle for constant inputs

* Ensure that arm64 also accelerates shuffle for non-constant inputs

* Ensure OP_XZERO and OP_XONES are recognized as being constant

* Ensure shuffle creates a correct instruction when the fsig doesn't match the necessary parameter count

* Ensure that getting the index for floating-point shuffle is possible

* Ensure the right class handle is passed down to LLVM so overload resolution can function

* Make sure we update the original xconst if we mutate it

* Return a new constant and instead of mutating the existing one

* Insert relevant xcast nodes

* Add some asserts around the ecount

* Ensure we get the right element type

* Ensure we don't create nodes unnecessarily for create_elementwise

* Ensure that create_elementwise still works for other vector sizes

* Ensure indentation of switch cases is correct for Mono

* Make TooDeepJsonDocument test more consistent across platforms (#105445)

* Make TooDeepJsonDocument test more consistent across platforms

Run the test on a thread with as consistent a stack size as possible so that we don't inadvertently succeed due to having a really large stack.

* Disable test on mono

* Update the TypeLib embedding and add comments on API use (#105416)

There is an undocumented semantic of Win32 Resource APIs.
The missing semantic is that all resource type/name
strings are transparently converted to uppercase
when calling any of the Win32 Resource APIs.

We don't want to apply this undocumented semantic to the reader/writer API
so we document it instead. We are avoiding applying the behavior
since ReadyToRun scenarios are designed to be a byte for byte copy
of the resource, including name as it was written by other tooling.

* Update docs for ByRefLike with generics for work in .NET 10 (#103318)

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

* Fix double printing in StressLog and simplify stresslog macros (#105420)

* Add support for nested types in the `corelib.h` parser for rooting descriptors (#105432)

* Fixed for assertion failure due to not checking if we are processing Eph samples (#105164)

* [PERF] Use correct python executable on windows in venv (#105451)

* Fix up Fuzzlyn CI scripts for new hardware intrinsics support (#105470)

1) Strip out the extensions in the seed name when using it for file/directory names, since the list of extensions is quite long
2) Limit the number of unreduced/uncategorized example seeds we show

* Try to re-enable DeepEquals_TooDeepJsonDocument_ThrowsInsufficientExecutionStackException test on mono (#105509)

* zlib-ng: avoid suppressing WD4242 and WD4244 (#105433)

WD4242 and WD4244 are compiler warnings that should not be suppressed because the warn about possible loss of data.

WD4242 shows up in zlib-ng/arch/*/slide_hash*.c files and comes from the arguments passed to the slide_hash_chain method.
WD4244 happens in Windows when building in Debug configuration, in various zlib-ng/deflate*.c files, and comes from the arguments passed to the check_match method.

Fixed by:

- Adding asserts to verify the values are below the maximum allowed for their type.
- Casting them the proper type before passing them as arguments to their methods.
- Removing the WD suppressions, which unfortunately also propagated to other unrelated cmake files.
- Fixed a similar loss of data error in an unrelated mono file where the warning suppression was propagated due to this.

* Delete outdated comments (#105519)

* Arm64/Sve: Add FFR register liveness tracking (#105348)

* Add tracking of FFR register

somewhat workable

code cleanup

Remove FFR

Add all the GetFfr*

wip

Work with MskCns() model

Use physReg approach

Remove commented prototypes

working

Remove bunch of unnecessary code

Remove SpecialImport from GetFFR/SetFFR/LoadFirstFaulting

some more code cleanup

some fixup

* Change condition for PhysReg

* jit format

* review feedback

* unspill for LoadVectorFirstFaulting as well

* Use the right opReg

* skip spilling tracking

* review feedback

* Use non-existent REG_FFR

* Do not reload from FFR for GetFfr()

* review feedback

* Make just GrabTemp

* fix build and formatting

* missed another build failure for arm

* Fix throwing exception when calling RunClassConstructor on a generic type with a static constructor (#105513)

* Fix throwing exception when calling RunClassConstructor on a generic type with a static constructor

https://github.com/dotnet/runtime/pull/99183 seems to have done away with assuming that a generic type's static constructor was
always "initialized". As a result, if you call RunClassConstructor on it, the runtime would throw an exception.

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

* Apply suggestions from code review

---------

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

* [RISC-V][LoongArch64] New passing info for floating-point structs (#103945)

* Replace StructFloatFieldInfoFlags with FpStructInRegistersInfo which carries also exact field sizes and offsets

* Replace StructFloatFieldInfoFlags with FpStruct::Flags in profiler

* Remove FpStructInRegistersInfo::FromOldFlags()

* Fix duplicating types in HandleInlineArray

* Remove signedness from FpStruct::IntKind because most probably we won't need it

* Remove old StructFloatFieldInfoFlags calculating routine

* Typo in TARGET_LOONGARCH64

* Remove m_returnedFpFieldOffsets from ArgIterator

* Add missing ENREGISTERED_PARAMTYPE_MAXSIZE condition to C# version of FpStruct info calculation

* Rename RISCV64PassStructInRegister to match settled casing for RiscV in class names

* Update hardcoded flags for float and double in ArgIteratorTemplate::ComputeReturnFlags()

This fixes JIT/HardwareIntrinsics/General/Vector* tests.

* Fix build on other platforms

* Update LoongArch to use FpStructInRegistersInfo

* Remove unused old flag masks

* LoongArch64 typo

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Missing FpStruct namespace

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Missing FpStruct namespace

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Missing FpStruct namespace

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Use FpStruct namespace everywhere in JIT

* JIT review

* Update StructFloatFieldInfoFlags description

* Revert to hitherto instruction set order as it's not the point of this PR

* Unify get{LoongArch,RiscV}64PassFpStructInRegistersInfo JIT interfaces

* Use JIT_TO_EE_TRANSITION instead of _LEAF because MethodTable::GetFpStructInRegistersInfo may throw

* Remove FpStruct::IntKind, we should have similar info in ClassLayout in JIT

* Change JIT interface to return a struct similar to CORINFO_SWIFT_LOWERING to facilitate code unification in the future

* Change JIT to use new Swift-like getFpStructLowering

* Cache CORINFO_FPSTRUCT_LOWERING

* Update LoongArch classifier to use CORINFO_FPSTRUCT_LOWERING

* Update StructFloatInfoFlags doc comment on C#

* Move StructFloatFieldInfoFlags and FpStructInRegistersInfo out of the JIT interface

* Merge LoongArch and RISC-V AOT calculation of FpStructInRegistersInfo because they were identical. Move it to Common\Internal/Runtime because it's no longer exposed in JIT interface.

* Don't zero-initialize CORINFO_FPSTRUCT_LOWERING

* Add note for CORINFO_FPSTRUCT_LOWERING::loweredElements type

---------

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Ensure we don't reuse temps when calling fgMorphArgs on LIR nodes (#105508)

* Ensure constant evaluation of shifts on xarch broadcast the operand to the correct size (#105487)

* Ensure constant evaluation of shifts on xarch broadcast the operand to the correct size

* Ensure we don't try to execute AVX2 code on unsupported platforms

* Use ConcurrentDictionary in runtimecounters test (#105520)

* Use ConcurrentDictionary in runtimecounters test

Fixes #105443

* Fix build break

* Fix issue 98506 - Excessive exceptions generated in StackTraceSymbols (#105530)

* Fix issue 98506 - Excessive exceptions generated in StackTraceSymbols

* Code review feedback

* Clean up some usages of LowLevelList<T> (#105407)

* Fix ShuffleThunk cache heap (#105480)

There was a problem with using heap from the related LoaderAllocator for
shuffle thunk cache heap. I have tested it again and it seems that the
issue is gone.

So I am removing the workaround, making the cache use LoaderAllocator
local heap.

Close #55697

* [browser] Fix computing destination sub path and publish extension target path in Wasm SDK (#105458)

* Bump flags to LLVM 19, not 16

---------

Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Ahmet Ibrahim Aksoy <aaksoy@microsoft.com>
Co-authored-by: Sven Boemer <sbomer@gmail.com>
Co-authored-by: Steve Pfister <steveisok@users.noreply.github.com>
Co-authored-by: Vladimir Sadov <vsadov@microsoft.com>
Co-authored-by: Mike Oliphant <oliphant@nostatic.org>
Co-authored-by: Tomasz Sowiński <tomeksowi@gmail.com>
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Paulus Pärssinen <paulus.parssinen@gmail.com>
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
Co-authored-by: Carl Walsh <darthwalsh@gmail.com>
Co-authored-by: Milos Kotlar <kotlarmilos@gmail.com>
Co-authored-by: Ivan Povazan <ivan.povazan@gmail.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
Co-authored-by: Mukund Raghav Sharma (Moko) <68247673+mrsharm@users.noreply.github.com>
Co-authored-by: Cameron Aavik <99771732+caaavik-msft@users.noreply.github.com>
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>
Co-authored-by: Mike McLaughlin <mikem@microsoft.com>
Co-authored-by: Huo Yaoyuan <huoyaoyuan@hotmail.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Co-authored-by: Marek Fišera <mara@neptuo.com>
2024-08-01 16:41:24 +02:00
Aman Khalid
74c608d67d
JIT: Add out-of-bounds fallback for AdvSimd.ShiftRightLogical (#105777)
Fixes #105621. When its immediate is out-of-bounds, AdvSimd.ShiftRightLogical can be transformed into AdvSimd.ShiftLogical, which takes the immediate in a register. This means AdvSimd.ShiftRightLogical will no longer throw ArgumentOutOfRangeException in Debug or Release; when optimizing, we'd previously fold the intrinsic away, thus creating behavioral discrepancies.
2024-08-01 09:39:57 -04:00
SwapnilGaikwad
71d8ae6843
Fix failing tests for GatherVectorByteOffsets (#105568) (#105747) 2024-08-01 09:31:55 -04:00
Radek Zikmund
f4866b0bfa
Revert "Temporarily disable NoCallback_RevokedCertificate_NoRevocationChecking_Succeeds" (#105793)
* Revert "Temporarily disable NoCallback_RevokedCertificate_NoRevocationCheckin…"

This reverts commit c1576ffb74.

* Update src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.ServerCertificates.cs
2024-08-01 14:43:43 +02:00
Jakob Botsch Nielsen
69c9bf8aa3
JIT: Check for potential store-to-load forwarding before reordering ldr -> ldp (#105695)
Very targeted fix for #93401 and #101437: before reordering two indirections,
check if there is a potential store in the same loop that looks like it could
end up being a candidate for store-to-load forwarding into one of those
indirections. Some hardware does not handle store-to-load forwarding with the
same fidelity when `stp`/`ldp` is involved compared to multiple `str`/`ldr`.

The detection is done by a graph walk that starts at the indirection and then
walks backwards until it finds a store that would reach the indirection. The
walk is limited to stay within the same loop as the indirections, and also
limited by a budget of 100 nodes visited (for a large loop we expect this to not
be as important).

If we detect the situation then avoid doing the reordering.

Fix #93401 
Fix #101437
2024-08-01 14:32:48 +02:00
Ahmet Ibrahim Aksoy
45f6952883
Fix condition to run CertificateCallbackThrowPropagates test on msquic 2.4 and higher (#105789)
* Fix condition

* Apply suggestions from code review

Co-authored-by: Radek Zikmund <32671551+rzikm@users.noreply.github.com>

---------

Co-authored-by: Radek Zikmund <32671551+rzikm@users.noreply.github.com>
2024-08-01 13:50:19 +02:00
Sun Lijun
8b078abecf
[LoongArch64] Fix the add overflow check for A=A+A. (#105674) 2024-08-01 11:33:22 +02:00
Sun Lijun
74460dd73e
[LoongArch64] Fix the arithmetic shift right in CodeGen::genSaveCalleeSavedRegistersHelp. (#105676)
* [LoongArch64] Fix the arithmetic shift right in CodeGen::genSaveCalleeSavedRegistersHelp.

* Apply the change to RiscV64.
2024-08-01 11:31:37 +02:00
Tomasz Sowiński
bc9cd27455
[RISC-V][LoongArch64] JIT: pass structs according to floating-point calling convention properly (#104237)
* Replace StructFloatFieldInfoFlags with FpStructInRegistersInfo which carries also exact field sizes and offsets

* Replace StructFloatFieldInfoFlags with FpStruct::Flags in profiler

* Remove FpStructInRegistersInfo::FromOldFlags()

* Fix duplicating types in HandleInlineArray

* Remove signedness from FpStruct::IntKind because most probably we won't need it

* Remove old StructFloatFieldInfoFlags calculating routine

* Typo in TARGET_LOONGARCH64

* Remove m_returnedFpFieldOffsets from ArgIterator

* Add missing ENREGISTERED_PARAMTYPE_MAXSIZE condition to C# version of FpStruct info calculation

* Rename RISCV64PassStructInRegister to match settled casing for RiscV in class names

* Update hardcoded flags for float and double in ArgIteratorTemplate::ComputeReturnFlags()

This fixes JIT/HardwareIntrinsics/General/Vector* tests.

* Fix build on other platforms

* Update LoongArch to use FpStructInRegistersInfo

* Remove unused old flag masks

* LoongArch64 typo

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Missing FpStruct namespace

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Missing FpStruct namespace

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Missing FpStruct namespace

Co-authored-by: Qiao Pengcheng <qiaopengcheng@loongson.cn>

* Use FpStruct namespace everywhere in JIT

* Add tests

* Fix passing FP structs in JIT

* Remove CallArgABIInformation.StructFloatFieldType and Offset because they were write-only. Replace with offset from new ABI info

* Remove CallArgABIInformation.StructDesc on System V because it was write-only

* Remove unused local vars from ABIPassingInformation::Classify

* Pass variables after the tested struct to detect potential register/stack slot over-allocation

* Add test for two-field but one-slot struct. Fix assertion bug that it uncovered

* Add sanity check for empty struct passing, disable on RISC-V and System V

* Format

* JIT review

* Update StructFloatFieldInfoFlags description

* Revert to hitherto instruction set order as it's not the point of this PR

* Disable Test_Empty_Sanity on arm32 due to bug in Clang

* Add ActiveIssue on arm and arm64

* Exclude arm64 from Test_PackedEmptyFloatLong*_RiscV

* Unify get{LoongArch,RiscV}64PassFpStructInRegistersInfo JIT interfaces

* Use JIT_TO_EE_TRANSITION instead of _LEAF because MethodTable::GetFpStructInRegistersInfo may throw

* Remove FpStruct::IntKind, we should have similar info in ClassLayout in JIT

* Change JIT interface to return a struct similar to CORINFO_SWIFT_LOWERING to facilitate code unification in the future

* Change JIT to use new Swift-like getFpStructLowering

* Cache CORINFO_FPSTRUCT_LOWERING

* Update LoongArch classifier to use CORINFO_FPSTRUCT_LOWERING

* Update StructFloatInfoFlags doc comment on C#

* Add arm32 clang issue

* Move StructFloatFieldInfoFlags and FpStructInRegistersInfo out of the JIT interface

* Merge LoongArch and RISC-V AOT calculation of FpStructInRegistersInfo because they were identical. Move it to Common\Internal/Runtime because it's no longer exposed in JIT interface.

* Don't zero-initialize CORINFO_FPSTRUCT_LOWERING

* Update LoongArch classifier

* Fix assert for two-field structs smaller than 8 bytes, add test
2024-08-01 11:20:13 +02:00
dotnet bot
03b4c7945a
Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2506676 (#105050)
* Localized file check-in by OneLocBuild Task: Build definition ID 679: Build ID 2497202

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2024-08-01 10:53:12 +02:00
Jan Kotas
c6d3b73dd7
Partial revert of #105301 to fix build break (#105785) 2024-08-01 10:50:49 +02:00
Ilona Tomkowicz
0ac75cdf7d
[browser] Marshalling of resolved Tasks/promises is not resolved in JS/C# (#105464)
* fix void Task marshaling

* Make MT test more deterministic.

---------

Co-authored-by: pavelsavara <pavel.savara@gmail.com>
2024-08-01 09:21:14 +02:00
Xu Liangyu
e3684bce47
[LoongArch64] Initial DFEATURE_EMULATE_SINGLESTEP for LA64. (#105741) 2024-07-31 21:01:22 -07:00
Xu Liangyu
b284b1c082
[LoongArch64] Add gcinfodumper related implementation. (#105740)
Change-Id: I530de029a74a15706ea1a59c7b91f8ce13089a93
2024-07-31 21:00:19 -07:00
Sergio Pedri
3577d44a77
Automatically export '__managed__Main' when needed (#105353)
* Automatically export '__managed__Main' if needed

* Add unit test for stub .exe configuration

* Move '__managed__Main' export to shared .targets

* Use 'LoadLibrary' and 'GetProcAddress' instead

* Update 'CMakeLists.txt' from 'SharedLibrary'

* Fix .cs filename in .csproj file

* Port scripts from shared library test
2024-07-31 20:58:10 -07:00
dotnet-maestro[bot]
1dffab5ceb
Update dependencies from https://github.com/dotnet/roslyn build 20240729.16 (#105696)
Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.12.0-1.24379.1 -> To Version 4.12.0-2.24379.16

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-07-31 18:03:50 -05:00
Sven Boemer
ed40e60f69
Fix check for types interesting to dataflow (#105642)
This makes the check `IsTypeInterestingForDataflow` more consistent
across ILLink/ILC/analyzer.

Fixes https://github.com/dotnet/runtime/issues/104761, and fixes
analyzer behavior for byrefs of string.
2024-07-31 14:48:45 -07:00
Egor Bogatov
7f10eeada7
Fix race condition in nongcheap.cpp test (#105658) 2024-07-31 23:09:39 +02:00
Giridhar Trivedi
bcbca94ce9
Add missing break statement (#104286)
Added missing break statement

Co-authored-by: root <root@t8360022.lnxne.boe>
Co-authored-by: Thays Grazia <thaystg@gmail.com>
2024-07-31 18:07:43 -03:00
Ilona Tomkowicz
c8fb13dcfd
Add comment to the workaround. (#105758) 2024-07-31 18:07:17 -03:00
Tanner Gooding
baa8df86a3
Ensure that we add the broadcast and mask flags prior to computing the instruction size (#105757) 2024-07-31 13:55:37 -07:00
Alan Hayward
40618ffad6
ARM64-SVE: Alphabetically order the SVE API (#105760) 2024-07-31 16:47:29 -04:00
Steve Harter
1009a1c2d1
Support [DefaultValue] when new feature switch is disabled (#105766) 2024-07-31 15:44:14 -05:00
dotnet-maestro[bot]
cc2f60147d
[main] Update dependencies from dotnet/cecil, dotnet/hotreload-utils, dotnet/runtime-assets, dotnet/source-build-externals (#105692)
* Update dependencies from https://github.com/dotnet/runtime-assets build 20240729.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 9.0.0-beta.24373.1 -> To Version 9.0.0-beta.24379.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 9.0.0-alpha.0.24372.1 -> To Version 9.0.0-alpha.0.24379.1

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

Microsoft.SourceBuild.Intermediate.cecil , Microsoft.DotNet.Cecil
 From Version 0.11.5-alpha.24372.1 -> To Version 0.11.5-alpha.24379.1

* Update dependencies from https://github.com/dotnet/source-build-externals build 20240729.2

Microsoft.SourceBuild.Intermediate.source-build-externals
 From Version 9.0.0-alpha.1.24376.4 -> To Version 9.0.0-alpha.1.24379.2

* Update dependencies from https://github.com/dotnet/runtime-assets build 20240729.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 9.0.0-beta.24373.1 -> To Version 9.0.0-beta.24379.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 9.0.0-alpha.0.24372.1 -> To Version 9.0.0-alpha.0.24379.1

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

Microsoft.SourceBuild.Intermediate.cecil , Microsoft.DotNet.Cecil
 From Version 0.11.5-alpha.24372.1 -> To Version 0.11.5-alpha.24379.1

* Update dependencies from https://github.com/dotnet/source-build-externals build 20240730.1

Microsoft.SourceBuild.Intermediate.source-build-externals
 From Version 9.0.0-alpha.1.24376.4 -> To Version 9.0.0-alpha.1.24380.1

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-07-31 14:32:23 -05:00
SingleAccretion
7911e709c0
Do not separate header comments from function definitions (#105754)
* Do not separate header comments from function definitions

Separating them with a space defeats a VS feature that shows
the header comments when you hover over a function in code.

* Remove // static as well
2024-07-31 10:52:37 -07:00
Sven Boemer
9afb008c10
Update generated ILLink analyzer tests (#105643)
Adds generated test sources that should have been checked in with the
changes which introduced these tests.
2024-07-31 10:33:21 -07:00
Buyaa Namnan
d4256fa2f9
Enable some reflection emit tests on Mono (#105662)
* Enable some reflection emit tets on Mono

* Revert RefEmitLoadContextTest in Runtime.Loader
2024-07-31 10:04:57 -07:00
Egor Bogatov
87b1d84ba1
Fix constant folding for shift SIMD operators (#105752) 2024-07-31 18:52:09 +02:00
Thays Grazia
7f2b222f92
Fix debugging when JMC is enabled (#105756) 2024-07-31 11:21:03 -05:00