Aleksey Kliger (λgeek) [Fri, 10 Jun 2022 04:22:27 +0000 (00:22 -0400)]
[wasm] Add infrastructure for building WebWorkers (#70220)
* [wasm] Add infrastructure for building WebWorkers
- Modify the rollup.config.js script to look for webworkers and to
roll them up into IIFE js files in the ${nativeBinDir}/src artifacts
directory
- A "webworker" is any file in `src/mono/wasm/runtime/workers/` that
looks like `dotnet-{workerName}-worker.ts` or `.js`. It can also
include other files (ideally by defining them in files in
subdirectories for that worker
`src/mono/wasm/runtime/workers/dotnet-{workerName}-worker/utility.ts`)
- Other changes still have to be done manually in wasm.proj, and
elsewhere in order to place the bundled JS file in the right place.
- Adds a tsconfig.json for the workers to typecheck using the
DedicatedWorkerGlobalScope and without the DOM globals (`window`, etc)
- This doesn't convert dotnet-crypto-worker.js into TypeScript, but it
does turn on TypeScript checking using a JSDoc comment.
To convert that file to typescript:
1. rename `workers/dotnet-crypto-worker.js` to
`workers/dotnet-crypto-worker.ts`
2. replace uses of `var` by `let` or `const`
3. add `:any` in various places.
* use fast-glob instead of fs.readdir
* add fast-glob to devDependencies
Zoltan Varga [Fri, 10 Jun 2022 01:39:03 +0000 (21:39 -0400)]
[mono][wasm] Add a 'wasm-gc-safepoints' option to enable the generation of GC safe points in AOTed code on WASM. (#70520)
Ankit Jain [Fri, 10 Jun 2022 01:09:07 +0000 (21:09 -0400)]
[wasm][nodejs] Ensure that stdout/stderr have been flushed out before exiting (#70416)
When the results xml is large, and we are writing the base64
representation in one line, `node` can exit before all the output gets
flushed out. This results in xharness getting an incomplete
`STARTRESULTXML <len> <base64> ... ` with missing `ENDRESULTXML`, thus
no `testResults.xml` is generated.
This can be seen in the case of `Microsoft.Extensions.Primitives.Tests`
which has xml ~140KB, and `System.Memory.Tests` which has a xml ~13MB.
So, wait for the two streams to be flushed out, with a timeout of 3secs.
- use the `drain` event only if `stream.write('')` returns `false`
* Address review feedback @kg, @maraf
Tlakaelel Axayakatl Ceja [Fri, 10 Jun 2022 00:07:05 +0000 (17:07 -0700)]
Add basic testing infrastructure in NativeAOT (port from dotnet/linker) (#70408)
Add basic testing infrastructure in NativeAOT (port from dotnet/linker)
- Port the Mono.Linker.Tests* projects from dotnet/linker
- Add the new projects to .editorconfig so they remain under the dotnet/linker format instead of dotnet/runtime
- clr.toolstests subset now runs the Mono.Linker.Tests infrastructure
- Make DisplayNameHelpers a public class so it can be used by the test infrastructure
- Add a couple of simple test cases (Dataflow and Requires) along with a Repro test, just like the repro project the repro test serves prototyping purposes
- Adds ProducedBy.NativeAOT to be able to represent differences between dotnet/linker and NativeAOT (either because of a bug or because NativeAOT correctly produces additional warnings)
- Use MSBuild properties instead of trying to figure out with linker paths
Buyaa Namnan [Thu, 9 Jun 2022 22:25:37 +0000 (15:25 -0700)]
Update analyzer version and fix new findings (#70157)
Ivan Povazan [Thu, 9 Jun 2022 22:09:41 +0000 (00:09 +0200)]
Update disabled tests details with newly created issues (#70493)
Andy Gocke [Thu, 9 Jun 2022 22:05:30 +0000 (15:05 -0700)]
Merge pull request #70401 from dotnet/darc-main-
fe02c49f-0b42-470f-be36-
18cf3ef8aacb
[main] Update dependencies from dotnet/linker
SingleAccretion [Thu, 9 Jun 2022 21:21:38 +0000 (00:21 +0300)]
Set `UnusedValue` correctly for the operands of `ARR_ADDR`/`BOX` (#70498)
* Add a test
* Fix the issue
Koundinya Veluri [Thu, 9 Jun 2022 21:20:22 +0000 (14:20 -0700)]
Modify thread pool thread counting to be a bit more defensive (#70478)
* Modify thread pool thread counting to be a bit more defensive
- An unexpected underflow in one or more thread counts can lead to a large number of threads to be created continually
- Prevented underflows in changes to thread counts, such that following an unexpected underflow, subsequent paired increments and decrements would avoid repeating the underflow
- Verified by creating an unexpected underflow in the debugger
Steve Harter [Thu, 9 Jun 2022 20:45:24 +0000 (15:45 -0500)]
Modify tests to distinguish between emit- and interpreted-based invoke (#70114)
Stephen Toub [Thu, 9 Jun 2022 20:09:33 +0000 (16:09 -0400)]
Enable IDE0110 (Remove unnecessary discard) (#70500)
Ankit Jain [Thu, 9 Jun 2022 19:18:42 +0000 (15:18 -0400)]
[wasm] Fix passing `shouldContinueOnError` through for the library tests (#70494)
The new `Threading*` CI jobs on `runtime-wasm` use `shouldContinueOnError: false` because the tests are known to be unstable right now. But they were not getting correctly forwarded to the base templates.
Steve Dunn [Thu, 9 Jun 2022 19:14:03 +0000 (20:14 +0100)]
Support immutable types with configuration binding (#67258)
Merging. Thanks @SteveDunn for your contribution.
dotnet-maestro[bot] [Thu, 9 Jun 2022 18:55:29 +0000 (20:55 +0200)]
[main] Update dependencies from dotnet/arcade (#69643)
* Update dependencies from https://github.com/dotnet/arcade build
20220519.3
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22269.3
* Update dependencies from https://github.com/dotnet/arcade build
20220523.1
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22273.1
* Update dependencies from https://github.com/dotnet/arcade build
20220524.3
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22274.3
* Update dependencies from https://github.com/dotnet/arcade build
20220524.7
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22274.7
* Update dependencies from https://github.com/dotnet/arcade build
20220525.1
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22275.1
* Update dependencies from https://github.com/dotnet/arcade build
20220525.2
Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
From Version 2.5.1-beta.22255.2 -> To Version 2.5.1-beta.22275.2
* Update dependencies from https://github.com/dotnet/arcade build
20220526.1
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22276.1
* Update dependencies from https://github.com/dotnet/arcade build
20220530.2
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22280.2
* Update dependencies from https://github.com/dotnet/arcade build
20220531.1
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22281.1
* Update dependencies from https://github.com/dotnet/arcade build
20220601.2
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22301.2
* Update dependencies from https://github.com/dotnet/arcade build
20220606.1
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22306.1
* Update dependencies from https://github.com/dotnet/arcade build
20220606.2
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22306.2
* Update dependencies from https://github.com/dotnet/arcade build
20220608.5
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 7.0.0-beta.22255.2 -> To Version 7.0.0-beta.22308.5
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Premek Vysoky <premek.vysoky@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Andy Gocke [Thu, 9 Jun 2022 18:28:23 +0000 (11:28 -0700)]
Manually skip IL2118
Tomáš Rylek [Thu, 9 Jun 2022 18:06:07 +0000 (20:06 +0200)]
Fix Crossgen2 PDB generator (#70407)
* Fix Crossgen2 PDB generator
During my perf investigation work I have found out that PDB emitter
in Crossgen2 is broken. I tracked this down to the change
https://github.com/dotnet/runtime/commit/
fdf6485c800ec580656d7491795e10881d493afb#diff-24e48862e3b82f52e7fa04f22700b1c976a012bfeb08a246406f4e5ec579699b
that caused two behavioral changes in the PDB emitter:
1) The logic around QueryPDBNameEx got refactored to use a char[]
instead of a StringBuilder and that silently caused _pdbFilePath
to be set to the string "System.Char[]" instead of the actual path
(cf PdbWriter.cs#221 in the quoted commit).
2) The COM wrapper refactoring ended up bumping the refcount
on the _ngenWriter by one so that it never got actually closed
and properly flushed; due to this the resulting PDB was invalid.
Thanks
Tomas
Jakob Botsch Nielsen [Thu, 9 Jun 2022 17:37:34 +0000 (19:37 +0200)]
JIT: Unspecialize handle types after arithmetic ops in VN (#70452)
VN was retaining the precise handle types when applying arithmetic
operations to handles. This meant that we could not rely on handles of
types like GTF_ICON_METHOD_HDL actually containing an embedded method
handle after constant propagation.
This change generalizes the handle type to GTF_ICON_CONST_PTR or
GTF_ICON_GLOBAL_PTR whenever VN does anything that semantically
"unassociates" the icon from the specialized handle type.
Ankit Jain [Thu, 9 Jun 2022 17:29:41 +0000 (17:29 +0000)]
[wasm] fix test failing when trimming
```
[06:37:05] fail: [FAIL] System.Diagnostics.Tests.StopwatchTests.DebuggerAttributesValid
[06:37:05] info: System.InvalidOperationException : Expected one DebuggerDisplayAttribute on System.Diagnostics.Stopwatch.
[06:37:05] info: at System.Diagnostics.DebuggerAttributes.ValidateDebuggerDisplayReferences(Object obj)
[06:37:05] info: at System.Diagnostics.Tests.StopwatchTests.DebuggerAttributesValid()
[06:37:05] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
```
Fixed by preserving the `DebuggerDisplayAttribute`.
Ankit Jain [Thu, 9 Jun 2022 16:35:10 +0000 (16:35 +0000)]
[wasm] Disable all trim warnings for tests, when using
.. `EnableAggressiveTrimming=true`, since the tests are not expected to
be trim-safe.
Based on @vitek-karas' suggestion.
Stephen Toub [Thu, 9 Jun 2022 14:26:30 +0000 (10:26 -0400)]
Enable nullable for Microsoft.Bcl.AsyncInterfaces (#70454)
* Enable nullable for Microsoft.Bcl.AsyncInterfaces
* Apply suggestions from code review
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Ilona Tomkowicz [Thu, 9 Jun 2022 14:09:02 +0000 (16:09 +0200)]
Added tests for static DIM. (#70138)
Radek Zikmund [Thu, 9 Jun 2022 13:48:04 +0000 (15:48 +0200)]
Disable UnixDomainSocketTest.FilePathEquality test on tvOS and iOS (#70471)
Kevin Jones [Thu, 9 Jun 2022 13:46:52 +0000 (09:46 -0400)]
Dispose algorithm for linux (#70458)
Tomas Weinfurt [Thu, 9 Jun 2022 13:45:52 +0000 (15:45 +0200)]
remove extra GC.SuppressFinalize from SslStream (#70467)
Zoltan Varga [Thu, 9 Jun 2022 09:37:05 +0000 (05:37 -0400)]
[mono][llvm] Make calls from the cold cconv wrappers through the PLT. (#70449)
Some of the calls go through the trampoline infrastructure, which
cannot patch indirect calls made through GOT slots, causing crashes
in the MONO_ARCH_CODE_EXEC_ONLY case.
Andy Gocke [Thu, 9 Jun 2022 04:59:33 +0000 (21:59 -0700)]
Add RUC
Aaron Robinson [Thu, 9 Jun 2022 04:58:43 +0000 (21:58 -0700)]
Remove SAFEARRAY APIs from PAL (#70462)
* Remove SAFEARRAY APIs from pal
Stephen Toub [Thu, 9 Jun 2022 04:23:35 +0000 (00:23 -0400)]
Enable IDE0074 (Use compound assignment) (#70402)
Stephen Toub [Thu, 9 Jun 2022 02:42:19 +0000 (22:42 -0400)]
Remove <Nullable>disable/annotations</Nullable> from test projects (#70455)
Sven Boemer [Thu, 9 Jun 2022 00:39:48 +0000 (17:39 -0700)]
Add using
Vladimir Sadov [Thu, 9 Jun 2022 00:28:12 +0000 (17:28 -0700)]
[NativeAOT] Asynchronous thread suspension at GC safe points on Windows (#70316)
* simple case works
* FEATURE_SUSPEND_REDIRECTION
* AVX support
* refactor
* no need for asm
* ARM64
* stub `IsSafePoint` on Unix
* revert unnecessary changes to RhpGcPoll2
* no copy of redirect context
* Specialcase active frames in EnumGcRefs
* remove bogus assert.
Carlos Sanchez [Thu, 9 Jun 2022 00:17:29 +0000 (17:17 -0700)]
Bump intellisense version to Preview4 (#70459)
Sven Boemer [Thu, 9 Jun 2022 00:08:25 +0000 (17:08 -0700)]
Suppress trim warnings in tests
Zoltan Varga [Thu, 9 Jun 2022 00:02:59 +0000 (20:02 -0400)]
[mono][jit] Fix an assertion on x86+android. (#70451)
Fixes https://github.com/dotnet/runtime/issues/70302.
Egor Bogatov [Wed, 8 Jun 2022 22:44:50 +0000 (00:44 +0200)]
JIT: Handle enums in box-unbox optimization
Mike McLaughlin [Wed, 8 Jun 2022 22:34:21 +0000 (15:34 -0700)]
Remove the pid argument on Windows createdump only take dumps of the parent process (#68877)
Issue: https://github.com/dotnet/runtime/issues/42646
Filip Navara [Wed, 8 Jun 2022 21:59:38 +0000 (23:59 +0200)]
Fix unit test example (#70457)
Huo Yaoyuan [Wed, 8 Jun 2022 21:58:11 +0000 (05:58 +0800)]
Guard COM exception marshaling under FEATURE_COMINTEROP (#70431)
* Guard FillVariant under FEATURE_COMINTEROP
* Guard COM exception information under FEATURE_COMINTEROP
* Remove TypeNameBuilder::ToString(BSTR)
* Remove the whole EECOMException type when COM interop is disabled
* Guard more ExceptionData usage under FEATURE_COMINTEROP
* Guard BSTRHolder under FEATURE_COMINTEROP
* Remove Unix BSTR simulation in palrt
* Add guard to COMException::GetMessage
Stephen Toub [Wed, 8 Jun 2022 21:52:43 +0000 (17:52 -0400)]
Remove some unnecessary regex NonBacktracking code (#70364)
* Remove some unnecessary regex NonBacktracking code
Move some debug-only code to #if DEBUG, remove other dead code, and clean up a few things that are unnecessary. Also add a few tests to fill out some code coverage results, and address some style-related comments from a recently merged PR.
* Address PR feedback
* Fix non-deterministic threading-related failures in regex tests
If the wrong tests run concurrently, they can end up seeing a changed NFA safe limit from another test.
David Wrighton [Wed, 8 Jun 2022 20:28:23 +0000 (13:28 -0700)]
Increase precision and safety of the NonVersionableAttribute (#70327)
* Increase precision and safety of the NonVersionableAttribute
- NonVersionable now only unconditionally affects whether or not the IL is reported as inlined in the inlining data
- Primitive types are now implicitly considered to be NonVersionable
- Classes defined in CoreLib may now be considered to be NonVersionable
- Classes now marked are String, RawData, and RawArrayData, which are all tied into intrinsics in crossgen2
- NFloat is now marked as NonVersionable so that some of its methods may actually be treated as NonVersionable
- There is now an additional predicate that the IL within the NonVersionable method must satisfy a series of tests to ensure that it can safely be inlined without adding additional tokens for the logic to depend on. See below for the details of the predicate
Collectively these changes make it so that even if we change our inlining rules, the NonVersionable marked methods will successfully pass through Crossgen, without generating requiring tokens from their original modules to be present in the final image.
The rules are:
// 1. ldfld, ldflda, and stfld to instance fields of NonVersionable structs and NonVersionable classes
// 2. cpobj, initobj, ldobj, stobj, ldelem, ldelema or sizeof, to NonVersionable structures, signature variables, pointers, function pointers, byrefs, classes, or arrays
// 3. stelem, to NonVersionable structures
// In addition, the method must not have any EH.
// The method may only have locals which are NonVersionable structures, or classes
* Address code review feedback
Steve Pfister [Wed, 8 Jun 2022 19:50:13 +0000 (15:50 -0400)]
[wasm] Add legs to build wasm with internal threads only and full threading enabled (#68787)
This change adds two build-only lanes to `runtime` and two full build+test lanes to `runtime-wasm` that builds wasm with internal threads only (`WasmEnablePerfTracing`) and full threading (`WasmEnableThreads`).
The `runtime-wasm` additions can only be manually triggered at this time.
Co-authored-by: Aleksey Kliger (λgeek) <alklig@microsoft.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Kevin Jones [Wed, 8 Jun 2022 18:48:31 +0000 (14:48 -0400)]
Remove old macOS compatibility code for RSA decryption
dotnet-maestro[bot] [Wed, 8 Jun 2022 18:33:33 +0000 (18:33 +0000)]
Update dependencies from https://github.com/dotnet/linker build
20220608.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22306.1 -> To Version 7.0.100-1.22308.1
Aaron Robinson [Wed, 8 Jun 2022 17:47:42 +0000 (10:47 -0700)]
Convert assert to exception for loading native libraries (#70319)
* Convert incorrect assert for loading relative paths to native libraries
* Reenable PMI running on InteropServices tests.
Jakob Botsch Nielsen [Wed, 8 Jun 2022 17:29:55 +0000 (19:29 +0200)]
Avoid unnecessary normalization for GT_RET_EXPR (#70340)
We can use type info from GT_RET_EXPR nodes when deciding whether we
need to normalize on a return.
Fix #70334
We could also consider typing these GT_RET_EXPR nodes with the actual
type of the call, though I am unsure if we want to introduce more
small-typed nodes.
Huo Yaoyuan [Wed, 8 Jun 2022 17:16:04 +0000 (01:16 +0800)]
Don't call RuntimeHelper.Equals in Object.Equals (#70420)
* Don't call RuntimeHelper.Equals in Object.Equals
* Update src/libraries/System.Private.CoreLib/src/System/Object.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Jo Shields [Wed, 8 Jun 2022 17:09:59 +0000 (13:09 -0400)]
Include `include` folder in runtime pack on all Mono platforms (#69719)
Closes: #46461
SingleAccretion [Wed, 8 Jun 2022 16:26:01 +0000 (19:26 +0300)]
Delete a zero-diff quirk and update `INDEX`-related comments (#70398)
* Delete a zero-diff quirk
* Also update some comments
Removing GT_INDEX/ADDR(IND) references.
Eric Erhardt [Wed, 8 Jun 2022 16:19:04 +0000 (11:19 -0500)]
Remove ActiveIssue on OSVersion_ValidVersion_OSX (#70367)
* Remove ActiveIssue on OSVersion_ValidVersion_OSX
This test was fixed to work correctly on the latest macOS versions in https://github.com/dotnet/runtime/pull/64565. The test can now be re-enabled.
Fix #49106
* Verify the Minor version as well, since it is no longer being verified by the RID.
kanadaj [Wed, 8 Jun 2022 16:16:06 +0000 (17:16 +0100)]
Mark IQueryable.DefaultIfEmpty() as nullable (#69821)
* Mark IQueryable.DefaultIfEmpty() as nullable
* Update CachedReflection.cs
* Update the nullability in the reference source
Tomas Weinfurt [Wed, 8 Jun 2022 14:42:35 +0000 (16:42 +0200)]
update dogfooding instruction for 7.0 (#70423)
* update dogfooding instruction for 7.0
* update example
* Update docs/project/dogfooding.md
Co-authored-by: Martin Costello <martin@martincostello.com>
dotnet-maestro[bot] [Wed, 8 Jun 2022 12:55:36 +0000 (07:55 -0500)]
[main] Update dependencies from 8 repositories (#69709)
* Update dependencies from https://github.com/dotnet/icu build
20220523.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.5.22269.3 -> To Version 7.0.0-preview.5.22273.1
* Update dependencies from https://github.com/dotnet/xharness build
20220524.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.22270.1 -> To Version 1.0.0-prerelease.22274.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20220523.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.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 7.0.0-beta.22267.1 -> To Version 7.0.0-beta.22273.1
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220524.2
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22252.2 -> To Version 7.0.0-preview1.22274.2
* Update dependencies from https://github.com/dotnet/msquic build
20220523.2
System.Net.MsQuic.Transport
From Version 7.0.0-alpha.1.22273.1 -> To Version 7.0.0-alpha.1.22273.2
* Update dependencies from https://github.com/dotnet/icu build
20220525.2
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.5.22269.3 -> To Version 7.0.0-preview.6.22275.2
* Update dependencies from https://github.com/dotnet/emsdk build
20220525.2
Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
From Version 7.0.0-preview.5.22268.1 -> To Version 7.0.0-preview.6.22275.2
* Update dependencies from https://github.com/dotnet/xharness build
20220526.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.22270.1 -> To Version 1.0.0-prerelease.22276.1
* Update dependencies from https://github.com/dotnet/emsdk build
20220525.3
Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
From Version 7.0.0-preview.5.22268.1 -> To Version 7.0.0-preview.6.22275.3
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220527.2
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22252.2 -> To Version 7.0.0-preview1.22277.2
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20220529.1
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.22217.3 -> To Version 1.0.0-prerelease.22279.1
* Update dependencies from https://github.com/dotnet/runtime build
20220529.1
Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
From Version 7.0.0-preview.5.22272.3 -> To Version 7.0.0-preview.6.22279.1
* Update dependencies from https://github.com/dotnet/icu build
20220530.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.5.22269.3 -> To Version 7.0.0-preview.6.22280.1
* Update dependencies from https://github.com/dotnet/icu build
20220530.2
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.5.22269.3 -> To Version 7.0.0-preview.6.22280.2
* Update dependencies from https://github.com/dotnet/xharness build
20220530.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.22270.1 -> To Version 1.0.0-prerelease.22280.1
* Add manual marshalling for non-blittable delegates defined in System.Drawing.Common (which has the DisableRuntimeMarshallingAttribute applied) passed to P/Invokes.
* Update dependencies from https://github.com/dotnet/xharness build
20220601.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.22270.1 -> To Version 1.0.0-prerelease.22301.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20220531.1
Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.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 7.0.0-beta.22267.1 -> To Version 7.0.0-beta.22281.1
* Update dependencies from https://github.com/dotnet/emsdk build
20220531.1
Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
From Version 7.0.0-preview.5.22268.1 -> To Version 7.0.0-preview.6.22281.1
* Update dependencies from https://github.com/dotnet/msquic build
20220531.1
System.Net.MsQuic.Transport
From Version 7.0.0-alpha.1.22273.1 -> To Version 7.0.0-alpha.1.22281.1
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220601.1
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22252.2 -> To Version 7.0.0-preview1.22301.1
* Update dependencies from https://github.com/dotnet/msquic build
20220601.1
System.Net.MsQuic.Transport
From Version 7.0.0-alpha.1.22273.1 -> To Version 7.0.0-alpha.1.22301.1
* Move OleDB to use more manual marshalling instead of delegate marshalling.
* Update dependencies from https://github.com/dotnet/roslyn-analyzers build
20220602.1
Microsoft.CodeAnalysis.NetAnalyzers
From Version 7.0.0-preview1.22252.2 -> To Version 7.0.0-preview1.22302.1
* Update dependencies from https://github.com/dotnet/runtime build
20220605.4
Microsoft.NET.Sdk.IL , Microsoft.NETCore.App.Runtime.win-x64 , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.ILAsm , runtime.native.System.IO.Ports , System.Text.Json
From Version 7.0.0-preview.5.22272.3 -> To Version 7.0.0-preview.6.22305.4
* Update dependencies from https://github.com/dotnet/xharness build
20220605.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.22270.1 -> To Version 1.0.0-prerelease.22305.1
* Update dependencies from https://github.com/dotnet/icu build
20220606.1
Microsoft.NETCore.Runtime.ICU.Transport
From Version 7.0.0-preview.5.22269.3 -> To Version 7.0.0-preview.6.22306.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
Jakob Botsch Nielsen [Wed, 8 Jun 2022 11:59:59 +0000 (13:59 +0200)]
Stop normalizing managed calls in R2R (#70339)
We no longer need to interop with JIT64 so clean up this TODO. We are in
fact already relying on the normalization done by the callee since we
allow tailcalling that skips the inserted normalization in R2R.
Tomas Weinfurt [Wed, 8 Jun 2022 11:39:42 +0000 (13:39 +0200)]
Add support for processing Unified TLS frames (#69848)
* initial drop
* cleanup
Ilona Tomkowicz [Wed, 8 Jun 2022 09:45:10 +0000 (11:45 +0200)]
[wasm][debugger] Implement support for null-conditional operators in simple expressions (#69307)
* Basic testcase.
* Fixed non-null access to proxy-hidden members.
* Fixing the issue and adding more tests.
* Fixed a failing test: let CompileAndRunTheExpression throw.
* Blocked failing tests on firefox.
* Applied @radical's suggestions.
* Reverted indexing to fix tests.
* Reverted LastOrDefault instead of indexing + corrected names.
* Changed to throw when root name empty.
* Removing null suppression that does not change the evaluation result but fails without this change.
* Applied @radical's comments.
* Change exception on string property evaluation.
* Added @radical's suggestions.
Co-authored-by: Ankit Jain <radical@gmail.com>
SRV [Wed, 8 Jun 2022 07:58:54 +0000 (10:58 +0300)]
Implement Equals/GetHashCode for UnixDomainSocketEndPoint (#69722)
* Added impl of Equals/GetHashCode for UnixDomainSocketEP
* Fixed typo
* Fixed missing underscore
* Clarify new fields using comments
* Review feedback
* Review feedback
* Added platform verification
* Fixed sporadic test failure due to hashcode collision
Dan Moseley [Wed, 8 Jun 2022 05:26:44 +0000 (23:26 -0600)]
Disable 2 FSW tests failing only on macOS 12 (#70365)
* Disable 2 osx fsw tests
* Use ConditionalTheory
Co-authored-by: Jozkee <dacantu@microsoft.com>
Andy Ayers [Wed, 8 Jun 2022 04:28:13 +0000 (21:28 -0700)]
JIT: enable cloning based on loop invariant type tests (#70377)
Such as those added by GDV.
The JIT will now clone just for type tests, or just for array bounds, or for
a mixture of the two. The JIT will still produce just one fast and one slow loop.
If there are a mixture of array bounds and type test conditions, all conditions
must pass for control to reach the fast loop.
Unlike array bounds checks, type test failures are not intrinsically rare,
so there is some profitability screening to ensure that a failed type test does
not force execution to run the slow version "too often". The type test must
execute frequently within the loop, and be heavily biased towards success.
This is work towards resolving #65206.
Thays Grazia [Wed, 8 Jun 2022 03:33:18 +0000 (00:33 -0300)]
[wasm] [debugger] Removing usage of serilog (#70382)
* [wasm] [debugger] Adding serilog dlls
Adding serilog dlls
* Removing serilog usage for Blazor.
Andy Ayers [Wed, 8 Jun 2022 01:59:23 +0000 (18:59 -0700)]
JIT: add ability to order blocks in dump by bbNum or bbID (#70399)
By default the JIT will dump blocks in bbNext order. This adds
other ordering options, specified by `JitDumpFgBlockOrder`:
* `0 (default) bbNext`
* `1 bbNum`
* `2 bbID`
`bbID` in particular is useful when comparing JIT dumps where blocks
have been reordered but the blocks themselves have similar content.
Stephen Toub [Wed, 8 Jun 2022 00:39:41 +0000 (20:39 -0400)]
Tweak NonBacktracking condition used to employ RegexFindOptimizations (#70405)
Rather than excluding all anchors, only exclude beginning anchors.
Dan Moseley [Wed, 8 Jun 2022 00:13:12 +0000 (18:13 -0600)]
Improve Stopwatch DebuggerDisplayAttribute test (#70394)
Jan Vorlicek [Tue, 7 Jun 2022 23:31:29 +0000 (01:31 +0200)]
Remove named mutex workaround for Linux arm/arm64 (#70381)
The workaround is no longer needed as the underlying issue in
glibc was fixed in glibc 2.24 and the minimum glibc we now
support is 2.27.
Sven Boemer [Tue, 7 Jun 2022 23:25:56 +0000 (16:25 -0700)]
Suppress trim warnings
For trim annotations which reference compiler-generated code
dotnet-maestro[bot] [Tue, 7 Jun 2022 21:17:56 +0000 (21:17 +0000)]
Update dependencies from https://github.com/dotnet/linker build
20220607.2
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22306.1 -> To Version 7.0.100-1.22307.2
Andy Ayers [Tue, 7 Jun 2022 20:56:31 +0000 (13:56 -0700)]
JIT: remove loop if `lpTop` becomes unreachable (#70324)
We may be able to prune the backedge of a middle-entry loop (one where
`lpEntry != lpTop`). Extend `optUpdateLoopsBeforeRemoveBlock` to handle
this case.
Fixes #69938.
dotnet-maestro[bot] [Tue, 7 Jun 2022 19:51:11 +0000 (14:51 -0500)]
Update dependencies from https://github.com/dotnet/hotreload-utils build
20220606.2 (#70345)
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.1.0-alpha.0.22281.2 -> To Version 1.1.0-alpha.0.22306.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Ankit Jain [Tue, 7 Jun 2022 19:40:11 +0000 (15:40 -0400)]
[wasm] Fix Wasm.Build.Tests test failures on windows (#70328)
* [wasm] Workaround a python bug which can cause em* scripts to hang
Issue - https://github.com/emscripten-core/emscripten/pull/15146
Emscripten added a workaround enabled by setting
the environment variable - `EM_WORKAROUND_PYTHON_BUG_34780`.
* [wasm] Wasm.Build.Tests - use a local copy of `dotnet`
.. to avoid conflicting with other instances on helix.
* don't log output from robocopy
Wraith [Tue, 7 Jun 2022 19:36:45 +0000 (20:36 +0100)]
JIT: Remove unneeded unconditional jumps (#69041)
* resolve merge conflict
* add checks for post-call jmp removal
* use emitIsLastInsCall() to preclude call,jmp pairs and simplfy emitRemoveJumpToNextInst
check for aligned instruction groups and skip them to preserve alignment
linearize emitRemoveJumpToNextInst, add safety asserts for ordering and comment the requirement, add debug output explaining decisions
* address feedback
* change instruction omit to use code size zero
* address feedback
* add assertion info dump
* address feedback
* address feedback
* remove end loop cleanup. cleanup jitdump messages and add early out flag.
* address feedback, formatting
* update variable naming and clarify comments
* more feedback
* add last instruction check and group flag set in emitSavIG
* more feedback
* fix jitdump output and make removal candidate printing optional
* remove emitDispJumpList parameter
* change overall size calculation and allow 0 size align to be printed in dumps
* fix invorrect jmp check, remove inline for emitInstHasNoCode
* allow alignment printing even when zero
* remove debug printf and fix x86
* address feedback
Jan Kotas [Tue, 7 Jun 2022 19:07:23 +0000 (12:07 -0700)]
Clarity atomicity guarantees in ECMA-335 (#70384)
Vitek Karas [Tue, 7 Jun 2022 18:41:39 +0000 (11:41 -0700)]
Update shared code from linker (#70204)
This brings in relatively recent version of the shared code from the dotnet/linker repo.
Main changes:
* ValueNode -> SingleValue - and the partial classes implementation for the values
* Adapt MethodBodyScanner to the SingleValue/MultiValue
* Includes some fixes around array handling and unknown values
* Removal of ReflectionPatternContext
* Partially replaced by DiagnosticContext
* Partially removed (the checks that everything reports something are nto needed anymore)
* Use HandleCallAction and RequireDynamicallyAccessedMembersAction - this replaces most of the functionality in ReflectionMethodBodyScanner.
Formatting:
The files which are shared exactly from linker are kept as is (so tabs and so on)
The files which are AOT specific should follow the formatting of AOT projects
Testing:
Passes smoke tests and some additional validation done via linker tests which is not part of this change
Note: This is not up-to-date with linker but it's getting us much closer. Known "TODOs":
* CompilerGeneratedState - linker has a much newer and much more capable version. Port of that will come later (as it was in heavy development while I was doing this port, and it's not strictly necessary for current functionality)
* Type hierarchy marking - this needs work on the linker side as it's not yet part of the shared codebase
* Correctly handle RUC/RDC for all "reflection accesses" to methods - some of the change improve on this, but it's nowhere near where it needs to be. Future work item.
Michal Strehovský [Tue, 7 Jun 2022 18:36:40 +0000 (03:36 +0900)]
Keep members on Int128 and Half for testing (#70332)
I was hitting a lot of obscure failures in #70201 that look like this:
```
[FAIL] System.Tests.Int128Tests.Parse_Span_Valid(value: "
170141183460469231731687303715884105727", offset: 0, count:
1, style: Integer, provider: null, expected: 1)
System.ArgumentException : Object of type 'System.Int32' cannot be converted to type 'System.Int128'.
at System.InvokeUtils.CheckArgument(Object, EETypePtr, InvokeUtils.CheckArgumentSemantics, BinderBundle, InvokeUti
ls.ArgSetupState&) + 0x1c0
at System.InvokeUtils.DynamicInvokeParamHelperCore(InvokeUtils.ArgSetupState&, RuntimeTypeHandle, InvokeUtils.Dyna
micInvokeParamLookupType&, Int32&, InvokeUtils.DynamicInvokeParamType) + 0x228
at System.InvokeUtils.DynamicInvokeParamHelperIn(InvokeUtils.ArgSetupState&, RuntimeTypeHandle) + 0x1b
at System.Runtime.Tests!<BaseAddress>+0xffe015
at System.InvokeUtils.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Object[], BinderBundle, Bool
ean, Boolean) + 0x14d
at Internal.Runtime.Augments.RuntimeAugments.CallDynamicInvokeMethod(Object, IntPtr, IntPtr, IntPtr, Object, Objec
t[], BinderBundle, Boolean, Boolean) + 0x3e
at Internal.Reflection.Execution.MethodInvokers.StaticMethodInvoker.Invoke(Object, Object[], BinderBundle, Boolean
) + 0x4e
at Internal.Reflection.Core.Execution.MethodInvoker.Invoke(Object, Object[], Binder, BindingFlags, CultureInfo) +
0x45
at System.Reflection.Runtime.MethodInfos.RuntimeMethodInfo.Invoke(Object, BindingFlags, Binder, Object[], CultureI
nfo) + 0x58
```
This stack is showing a reflection invoke attempt by xunit (not by a test, but by xunit itself) to invoke a method taking Int128, but passing a boxed Int32 as an argument. The TestData is indeed doing that.
I was getting myself ready to debug xunit but I thought that maybe xunit has a custom binder that calls the operator methods using reflection to do the conversions. Sure enough the RD.XML fixed it, so the problem was with operators getting trimmed away.
Michal Strehovský [Tue, 7 Jun 2022 18:36:25 +0000 (03:36 +0900)]
Fix double to unlong conversions to handle NaN (#70331)
This was apparently fixed in 2016 on CoreCLR but no tests were added.
The generic math tests are the first things that exercise this.
Doesn't fail in the CI because this helper is likely not needed on ARM64 and we only test libs with NativeAOT on ARM64.
Thought this was because of my local changes (because the CI was clean) but wasn't. Spent more time on this than I would be willing to admit.
dotnet-maestro[bot] [Tue, 7 Jun 2022 18:20:49 +0000 (11:20 -0700)]
[main] Update dependencies from dotnet/linker (#69710)
* Update dependencies from https://github.com/dotnet/linker build
20220523.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22273.1
* Update dependencies from https://github.com/dotnet/linker build
20220524.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22274.1
* Update dependencies from https://github.com/dotnet/linker build
20220525.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22275.1
* Update dependencies from https://github.com/dotnet/linker build
20220530.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22280.1
* Update dependencies from https://github.com/dotnet/linker build
20220531.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22281.1
* Update dependencies from https://github.com/dotnet/linker build
20220601.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22301.1
* Update dependencies from https://github.com/dotnet/linker build
20220603.2
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22303.2
* Update dependencies from https://github.com/dotnet/linker build
20220606.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22281.1 -> To Version 7.0.100-1.22306.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Vitek Karas <10670590+vitek-karas@users.noreply.github.com>
Eric Erhardt [Tue, 7 Jun 2022 18:09:33 +0000 (12:09 -0600)]
Fix race condition in WASM crypto worker (#70185)
When sending a message between LibraryChannel and ChannelWorker, there is a race condition where both threads are reading/writing to shared memory at the same time. This can cause message pages to be skipped.
To fix this, add a shared mutex lock so only one side is reading/writing to shared memory at the same time.
Fix #69806
Aman Khalid [Tue, 7 Jun 2022 17:47:31 +0000 (10:47 -0700)]
Fix unwind info when fake-splitting; add job to runtime-jit-experimental (#69922)
Fake-splitting currently breaks stack walks by not generating unwind
info for cold code. This commit implements unwind info on x86/64 when
fake-splitting by generating unwind info for the combined hot/cold
section just once, rather than generating unwind info for the separate
sections.
For reasons to be investigated, this implementation does not work when
the code sections are separated by an arbitrary buffer (such as the 4KB
buffer previously used). Thus, the buffer has been removed from the
fake-splitting implementation: Now, the hot and cold sections are
placed contiguously in memory, but the JIT continues to behave as if
they are arbitrarily far away (for example, by using long branches
between sections).
Following this fix, fake-splitting no longer requires the GC to be
suppressed by setting `COMPlus_GCgen0size=1000000`. A test job
has been added to `runtime-jit-experimental` to ensure
fake/stress-splitting does not regress.
Stephen Toub [Tue, 7 Jun 2022 17:42:23 +0000 (13:42 -0400)]
Use u8 in more places (#69995)
* Use u8 in more places
Primarily replacing Encoding.UTF8/ASCII.GetBytes("literal") with "literal"u8.ToArray()
* Address PR feedback (and fix some vars)
Jeremy Koritzinsky [Tue, 7 Jun 2022 17:42:07 +0000 (10:42 -0700)]
Remove complex marshalling support from crossgen2 (#70183)
Michal Strehovský [Tue, 7 Jun 2022 17:36:40 +0000 (02:36 +0900)]
Fix trimmability of various System.Runtime tests (#70329)
The reflection patterns couldn't be statically analyzed.
Needed to unblock #70201. NativeAOT trims by default and CoreLib is marked trimmable.
SingleAccretion [Tue, 7 Jun 2022 17:35:37 +0000 (20:35 +0300)]
Delete a few dependencies on field sequences (#69991)
* Remove field seqs from "gtGetStructHandleIfPresent"
* Ensure block morphing preserves handles
Or, rather, restores them better in case they were lost from FIELD nodes.
* Delete two dependencies on FieldSeq from morph
Two small positive diffs where the following tree:
IND bool
ADDR [FieldSeq]
LCL_VAR bool
Is now folded into LCL_VAR instead of LCL_FLD.
Sychev Vadim [Tue, 7 Jun 2022 17:28:41 +0000 (20:28 +0300)]
Optimization for "~x + 1" to "-x" (#69003) (#69600)
SingleAccretion [Tue, 7 Jun 2022 17:15:33 +0000 (20:15 +0300)]
Delete `GT_INDEX` (#69917)
* Do not set NO_CSE on ARR_ADDRs
It is effectively no-CSE already because of how "optIsCSECandidate" works.
* Delete GT_INDEX
Instead:
1) For "ldelem", import "IND/OBJ(INDEX_ADDR)".
2) For "ldelema", import "INDEX_ADDR".
This deletes two usages of "ADDR":
1) "OBJ(ADDR(INDEX))" from "ldelem<struct>".
2) "ADDR(INDEX)" from "ldelema".
* Add a zero-diff quirk
* Update the first class structs document
Remove references to things that no longer exist.
Tanner Gooding [Tue, 7 Jun 2022 16:31:07 +0000 (09:31 -0700)]
Re-enable the pause intrinsic test for x86/x64 CoreCLR (#70230)
* Re-enable the pause intrinsic test for x86/x64 CoreCLR
* Ensure we don't skip base intrinsics when only SSE/SSE2 are disabled
* Ensure InstructionSet_Vector64/128/256 are handled correctly in lookupId
Tomáš Rylek [Tue, 7 Jun 2022 16:25:23 +0000 (18:25 +0200)]
Mop-up changes per Jakob's PR suggestions (#70180)
1) Rename CORINFO_HELP_STATIC_VIRTUAL_AMBIGUOUS_RESOLUTION to
CORINFO_HELP_THROW_AMBIGUOUS_RESOLUTION_EXCEPTION and put it next
to the other CORINFO_HELP_THROW methods;
2) Add the new helper to CorInfoHelpFunc.cs;
3) Remove the jitinterface member doesFieldBelongToClass;
4) Update the JIT EE GUID.
Thanks
Tomas
Fixes: #69900
Thays Grazia [Tue, 7 Jun 2022 16:15:13 +0000 (13:15 -0300)]
Update testing-android.md (#70362)
Sergei Papikian [Tue, 7 Jun 2022 16:09:32 +0000 (19:09 +0300)]
DebuggerDisplay Stopwatch (#65753)
* feat: add DebuggerDisplay method and attribute
* refactor: remove 'this'
* Test
* Fix test
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Julien Couvreur [Tue, 7 Jun 2022 16:03:02 +0000 (09:03 -0700)]
Add bool and uint to documentation for RuntimeHelpers.CreateSpan (#70360)
Tarek Mahmoud Sayed [Tue, 7 Jun 2022 15:48:13 +0000 (08:48 -0700)]
Fix TZ Tests (#70309)
Koundinya Veluri [Tue, 7 Jun 2022 15:01:09 +0000 (08:01 -0700)]
Fix some scaling issues with the global queue in the thread pool (#69386)
* Fix some scaling issues with the global queue in the thread pool
- The global concurrent queue is not scaling well in some situations on machines with a large number of processors. A lot of contention is seen in dequeuing work on some benchmarks.
- I initially tried switching to queuing work from thread pool threads more independently with more efficient work stealing, but it looks like that may need more investigation/experimentation. This is a simpler change that seems to work reasonably well for now.
- Beyond 32 procs, added additional concurrent queues, one per 16 procs. When a worker thread begins dispatching work, it assigns one of those additional queues to itself, trying to limit assignments to 16 worker threads per queue.
- Work items queued by a worker thread queues to the assigned queue. The worker thread dequeues from the assigned queue first, and later tries to dequeue from other queues. Work items queued by non-thread-pool threads continue to go into the global queue.
- When a worker thread stops dispatching work items, it unassigns itself from the queue, and may transfer work items from it if it was the last thread assigned to the queue.
- In the observed cases, work items are distributed to the different queues and contention is reduced due to a limited number of threads operating on each queue
Olli Saarikivi [Tue, 7 Jun 2022 13:50:03 +0000 (06:50 -0700)]
NonBacktracking inner matching loop optimizations (#70217)
* Inner matching loop optimizations
* Cleanup and comments
* Fix and generalize FixedLength handling in matcher
* Fix FixedLength support again
* Suggestions from code review
* Change _stateInfo type to byte
Badre BSAILA [Tue, 7 Jun 2022 09:37:06 +0000 (11:37 +0200)]
handle SECURITY_STATUS 0x80090016 (#69942)
* handle SECURITY_STATUS 0x80090016
* adjust dictionary size
* capital set
Jakob Botsch Nielsen [Tue, 7 Jun 2022 09:00:42 +0000 (11:00 +0200)]
JIT ARM32: Fix passing odd sized structs from arbitrary sources (#70075)
* JIT ARM32: Fix odd sized structs from arbitrary sources
ARM32 ABI allows passing structs in register even when their sizes are
not divisible by 4. This means we sometimes need to pass 3 bytes in the
last register. The JIT would not handle this when the source was an
arbitrary memory location (this would require multiple loads and
shifts). The fix is to just force a copy into the local stack frame for
this case.
Fix #61168
* Reenable ABI tests
Fix #68837
Fix #70042
Andy Ayers [Tue, 7 Jun 2022 05:42:36 +0000 (22:42 -0700)]
JIT: broaden cloning invariant checks (#70232)
Streamline call effects checks. Use wider bit vectors.
Closes #70100.
SingleAccretion [Tue, 7 Jun 2022 02:18:03 +0000 (05:18 +0300)]
Fold more "OBJ(ADDR(LCL))" patterns in multi-reg morphing (#70207)
It is unfortunate that we have to expand this code, but it
will avoid diffs for a TYP_STRUCT LCL_FLD change.
SingleAccretion [Tue, 7 Jun 2022 02:14:05 +0000 (05:14 +0300)]
Do not use `LEA`s in HIR (#69992)
* Make LEAs backend-only
In the frontend, for better or worse, the canonical form
of address arithmetic is explicit pointer arithmetic.
* Add a test
Jackson Schuster [Tue, 7 Jun 2022 01:56:44 +0000 (20:56 -0500)]
Fix linker ref param warnings (#70082)
* Update dependencies from https://github.com/dotnet/linker build
20220523.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22273.1
* Update dependencies from https://github.com/dotnet/linker build
20220524.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22274.1
* Update dependencies from https://github.com/dotnet/linker build
20220525.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22275.1
* Update dependencies from https://github.com/dotnet/linker build
20220530.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22280.1
* Update dependencies from https://github.com/dotnet/linker build
20220531.1
Microsoft.NET.ILLink.Tasks
From Version 7.0.100-1.22270.1 -> To Version 7.0.100-1.22281.1
* WIP
* Supress warnings produced by ref param dataflow
* Update comments and remove IL2118/9 suppressions
* whitespace
* Trailing whitespace
* PR feedback
* Fix wording
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Sven Boemer <sbomer@gmail.com>
Zoltan Varga [Tue, 7 Jun 2022 01:29:58 +0000 (21:29 -0400)]
[mono][wasm] Revert the gc_pin optimization changes. (#70234)
Fixes https://github.com/dotnet/runtime/issues/70213.
Carlos Sanchez [Tue, 7 Jun 2022 01:19:03 +0000 (18:19 -0700)]
Rename TarFormat to TarEntryFormat (#70313)
SingleAccretion [Tue, 7 Jun 2022 00:56:29 +0000 (03:56 +0300)]
Remove obsolete code from "gtSetMultiOpOrder" (#70216)
Remove references to preserving previous behavior.
Use a better algorithm for calculating the "level" of MultiOp nodes.
SingleAccretion [Tue, 7 Jun 2022 00:48:33 +0000 (03:48 +0300)]
Do not retype SIMD nodes (#70265)
* Do not retype SIMD nodes
It is not necessary: the only case where it is required, SIMD8 to
LONG bitcasts on Windows x64, is already handled by lowering.
It is dangerous: in case we CSE the retyped tree, its other uses
will be (effectively) retyped as well.
* Add a test