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

134657 commits

Author SHA1 Message Date
Andy Gocke
f0ff6d6948
Revert "Add more complete linux build instructions (#101631)" (#104581)
This reverts commit 55747a5866.
2024-07-08 16:38:49 -07:00
Andy Gocke
55747a5866
Add more complete linux build instructions (#101631)
I'm trying to make it slightly easier to install the needed requirements, and add some validation if a user hasn't installed the requirements.

Also, I validated that these instructions still work for Ubuntu 24.04 and have noted that other installs are only community-supported.
2024-07-08 23:15:02 +00:00
Carlos Sánchez López
cf08d43a93
Migrate to zlib-ng, part 2: consume it in runtime (second attempt) (#104454)
* Reapply "Migrate to zlib-ng, part 2: consume it in runtime (#102403)" (#104414)
* Apply jkotas comment suggestion in configureplatform.cmake
* Delete unnecessary comment in zlib-ng.cmake
* Fix windows nativeaot failure happening when executing:

build.cmd -ci -arch x64 -os windows  -s clr.nativeaotlibs+clr.nativeaotruntime+libs+packs -c Release /p:BuildNativeAOTRuntimePack=true /p:SkipLibrariesNativeRuntimePackages=true
2024-07-08 23:11:47 +00:00
Andy Gocke
21cde6987f
Update pr-guide with staleness requirement (#104576) 2024-07-08 14:47:24 -07:00
Emmanuel André
edab50b38e
Add CancellationToken support for LoadIntoBufferAsync (#103991)
* Add CancellationToken support for LoadIntoBufferAsync

* Add documentation

* Rework cancellation token in tests

* Move to outerloop test using delays

* Use IgnoreExceptions helper in tests

---------

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
2024-07-08 14:23:45 -07:00
Elinor Fung
8181785b2f
[LibraryImportGenerator] Use basic forwarder in down-level support if any parameters can't be marshalled (#104416)
In down-level support, when determining marshalling generators for types, we fall back to just forwarding the parameter without erroring. This means that we end up generating a stub that marshal some parameters and just silently forwards others when all of these are true:
- target framework is down-level (below .NET 7)
- the signature is not blittable (parameters require marshalling and/or SetLastError=true)
- no parameters are identified via an `ITypeBasedMarshallingInfoProvider` as missing marshalling support
- at least one parameter cannot be marshalled and falls back to just forwarding the parameter

This is not a problem in non-down-level scenarios, as we error if we can't marshal any parameters. This is also not a problem if any parameters are identified as unsupported via an `ITypeBasedMarshallingInfoProvider`, as we do correctly check that case and simply forward to `DllImport`.

This change makes it so that in down-level scenarios, if any type falls back  to forwarding, we print a basic `DllImport` instead of a stub with mixed marshalling and forwarding.
2024-07-08 13:59:38 -07:00
Jakob Botsch Nielsen
a0f0c6ca26
JIT: Propagate physical promotion liveness in post-order (#104554)
We now have a DFS tree available in physical promotion. This mean that
like normal liveness we can maximize the information propagated on every
iteration by running physical promotion's dataflow in post-order.
2024-07-08 22:57:35 +02:00
Anton Firszov
8b9ea5e180
Swap MetricsHandler and DiagnosticsHandler (#104455)
To support Exemplars, http.request.duration must be recorded before stopping the HTTP request Activity.
2024-07-08 22:17:08 +02:00
Eirik Tsarpalis
e4d9e266b7
Clean up JSON property lookup logic and add alternate key lookup support. (#103836)
* Clean up JSON property lookup logic and add alternate lookup support.

* Ensure PropertyRef cache doesn't contain duplicates.

* Remove usings.

* Revert back to using original caching algorithm.

* Incorporate suggestions to key generation algorithm.

* Address feedback.

* Simplify more PropertyRef methods.
2024-07-08 21:16:32 +01:00
Aman Khalid
f99194cb7f
JIT: Ensure EH clauses with same try region are reported contiguously to the VM (#104531)
The CORINFO_EH_CLAUSE_SAMETRY flag indicates to the VM that a given EH clause maps to the same try region as the previous EH clause. However, the JIT's internal invariants may result in an EH table ordering such that clauses mapped to the same try region aren't contiguous, thus breaking the functionality of this flag. To address this without changing the JIT's EH invariants, ensure the JIT reports clauses with the same try region contiguously to the VM, and sets CORINFO_EH_CLAUSE_SAMETRY accordingly.

Fixes #101772.
2024-07-08 16:00:21 -04:00
Jan Vorlicek
dd2120b9f8
Remove global spinlock for EH stacktrace (#103076)
* Remove global spinlock for EH stacktrace

The global spinlock that was used to ensure that stack trace and the
associated dynamic methods array were updated and read atomically.
However, for the new EH, it has shown to cause a high contention in case
many threads were handling exceptions at the same time.

This change replaces the two arrays by one object member in the
exception class. It contains reference to either the byte[] of the
stack trace (when there are no dynamic methods on the stack trace) or an
object[] where the first element contains the stack trace byte[]
reference and the following elements contain what used to be in the
dynamic array. That allows atomic updates and reads of the stack trace
and dynamic method keepalive references without a need of a lock.

The original code was quite convoluted, it was difficult to reason about
and it had some races in it that were hidden behind the global lock. So
I have decided to rewrite the whole thing from scratch.

The way it ensures that it is race free is that whenever it updates the
exception stack trace and the one that's on the exception was created by
a different thread, it creates a deep copy of both the stack trace and
the keepalive array. When making the copy, it also handles a case when
a frame that needs a keepalive entry is on the stack trace part, but the
keepalive array extracted from the exception is stale (the other thread
needed to resize the keepalive array, but not the stack trace). In that
case, the stack trace is trimmed at first such entry found.

Since the case when multiple threads are throwing the same exception and
so they are modifying its stack trace in parallel is pathological
anyways, I believe the extra work spent on creating the clones of the arrays
is a good tradeoff for ensuring easy to reason about thread safety.

I have also removed a dead code path from the
StackTraceInfo::SaveStackTrace.

Finally, since with the previous iteration of this change, a bug in
building the stack trace was found, I have added a coreclr test to
verify stack trace for an exception matches the expectations.

* Fix MUSL build

* Fix x86 build

* Fix several issues

* Missing calls to IsOverflow at few places
* Added a flag on StackTraceElement to indicate that the element needs a
  keepalive entry. It removes the need to call IsLCGMethod / Collectible
  check on the method table stored in the element and eliminates a
  possible problem with the method being collected in one place.
* Returned missing call to StackFrameInfo::Init to the x86 code path
* Removed obsolete comment and code line

* Few changes based on feedback

* Add keep alive items count to the stack trace header.
* Implement the concept of frozen stack traces to eliminate copies in
  the ExceptionDispatchInfo storing / restoring exceptions.

* Rename keepalive to keepAlive

* Handle possible array size overflow

In the StackTraceArray::Allocate

* Fix typo

* Change the size / keepAlive fields in stack trace to uint32_t

Plus a build break fix

* Remove SaveStackTracesFromDeepCopy

Also rename GetStackTracesDeepCopy to GetFrozenStackTrace and move the
return argument to return value.

* Remove dummy field and an unused function

* Cleanup based on feedback

* Move the race handling into GetStackTrace only

Plus an unused method removal and a little naming / contract cleanup

* Add VolatileLoad/Store around the size / keep alive count

Also remove the memory barrier from the StackTraceArray::Append since it
is not needed after that change.

* Add comment on why trimming the stack trace by keep alive is needed

I have also realized that when we need to trim, the keepAlive array is
always fully populated, so we don't need to check for cases where there
would be NULL in an entry of the array.
2024-07-08 21:52:13 +02:00
William Sanders
673a6645a4
set scope and build validation in dev when no options provided (#99199) 2024-07-08 14:36:26 -05:00
Alexander Köplinger
a008f7c04f
Fix cross-compiling CoreCLR from macOS arm64 to x64 (#104556)
It got uncovered by https://github.com/dotnet/runtime/pull/103801.

This showed up in the VMR since we use arm64 macOS build agents there.
2024-07-08 21:05:48 +02:00
dotnet-maestro[bot]
90bd757ba6
[main] Update dependencies from dotnet/roslyn (#104363)
* Update dependencies from https://github.com/dotnet/roslyn build 20240702.5

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.11.0-3.24352.5

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

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.11.0-3.24352.5

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

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.11.0-3.24352.5

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

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.11.0-3.24352.5

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

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.11.0-3.24352.5

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

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.12.0-1.24355.3

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

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.11.0-3.24329.1 -> To Version 4.12.0-1.24355.3

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-07-08 20:44:59 +02:00
Eirik Tsarpalis
90d4c7d41a
Improve JsonNode.DeepEquals numeric equality. (#104255)
* Attempt at improving JsonNode.DeepEquals numeric equality.

* Implement arbitrary-precision decimal equality comparison.

* Address feedback

* Add more comments.

* Update src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs

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

* Address feedback

* Improve comments

* Update src/libraries/System.Text.Json/src/System/Text/Json/JsonHelpers.cs

* Trim frac trailing zeros before trimming leading zeros.

* Add handling for exponent values > Int32

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2024-07-08 17:57:59 +01:00
Steve Harter
670d11f4d3
Use ConcurrentDictionary to avoid threading issues (#104407) 2024-07-08 11:43:55 -05:00
Huo Yaoyuan
1c51cf0580
Delete dead AVX detection code in vm (#104544) 2024-07-08 09:06:40 -07:00
Buyaa Namnan
101c0daf5a
Remove unnecessary endianness dependent logic (#104332)
* Remove unnecessary endianness logic

* Revert back to the old more performant approach

* Write 2 values once
2024-07-08 08:23:32 -07:00
Aleksey Kliger (λgeek)
e3363265b2
[cdac] RuntimeTypeSystem contract; rename ContainsPointers -> ContainsGCPointers (#103444)
* Implement GetThreadStoreData in cDAC

* [dac] Return canonical MethodTable instead of EEClass

   Instead of storing the EEClass pointer in DacpMethodTableData, store the canonical method table instead.

   Correspondingly, update GetMethodTableForEEClass to expect a canonical method table pointer instead of an EEClass

   Also update cDAC to do likewise

* document GetMethodTableData string baseSize adjustment

* Apply suggestions from code review

Co-Authored-By: Aaron Robinson <arobins@microsoft.com>

* [vm] rename ContainsPointers flag to ContainsGCPointers

   also rename getter/setter methods in MethodTable

* code style suggestions from code review

* DAC: always set wNumVirtuals and wNumVtableSlots to 0

   This information can be retreived from the MethodTable using normal lldb/windbg primitives and doesn't need to be part of the DAC API contract

* Remove NumVirtuals and NumVtableSlots from RuntimeTypeSystem.md

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

* "untrusted" -> "non-validated"

* pull test target helpers out

   goal is to be able to use this for testing contracts that depend on some data in the heap

* Add one FreeObjectMethodTable unit test

* validate that a mock system object is a valid method table

* code review feedback and more tests:

   1. rename AttrClass data descriptor field to CorTypeAttr
   2. fixup HasComponentSize / RawGetComponentSize comments and code
   3. update "system.object" mock methodtable with more field values
   4. update "system.string" mock methodtable with more field values

* Update src/coreclr/gc/env/gcenv.object.h

   Co-authored-by: Elinor Fung <elfung@microsoft.com>

* Update src/native/managed/cdacreader/src/Contracts/Metadata_1.MethodTableFlags.cs

   Co-authored-by: Elinor Fung <elfung@microsoft.com>

* move non-validated MethodTable handling to a separate class

* clear up ComponentSize contract spec and impl

* rename Metadata -> RuntimeTypeSystem

* add validation failure test; change validation to throw InvalidOperationException

* Update src/native/managed/cdacreader/src/Contracts/RuntimeTypeSystem_1.cs

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

* Add a generic instance test

* add array instance test

---------

Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2024-07-08 09:09:23 -04:00
Ahmet Ibrahim Aksoy
e0d8b0deeb
Refactor WinHttpHandler test to use LoopbackServer.CreateClientAndServer (#104400) 2024-07-08 14:27:43 +02:00
Omair Majid
dbe63a7d90
Handle top-level UseSystemLibs argument from the VMR (#104440)
This will be used by https://github.com/dotnet/sdk/pull/41984

It's another attempt at https://github.com/dotnet/runtime/pull/101797
2024-07-08 14:11:51 +02:00
Miha Zupan
2d9203420a
Reduce allocations in Quic/HTTP3 (#104394)
* Reduce allocations in Quic/HTTP3

* Also wait for WritesClosed when there's no content
2024-07-08 05:03:36 -07:00
Ilona Tomkowicz
26b6161c6b
[wasm] Re-try when browser's WBT fail with System.TimeoutException (#104481) 2024-07-08 14:02:48 +02:00
Pavel Savara
819826683d
[wasi] enable WASMTIME_BACKTRACE_DETAILS (#104446) 2024-07-08 12:38:24 +02:00
Ilona Tomkowicz
27d1ab0393
[browser] Add test case for maxParallelDownloads (#104476) 2024-07-08 11:55:19 +02:00
Tomas Weinfurt
e71e0f4f84
update proxy setting on registry changes (#103364)
* update proxy setting on registry changes

* udpate

* build fixes

* console

* registry

* winhttp

* invalid

* feedback

* feedback

* 'feedback'

* Apply suggestions from code review

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

* MemberNotNull

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2024-07-07 21:22:12 -07:00
xtqqczze
4e278fe17f
Use XmlResolverIsNetworkingEnabledByDefault property in AotCompilerCommon.props (#104520) 2024-07-07 09:47:43 -07:00
Huo Yaoyuan
7b712815b5
Convert Array.IsSimpleCopy and CanAssignArray type to managed (#104103)
* Revert "Push back changes around IsSimpleCopy and CanAssignArrayType"

This reverts commit 4ce4f5118c20f438c1e33a5a73d626f1180c86d5.

* Reduce use range of CorElementType

* Add test for pointer array

* Rearrange test

* NativeAot compat

* Mono compat

* Disable test on mono

* Don't lookup cast cache in QCall
2024-07-07 09:22:08 -07:00
xtqqczze
acfb91f9a9
Remove link to fixed GitHub issue (#104521) 2024-07-07 10:31:05 -04:00
Tanner Gooding
4addcaa7e3
Add some helper functions for getting the intrinsic ID to use for a given oper (#104498)
* Add some helper functions for getting the intrinsic ID to use for a given oper

* Make the Unix build happy

* Make the Arm64 build happy

* Respond to PR feedback

* Ensure we don't use EVEX unnecessarily

* Ensure zero diffs for x64
2024-07-06 17:35:46 -07:00
Jan Kotas
9efc798f85
Fix stackoverflow message for repeated frames (#104508)
Fixes #104495
2024-07-06 11:35:23 -07:00
Miha Zupan
a7efcd9ca9
Update readAheadTask asserts (#104496) 2024-07-05 19:45:32 -07:00
Sun Lijun
aee78d306a
[LoongArch64] Add nativeaot support on LoongArch64. (#103889)
* [LoongArch64] Add nativeaot support on LoongArch64.

---------

Co-authored-by: Filip Navara <filip.navara@gmail.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2024-07-05 18:54:38 -07:00
Mikhail Ablakatov
67e198341d
JIT ARM64-SVE: Add Sve.ConditionalExtract* APIs (#104150)
* JIT ARM64-SVE: Add Sve.ConditionalExtract* APIs

* cleanup: fix formatting

* Update Helpers.cs

* cleanup: group and place APIs in alphabedical order and align the field

* Remove redundant HasScalarInputVariant flags from *Replicate intrinsics

* cleanup: place special intrinsics in alphabetical order

* cleanup: correctly specify emitted instructions in the comments

* fixup! cleanup: place special intrinsics in alphabetical order

* fixup! cleanup: group and place APIs in alphabedical order and align the field

* fixup! ARM64-SVE: GatherPrefetch (#103826)

* Revert "fixup! ARM64-SVE: GatherPrefetch (#103826)"

This reverts commit b0212caf190db21c54a59a48f226ca7c4eceea25.

* cleanup: align the lines for the newly added tests.

---------

Co-authored-by: Kunal Pathak <Kunal.Pathak@microsoft.com>
2024-07-05 18:49:23 -07:00
Jan Kotas
e224ffb9b7
Delete some unused HRESULT macro definitions (#104484) 2024-07-05 18:27:59 -07:00
Tanner Gooding
e125e93c3f
Fix an issue with complex number parsing (#104388) 2024-07-05 17:08:20 -07:00
Kunal Pathak
5505150987
Arm64/Sve: Implement AbsoluteCompare* and Compare* APIs (#104464)
* Add AbsoluteCompare*() APIs

* Map API to instructions

* Add test coverage

* Add support for AbsoluteCompare

* uncomment some other tests

* Add CompareGreater* and CompareLess* APIs

* Add remaining Compare* APIs

* Map API to instructions

* fix test cases

* Add test coverage for Sve.CompareUnordered
2024-07-05 15:13:12 -07:00
xtqqczze
84bda51cbe
Remove virtual modifier from InternalFallback (#104483)
* `System.Text.DecoderFallbackBuffer`
* `System.Text.EncoderFallbackBuffer`
2024-07-05 17:13:43 -04:00
Kevin Jones
ac25c23ecd
Fix typo in RSASignaturePaddingMode documentation
Co-authored-by: joegoldman2 <147369450+joegoldman2@users.noreply.github.com>
2024-07-05 15:52:56 -04:00
Katelyn Gadd
5b7e77d086
[wasm] Don't use SyncTextWriter in single-threaded wasm builds (#101221)
Bypass SyncTextWriter on single-threaded wasm to avoid compiling synchronization code during startup when console is touched
2024-07-05 11:40:28 -07:00
Kevin Jones
02bd1da6e3
Obsolete X509Certificate{2} constructors and X509Certificate2Collection.Import 2024-07-05 13:37:34 -04:00
Tanner Gooding
b9673cb8c3
Lower GetElement on arm64 to the correct access sequence (#104288)
* Lower GetElement on arm64 to the correct access sequence

* Use constant offset where possible

* Ensure that lvaSIMDInitTempVarNum is marked as being used by LclAddrNode

* Fix assert

* Create a valid addr mode for Arm64

* Don't lower unnecessarily

* Account for index 0 and scale 1

* Remove the offset constant node when it's unused
2024-07-05 10:09:16 -07:00
Kevin Jones
06e00763df
Add RetryHelper to AIA test
All other AIA tests use RetryHelper, but this one did not. So let's add it to this one, too.
2024-07-05 09:10:43 -07:00
AlexandreEXFO
ebf21a4253
Fix typo in RSASignaturePaddingMode.Pss apidoc 2024-07-05 09:01:41 -07:00
xtqqczze
c52177b21c
Remove virtual modifier from GetDatePart (#104456)
* Remove `virtual` modifier from `GetDatePart`

* Update HebrewCalendar.cs

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2024-07-05 08:55:05 -04:00
Artur Zgodziński
8bcbe18072
Unify debug views of immutable dictionaries (#100745)
* Unify debug views of immutable dictionaries

Fixes #94289

- Updates the way the debugger displays the remaining dictionaries (Frozen, Immutable, ImmutableSorted, Concurrent) to present their keys and values in separate columns.
- Fixes debugger views of Builder classes of immutable collections. Previous custom implementations incorrectly treated the Builder classes as immutable.

* Fixed tests of debugger attributes with immutable and concurrent generic dictionaries

* Removed tests superseded by DebugView.Tests.
* Fixed DebugView.Tests of cuncurrent and immutable generic dictionaries which failed on .Net Framework

* Fix ns2.0 build.

---------

Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
2024-07-05 12:51:43 +01:00
Jakob Botsch Nielsen
41d854fd44
JIT: Skip old promotion for retbuf defined locals (#104439)
These locals end up being dependently promoted. Skip them and allow
physical promotion to handle them instead.
2024-07-05 13:41:59 +02:00
Jakob Botsch Nielsen
8a99adad39
JIT: Disable old promotion for structs with significant padding (#104438)
When old promotion kicks in for structs with significant padding it
generally results in dependent promotion as block morphing handles these
conservatively. Disable this case and allow physical promotion to handle
it instead.
2024-07-05 13:41:37 +02:00
Miha Zupan
bd752c34ef
Avoid unobserved task exceptions in Http tests (#104384)
* Improve HttpProtocolTests

* Avoid unobserved exceptions from H2's read loop

* More test changes

* Actually do what the test name suggests

* Fix Dispose_DisposingHandlerCancelsActiveOperationsWithoutResponses

* Revert some changes that Browser doesn't like
2024-07-05 13:01:42 +02:00
Ilona Tomkowicz
116f5fd624
[wasm] Fix a typo in browser-bench wasm app (#104434) 2024-07-05 11:52:05 +02:00