Stephen Toub [Fri, 4 Nov 2022 08:57:47 +0000 (04:57 -0400)]
Add BinaryPrimitives.ReverseEndianness for spans of elements (#76339)
Mark Plesko [Fri, 4 Nov 2022 08:30:33 +0000 (01:30 -0700)]
Standardize test script naming to CLRTestBa{tc,s}hP{re,ost}Commands (#76483)
Main change is BashCLRTestPreCommands -> CLRTestBashPreCommands. As part of this I noticed that wasm tests overwrite the Bash precommands, and fixing that breaks them so it isn't touched here. Also, there are several non-Commands variables that start with Ba{tc,s}hTest that aren't touched here.
Remove check on RunCrossGen2 in disasm checks as that is intended as a shell environment variable, not an msbuild variable.
Convert a few more tests to the new environment variable format.
Pavel Savara [Fri, 4 Nov 2022 07:26:56 +0000 (08:26 +0100)]
[wasm] browser profiler (again) (#77779)
* 0e24ea7 again
* fix support for shells
* report only when enabled
Aaron Robinson [Fri, 4 Nov 2022 02:40:20 +0000 (19:40 -0700)]
Design to support ByRefLike types in Generics (#67129)
* Design to support ByRefLike types in Generics
* Trim whitespace
* Review feedback
* Remove words
* Update based on feedback
* Add F# as being impacted.
* Feedback and clarify wording for constrained calls.
* Add well-known IL sequences for boxing
Record APIs where compiler constraint analysis should be suppressed.
Defined analysis suppression attribute.
* Minor nits.
* Update docs/design/features/byreflike-generics.md
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
* Review feedback
* Update to design doc
* Misspelling
* Update byreflike-generics.md
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
Aaron Robinson [Fri, 4 Nov 2022 02:24:58 +0000 (19:24 -0700)]
Remove "wprintf" from PAL (#77852)
The last usage was in FormatMessageW, which
only used wprintf syntax for messages that used
embedded printf format between two "!". We do
not use this feature in any of our messages so
this code path is technically unused.
Remove _snwprintf_s from PAL
Remove _vsnwprintf_s from PAL
_woutput_s was not removed because it is intertwined
with the implementation for printf. The linker will just
prune the implementation anyways.
FormatMessageW errors if embedded formatting is used
Update PAL tests for FormatMessageW
Alexandre Mutel [Thu, 3 Nov 2022 20:45:56 +0000 (21:45 +0100)]
Optimize XxHash3 (#77756)
* Optimize XxHash3
* Update src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash3.cs
* Fix var
* Fix compilation errors for < .NET 7.0
* Fix issue on scalar code path
Co-authored-by: Stephen Toub <stoub@microsoft.com>
David Wrighton [Thu, 3 Nov 2022 20:45:03 +0000 (13:45 -0700)]
Fix op_Inequality for `Vector64<T>` (#77815)
Recent changes to the implementation of the `Vector64<T>` type caused a regression to the fallback path for inequality. In particular it changed from inequality to checking of all elements were unequal, which is a different operation.
Jakob Botsch Nielsen [Thu, 3 Nov 2022 19:36:23 +0000 (20:36 +0100)]
Update superpmi-collect queues (#77825)
dotnet-maestro[bot] [Thu, 3 Nov 2022 19:05:56 +0000 (14:05 -0500)]
Update dependencies from https://github.com/dotnet/arcade build
20221102.1 (#77828)
Microsoft.DotNet.ApiCompat , 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.22528.1 -> To Version 8.0.0-beta.22552.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
dotnet-maestro[bot] [Thu, 3 Nov 2022 18:52:34 +0000 (13:52 -0500)]
Update dependencies from https://github.com/dotnet/linker build
20221102.1 (#77830)
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22551.1 -> To Version 7.0.100-1.22552.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Alexander Köplinger [Thu, 3 Nov 2022 18:40:34 +0000 (19:40 +0100)]
Use correct container definitions in perf_slow.yml (#77774)
Fallout from https://github.com/dotnet/runtime/pull/75473, container handling happens in platform-matrix.yml now.
madelson [Thu, 3 Nov 2022 17:58:25 +0000 (13:58 -0400)]
Make ResourceManager.BaseName work as documented. (#75497)
* Make ResourceManager.BaseName work as documented.
This property is documented to return the "qualified namespace name and
the root resource name of a resource file". However, previously when
constructing a ResourceManager with a Type the BaseName property would
instead return the name of the type without its namespace.
fix #74918
* Remove _locationInfo field
* Add additional test cases for ResourceManager.BaseName.
Address feedback from https://github.com/dotnet/runtime/pull/75497#issuecomment-
1262913704.
* Fix BaseName test case in response to https://github.com/dotnet/runtime/pull/75497#issuecomment-
1295500698
Jakob Botsch Nielsen [Thu, 3 Nov 2022 17:15:40 +0000 (18:15 +0100)]
Unify RunCrossGen2 environment variable to be set to 1 instead of "true" (#77808)
Various places were setting this to "true" and various other places to
"1". Always use "1" in the environment variable and "true" in the
msbuild property. This fixes local runs of crossgen2 tests (using
src/tests/run.cmd runcrossgen2tests) -- these were not skipping
FileCheck tests before as the test wrapper script only checks for "1".
SingleAccretion [Thu, 3 Nov 2022 17:05:03 +0000 (20:05 +0300)]
Do not add null checks for boxed statics (#77796)
* Do not add some null checks
* Fix ARR_ELEM exceptions
Stephen Toub [Thu, 3 Nov 2022 16:49:57 +0000 (12:49 -0400)]
Avoid some unnecessary MemoryStream.ToArray calls (#77832)
Ankit Jain [Thu, 3 Nov 2022 15:41:51 +0000 (11:41 -0400)]
Mono workloads: Fix building non-mono project when `RunAOTCompilation=true` (#77762)
This manifested in a case where a non-mono project was passed a mono specific property `RunAOTCompilation=true`, but instead of it getting ignored, the build failed with:
```
/usr/local/share/dotnet/sdk/7.0.200-preview.22521.7/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5):
error NETSDK1147: To build this project, the following workloads must be installed: macos [/private/tmp/c/c.csproj]
error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/private/tmp/c/c.csproj]
```
And this is because the `MonoAOTCompiler.Task` is imported with:
https://github.com/dotnet/runtime/blob/
82aa87f9cdf9ac20f0f685016648c36247a76ff1/src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Manifest/WorkloadManifest.targets.in#L57-L57
- This happens for net6, and net8 projects.
Fixes https://github.com/dotnet/runtime/issues/77707 .
cc @steveisok @lewing
Ankit Jain [Thu, 3 Nov 2022 15:40:57 +0000 (11:40 -0400)]
[wasm] Bump tests timeout 15mins to 30mins, for .. (#77819)
.. `xharness`.
Some library tests, like `System.Text.RegularExpressions.Tests` can take more than 15mins.
- Also, fix building `console-v8` sample with `make`
Theodore Tsirpanis [Thu, 3 Nov 2022 15:29:21 +0000 (17:29 +0200)]
Use more spans in `System.Reflection.Metadata` et. al. (#76574)
* Use Unsafe.As in ImmutableByteArrayInterop.
Code quality increases.
* Optimize methods in the BlobUtilities class.
* Include more information in exceptions thrown from catch blocks.
* Use spans in BlobContentId, avoiding ImmutableByteArrayInterop.
* Use spans in BlobWriter, reducing pinning and ImmutableArrayInterop.
* Use spans in BlobBuilder, reducing pinning and ImmutableArrayInterop.
* Remove NoInlining from the throw helpers.
It prevents the JIT from looking into the method's body, realizing it's a throw helper, and doing what's best (such as considering it cold).
* Inline `BlobUtilities.Read(Immutable)?Bytes`.
* Avoid a length check introduced by the use of `BinaryPrimitives`.
* Remove `DisallowNull` from `ImmutableArrayInterop.DangerousCreateFromUnderlyingArray`.
* Remove an early bail-out if the buffer was empty.
* Stop using value tuples.
* Fix tests and expose writing a span to BlobWriter.
* Fix stack overflows.
* Shorten BlobUtilities methods that write integers.
* Optimize some methods in `MemoryBlock`.
Meri Khamoyan [Thu, 3 Nov 2022 15:03:31 +0000 (19:03 +0400)]
#76881 internal properties in GetRuntimeProperties are not shown (#77169)
Fixes https://github.com/dotnet/runtime/issues/76881
Michael Aranda [Thu, 3 Nov 2022 14:20:52 +0000 (08:20 -0600)]
Fixes typos and formatting in comments (#76975)
Ilya [Thu, 3 Nov 2022 14:13:51 +0000 (19:13 +0500)]
Implement Environment.IsPrivilegedProcess (#77355)
* Implement Environment.IsPrivilegedProcess
* Address feedback
* Use one static
* Fix mono wasm
* Address feedback 2
* Address feedback 3
* Fix typo.
* Fix wasm
RaymondY [Thu, 3 Nov 2022 14:13:15 +0000 (22:13 +0800)]
correct code snippets (#77581)
Let them be valid C# code. Uniform code style as well.
Jan Kotas [Thu, 3 Nov 2022 14:04:02 +0000 (07:04 -0700)]
Fix ThunkGenerator build break (#77816)
Apply all style auto-fixers on ThunkGenerator
Jakob Botsch Nielsen [Thu, 3 Nov 2022 10:37:34 +0000 (11:37 +0100)]
Fix wrong metadata name in test (#77806)
Adeel Mujahid [Thu, 3 Nov 2022 09:01:15 +0000 (11:01 +0200)]
Update tar test data version (#77785)
Andy Ayers [Thu, 3 Nov 2022 04:18:41 +0000 (21:18 -0700)]
JIT: Enable phi-based jump threading when SSA updates aren't needed (#77748)
Leverage the new SSA accounting to look for cases of phi-based jump threading
that will not require SSA updates. In particular cases where the phis are all
locally consumed.
Also update documentation on the SSA checker implementation (which aims to
ensure that the SSA accounting we're relying on here is accurate).
Elinor Fung [Thu, 3 Nov 2022 03:26:36 +0000 (20:26 -0700)]
Remove empty BEGIN/END_ENTRYPOINT_* macros (#77810)
Zoltan Varga [Thu, 3 Nov 2022 00:48:15 +0000 (20:48 -0400)]
[mono] Avoid returning true from RuntimeType.IsActualEnum for generic parameters. (#77763)
Related: https://github.com/dotnet/runtime/pull/71685.
Ali Khalili [Wed, 2 Nov 2022 21:17:08 +0000 (21:17 +0000)]
System.Threading.RateLimiting de-queue canceled request (#77182)
* Dequeue canceled request before making decision for processing queue’s requests
Carlos Sanchez [Wed, 2 Nov 2022 20:28:48 +0000 (13:28 -0700)]
Update assembly version from hardcoded to MajorVersion (#74157)
* Update assembly version from hardcoded to MajorVersion
* Bump version to 8 in XsdDataContractExporterTests
* Retrieve major version dynamically for expected message in TypesTest_Negative
* Retrieve major version dynamically for expected message in SurrogateProvider_MemberData
* Manually generate the TestData.resources.
The dotnet exec command generated by the msbuild Target had to be manually executed in the cmdline with the target framework folders for RemoteExecutor hardcoded to net7.0-windows so the resources file could be generated.
* Avoid hardcoded 8 in additional SurrogateTests line
* Fix Diagnostics.EventLog supression message
* Update assembly version from hardcoded to MajorVersion
* Bump version to 8 in XsdDataContractExporterTests
* Retrieve major version dynamically for expected message in TypesTest_Negative
* Retrieve major version dynamically for expected message in SurrogateProvider_MemberData
* Manually generate the TestData.resources.
The dotnet exec command generated by the msbuild Target had to be manually executed in the cmdline with the target framework folders for RemoteExecutor hardcoded to net7.0-windows so the resources file could be generated.
* Avoid hardcoded 8 in additional SurrogateTests line
* Fix Diagnostics.EventLog supression message
* Extract the LocalEchoServer bits from the projects
.. so that the helix bits are in a LocalEchoServer.helix.targets ,
instead of being special-cased in sendtohelix-wasm.targets .
- And this is setup and used by the test projects by importing one file.
* Build the LocalEchoServers specifically without using artifacts .
- The RemoteLoopServer, and NetCoreServer are projects used as aspnetcore
middleware, and loaded by xharness.
- These are built against the live artifacts, same as other projects.
- But this can be a problem when the libraries in `runtime` are on a
newer assembly version (say `8.0.0`), but xharness is still built with
`7.0.0` libraries.
- In that case, xharness fails to load the middleware:
```
Application startup exception: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
...
Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=
b03f5f7f11d50a3a'. The system cannot find the file specified.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Microsoft.DotNet.XHarness.CLI.CommandArguments.TypeFromAssemblyArgument`1.GetLoadedTypes()+MoveNext() in /_/src/Microsoft.DotNet.XHarness.CLI/CommandArguments/Arguments/TypeFromAssemblyArgument.cs:line 29
at Microsoft.DotNet.XHarness.CLI.Commands.WebServer.<>c__DisplayClass0_0.<Start>b__9(TestWebServerOptions options) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs:line 60
at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
at Microsoft.Extensions.Options.OptionsCache`1.<>c__3`1.<GetOrAdd>b__3_0(String name, ValueTuple`2 arg)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd[TArg](TKey key, Func`3 valueFactory, TArg factoryArgument)
at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd[TArg](String name, Func`3 createOptions, TArg factoryArgument)
at Microsoft.DotNet.XHarness.CLI.Commands.WebServer.TestWebServerStartup.Configure(IApplicationBuilder app, IOptionsMonitor`1 optionsAccessor) in /_/src/Microsoft.DotNet.XHarness.CLI/Commands/WebServer.cs:line 126
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
at Microsoft.AspNetCore.Hosting.WebHost.BuildApplication()
```
- Build the project in isolation from rest of the repo, so that it is
built with references only from the SDK. The built assembly can then be
deployed for use with xharness, just like before.
* add missing files
* [wasm] fixup extensions targets for LocalEchoServer
* [wasm] Use eng/targetingpacks.targets instead of wasm specific targets
* [wasm] Avoid duplicate imports, and don't use the targetingpacks.targets
.. for runtime tests since the paths are set explicitly in the project
* [wasm] Workaround for https://github.com/dotnet/runtime/issues/77707
The middleware projects are now being built separately, so they can
target a different TFM. But when `RunAOTCompilation=true` is set, like
on CI/AOT builds, the build breaks with:
```
To build this project, the following workloads must be installed: macos [/__w/1/s/Build.proj]
To install these workloads, run the following command: dotnet workload restore [/__w/1/s/Build.proj]
```
This is described in https://github.com/dotnet/runtime/issues/77707 .
And the issue is present in `7.0 rc1` also, which is currently used for
building the repo. To workaround it, we unset some properties which
aren't needed anyway for the middleware projects builds.
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Ali Khalili [Wed, 2 Nov 2022 20:26:19 +0000 (20:26 +0000)]
Fix missing dispose on rate limiting (#76784)
Elinor Fung [Wed, 2 Nov 2022 20:09:05 +0000 (13:09 -0700)]
Avoid locking during host trace flush when not necessary (#77765)
dotnet-maestro[bot] [Wed, 2 Nov 2022 17:57:48 +0000 (17:57 +0000)]
[main] Update dependencies from 7 repositories (#77594)
[main] Update dependencies from 7 repositories
Drew Kersnar [Wed, 2 Nov 2022 17:02:30 +0000 (12:02 -0500)]
Fix triple slash documentation for System.Runtime.Intrinsics (#76687)
* Add missing type param documentation for Vector64.Create<T>
* Add summaries to the Vector types
* Fix typeparamref
* Address PR feedback
dotnet-maestro[bot] [Wed, 2 Nov 2022 16:56:10 +0000 (12:56 -0400)]
[main] Update dependencies from dotnet/linker (#77595)
* Update dependencies from https://github.com/dotnet/linker build
20221027.4
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22525.3 -> To Version 7.0.100-1.22527.4
* Update dependencies from https://github.com/dotnet/linker build
20221031.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22525.3 -> To Version 7.0.100-1.22531.1
* Update dependencies from https://github.com/dotnet/linker build
20221031.2
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22525.3 -> To Version 7.0.100-1.22531.2
* Update dependencies from https://github.com/dotnet/linker build
20221101.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22525.3 -> To Version 7.0.100-1.22551.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Adeel Mujahid [Wed, 2 Nov 2022 16:55:56 +0000 (18:55 +0200)]
Use SR.Format in a few more places (#77615)
Brian Bohe [Wed, 2 Nov 2022 16:41:08 +0000 (09:41 -0700)]
Avoid reporting empty debug info ranges to the vm (#77289)
* Removing empty variable live ranges
The debugger is not using empty variable live ranges.
We are reporting them because they can get extended
later if the variable becomes alive in the immediately
next emitted instruction. If an empty live range is
not getting extended, which we can realize after
emitting all the code or creating a new live range
for the same variable, we can remove it.
* Extending variable live ranges in more cases
When the emitter moved to the next group but has not
emitted any instruction, and the variable died and
becomes alive again, we would like to extend its range.
* Avoiding creating a new debug range when previous is empty
* Updating check for empty debug ranges
* Updating print
* Avoiding printing twice variable live range
* Avoiding reporting empty variable ranges to the vm
* Revert "Avoiding printing twice variable live range"
This reverts commit
4e1cf47dd6cdf9d45ce4a51eaa05b3ec6e4b3b41.
* Revert "Updating print"
This reverts commit
7b79b0d955daa4dc9770b604d6780591b51c9ee1.
* Revert "Updating check for empty debug ranges"
This reverts commit
e8b102d489d79028750068decf4f427ad8e5f69f.
* Revert "Avoiding creating a new debug range when previous is empty"
This reverts commit
a11fd5d0ffaa98631d731bec1f2619f1d108d33a.
* Revert "Extending variable live ranges in more cases"
This reverts commit
609605a1ca7cf1c0c843dbaf353432ec9ed846e2.
* Revert "Removing empty variable live ranges"
This reverts commit
66d18e031f83c8efe864981b35c0548af49e0714.
* Freeing vm memory when there is no debug info
* Persisting JIT-EE contract on empty debug info
* Update src/coreclr/jit/ee_il_dll.cpp
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Co-authored-by: Brian Bohe <brianbohe@microsoft.com>
Co-authored-by: Jakob Botsch Nielsen <Jakob.botsch.nielsen@gmail.com>
Tanner Gooding [Wed, 2 Nov 2022 16:25:40 +0000 (09:25 -0700)]
Mark and expose additional Vector functions as Intrinsic (#77562)
* Mark and expose additional Vector functions as Intrinsic
* Applying formatting patch
* Ensure Vector64.CreateScalarUnsafe for long/ulong/double is handled
* Ensure we use the right Count
* Ensure small types don't sign extend up to int
* Ensure reflection invocation is correct for Vector<T> bitwise ops
* Adding tests and fixing a couple small typing issues
* Fixing the name of the One property
* Assert GT_RSH for simd isn't TYP_LONG on xarch
* Ensure the correct operation is picked for vector ShiftRightArithmetic
* Fixing StoreAlignedNonTemporal on Arm64
Aleksey Kliger (λgeek) [Wed, 2 Nov 2022 16:21:30 +0000 (12:21 -0400)]
[hot_reload] implement param reflection (#77563)
* Add new test ReflectionAddNewMethod
* FIXME: get_param_names, get_marshal_info and custom_attrs need work
* WIP - add a method param reverse lookup
* look up params from added methods
* Remove FIXMEs and unused field
* remove writelines from test
* fix test on coreclr
* why does coreclr have 2 attributes here??
* There should be 2 attributes on the 4th param
* one more place that looks at params
* A couple more places where we look at the Params table
* Check default values on params on added method
* fix lookup if table is empty
* add a gratuitious typeof assert
otherwise the CancellationToken type is trimmed on wasm
* Add a single mono_metadata_get_method_params function
remove duplicated code
Jakob Botsch Nielsen [Wed, 2 Nov 2022 09:35:40 +0000 (10:35 +0100)]
JIT: Support profiles with only histograms (#77721)
Split up "we have a profile" and "we have profile weights" questions.
Matous Kozak [Wed, 2 Nov 2022 09:24:23 +0000 (10:24 +0100)]
[mono] Remove Vector128 checks for amd64 APIs (#77534)
* Remove Vector128 checks for amd64 APIs
* refactor emit_sum_vector (amd64)
Jay Cho [Wed, 2 Nov 2022 09:00:19 +0000 (18:00 +0900)]
Add RIDs for Tizen 7.0 (#76600)
Zoltan Varga [Wed, 2 Nov 2022 04:14:20 +0000 (00:14 -0400)]
[mono][wasm] Handle delegates decorated with [UnmanagedFunctionPointe… (#77709)
* [mono][wasm] Handle delegates decorated with [UnmanagedFunctionPointer] in
the interp-to-native generator.
Fixes https://github.com/dotnet/runtime/issues/76930.
* Update src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
* Update src/tasks/WasmAppBuilder/PInvokeTableGenerator.cs
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
mfkl [Wed, 2 Nov 2022 04:13:38 +0000 (11:13 +0700)]
Add option for truncated stream detection (#75671)
* Add option for truncated stream detection
fix https://github.com/dotnet/runtime/issues/47563
* Use RemoteExecutor
move the test to concrete classes as abstracted classes are not supported by RemoteExecutor
* review feedback
* use same error text message
* cache appcontext getswitch
* fix failing test
* slice byte array for assertion
* renaming
* add missing RemoteExecutor.IsSupported
* fast check first
Ankit Jain [Wed, 2 Nov 2022 02:01:45 +0000 (22:01 -0400)]
Revert "[wasm] browser profiler (#77449)" (#77759)
This reverts commit
0e24ea7c2a0436a8f2bf83e8f5981ec035518b99.
It broke all the perf pipeline wasm builds. It happens with v8 `10.9.130`:
```
Error: Invalid 'startMark' argument: No numeric 'startTime' field
at pe (/home/helixbot/work/
B2E7090F/w/
A520093B/e/performance/artifacts/bin/for-running/MicroBenchmarks/
659adab0-5c86-4e74-8913-
672bd56fd58e/bin/net7.0/browser-wasm/AppBundle/dotnet.js:3:12994)
at /home/helixbot/work/
B2E7090F/w/
A520093B/e/performance/artifacts/bin/for-running/MicroBenchmarks/
659adab0-5c86-4e74-8913-
672bd56fd58e/bin/net7.0/browser-wasm/AppBundle/dotnet.js:5:95874
exiting due to exception: Error: Invalid 'startMark' argument: No numeric 'startTime' field
```
- It works fine with older versions like `10.7.193` (current stable).
- It wasn't caught in the CI checks because those are using an older version of v8.
Andy Ayers [Wed, 2 Nov 2022 00:31:27 +0000 (17:31 -0700)]
JIT: increase edge weight slop tolerance some more (#77747)
Allow up to 1/50 variance between the expected and computed values.
Fixes #77450.
Tarek Mahmoud Sayed [Tue, 1 Nov 2022 22:53:48 +0000 (15:53 -0700)]
Fix Activity.OperationName when Activity is created with null value (#77746)
Tarek Mahmoud Sayed [Tue, 1 Nov 2022 22:50:01 +0000 (15:50 -0700)]
Fix TimeZoneInfo test failure (#77745)
Michelle McDaniel [Tue, 1 Nov 2022 21:19:49 +0000 (14:19 -0700)]
Migrate docker containers to latest tags (#76630)
* Move docker tags to -latest
As part of https://github.com/dotnet/arcade/issues/10123, we have added a floating -latest tag to all currently in-support docker container images. This change moves all container reference to the -latest version so runtime can get all of the latest updates to the containers.
* Change all of the centos-8-rpmpkg images to centos-7-rpmpkg
CentOS 8 was EOL and has been removed as a supported docker image in dotnet-buildtools-prereqs-docker
* Replace -latest tags with new tag schema
* Move tests off eol docker containers
* Update the images in the new infra
Parker Bibus [Tue, 1 Nov 2022 20:00:32 +0000 (13:00 -0700)]
Update the Nuget Config used for Maui net6 apps. (#77739)
MSDN.WhiteKnight [Tue, 1 Nov 2022 19:29:00 +0000 (00:29 +0500)]
Add readmes for configuration packages, part 1 (#77733)
Brian Bohe [Tue, 1 Nov 2022 18:43:57 +0000 (11:43 -0700)]
Fixing VarLocInfo on JITDUMP (#77700)
Co-authored-by: Brian Bohe <brianbohe@microsoft.com>
Aaron Robinson [Tue, 1 Nov 2022 18:41:39 +0000 (11:41 -0700)]
Update mask for lookup of `this` in CCW `ComWrappers` scenario (#77302)
* Expand ComWrappers mask for vtable lookup on 64-bit
Pavel Savara [Tue, 1 Nov 2022 18:20:59 +0000 (19:20 +0100)]
[wasm] browser profiler (#77449)
* wip
* wip
* cleanup
* feedback
* feedback
Aaron Robinson [Tue, 1 Nov 2022 18:07:42 +0000 (11:07 -0700)]
Update SuperPMI artifact logging (#77685)
* Update SuperPMI artifact logging
Ankit Jain [Tue, 1 Nov 2022 17:48:32 +0000 (13:48 -0400)]
[wasm] Fix analyzer support in templates (#77704)
- Add
`[assembly:System.Runtime.Versioning.SupportedOSPlatform("browser")]`
to the browser, and console templates. This would allow the analyzers,
if enabled, to treat the assembly as one that will run only on
browser.
- Populate `@(SupportedPlatform)` with only `browser`, for *wasm*
projects, similar to https://github.com/dotnet/sdk/blob/
fef8cedfb6b4ac85a7e135f3e4f155e29cdcbdf1/src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets#L75-L79
- This also fixes the firefox CI build which regressed recently
Egor Bogatov [Tue, 1 Nov 2022 16:32:17 +0000 (17:32 +0100)]
Run dotnet-format for ThunkGenerator (#77715)
Kevin Jones [Tue, 1 Nov 2022 16:17:48 +0000 (12:17 -0400)]
Improve WoA workflow documentation (#77691)
* Recommend using Visual Studio's ninja
Jakob Botsch Nielsen [Tue, 1 Nov 2022 16:15:55 +0000 (17:15 +0100)]
Update some documentation (#77711)
* Update references to Ngen variants of JIT environment variables
* Update crossgen to crossgen2
* SPC instead of mscorlib
dotnet-maestro[bot] [Tue, 1 Nov 2022 16:04:58 +0000 (09:04 -0700)]
Update dependencies from https://github.com/dotnet/arcade build
20221028.1 (#77713)
Microsoft.DotNet.ApiCompat , 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.22524.5 -> To Version 8.0.0-beta.22528.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Steve Dunn [Tue, 1 Nov 2022 14:55:36 +0000 (14:55 +0000)]
First pass at adding a test to reproduce the problem. (#77693)
Andrew Au [Tue, 1 Nov 2022 14:50:31 +0000 (07:50 -0700)]
Avoid running R2RDump if crossgen2 failed (#77705)
Jakob Botsch Nielsen [Tue, 1 Nov 2022 13:15:18 +0000 (14:15 +0100)]
Update a few dependencies (#77678)
Fix some component governance warnings.
Alan Hayward [Tue, 1 Nov 2022 12:40:41 +0000 (12:40 +0000)]
Arm64: Add If conversion pass (#73472)
* Arm64: Add If conversion pass
* Minor review fixups
* Return a PhaseStatus
* Fix formatting
* Check for side effects on NOPs
* Add function block comments for the phase
* Remove creation of AND chains from if conversion pass
* Update middleBlock flow
* Check for order side effects
* Remove COLON_COND check
* Remove flag toggling
* Move the conditional assignment to the JTRUE block
* Fix formatting
* Allow conditions with side effects
* Fix formatting
* Correct all moved SSA statements
* Add size costing check
* Only move middle block ssa defs
* Fix formatting
* Fewer SSA assumptions
* Use implicit func for value numbering
* Update header for gtFoldExprConditional
* Cost based on speed
* Add Stress mode for inner loops
* Rework costings
* Check for invalid VNs
* Ignore compares against zero
* Ensure float compares are contained
* Allow if conversion of test compares
* Do not contain test compares within compare chains
* Add float versions of the JIT/opt/Compares tests
* Fix formatting
* Compare chains use CmpCompares, selects use Compares
* Fix flow checking for empty blocks
* Fix to contexts setting JitStdOutFile
* Fix attr and reg producing in select generation
SingleAccretion [Tue, 1 Nov 2022 10:15:31 +0000 (13:15 +0300)]
Delete a bit of dead code (#77655)
Mostly I was after the FP morphing, but removed some other things along the way as well.
No diffs except a nice TP boost as expected.
Egor Bogatov [Tue, 1 Nov 2022 08:41:52 +0000 (09:41 +0100)]
Fold bound checks for static readonly arrays/strings (#77593)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
Vladimir Sadov [Tue, 1 Nov 2022 06:58:35 +0000 (23:58 -0700)]
Switch CoreCLR WeakReference to unified managed implementation (#77196)
* Delete managed CoreClr WR
* all but com works
* COM tests are passing
* HandleTagBits const for NativeAot
* Exclusive Set
* fix
* Use sign bit
* Platforms not supporting COM can mask only one bit.
* new approach
* fix mono build
* check for FEATURE_COMWRAPPERS too
* stub NativeAOT support (NYI).
* current
* moved handle tags on the managed side to one location
* Getter optimizations
* Optimizations for Setter
* accessibility of some members
* ensure identity of the rehydrated RCW
* make ComWeakRefToObject a QCall
* delete unused pWeakReferenceOfTCanonMT and pWeakReferenceMT
* byte-aligned
* cleanup unreachable code
* renamed WeakReferenceObject::m_Handle -> WeakReferenceObject::m_taggedHandle
* Apply suggestions from code review
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* some PR feedback
* GetWeakHandle no longer cares about inlining.
* turn ObjectToComWeakRef into a QCall
* revert changes under coreclr\gc
* added a note to eventually remove HNDTYPE_WEAK_NATIVE_COM
* Update src/coreclr/gc/gcinterface.h
Co-authored-by: Maoni Stephens <Maoni0@users.noreply.github.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Maoni Stephens <Maoni0@users.noreply.github.com>
Elinor Fung [Tue, 1 Nov 2022 03:54:02 +0000 (20:54 -0700)]
Add doc describing well-known properties that the host can pass to the runtime (#76732)
Neale Ferguson [Tue, 1 Nov 2022 02:33:16 +0000 (22:33 -0400)]
Correct minimum memory size value from 200MB to 20MB (#77682)
Filip Navara [Tue, 1 Nov 2022 02:13:03 +0000 (19:13 -0700)]
Don't generate extra structure record in debugging information for enums. (#77684)
Will Smith [Tue, 1 Nov 2022 02:07:38 +0000 (19:07 -0700)]
[JIT] x86/x64 - improved localloc codegen in some cases (#76851)
Andy Ayers [Tue, 1 Nov 2022 02:00:48 +0000 (19:00 -0700)]
JIT: introduce some SSA accounting and checking (#77055)
Record some information about each SSA def and try and keep it conservatively
correct through the first few optimization phases.
We note:
* total number of uses
* whether all uses are in the same block as the def
* whether there are any phi uses
Subsequent phases that introduce new uses must now call `optRecordSsaUses` on
the new trees they create to update these accounts.
This information is cross-checked versus the IR in post phase checking.
Because we don't have a well-defined mechanism to track when nodes are deleted
the recorded counts may end up being overestimates in subsequent phases. This is
ok, but underestimates are flagged as errors.
Aaron Robinson [Tue, 1 Nov 2022 01:01:57 +0000 (18:01 -0700)]
Remove Metadatatracker (#77701)
This was mechanism for IBC to track metadata access.
It is no longer used.
Roman Marusyk [Tue, 1 Nov 2022 00:03:24 +0000 (02:03 +0200)]
Trim trailing SP and HTAB for header value on HTTP/1.1 (#77030)
* Trim trailing SP and HTAB for header value on HTTP/1.1
* Fix condition
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Add tests
* Update src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.cs
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
Jonas Nyrup [Mon, 31 Oct 2022 23:59:17 +0000 (00:59 +0100)]
Exclude param/return/exception tags from summary (#77686)
This fixes Visual Studio tooltip rendering e.g. parameter documentation as part
of the method summary.
Aaron Robinson [Mon, 31 Oct 2022 22:23:25 +0000 (15:23 -0700)]
Fix non-standard modifers of printf in gc (#77627)
Zoltan Varga [Mon, 31 Oct 2022 22:14:06 +0000 (18:14 -0400)]
[mono] Add LLVM documentation. (#77445)
SingleAccretion [Mon, 31 Oct 2022 20:17:53 +0000 (23:17 +0300)]
Add explicit null checks for zero-offset struct fields (#77641)
MSDN.WhiteKnight [Mon, 31 Oct 2022 19:07:52 +0000 (00:07 +0500)]
Fix link in System.Collections.Immutable readme (#77687)
Andrew Au [Mon, 31 Oct 2022 18:57:36 +0000 (11:57 -0700)]
Avoid duplicated read (#77577)
Badre BSAILA [Mon, 31 Oct 2022 18:48:52 +0000 (19:48 +0100)]
emit branchless form of (i >= 0 && j >= 0)/(i!=0&& j!= 0) for signed integers (#62689)
* emit branchless form of (i >= 0 && j >= 0)/(i!=0&& j!= 0) for signed integers
* drop unsigned ops
* apply the proposed condition
* check if we are having reverse bool operation
* delete obsolete comment
Co-authored-by: Andy Ayers <andya@microsoft.com>
Thays Grazia [Mon, 31 Oct 2022 17:59:15 +0000 (14:59 -0300)]
[wasm][debugger] Never send messages from our internal protocol extensions to the browser (#77616)
* ignore messages from protocol extensions even for unknown context
* Addressing @radical comments
* adressing @radical comments
* adressing @radical comments
hangy [Mon, 31 Oct 2022 17:47:28 +0000 (18:47 +0100)]
Move Interop code from System.Drawings.Common to Common directory (#77565)
* Move Library names to Common directory
* Move ExtractAssociatedIcon P/Invoke to Interop.ExtractAssociatedIcon.cs
* Move PrintDlg P/Invoke to Interop.PrintDlg.cs
* Move Kernel32 P/Invoke to Interop.*.cs
* Move Winspool P/Invoke to Interop.*.cs
* Move User32 P/Invoke to Interop.*.cs
* Move Gdi32 P/Invoke to Interop.*.cs
Steve Pfister [Mon, 31 Oct 2022 16:38:04 +0000 (12:38 -0400)]
[Workloads] Add UsingMobileWorkload property to control loading net7 packs (#77489)
Fixes https://github.com/dotnet/runtime/issues/77385
Eric Erhardt [Mon, 31 Oct 2022 15:42:48 +0000 (10:42 -0500)]
Fix inconsistency in Regex infinite timeout usages (#77560)
In the Regex source generator, there is an inconsistency in which "timeout constant" we are comparing against vs. which constant we are setting when the timeout isn't specified.
Fixing it to always use Regex.InfiniteMatchTimeout.
Nathan Ricci [Mon, 31 Oct 2022 15:25:18 +0000 (11:25 -0400)]
[MONO][MARSHAL] Initialize ilgen with a flag (#77448)
Use flag to initilize ilgen, instead of doing it lazily.
SingleAccretion [Mon, 31 Oct 2022 14:19:27 +0000 (17:19 +0300)]
Fold full-width SIMD-typed indirections (#76745)
* Fold simple SIMD indirs in local morph
* Fix various downstream bugs
We should really delete the SIMD "InitObj" IR form,
but that change had some unfortunate regressions to
it, so, for now, just make it work reliably.
* Delete code
* Fix args morphing
Consider a promoted two-field HFA stack argument on ARM64.
This argument needs to be processed by multi-reg morphing,
so that it is transformed into a FIELD_LIST, otherwise it
would end up independently promoted yet appear in the IR
as a LCL_VAR.
That was not happening because the number of stack slots
consumed by such an argument is 1 (8 bytes), and the number
of registers is zero (naturally).
As the fix, use the more obviously correct check based
on "structBaseType" to detect when we need to invoke
multi-reg morphing.
No diffs.
Ilona Tomkowicz [Mon, 31 Oct 2022 13:09:40 +0000 (14:09 +0100)]
[wasm][debugger] Support indexing by non-numbers (#76065)
* Partial support with non-refactored approach.
* Refactor of 1d indexing with indexObject.
* More complex test case to check if char cast to int is necessary.
* Typo.
* Refactored indexing with LiteralExpressionSyntax.
* Cleanup.
* Removed a bit of nesting.
* Missing merge change.
* Extracting a local function to get index info.
* Applied remaining changes suggested by @radical.
* Applied @radical's enhancements.
Mitchell Hwang [Mon, 31 Oct 2022 12:25:26 +0000 (20:25 +0800)]
[build] Enable CodeQL with TSA (#76751)
* [SDL] Enable CodeQL in separate pipeline with TSA
* Address feedback
* Move CodeQL manual tasks
* [build] Move internal variables to template
* Guard Manual CodeQL tasks with isSourceBuild
Huo Yaoyuan [Mon, 31 Oct 2022 09:24:29 +0000 (17:24 +0800)]
Delete some unused files and functions from clr pal (#77112)
* Delete unused coreclr\tools\util
* Delete palrt/path.cpp
* Cleanup strsafe.h
* Delete nls.h
* Delete shlwapi.h
* Cleanup shlwapi leftovers
* Delete winnls.h
* Delete wincrypt.h
* Delete weakreference.h
* Delete tchar.h
* Add back wincrypt used in assembly.cpp
* Delete psapi.h
* Remove use of shlwapip.h
* Revert "Delete weakreference.h"
This reverts commit
4990d0344c48abd6fd7b6a83a072e0e1c31e69c1.
* Revert changes in wincrypt.h
MSDN.WhiteKnight [Sun, 30 Oct 2022 21:22:04 +0000 (02:22 +0500)]
Add package readme for Microsoft.Extensions.Configuration.Binder (#77649)
Tarek Mahmoud Sayed [Sun, 30 Oct 2022 17:36:44 +0000 (10:36 -0700)]
Fix Binding with IDictionary<,> implementer types (#77582)
Eriawan Kusumawardhono [Sun, 30 Oct 2022 01:00:48 +0000 (08:00 +0700)]
update instruction to build, test, and get code coverage result to use correct folder for .NET libraries incode-coverage.md (#77643)
Ankit Jain [Sun, 30 Oct 2022 00:44:54 +0000 (20:44 -0400)]
[wasm] Run debugger tests with one work item per test class (#77417)
The tests take more than an hour to run as a single helix work item, so run the test classes in parallel on helix.
Also, move the debugger specific bits in `sendtohelix-wasm.targets` to a `wasm.helix.targets` next to the debugger tests.
Jakob Botsch Nielsen [Sat, 29 Oct 2022 16:38:27 +0000 (18:38 +0200)]
JIT: Stop propagating BBF_SPLIT_FLAGS from inlinee's parent (#77600)
Elinor Fung [Sat, 29 Oct 2022 14:54:08 +0000 (07:54 -0700)]
Delete special-casing of .obj/.tlb (FILETYPE_NTOB/FILETYPE_TLB) (#77626)
* Delete special-casing of .obj/.tlb (FILETYPE_NTOB/FILETYPE_TLB)
* Unused function
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Michal Strehovský [Sat, 29 Oct 2022 14:52:43 +0000 (23:52 +0900)]
Remove libstdc++ dependency on NativeAOT-Bionic (#77629)
Jan Kotas [Sat, 29 Oct 2022 04:44:58 +0000 (21:44 -0700)]
Fix source-build prebuilts introduced by analyzers (#77607)
* Fix source-build prebuilts introduced by analyzers
Use the default root settings for analyzers and disable analyzers for specific projects that are not clean instead.
* Fix analyzer warnings in ILCompiler.Build.Tasks
Fixes #77601
Stephen Toub [Fri, 28 Oct 2022 23:30:52 +0000 (19:30 -0400)]
Use char helpers for ASCII portion of Regex character class matching (#77604)
If the entire character class is ASCII, we already use char.IsXx helpers when they're equivalent, e.g. [A-Z] will result in using char.IsAsciiLetterUpper. But if the character class contains any non-ASCII, we always use a lookup table for the ASCII portion of the comparison. This PR allows us to similarly use those IsAsciiXx helpers for the ASCII portion.
Brian Bohe [Fri, 28 Oct 2022 22:00:26 +0000 (15:00 -0700)]
Avoiding printing twice variable live range (#77447)
Co-authored-by: Brian Bohe <brianbohe@microsoft.com>