Commit Graph

139896 Commits

Author SHA1 Message Date
Vlad Brezae 02596ba8d9
[wasm] Fix fragmentation caused by large objects allocation (#118099) 2025-07-30 15:53:57 +02:00
Ruihan-Yin 123627ba0f
[APX] fix a few emitter bugs. (#117791) 2025-07-30 13:08:02 +02:00
Michal Strehovský fe3f59b135
Fix missed places in dataflow analysis that introduce genericness (#118020) 2025-07-30 03:31:40 -07:00
Johan Lorensson 913c282fc9
Fix broken debugger/debuggee startup handshake protocol on macOS26. (#118120)
* Add support for new startup handshake protocol over pipes instead of sempahores.

* Remove NonBlocking runtime support.

* Renames, logging and simplification.

* Improve tracing.

* Make open check non blocking.

* Fold access into open calls and track ENOENT | ENOACCES

* Review feedback.
2025-07-30 12:06:48 +02:00
Johan Lorensson cfe9056a0b
Adjust Test_wait_interrupted_user_apc test timeout to handle deviation due to lowres timers. (#116066)
* Adjust test timeout to handle deviation due to lowres timers.

* Acceept 500 ms deviation on wait time.

* Reenable test.

* Adjust wait time calculation.

* Reduce wait delta to 20ms to account for low vs high res timers.
2025-07-30 12:05:18 +02:00
Vlad Brezae e9dd250942
Don't use vfork on android (#118085)
When we start the child process, we clear all signal handlers. This operations ends up clearing the signal handlers also for the parent process. Revert to just using fork for simplicity.
2025-07-30 13:03:56 +03:00
Katelyn Gadd b6e34b8c14
[interp] Forcibly enable intrinsics when we encounter a must-expand call (#117727)
* When encountering a must expand intrinsic self-call in an interpreted method, always expand it even if intrinsics are turned off.
* Clean up a minor edge case in the 'is reference or contains references' intrinsic
* Remove an alignment assert that is causing failures in the startup path
2025-07-29 18:27:13 -07:00
snickolls-arm 97d94229eb
Simplify SVE unary test template (#118129)
* Replace DataTable with PinnedVector class
* Add functions for generating random Vectors
* Add functions for converting between Vector and Array types
* Generate an expected Vector for comparison and log to terminal
* Simplify validation functions
* Remove RetVectorType and Op1VectorType template variables
2025-07-29 14:51:46 -04:00
Stephen Toub 64ccbadcb5
Enable lookarounds to influence atomicity (#118153)
* Enable lookarounds to influence atomicity

As part of our auto-atomicity handling, today we give up when the subsequent node is a lookaround. This improves it to support the case when the subsequent node is a positive lookahead.

* Update src/libraries/System.Text.RegularExpressions/tests/UnitTests/RegexReductionTests.cs
2025-07-29 17:33:29 +00:00
Sven Boemer f9fb08132b
Import illink.targets for ref projects (#118144)
This lets the logic from the ILLink targets add
`AssemblyMetadata("IsTrimmable", "true")` to ref projects which have
trimming enabled.

Also moves the trimming opt-out into `Directory.Build.props` when it
should be shared between src and corresponding ref projects.

This will be used to enable the Roslyn analyzer to produce a warning
for references to assemblies that aren't marked "IsTrimmable".
2025-07-29 10:14:53 -07:00
Aman Khalid 3abbf997b1
JIT: Boost inversion for oversize loops with bounds checks (#118078)
Addresses some of the regressions in #116486. If a loop has bounds checks in it, it might benefit from cloning, so perhaps we ought to tolerate going a bit over the inversion size limit to enable downstream optimizations. I ought to do something for GDV checks; perhaps as a follow-up, I'll move the checks in loop cloning to something I can reuse here. The 1.25x figure isn't all that scientific -- I found it to be the smallest factor necessary to make a dent in the regressions from less cloning I looked at, and despite the size increases, it's a net PerfScore win across collections.
2025-07-29 12:24:24 -04:00
Sven Boemer 8ea880933b
Remove warning for base type with RequiresUnreferencedCode (#117944)
Removes the IL2109 warning about a type without RUC derived from a type with
RUC. This existed for RequiresUnreferencedCode but not RequiresDynamicCode.
The warning on the class should not be necessary because there will be a warning
for the base ctor call.
2025-07-29 09:22:30 -07:00
Matt Mitchell be3060c536
Update version branding to rc1 (#118002) 2025-07-29 09:11:49 -07:00
Tanner Gooding 55805eea13
Don't do an invalid mask conversion optimization for conditional select nodes (#118154) 2025-07-29 16:05:13 +00:00
Michal Strehovský 9c714ff298
Fix building with GVM_RESOLUTION_TRACE defined (#118160)
`MethodNameAndSignature` no longer has the `string`-typed property.
2025-07-29 07:35:18 -07:00
Aman Khalid 18ae5dd6c1
JIT: Remove `BBF_RUN_RARELY` (#118147) 2025-07-29 09:23:56 -04:00
Ilona Tomkowicz 2bbb5f1dfd
Enable `Wasm.Build.Tests.WasmTemplateTests.RunWithDifferentAppBundleLocations` (#117985)
* Re-enable.

* Indent.

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
2025-07-29 12:29:48 +02:00
Michal Strehovský a8fee60508
Update DefaultStackSize to Thread_DefaultStackSize (#118076)
https://github.com/dotnet/runtime/pull/110455#issuecomment-3118701638
2025-07-29 07:53:04 +02:00
Michal Strehovský 49f5984113
Fix stack limits condition (#118077) 2025-07-29 07:52:43 +02:00
Rachel 2db9fdf5b4
Adding GetAssemblyLoadContext cDAC API (#117939)
* adding GetAssemblyLoadContext cDAC API

* simplifying field access

* restructuring etc

* comments
2025-07-28 18:39:50 -07:00
Rachel 2d3bf386a5
Adding GetAppDomainName cDAC API (#117837)
* Adding GetAppDomainName cDAC API 

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-28 18:39:00 -07:00
Stephen Toub 27cc30f085
Transform regex `X|` into `X?` and `|X` into `X??` (#118087)
An alternation with two branches where the second is empty is the same as the first branch just being an optional loop; similarly, when the first branch is empty, it's a lazy optional loop of the second branch. Expressing as an optional is better optimized elsewhere in the regex transforms, e.g. with loop coalescing, so we're better off with the optional representation.
2025-07-28 20:37:14 -04:00
Pranav Senthilnathan 865d4e69f1
Cleanup for cert accessors (#118116) 2025-07-28 15:58:49 -07:00
Stephen Toub 1aa2fd8bd7
Tweak regex source gen for single char repeater (#118137)
This doesn't help with perf, it just makes the generated code a bit cleaner. Instead of e.g.
```C#
if ((uint)slice.Length < 20)
{
    return false; // The input didn't match.
}

if (slice.Slice(0, 20).ContainsAnyExceptInRange('a', 'c'))
{
    return false; // The input didn't match.
}
```
we'll now get:
```C#
if ((uint)slice.Length < 20 || slice.Slice(0, 20).ContainsAnyExceptInRange('a', 'c'))
{
    return false; // The input didn't match.
}
```
2025-07-28 22:57:36 +00:00
Stephen Toub 26d4886e81
Fix compilation failure from regex source generator with some lazy loops (#118132)
Because of some possible complicated control flow, the compiler thinks these variables are not deterministically initialized.
2025-07-28 16:25:53 -04:00
Stephen Toub 5196f3eb26
Avoid extra boundary checks when preceeded/succeeded char set is known (#118105)
* Avoid extra boundary checks when preceeded/succeeded char set is known

If we statically know by construction that what comes before or after a \b is guaranteed to be a word char, then we can avoid half the run-time checks.

This also tweaks the source-generated implementation of IsBoundaryWordChar in order to avoid an extra branch on every check. It's currently delegating to IsWordChar and then if that returns false, checking whether it's one of the other two joiner characters that are considered as part of the boundary set. Instead, this duplicates the IsWordChar implementation (which is just a couple of lines once the helpers are separated out into their own members), such that for ASCII, the additional check isn't necessary. The implementation used by the interpreter and RegexCompiler already do this.

* Address PR feedback
2025-07-28 14:37:33 -04:00
Shiming Ge 307753a093
Fix the issue that the test exits with cannot find Microsoft.Win32.Primitives.dll (#117699)
* fix the issue that the test exits with cannot find Microsoft.Win32.Primitives.dll

* Update src/tests/GC/Stress/Framework/ReliabilityFramework.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-28 11:15:31 -07:00
Max Charlamb 9df2042d2b
[cDAC] Rename datadescriptor.h -> datadescriptor.inc (#118067)
* rename datadescriptor.h -> datadescriptor.inc
2025-07-28 12:24:01 -04:00
Max Charlamb ffe8967763
[cDAC] Implement `ISOSDacInterface::GetJumpThunkTarget` (#117781)
* implement GetJumpThunkTarget
2025-07-28 12:16:16 -04:00
Stephen Toub 028b30f719
Further reduce loops around zero-width assertions (#118111)
* Further reduce loops around zero-width assertions

In addition to replacing the loop with an empty when it contains only a zero-width assertion and has a lower bound of 0, if it doesn't have a lower bound of 0, we can just remove the loop layer, replacing it with its child directly, since any additional iterations beyond one is redundant.
2025-07-28 16:07:41 +00:00
Jonathan Davies 96b8cdcf45
arm64: Refactor Helpers.cs (#118125)
* Remove duplicate functions
* Use template functions where possible
2025-07-28 15:07:53 +00:00
Copilot 45802538e2
[wasi] Disable build in .NET 10 (#117936) 2025-07-28 16:35:42 +02:00
Larry Ewing 0fd7ca0c8e
Add PackedSimd aliases for AddSaturate and SubtractSaturate (#118089) 2025-07-28 09:12:32 -05:00
Stephen Toub a166765737
Support Notones in alternation reductions that merge sets (#118109)
Today, given an alternation like `a|b|[cd]|efg`, that gets reduced to `[abcd]|efg`, supporting One and Set nodes. But it doesn't support Notone nodes. That means the semi-common idiom `.|\n` that folks use to express any character when not using Singleline doesn't get reduced and remains an alternation. This extends the existing reduction pass to also recognize Notones, just by treating them as one or two ranges.
2025-07-28 13:55:53 +00:00
shangchenglumetro 4e8a560e0d
chore: remove redundant words in comment (#117310)
Signed-off-by: shangchenglumetro <shuang.cui@live.com>
2025-07-28 06:53:42 -07:00
Jeff Handley ee8f12ccab
Update mentionees for the binaryformatter-migration label (#118082) 2025-07-28 13:53:52 +02:00
Pavel Savara 5922fd3005
[browser] fix JSExport in lazy loaded assembly (#117890) 2025-07-28 11:07:39 +02:00
David Nguyen c87888ac27
[Android][CoreCLR] Add runtimeconfig.json support for test host (#117980)
* Add placeholders for setting AppContext keys and values

* For CoreCLR, add runtimeconfig.json parsing and set AppContext keys and values by replacing the template placeholders

* Setting the env variables is now redundant

* Enable newly fixed tests

* Enable the test

* Add a null check instead of using the null-forgiving operator

* Refactoring: rename method and variables and add comments

* Rename variable
2025-07-28 09:41:29 +02:00
Stephen Toub dc6ac3a289
Normalize some well-known negated sets (#118106)
Some folks end up writing sets like `[^\d]` instead of `\D`, `[^\w]` instead of `\W`, or `[^\s]` instead of `\S`. This defeats some special recognition of the common \D, \W, and \S sets. Normalize them.
2025-07-28 03:57:57 +00:00
Stephen Toub 7a6890342c
Remove positive lookarounds that wrap only zero-width assertions (#118091)
A positive lookahead effectively changes its contents to be zero-width. If the contents is already zero-width, the lookaround adds no value.
2025-07-28 00:16:09 +00:00
Stephen Toub c74a167b25
Remove capture groups from negative lookarounds (#118084)
Any captures performed inside of negative lookarounds do not persist to outside of the lookaround. As such, as long as there are no backreferences inside of the lookaround that would read on those captures, we can eliminate the capturing.
2025-07-27 23:31:32 +02:00
Miha Zupan 655836ed3b
Fix Regex source generator multithreading issue (#118086) 2025-07-27 02:07:47 +00:00
Hamish Arblaster 82d6d4678a
Implement `Unsafe.IsAddressLessThanOrEqualTo` & `Unsafe.IsAddressGreaterThanOrEqualTo` (#117800)
* Implement Unsafe. IsAddressLessThanOrEqualTo & Unsafe.IsAddressGreaterThanOrEqualTo

* Update vectorization-guidelines.md

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2025-07-26 17:33:19 -07:00
Stephen Toub a8c169a07c
Replace nop regex loops with empty (#118079)
When loop bodies end up containing zero-width assertions and the loop has a min bound of 0, the whole loop can be removed, as the zero-width assertion may or may not apply.
2025-07-26 20:20:36 +00:00
Stephen Toub 197f38a02b
Coalesce adjacent equivalent anchors (#118083)
Sometimes you see patterns where folks have put the same anchor multiple times in a row, e.g. `\b\b`. The subsequent anchors are nops and can just be removed.
2025-07-26 13:37:13 -04:00
Tarek Mahmoud Sayed 7f96aef45e
Check source and destination spans overlap in TryNormalize method (#118047)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-07-26 08:23:25 -07:00
Copilot a2b08f1752
Add XML documentation for 29 undocumented .NET 7.0 APIs (#117697)
* Initial plan

* Add documentation for System.Data.SqlTypes and System.Diagnostics APIs

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>

* Add documentation for System.Reflection.Metadata, System.Runtime.Versioning, System.Security.Cryptography.Cose and System.Runtime.Serialization.Json APIs

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>

* Add documentation for System.Security.Cryptography.X509Certificates.X509SubjectAlternativeNameExtension and System.Runtime.Serialization.DataContracts.DataContract APIs

Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>

* Use <see> tags and remove trailing whitespace

* Remove trailing whitespace

* Add missing <see> tag

* Revert to using <inheritdoc/> where it already existed

* Remove redundant X509SubjectAlternativeNameExtension documentation

Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>

* Update TraceConfiguration summary to reference TraceSource with proper XML doc tags

Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>

* Apply XML documentation feedback: improve cref tags, fix whitespace, and restore X509SubjectAlternativeNameExtension docs

Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>

* Apply feedback from code review: update FieldTypeEncoder.CustomModifiers documentation

Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: PranavSenthilnathan <12225508+PranavSenthilnathan@users.noreply.github.com>
Co-authored-by: tarekgh <10833894+tarekgh@users.noreply.github.com>
2025-07-26 04:21:30 -07:00
Katelyn Gadd d58e9aa10b
Re-enable VarianceSafety tests on crossgen (#118036)
#109201 does not reproduce for me locally on Windows, and does not appear to reproduce on CI anymore.
2025-07-25 17:06:23 -07:00
Katelyn Gadd c3d2576131
Re-enable Method002 test on crossgen (#118035)
#109202 does not reproduce for me locally on Windows and does not seem to reproduce on CI anymore either.
2025-07-25 17:06:01 -07:00
xtqqczze f27927a399
Simplify lazy initialization by removing `Volatile.Read` (#117868)
Replaced `Volatile.Read` with plain field reads. The memory barriers provided by `CompareExchange` are
sufficient to ensure thread safety and visibility, making `Volatile.Read`
unnecessary.

Follow-up to https://github.com/dotnet/runtime/pull/117817

Related: https://github.com/dotnet/runtime/pull/100969

cc: @stephentoub

Co-authored-by: Tanner Gooding <tagoo@outlook.com>
2025-07-25 23:25:58 +00:00