Commit Graph
116187 Commits
Author SHA1 Message Date
Peter Sollich 8ced105bdf The problem was that the assert didn't take into account the fact that some regions may be on the decommit list already due to aging of regions. (#66495) 2022-03-12 09:11:44 -08:00
Alexander Köplinger 48e431b123 Reenable HostApplicationBuilderTests disabled on Mono/Windows (#66521)
They were disabled against https://github.com/dotnet/runtime/issues/34582 which was fixed by https://github.com/dotnet/runtime/pull/64834
2022-03-12 16:27:04 +01:00
Kunal Pathak 6e26872d0a Arm64: Always use SIMD features (#66411)
* Use supportSIMDTypes() throughout

* Make featureSIMD only for non-arm64
2022-03-11 20:35:06 -08:00
Kevin Jones 4bcc7998f0 Re-enable RevokeEndEntity_PolicyErrors_NotTimeValid 2022-03-11 21:31:43 -05:00
Elinor Fung c251dbb17b Fix compiler warning 4244 in host (#66518) 2022-03-11 17:22:26 -08:00
Tarek Mahmoud SayedandStephen Toub 4fc085622a Add Activity.HasRemoteParent (#66489)
Co-authored-by: Stephen Toub <[email protected]>
2022-03-11 14:05:40 -08:00
Jan Kotas f99ba2e2b8 Revert "Avoid Attribute.GetCustomAttributes() returning null for open generic type (#65237)" (#66508)
This reverts commit 2029495761.
2022-03-11 16:12:20 -05:00
Charles Stoner b60b5e50a8 Add comment for use of DynamicDebugViewEmptyException.Empty (#66510) 2022-03-11 16:12:00 -05:00
Manish Godse e850bcbc5f [WIP] Enable regions again. (#64688)
* Enable regions again.

* disable regions for MacOS for now.

* disable for NativeAOT for now
2022-03-11 13:11:33 -08:00
Steve PfisterandSteve Pfister 36a435cf12 Add Android 32 to RID graph (#66022)
Supports Android 12L, which will be stable most likely by summer or earlier.

Co-authored-by: Steve Pfister <[email protected]>
2022-03-11 13:09:58 -08:00
Přemek VysokýandAlexander Köplinger a883caa080 Write the exit code tag from the Apple app wrapper (#66511)
Co-authored-by: Alexander Köplinger <[email protected]>
2022-03-11 21:42:43 +01:00
Jakob Botsch Nielsen 8242a50527 Fix early JITDUMP disasm in ARM/ARM64 (#66502) 2022-03-11 21:36:16 +01:00
Fan Yang 30c2cdc7dd Enable emitting intrinsics for System.Numerics.Vector<T> on arm64 (#66476) 2022-03-11 15:09:01 -05:00
Andy Ayers d7b0e217cc Add OSR to DacpTieredVersionData (#66507) 2022-03-11 11:57:23 -08:00
Alexander Köplinger 641386c6ca [mono] Fixup name of define (#66523) 2022-03-11 20:54:04 +01:00
Elinor Fung 392c1513e1 Move to Windows.10.Amd64.Server2022.ES.Open (#66404) 2022-03-11 11:48:05 -08:00
Alexander Köplinger 9de7aaf9c8 [mono] Cleanup todo items from defines-todo.cmake (#66408)
There are roughly three categories:

1. Already implemented or completely unused defines
2. Defines we can remove because they're no longer useful:
- `MAJOR_IN_MKDEV` and `MAJOR_IN_SYSMACROS`
Not used in the runtime anymore.

- `HAVE_EPOLL` and `HAVE_KQUEUE`
Not used in the runtime anymore.

- `ANDROID_UNIFIED_HEADERS` and `HAVE_ANDROID_NDK_VERSION_H`
We're requiring a recent Android NDK now that only supports unified headers.

- `MONO_DL_NEED_USCORE`
It doesn't seem needed anymore.
dlsym() on macOS automatically prepends an underscore and from what I can find it was mostly for old *BSDs.

- `GLIBC_BEFORE_2_3_4_SCHED_SETAFFINITY`
We don't support such an old glibc anymore.

- `HAVE_SIOCGIFCONF`
We don't use this and related networking code in the runtime anymore.

- `DISABLE_HW_TRAPS`
We have `MONO_ARCH_DISABLE_HW_TRAPS` instead.

- `MONO_BIG_ARRAYS`
No longer needed and probably broken due to missing BCL changes.

- `ENABLE_MONODROID` and replace `ENABLE_MONOTOUCH` with `TARGET_APPLE_MOBILE`
ENABLE_MONODROID was unused and MonoTouch was an earlier name for Xamarin.iOS, replace it with something more descriptive

- `MONO_JEMALLOC`
We haven't used it and don't plan to.

- `MONO_XEN_OPT`
Xen is not a primary scenario for Mono anymore so we probably don't need this optimization.

3. Defines which are still useful and are implemented by this PR
- Fix `MONO_KEYWORD_THREAD` build and implement `HAVE_TLS_MODEL_ATTR`

- Boehm/Null GC support

- `MONO_SMALL_CONFIG`

- `USE_MALLOC_FOR_MEMPOOLS`

- `ENABLE_DTRACE`

- `ENABLE_EXPERIMENT_TIERED` and remove dynamic experiments

- `ENABLE_OVERRIDABLE_ALLOCATORS`

- `MONO_ARCH_ILP32`

- `RISCV_FPABI`

- `__mono_ppc64__`

- `HAVE_ARMV5/6`. There is an open question about what we'll do with `HAVE_ARMV7`, added a TODO comment.
2022-03-11 20:43:58 +01:00
Simon Rozsival 89469632fe [Mono] Intrinsify Vector Dot product and Sum on Arm64 (#66391)
* Add Dot intrinsic

* WIP saddvq/uaddvq

* Add Dot and Sum impl for Arm64

* Add faddv

* Fix the Dot and Sum implementations

* Cleanup

* Cleanup

* Fix type checking

* Fix type checking

* Fix indentation

* Fix edge case with single element vectors

* Improve implementation
2022-03-11 14:38:16 -05:00
Viktor Hofer 2575ce5f51 Use ApiCompatTask in ApiCompat.proj (#66073)
* Use ApiCompatTask in ApiCompat.proj

As ApiCompat now has a task that allows to run in-proc, use that instead
of shelving out. Also use items instead of properties to define
the attribute exclusion list.

* Update ApiCompat version
2022-03-11 18:51:22 +01:00
3e2d483153 Add support for the new WASM Exception Handling feature (#66435)
* [mono] Fix parsing options added by utils/options.h when using --response.

* [mono][jit] Add support for WASM EH.

WASM EH uses the newly added llvm catchpad instructions instead of
the old landingpad instructions. Add a --wasm-exceptions option
to control whenever the old JS style or the new WASM style code
is generated.

* Add support for the new WASM Exception Handling feature.

It is controlled by the $(WasmExceptionHandling) msbuild property.

Its only used in AOT mode, the interpreter mode wouldn't benefit from it.

The only file in the runtime which contains a throw or a catch is
llvm-runtime.cpp, so create 2 small static libraries from this file:
* libmono-wasm-eh-js - compiled to use JS style EH
* libmono-wasm-eh-wasm - compiled to use WASM style EH
This avoids the need to compile 2 versions of the whole runtime.

Requires emscripten 3.x.

* Add missing quote

* Update src/mono/mono/mini/CMakeLists.txt

Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>

* Update src/mono/CMakeLists.txt

Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>

Co-authored-by: Radek Doulik <[email protected]>
Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>
2022-03-11 11:50:33 -05:00
dotnet-maestro[bot]anddotnet-maestro[bot] 718927c2cd Update dependencies from https://github.com/dotnet/linker build 20220310.1 (#66505)
Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22158.1 -> To Version 7.0.100-1.22160.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-03-11 17:29:49 +01:00
dotnet-maestro[bot]anddotnet-maestro[bot] 5aa3321b7e [main] Update dependencies from dotnet/runtime-assets dotnet/roslyn-analyzers (#66504)
* Update dependencies from https://github.com/dotnet/runtime-assets build 20220310.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.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.22128.1 -> To Version 7.0.0-beta.22160.1

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220310.2

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22157.1 -> To Version 7.0.0-preview1.22160.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-03-11 17:29:18 +01:00
Adam Sitnik d008c6f2e7 don't run WriteChars_VeryLargeArray_DoesNotOverflow test on 32 bit platforms (#66503) 2022-03-11 10:28:34 -05:00
JK Park a6f52bc558 Fix typo in comment (#66497)
thta => that
2022-03-11 06:18:20 -05:00
Antoine Martin 12816261fe Add armv8l virtualized 32-bit ARM core detection (#66477) 2022-03-11 10:29:12 +01:00
Vitek KarasandElinor Fung f82fe1d83f Refactor and improve MLL tests (#66332)
* Remove duplicated code - I know that tests should be descriptive, but repeating 100 times that we want to capture output doesn't feel necessary.
* For some of them move more stuff into the shared test state - this improves perf as we avoid repeating the setup (copying files around) for each test case, we do it once for the entire class
I also changed some of the tests to "Theory" as it's easier to read that way.
  * `SDKLookup.cs` - moved most of the state in to the shared state to speed up the tests.

* Adding more cases into the "theory" tests
  * Most notably for the framework resolution I added variations on the TFM (which will be needed when we implement disable of MLL)
* Adding new tests mostly around "list runtimes" (various forms), "list sdks" (various forms) and errors (which also list runtimes or sdks)

* Ported all of the `MultiLevelLookupFramework` tests over to the `FrameworkResolution` and `DependencyResolutions` suites which have a more robust test infra and can run the same tests much faster. Along the way I added lot more variations on top of the existing tests:
  * `PerAssemblyVersionResolutionMultipleFrameworks.cs` - this is actually not an MLL test, but I moved it to the new infra to make it much faster
  * `MultipleHives.cs` - MLL framework resolution tests

For SDK resolution I kept the `MultiLevelSDKLookup.cs` just removed code duplication and added new variants.

For the core reviewers: I promise I didn't remove any single test case in spirit with these exceptions:

* We had tests which validated that framework resolution is not affected by frameworks in current directory and also by frameworks in the user's directory. I left some basic test for the current directory check, but I completely removed the user's directory variant as the product simply doesn't have any code around that anymore.

* Remove "user" directory from SDK resolution tests

The product simply doesn't have any knowledge about user directory SDK lookup, so there's little value in testing for it (even though the test expects it to not have any impact).

Co-authored-by: Elinor Fung <[email protected]>
2022-03-11 00:34:45 -08:00
Aaron Robinson 5ce2b9f860 Update repo CMake configuration to target /W4 by default (#66474)
* Update repo CMake configuration to target /W4 by default

Disable all failing warnings.

* Mono API tests only use W3
2022-03-10 20:59:21 -08:00
Aleksey Kliger (λgeek) ba5207b0f4 [metadata] Avoid realloc and memcpy when >1 gparams on generics (#66458)
* [metadata] Avoid realloc and memcpy when >1 gparams on generics

* Read the first gparam row again at the beginning of the second pass
2022-03-10 23:21:01 -05:00
dotnet-maestro[bot] 723324d1fe Update dependencies from https://github.com/dotnet/linker build 20220308.1 (#66390)
[main] Update dependencies from dotnet/linker
2022-03-11 00:33:51 +00:00
Kevin Jones b3e380e3e6 One-shot decrypt in to user buffers
This changes the one-shot decryption to allow decrypting directly in to user-supplied buffers, even in the presence of padding, so that a copy and CryptoPool rental can be avoided.

If the buffer is large enough to accommodate the padding, then decrypt directly in to the supplied buffer, zero the padding, and indicate the de-padded amount in bytesWritten.

If the buffer is possibly large enough, then decrypt all but the last block in to the buffer, and do the last block on the stack. If the de-padded amount in the stack is small enough, then copy the remaining. If it is too large, then zero everything in the user buffer.
2022-03-10 19:17:07 -05:00
Andy Gocke 4f7d9e7561 Add table of testing configurations (#66347)
* Add table of testing configurations

* Remove "cross" from specification
2022-03-10 15:48:39 -08:00
Stephen Toub 3fc949bc10 Overhaul how regex generated code is structured (#66432)
* Overhaul how regex generated code is structured

* Address PR feedback

* Change parser to return RegexMethod

Clean up how the data is structured.

* Add a test for same method name in multiple types
2022-03-10 18:42:19 -05:00
Jose Perez Rodriguez 458524aa75 Updating Unicode files to use 14.0.0 (#66362) 2022-03-10 14:28:35 -08:00
Fan Yang c069fa20aa [Mono] Intrinsify Narrow for for Vector{64, 128} on Arm64 (#66409)
* Add arm64 intrinsics for Narrow

* Fix integer types

* Fix more issues with integer types

* Add some comments

* Nit

* Change var names

* Fix format

* Fix format again
2022-03-10 17:00:05 -05:00
Meri KhamoyanandFan Yang 4a7feea7ea [Mono] Add intrinsics for several operators (#66317)
This PR contributes to  #64072

Added intrinsics for following operators
- Operator *
- Operator /
- Operator |
- Operator &
- Operator ^
- Unary operator -
- Unary operator ~

Co-authored-by: Fan Yang <[email protected]>
2022-03-10 22:56:07 +01:00
Alexander Köplinger d282630896 [mono] Stop setting time_date_stamp field in MonoImage (#66452)
We never read that field in the runtime and it was causing unnecessary disk IO during startup (5ms on my iOS device).
It was also never set on Windows already.
2022-03-10 22:47:57 +01:00
Elinor Fung 6cb2ae678f Enable/fix compiler warning 4996 in host (#66431) 2022-03-10 13:23:56 -08:00
dotnet-maestro[bot]anddotnet-maestro[bot] 0046648f91 Update dependencies from https://github.com/dotnet/msquic build 20220310.2 (#66468)
System.Net.MsQuic.Transport
 From Version 7.0.0-alpha.1.22159.1 -> To Version 7.0.0-alpha.1.22160.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2022-03-10 21:58:09 +01:00
Aaron Robinson 5959374a0a Remove null check that is used later to handle size request scenario. (#66428) 2022-03-10 12:02:16 -08:00
Stephen Toub 28580bf9fc Use StartsWith(..., OrdinalIgnoreCase) in RegexCompiler / source generator (#66339)
* Use StartsWith(..., OrdinalIgnoreCase) in RegexCompiler / source generator

When we encounter a sequence of sets representing case-insensitive ASCII, we can simplify the code generated to just call StartsWith, which both makes it more readable but also takes advantage of the new JIT optimization to lower that into efficient vectorized comparisons based on the supplied literal.

This also cleans up some formatting in the source generator emitted code to make things much more concise and less noisy.

* Address PR feedback
2022-03-10 14:11:56 -05:00
Egor Bogatov cdb1d26bcc Check gtClassProfileCandidateInfo before instrumentation (#66388) 2022-03-10 21:40:34 +03:00
Eirik Tsarpalis 7b71e1bf5c Disable timing out test on mono (#66381)
* disable timing out test on mono

* Update src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CustomConverterTests/CustomConverterTests.cs
2022-03-10 18:40:14 +00:00
Stephen Toub 406d854192 Clean up NonBacktracking DgmlWriter (#66363)
* Clean up NonBacktracking DgmlWriter

* Address PR feedback, clean up some lang=regex usage, fix a test failure
2022-03-10 13:33:14 -05:00
f63e4d93fb [main] Update dependencies from 7 repositories (#66330)
* Update dependencies from https://github.com/dotnet/arcade build 20220307.6

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.22154.3 -> To Version 2.5.1-beta.22157.6

* Update dependencies from https://github.com/dotnet/icu build 20220307.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 7.0.0-preview.3.22128.1 -> To Version 7.0.0-preview.3.22157.1

* Update dependencies from https://github.com/dotnet/xharness build 20220307.2

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.22153.2 -> To Version 1.0.0-prerelease.22157.2

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220307.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22153.1 -> To Version 7.0.0-preview1.22157.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.22128.2 -> To Version 1.0.2-alpha.0.22157.2

* Update dependencies from https://github.com/dotnet/llvm-project build 20220307.1

runtime.win-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.win-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.osx.11.0-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-x64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.ObjWriter , runtime.linux-arm64.Microsoft.NETCore.Runtime.ObjWriter
 From Version 1.0.0-alpha.1.22128.1 -> To Version 1.0.0-alpha.1.22157.1

* Use full names for GenericHandler passed to xharness

* Update dependencies from https://github.com/dotnet/msquic build 20220309.1

System.Net.MsQuic.Transport
 From Version 7.0.0-alpha.1.21529.3 -> To Version 7.0.0-alpha.1.22159.1

* Update dependencies from https://github.com/dotnet/xharness build 20220310.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.22153.2 -> To Version 1.0.0-prerelease.22160.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Ankit Jain <[email protected]>
2022-03-10 19:10:24 +01:00
Pavel IvanovandEric Erhardt 67ea9c0bb4 Stop collecting disposables if changed token encountered (#66265)
* reproduce issue: collecting disposables even if composite token has alredy been changed

* stop collecting disposables if composite token has already been changed

* Update src/libraries/Microsoft.Extensions.Primitives/tests/CompositeChangeTokenTest.cs

Co-authored-by: Eric Erhardt <[email protected]>

* Update src/libraries/Microsoft.Extensions.Primitives/tests/CompositeChangeTokenTest.cs

Co-authored-by: Eric Erhardt <[email protected]>

Co-authored-by: Eric Erhardt <[email protected]>
2022-03-10 10:49:34 -06:00
Radek Zikmund 5c0c3179ef Remove asserts checking OpenSSL error queues (#66443)
Fixes #44689

As of #65148, libraries use different approach to handling OpenSSL errors. The original assert which would be hit if a previous operation left errors in the queue is no longer necessary as all OpenSSL calls are prepended by `ERR_clear_error()` to make sure the latest (and most relevant) error is reported.
2022-03-10 15:45:04 +01:00
Peter Sollich 801e81ee8a Fix the accounting for gen 1 allocations by taking into account what has been already consumed in this GC. (#60248)
Details:

In gen 1 GCs, we recompute the budget at the end of the GC. However, the amount consumed in the current GC is nowhere taken into account. That causes us to do at most alternate gen 0 and gen 1 GCs, we cannot do back-to-back gen 1 GCs.

If we take the gen 1 budget as the amount of memory we are aiming to be used for gen 1, then it seems illogical to just drop the amount used in this GC on the floor.

The fix is to actually subtract the amount of gen 1 budget used in this GC from dd_new_allocation for gen 1. This is a bit awkward for server GC, because we even out the budget and the amount to subtract from dd_new_allocation across heaps after having computed it for each heap individually.
2022-03-10 11:26:41 +01:00
Egor Bogatov 9030b78f19 Fix implicit nullchecks for floats on arm64 (#66413) 2022-03-10 12:45:58 +03:00
Bruce Forstall a4a6d30517 Add timestamp to some superpmi.py output (#66437)
This should help determine where time is being spent in long-running
tasks such as PMI or crossgen2 collections in the CI system.
2022-03-09 23:26:59 -08:00
Bruce Forstall 39485afc02 Add retries to dotnet restore in SPMI collection of benchmarks (#66433)
Also, run a `dotnet --info` command to verify the version of the CLI we are running.
2022-03-09 22:18:55 -08:00