Tomáš Rylek [Thu, 14 May 2020 20:19:08 +0000 (22:19 +0200)]
Startup optimization w.r.t. manifest access in composite mode (#36446)
During my work on fixing runtime crashes in composite build
with large version bubble enabled I noticed room for startup
perf improvement and a very slight working set optimization:
For component assemblies of a composite image, we can basically
share the cache of those manifest assembly references that
have already been resolved (GetNativeMetadataAssemblyRefFromCache)
within the native image because that is the logical owner
of the manifest metadata.
In the "asymptotic" case of composite images with many
components, the pre-existing behavior was basically
a quadratic O(n^2) algorithm in the number of component
assemblies. This change reduces it to linear in the sense
that all assembly references from the composite image get
resolved only once.
Thanks
Tomas
Aleksey Kliger (λgeek) [Thu, 14 May 2020 19:57:32 +0000 (15:57 -0400)]
[Mono] Don't set thread name of main thread on Linux (#36116)
* [mono] Record MonoNativeThreadId of the main thread
We would like to know the MonoNativeThreadId (pthread_t on Linux) of the main
thread of the application. We can identify the main thread (on linux) because
it is the one for which `gettid () == getpid ()`. (`gettid()` returns a
`pid_t` which is not the same thing as a `pthread_t`, hence this roundabout way
of detecting it.)
A complication arises in embedding scenarios: the main thread is not
necessarily the one that calls `mono_jit_init` or otherwise interacts with the
runtime. Therefore we do the `gettid() == getpid ()` test at `MonoThreadInfo`
creation time when we call `register_thread`.
If the main thread never interacts with Mono, the main thread is not known to
us.
* [mono] Don't set name of main thread on Linux
Setting the name of the main thread also changes the name of the process.
Fixes https://github.com/dotnet/runtime/issues/35908
The corresponding fix for CoreCLR is https://github.com/dotnet/runtime/pull/34064
* Re-enable test from https://github.com/dotnet/runtime/pull/34064
Viktor Hofer [Thu, 14 May 2020 18:50:17 +0000 (20:50 +0200)]
Make depproj intermediate output paths unique again (#36451)
Fixes https://github.com/dotnet/runtime/issues/36255
Depprojs depend on IntermediateOutputPath being set in a props file early enough as restore is happening per configuration. Even though it isn't recommended that the TargetFramework property is read before the project is loaded, we currently encode the TargetFramework in the IntermediateOutputPath for depproj files. The long-term fix is to get rid of per configuration restores by getting rid of our depproj files.
Simon Nattress [Thu, 14 May 2020 18:12:30 +0000 (11:12 -0700)]
Update Linux docker instructions (#36370)
* Update linux-instructions.md to use root build.sh
Egor Bogatov [Thu, 14 May 2020 16:56:11 +0000 (19:56 +0300)]
[mono] Shrink Android APK size (#36437)
* Shrink Android apk size
* bump xharness cli, use cmake config
Jeremy Barton [Thu, 14 May 2020 15:29:32 +0000 (08:29 -0700)]
Add an atexit handler to bypass calls into ERR_ string routines.
This works around Ubuntu's apparent lack of NO_ATEXIT support in their
build of OpenSSL.
Kevin Jones [Thu, 14 May 2020 15:28:44 +0000 (11:28 -0400)]
Support additional friendly names on ECC OIDs
Expand the name/OID table to support a m:m relationship (secp256r1 and nistP256 are both 1.2.840.10045.3.1.7; 1.3.14.7.2.3.1 and 1.2.840.113549.1.1.4 are both md5RSA) and add in the alternative names for the secp{size}r1 curves (size in 256, 384, 521).
dotnet-maestro[bot] [Thu, 14 May 2020 14:24:31 +0000 (16:24 +0200)]
[master] Update dependencies from dotnet/arcade mono/linker dotnet/xharness (#36445)
* Update dependencies from https://github.com/dotnet/arcade build
20200511.9
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenAPI , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.GenFacades
From Version 5.0.0-beta.20258.8 -> To Version 5.0.0-beta.20261.9
* Update dependencies from https://github.com/mono/linker build
20200514.1
Microsoft.NET.ILLink.Tasks
From Version 5.0.0-preview.3.20262.1 -> To Version 5.0.0-preview.3.20264.1
* Update dependencies from https://github.com/dotnet/xharness build
20200514.1
Microsoft.DotNet.XHarness.Tests.Runners
From Version 1.0.0-prerelease.20263.4 -> To Version 1.0.0-prerelease.20264.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Viktor Hofer [Thu, 14 May 2020 14:05:38 +0000 (16:05 +0200)]
Consolidate subset projects into ProjectToBuild (#36441)
Consolidating subset projects into a single ProjectToBuild item type to
allow specifying projects to build from different subsets after the
subset was already built.
Aaron Robinson [Thu, 14 May 2020 13:54:10 +0000 (06:54 -0700)]
Update message for generic type. (#36434)
Viktor Hofer [Thu, 14 May 2020 13:42:18 +0000 (15:42 +0200)]
Remove duplicate configuration properties (#36442)
Alexander Köplinger [Thu, 14 May 2020 12:48:51 +0000 (14:48 +0200)]
Work around -no_weak_imports issue with recent Xcode (#36436)
See https://github.com/mono/mono/issues/19393.
We can use the `-Werror=partial-availability` as a good alternative until the Xcode bug is fixed.
monojenkins [Thu, 14 May 2020 12:16:41 +0000 (08:16 -0400)]
[debugger] Removing some asserts (#36234)
Removing some asserts and returning err_invalid_argument with an error message when it's possible.
Fixes https://github.com/mono/mono/issues/19651
Co-authored-by: thaystg <thaystg@users.noreply.github.com>
Ganbarukamo41 [Thu, 14 May 2020 10:21:02 +0000 (19:21 +0900)]
Update windows prerequisites to be more specific about SDK (#36438)
* Update windows prerequisites to be more specific about SDK
* Global installation of nightly SDK is required to normally browse the solution files in VS, as there is no way to supply SDKs when the solution files are opened through VS.
* Update windows prerequisites
* allow newer versions of VS workloads
Alexander Köplinger [Thu, 14 May 2020 10:12:56 +0000 (12:12 +0200)]
Fix mono runtime build warnings when building iOS config (#36435)
```
/Users/alexander/dev/runtime/src/mono/mono/mini/aot-runtime.c:5647:13: warning: unused variable 'image' [-Wunused-variable]
/Users/alexander/dev/runtime/src/mono/mono/mini/simd-intrinsics-netcore.c:11:1: warning: no previous prototype for function 'mono_simd_intrinsics_init' [-Wmissing-prototypes]
/Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1230:1: warning: no previous prototype for function 'mono_crash_save_failfast_msg' [-Wmissing-prototypes]
/Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1236:1: warning: no previous prototype for function 'mono_crash_get_failfast_msg' [-Wmissing-prototypes]
```
Adeel Mujahid [Thu, 14 May 2020 09:44:50 +0000 (12:44 +0300)]
Implement GetEntrypointExecutableAbsPath on SunOS (#36430)
* Implement `GetEntrypointExecutableAbsolutePath`.
* Fix a warning from newer gawk (v5.0.1 from 2019):
> ```sh
> awk: /runtime/src/coreclr/src/nativeresources/processrc.awk:54:
> warning: regexp escape sequence `\"' is not a known regexp operator
> ```
Andy Ayers [Thu, 14 May 2020 08:09:25 +0000 (01:09 -0700)]
Rework rejit test to ensure subprocess environment is suitable (#36420)
This test is optimization sensitive, but it invokes a subprocess that
will inherit environment variables like `COMPlus_JITMinOpts` that can impact
optimization of code jitted in the subprocess and cause the test to fail.
So, update the parent process code to override `COMPlus_JITMinOpts` and
`COMPlus_JitStress` for the child process.
Closes #35742.
dotnet-maestro[bot] [Thu, 14 May 2020 08:03:12 +0000 (08:03 +0000)]
[master] Update dependencies from mono/linker dotnet/llvm-project dotnet/xharness (#36336)
* Update dependencies from https://github.com/mono/linker build
20200512.1
- Microsoft.NET.ILLink.Tasks: 5.0.0-preview.3.20261.2 -> 5.0.0-preview.3.20262.1
* Update dependencies from https://github.com/dotnet/llvm-project build
20200512.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.3 -> 9.0.1-alpha.1.20262.1
* Update dependencies from https://github.com/dotnet/xharness build
20200513.4
- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20261.4 -> 1.0.0-prerelease.20263.4
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Alexander Köplinger [Thu, 14 May 2020 07:20:14 +0000 (09:20 +0200)]
Remove Microsoft.NETCore.Platforms.Future project (#36407)
It's no longer used.
Tomáš Rylek [Thu, 14 May 2020 06:24:22 +0000 (08:24 +0200)]
Fix execution of large version bubble composite images (#36373)
Large-bubble composite images are special in having more entries
in the manifest metadata than in the component assembly table:
When the build starts, all component assemblies get hard-injected
into the manifest metadata and subsequently we lazily add those
additional reference assemblies (within the same version bubble)
as we need for encoding signatures.
Thanks
Tomas
Santiago Fernandez Madero [Thu, 14 May 2020 03:25:40 +0000 (20:25 -0700)]
Move Mobile test runners to libraries/common and use P2P references (#36411)
* Move Mobile test runners to libraries/common and use P2P references
* PR Feedback
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
imhameed [Thu, 14 May 2020 03:17:07 +0000 (20:17 -0700)]
Improve Sse41.Multiply compatibility with LLVM 9. (#36369)
The llvm.x86.sse41.pmuldq intrinsic is no longer available as of
https://github.com/dotnet/llvm-project/commit/
254ed028a4bd4fa81d0049d90e6ab23d704dd366.
This also adds a convenience wrapper for creating constant LLVM IR
vectors, up to 16 elements long, of arbitrary integral type.
Finally, fix a latent bug in init_function_pass_manager;
llvm::StringRef::size returns a value of type size_t, but the printf
precision specifier requires a value of type int.
Kunal Pathak [Thu, 14 May 2020 02:18:18 +0000 (19:18 -0700)]
Disable test GitHub_35821 (#36419)
Viktor Hofer [Thu, 14 May 2020 02:17:13 +0000 (04:17 +0200)]
Fix cross-compiling argument validation for Linux (#36368)
* Fix cross-compiling argument validation for Linux
https://github.com/dotnet/runtime/commit/
7c66b6fb6fb00dd86d969ec622a9bb2830016375 added a ValidateSet for Windows_NT and Unix even though we don't support building for just "Unix" but for the more concrete OS which is "Linux".
* Update build.ps1
Tanner Gooding [Wed, 13 May 2020 23:51:20 +0000 (16:51 -0700)]
Optimize Vector64 and Vector128.Create methods (#36267)
* Updating the Vector64 and Vector128 Create methods to be marked Intrinsic on ARM64
* Updating the JIT to emit constants for Vector64 and Vector128.Create
* Fixing lookupNamedIntrinsic and impIntrinsic to throw PNSE for unsupported mustExpand intrinsics
* Fixing impIntrinsic to directly use gtNewMustThrowException
* Move gtNewMustThrowException to not depend on FEATURE_HW_INTRINSICS
* Applying formatting patch
* Add basic support for GT_CLS_VAR_ADDR to the ARM64 JIT
* Update lookupNamedIntrinsic to handle System.Runtime.Intrinsics for unsupported platforms
* Fixing INS_ldr in emitIns_R_C to use isValidVectorLSDatasize
* Elaborate on why we specially recognize the HWIntrinsics even on platforms that don't support them
Aaron Robinson [Wed, 13 May 2020 23:16:53 +0000 (16:16 -0700)]
Incorrect CALLSITE macro usage. (#36357)
Anirudh Agnihotry [Wed, 13 May 2020 22:37:34 +0000 (15:37 -0700)]
Adding sdlConfig file to move policheck out of the build (#36142)
* sdlfile
* add the variable names
Adeel Mujahid [Wed, 13 May 2020 21:46:33 +0000 (00:46 +0300)]
Add configurations for SunOS in installer (#36316)
Santiago Fernandez Madero [Wed, 13 May 2020 21:28:55 +0000 (14:28 -0700)]
Disable System.Diagnostics.Tests.EventLogSourceCreationTests (#36138)
* Disable System.Diagnostics.Tests.EventLogSourceCreationTests.CheckSourceExistenceAndDeletion
* Fix trait to skip tests in CI
* Use ActiveIssue instead
Swaroop Sridhar [Wed, 13 May 2020 21:09:18 +0000 (14:09 -0700)]
BundleProbeTest: Enable disabled tests (#36327)
A few of the bundle probe tests were failing on Linux-musl-x64-release.
This change adjusts the test to circumvent the failure.
Fixes #35755
Stephen Toub [Wed, 13 May 2020 21:07:11 +0000 (17:07 -0400)]
Update to v3.0.0 of Microsoft.CodeAnalysis.FxCopAnalyzers (#36318)
Carlos Sanchez Lopez [Wed, 13 May 2020 19:24:01 +0000 (12:24 -0700)]
Fix Path.GetPathRoot wrong check in Unix (#35734)
* Fix Path.GetPathRoot wrong check in Unix
* Return .Empty instead of null
* Update src/libraries/System.Private.CoreLib/src/System/IO/Path.Unix.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Address unit test comments
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Eirik Tsarpalis [Wed, 13 May 2020 19:16:03 +0000 (20:16 +0100)]
[CBOR] Implement a proof of concept for ECDsa COSE key serialization (#36002)
* Implement a proof of concept for ECDSA cose key serialization
* roundtrip COSE all the way to the ECDsa instance
* remove comment out code
* fix tests failing on Linux
* address feedback
* fix tests for linux
* address feedback
* add missing using statement
* refactor CoseKey deserializer implementation so that optional fields are supported.
Levi Broderick [Wed, 13 May 2020 18:02:13 +0000 (11:02 -0700)]
Throttle allocations in BinaryReader (#36348)
Zoltan Varga [Wed, 13 May 2020 17:10:57 +0000 (13:10 -0400)]
Add a WasmAppBuilder task and a sample. (#36338)
Viktor Hofer [Wed, 13 May 2020 16:57:17 +0000 (18:57 +0200)]
Update -vs removal switch documentation (#36353)
Alexander Köplinger [Wed, 13 May 2020 16:39:17 +0000 (18:39 +0200)]
Set TargetsMobile=true on Browser TargetOS and build the wasm runtimes earlier during the libs build (#36337)
* Set TargetsMobile=true on Browser TargetOS
* Build the wasm runtimes earlier during the libs build so they end up in lib-runtime-packs.
* Add emsdk_env.sh into .gitignore
Co-authored-by: Zoltan Varga <vargaz@gmail.com>
Koundinya Veluri [Wed, 13 May 2020 16:37:16 +0000 (12:37 -0400)]
Merge pull request #36268 from kouvel/NamedMutexFix
Fix Unix named mutex crash during some race conditions
Below when I refer to "mutex" I'm referring to the underlying mutex object, not an instance of the `Mutex` class.
- When the last reference to a mutex is closed while the lock is held by some thread and a pthread mutex is used, the mutex was attempted to be destroyed but that has undefined behavior
- There doesn't seem to be a way to behave exactly like on Windows for this corner case, where the mutex is destroyed when the last reference to it is released, regardless of which process has the mutex locked and which process releases the last reference to it (they could be two different processes), including in cases of abrupt shutdown
- For this corner case I settled on what seems like a decent solution and compatible with older runtimes:
- When a process releases its last reference to the mutex
- If that mutex is locked by the same thread, the lock is abandoned and the process no longer references the mutex
- If that mutex is locked by a different thread, the lifetime of the mutex is extended with an implicit ref. The implicit ref prevents this or other processes from attempting to destroy the mutex while it is locked. The implicit ref is removed in either of these cases:
- The mutex gets another reference from within the same process
- The thread that owns the lock exits and abandons the mutex, at which point that would be the last reference to the mutex and the process would not reference the mutex anymore
- The implementation based on file locks is less restricted, but for consistency that implementation also follows the same behavior
- There was also a race between an exiting thread abandoning one of its locked named mutexes and another thread releasing the last reference to it, fixed by using the creation/deletion process lock to synchronize
Fix for https://github.com/dotnet/runtime/issues/34271 in master
Closes https://github.com/dotnet/runtime/issues/28449 - probably doesn't fix the issue, but trying to enable it to see if it continues to fail
Santiago Fernandez Madero [Wed, 13 May 2020 16:00:23 +0000 (09:00 -0700)]
Return exit code 1 in android test runner if a test failed (#36319)
* Return exit code 1 in android test runner if a test failed
* Exit instrumentation with runner exit code
Stephen Toub [Wed, 13 May 2020 13:13:14 +0000 (09:13 -0400)]
Remove some `= null!`s from corelib (#36175)
* Remove some `= null!`s from corelib
In some cases, this was achieved by:
- Using [MemberNotNull] when it could be used to enable the compiler to appropriately follow the initialization
- Making the field nullable and using `!`s at usage sites in cases where the `= null!` wasn't appropriate because the field could actually be null
- Making the field nullable and adding null checks sparingly
- Suppressing warnings in cases where fields weren't accessed in managed code
- Removing stale cases where it wasn't necessary anymore anyway
- Removing unnecessary empty internal/private ctors
* Address PR feedback
* Disable test on mono
monojenkins [Wed, 13 May 2020 12:23:28 +0000 (08:23 -0400)]
Emit DWARF debug_abbrev offset for compile units as a label instead of 0 (#36320)
When outputting DWARF code to start a compilation unit in .debug_info, the standard expect a 4-byte offset from the .debug_abbrev code. Mono has always output an offset of 0.
However, this doesn't work in every cases. When we have linux+fullaot, we link two object files (one from Mono, one from LLVM). Both have their .debug_abbrev section. If we use 0 as an offset, it seems possible that the linker will keep thinking that our offset is 0, no matter the circumstances. Since the offset is always 0, it can be using the wrong abbreviation table (i.e. the one from the LLVM assembly instead of the one from the Mono assembly). The consequence of this is that the linked file is not valid DWARF (dwarfdump and objdump will complain about invalid offsets). At best, some tools will be able to work with a part of what we have, but any program requiring entirely valid DWARF will fail.
To fix this, we generate a label for the start of our debug_abbrev section and we instead generate it by generating a long with that label. This matches existing behavior seen in the LLVM generated code, and makes dwarfdump and objdump react properly to the linked product.
Fixes mono/mono#8806
Co-authored-by: mathieubourgeois <mathieubourgeois@users.noreply.github.com>
monojenkins [Wed, 13 May 2020 12:01:30 +0000 (08:01 -0400)]
[runtime] Move delegate_bound_static_invoke_cache to MonoWrapperCaches. (#36309)
<!--
Thank you for your Pull Request!
If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.
Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
Alexander Köplinger [Wed, 13 May 2020 10:50:39 +0000 (12:50 +0200)]
Add MonoAOTCompiler msbuild task (#35961)
Stephen Toub [Wed, 13 May 2020 03:35:53 +0000 (23:35 -0400)]
Remove several unnecessary arrays used with Split (#36304)
Now that we have a Split overload that takes a single char, the previous optimization to cache an array and reuse that array with the array-based overload isn't needed.
Sung Yoon Whang [Wed, 13 May 2020 03:16:00 +0000 (20:16 -0700)]
Add POH size counter (#36150)
* Add POH size counter
* Add 'Pinned Object Heap' to DisplayName
Santiago Fernandez Madero [Wed, 13 May 2020 02:55:48 +0000 (19:55 -0700)]
Flow exit code from RunTests.sh in iOS (#36315)
Eric Erhardt [Wed, 13 May 2020 02:39:49 +0000 (21:39 -0500)]
Remove unsed variable in MsQuicApi (#36302)
Ivan Diaz Sanchez [Wed, 13 May 2020 01:58:51 +0000 (18:58 -0700)]
Prevent build scripts from letting random values through (#35642)
* Arch, OS, and Config no longer let random values through when building the repo. Also, removed the casing restrictions on the bash version.
* Fixed the bash build script! Also, casing restrictions are gone!
* Added safeguards for bogus values on -rc and -lc on the sh build script.
* Fixed the merge conflict on build.sh
* Used awk instead of declare for increased compatibility on build.sh
* Restored execute permissions to build.sh
Eric Erhardt [Wed, 13 May 2020 01:07:59 +0000 (20:07 -0500)]
Fix Microsoft.Extensions.DependencyModel AssemblyVersionInPackageVersion (#36301)
Elinor Fung [Wed, 13 May 2020 01:04:14 +0000 (18:04 -0700)]
Set ExactSpelling=true on P/Invokes in System.Private.CoreLib that already specify the unicode W suffix (#36257)
* Set ExactSpelling=true on P/Invokes in System.Private.CoreLib that
already specify the unicode W suffix
* PR feedback: refactor NDirectMethodDesc::FindEntryPoint
David Shulman [Wed, 13 May 2020 00:36:08 +0000 (17:36 -0700)]
Fix HttpClient SSL3.0 test on newer Windows OS (#36308)
When I upgraded my dev machine to Windows 10 Version 2004 Preview, I noticed that the
HttpClient GetAsync_SupportedSSLVersion_Succeeds test was failing when using SSL 3.0.
This new version of Windows changes the default setting of SSL 3.0. So, by default,
SSL 3.0 is no longer enabled.
The problem was that this specific test wasn't using our PlatformDetection.SupportsSsl30
logic. Fixed the test so that it will properly detect whether SSL 3.0 is enabled on
the machine.
Nikiforov Alexey [Wed, 13 May 2020 00:13:16 +0000 (03:13 +0300)]
Add ctor to JsonSerializerOptions that takes serializer defaults (#36073)
* add ctor to JsonSerializerOptions that takes serializer defaults
* add out of range handling; enhance xml documentation
* test serializer option construction via serializer defaults
* adjust PredefinedSerializerOptions tests
Aaron Robinson [Tue, 12 May 2020 23:10:36 +0000 (16:10 -0700)]
Add QCALL_CONTRACT_NO_GC_TRANSITION (#36294)
New QCall macro for APIs that use SuppressGCTransitionAttribute.
Stephen Toub [Tue, 12 May 2020 22:48:53 +0000 (18:48 -0400)]
Fix nullable annotations on DangerousAcceptAnyServerCertificateValidator (#36305)
It should match ServerCertificateCustomValidationCallback.
Aaron Hudon [Tue, 12 May 2020 21:29:36 +0000 (14:29 -0700)]
Comment typos (#36296)
Santiago Fernandez Madero [Tue, 12 May 2020 20:43:24 +0000 (13:43 -0700)]
Use Publish target for self contained test apps (#36290)
Koundinya Veluri [Tue, 12 May 2020 20:14:37 +0000 (13:14 -0700)]
Address feedback, disable a test on Mono, slightly simplify same test (avoid two guids in name)
Eric Erhardt [Tue, 12 May 2020 20:09:17 +0000 (15:09 -0500)]
Remove PlatformAbstractions from runtime tests. (#36243)
* Remove PlatformAbstractions from runtime tests.
Contributes to #3470
Jeremy Barton [Tue, 12 May 2020 19:54:18 +0000 (12:54 -0700)]
Ignore the private key handle cert property for persisted keys
When a CERT_CONTEXT value has both property 2 (prov info) and property 78
(ncrypt key handle), prefer to load based on the property 2 state.
This avoids a scenario where calling Get[Algorithm]PrivateKey sets the
'CLR IsEphemeral' property on a persisted key, preventing future loads of that key.
An alternative approach of preferring the loaded key over the cold-load was
not selected to avoid value contamination of ephemeral properties set on the
CngKey object directly after the caller calls Get[Algorithm]PrivateKey.
Eric Erhardt [Tue, 12 May 2020 18:04:48 +0000 (13:04 -0500)]
Fix build break by bumping DependencyModel package version (#36285)
Jan Vorlicek [Tue, 12 May 2020 17:52:35 +0000 (19:52 +0200)]
Minor MethodTable building optimization (#36283)
When learning on how virtual method overriding is implemented in the
runtime, I've bumped into two places where we were calling
MapToImplSlotNumber twice in a row without any reason. Since this method
isn't trivial, it seems worth fixing.
Carlos Sanchez Lopez [Tue, 12 May 2020 17:43:28 +0000 (10:43 -0700)]
Apply CA1835 - Prefer memory overloads for Stream.ReadAsync/WriteAsync (#35941)
* Apply CA1835 Roslyn fixes on .NET Libraries
- Prefer the Stream.ReadAsync and Stream.WriteAsync memory overloads.
- Unit test fix suggested by buyaa-n to adjust the usage of these overloads.
* Additional missing unit test overload for ReadOnlyMemory
Ryan Lucia [Tue, 12 May 2020 17:16:16 +0000 (13:16 -0400)]
[mono] Don't throw inheritance error on interfaces in IsDefined (#35516)
Issue is very similar to the one fixed in https://github.com/dotnet/runtime/commit/
3df21ae60ec7de12abc77f4cc329903abe9ea542. When adding the error messages, we were too strict on when to throw. This should hopefully avoid all that by being significantly more lax.
Test moved to be in a location better suited to both examples.
Fixes https://github.com/dotnet/runtime/issues/35514
Youssef Victor [Tue, 12 May 2020 16:50:06 +0000 (18:50 +0200)]
Use CopyTo(arr) instead of creating List<T> first (#36228)
* Use LINQ ToArray
* Update RoType.cs
* Update RoType.cs
* Update src/libraries/System.Reflection.MetadataLoadContext/src/System/Reflection/TypeLoading/Types/RoType.cs
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix whitespace causing analyzer warnings
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Santiago Fernandez Madero [Tue, 12 May 2020 16:49:05 +0000 (09:49 -0700)]
Update testing.md (#36286)
dotnet-maestro[bot] [Tue, 12 May 2020 16:48:50 +0000 (12:48 -0400)]
[master] Update dependencies from 4 repositories (#36279)
* Update dependencies from https://github.com/dotnet/arcade build
20200508.8
- Microsoft.DotNet.XUnitExtensions: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.VersionTools.Tasks: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.ApiCompat: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Arcade.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.Feed: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.Packaging: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.CodeAnalysis: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.XUnitConsoleRunner: 2.5.1-beta.20256.5 -> 2.5.1-beta.20258.8
- Microsoft.DotNet.Helix.Sdk: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.RemoteExecutor: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
- Microsoft.DotNet.GenFacades: 5.0.0-beta.20256.5 -> 5.0.0-beta.20258.8
* Update dependencies from https://github.com/mono/linker build
20200511.2
- Microsoft.NET.ILLink.Tasks: 5.0.0-preview.3.20257.4 -> 5.0.0-preview.3.20261.2
* Update dependencies from https://github.com/dotnet/llvm-project build
20200511.3
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20261.1 -> 6.0.1-alpha.1.20261.3
* Update dependencies from https://github.com/dotnet/xharness build
20200511.4
- Microsoft.DotNet.XHarness.Tests.Runners: 1.0.0-prerelease.20257.4 -> 1.0.0-prerelease.20261.4
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Tom Deseyn [Tue, 12 May 2020 14:08:50 +0000 (16:08 +0200)]
Ensure Process.ProcessName doesn't change when setting Thread.Name on Linux (#34064)
Fixes https://github.com/dotnet/runtime/issues/33673
This issue is a side-effect of adding support for setting thread names on Linux in https://github.com/dotnet/coreclr/pull/27182.
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Adeel Mujahid [Tue, 12 May 2020 13:45:02 +0000 (16:45 +0300)]
Add configurations for SunOS CoreCLR managed build (#36266)
Santiago Fernandez Madero [Tue, 12 May 2020 11:47:59 +0000 (04:47 -0700)]
Build tests as self contained apps for mobile targets (#36262)
This uses the SDK to publish tests as self contained apps before building the app bundle using the built runtime pack.
I moved the `RunTests.sh` output path to `BundleDir` as whenever we start sending to helix, there is no need to .zip up the whole `OutDir` as we can just send the bundle + `RunTests.sh` script.
Krzysztof Wicher [Tue, 12 May 2020 08:29:47 +0000 (01:29 -0700)]
Merge pull request #35683 from krwq/nullable-xml-2
Nullable: System.Xml, part 2
Zoltan Varga [Tue, 12 May 2020 07:29:02 +0000 (03:29 -0400)]
Build WASM runtimes (#35566)
Sean Hall [Tue, 12 May 2020 06:24:02 +0000 (16:24 +1000)]
Fix vs testing link (#36261)
Koundinya Veluri [Mon, 27 Apr 2020 23:30:06 +0000 (16:30 -0700)]
Fix Unix named mutex crash during some race conditions
Below when I refer to "mutex" I'm referring to the underlying mutex object, not an instance of the `Mutex` class.
- When the last reference to a mutex is closed while the lock is held by some thread and a pthread mutex is used, the mutex was attempted to be destroyed but that has undefined behavior
- There doesn't seem to be a way to behave exactly like on Windows for this corner case, where the mutex is destroyed when the last reference to it is released, regardless of which process has the mutex locked and which process releases the last reference to it (they could be two different processes), including in cases of abrupt shutdown
- For this corner case I settled on what seems like a decent solution and compatible with older runtimes:
- When a process releases its last reference to the mutex
- If that mutex is locked by the same thread, the lock is abandoned and the process no longer references the mutex
- If that mutex is locked by a different thread, the lifetime of the mutex is extended with an implicit ref. The implicit ref prevents this or other processes from attempting to destroy the mutex while it is locked. The implicit ref is removed in either of these cases:
- The mutex gets another reference from within the same process
- The thread that owns the lock exits and abandons the mutex, at which point that would be the last reference to the mutex and the process would not reference the mutex anymore
- The implementation based on file locks is less restricted, but for consistency that implementation also follows the same behavior
- There was also a race between an exiting thread abandoning one of its locked named mutexes and another thread releasing the last reference to it, fixed by using the creation/deletion process lock to synchronize
Fix for https://github.com/dotnet/runtime/issues/34271 in master
Closes https://github.com/dotnet/runtime/issues/28449 - probably doesn't fix the issue, but trying to enable it to see if it continues to fail
Jeremy Koritzinsky [Tue, 12 May 2020 05:18:17 +0000 (22:18 -0700)]
Handle struct marshal stubs in ILStubManager::TraceManager. (#36249)
Fixes #36248
Tomas Weinfurt [Tue, 12 May 2020 01:48:54 +0000 (18:48 -0700)]
disable ServerAsyncAuthenticate_MismatchProtocols_Fails again (#36250)
Tanner Gooding [Tue, 12 May 2020 01:32:04 +0000 (18:32 -0700)]
[ARM64] Implement Duplicate and DuplicateSelectedScalar (#36144)
* Adding support for DuplicateToVector64 and DuplicateToVector128 to Arm.AdvSimd and Arm.AdvSimd.Arm64
* Adding tests for DuplicateToVector64 and DuplicateToVector128
* Adding support for DuplicateSelectedScalarToVector64 and DuplicateSelectedScalarToVector128 to Arm.AdvSimd and Arm.AdvSimd.Arm64
* Adding tests for DuplicateSelectedScalarToVector64 and DuplicateSelectedScalarToVector128
* Regenerating tests for the newly added HWIntrinsics
* Ensure parentheses exist
* Removing the AdvSimd.Arm64 hwintrinsiclist entry for DuplicateToVector64
* Removing the rest of the NI_AdvSimd_arm64_DuplicateToVector64 usages and clarifying a comment
* Moving break outside the braces for consistency
* Removing another Arm64.DuplicateToVector64
* Removing the AdvSimd.Arm64.DuplicateToVector64 tests
* Adding tests covering DuplicateToVector64/DuplicateToVector128 immediate inputs
* Regenerating the ARM64 HWIntrinsic tests
* Fixing the DuplicateToVector immediate tests
* Regenerating the DuplicateToVector immediate tests
Youssef Victor [Tue, 12 May 2020 01:12:22 +0000 (03:12 +0200)]
Delete outdated todo comment (#36224)
Anirudh Agnihotry [Tue, 12 May 2020 00:56:45 +0000 (17:56 -0700)]
update branding to preview6 (#36247)
Simon Nattress [Mon, 11 May 2020 23:35:06 +0000 (16:35 -0700)]
Reduce DebugInfoTable size (#36174)
The DebugInfoTableNode contains an array of native format vertices that currently are not unified. Many methods have identical debug info blobs so they can be collapsed to save output binary size. For identical debug info blobs, pass the same byte array reference to the native format writer which will unify on the object reference.
In the framework composite image for example, 70% of the debug infos are duplicates. Removing the duplicates reduces the composite image size by 5%.
Youssef Victor [Mon, 11 May 2020 23:34:17 +0000 (01:34 +0200)]
Fix empty ParamName in ArgumentException (#36208)
* Update reflectioninvocation.cpp
* Update TypeInfoTests.cs
* Update EnumConverterTest.cs
Eric Erhardt [Mon, 11 May 2020 22:02:42 +0000 (17:02 -0500)]
Fix up nint code after latest changes to use compiler nint. (#36220)
Mitchell Hwang [Mon, 11 May 2020 21:57:51 +0000 (17:57 -0400)]
[testing] Rename Prop AppleTestBuilderDir to AppleAppBuilderDir (#36227)
Co-authored-by: Mitchell Hwang <mihw@microsoft.com>
Viktor Hofer [Mon, 11 May 2020 21:37:25 +0000 (23:37 +0200)]
Remove EmbeddedResourceUseDependentUponConvention (#36140)
Underlying issue is fixed: https://github.com/microsoft/msbuild/issues/4740
Anirudh Agnihotry [Mon, 11 May 2020 20:59:11 +0000 (13:59 -0700)]
Use already defined generateAssemblyReferenceSource rather defining a new target (#35818)
* use arcade target
* extra space
* fixes generation of reference src from runtime projects
* run target to get genapi
* use referencePath to get references
* adding GenerateReferenceSource target
* added the target name
Jarret Shook [Mon, 11 May 2020 20:01:19 +0000 (13:01 -0700)]
Setup pr and batch runs for dev/infrsatructure (#36218)
Tanner Gooding [Mon, 11 May 2020 19:43:07 +0000 (12:43 -0700)]
Ensure we mark op2 as delayFree if it is rmw and the parent node returns a non-SIMD type (#36226)
Aaron Robinson [Mon, 11 May 2020 19:29:42 +0000 (12:29 -0700)]
Update the mscorlib.md document. (#36225)
Rename mscorlib.md to corelib.md.
Remove no longer relevant details.
Egor Bogatov [Mon, 11 May 2020 18:47:13 +0000 (21:47 +0300)]
Fix iOS and Android samples (#36223)
Elinor Fung [Mon, 11 May 2020 18:06:12 +0000 (11:06 -0700)]
Make global ComWrappers for marshalling respect requested IID (#36054)
Youssef Victor [Mon, 11 May 2020 18:05:14 +0000 (20:05 +0200)]
Include Content-Type in exception in ReadFromJsonAsync (#36186)
* Update Strings.resx
* Update HttpContentJsonExtensions.cs
Andrew Au [Mon, 11 May 2020 18:00:41 +0000 (11:00 -0700)]
Expose the parsed signature in structured format (#36190)
Viktor Hofer [Mon, 11 May 2020 18:00:11 +0000 (20:00 +0200)]
Use TargetFramework conditions consistently in libraries (#35956)
* Use TargetFramework condition consistently in libs
* Add docs section to describe the guideline
* Update Microsoft.Extensions.DependencyInjection.csproj
* Outline TargetFramework DesingTimeBuild issue
* Update Microsoft.Extensions.DependencyInjection.csproj
dotnet-maestro[bot] [Mon, 11 May 2020 17:34:48 +0000 (17:34 +0000)]
Update dependencies from https://github.com/dotnet/llvm-project build
20200511.1 (#36210)
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk: 6.0.1-alpha.1.20254.1 -> 6.0.1-alpha.1.20261.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
ts2do [Mon, 11 May 2020 17:32:59 +0000 (12:32 -0500)]
Add invalidation to DTFI's SetAllDateTimePatterns (#34438)
Invalidate derived patterns to match the behavior of invoking the corresponding property setters
Tarek Mahmoud Sayed [Mon, 11 May 2020 17:29:17 +0000 (10:29 -0700)]
Revert "Revert "Remove superflous CheckReleased call which will slow down Event Log Reading up to 20x times. (#35911)" (#36143)" (#36188)
This reverts commit
ca8c9dea8e30a9701160e4cd61b5b26f209499ff.
Manish Godse [Mon, 11 May 2020 17:24:37 +0000 (10:24 -0700)]
Preempt Watson exception handling (#36179)
* switch to preemp GC before DW version lookup
* move preempt to PopulateBucketParameters
* Adding GC_TRIGGERS to callchain of CaptureUnhandledInfoForWatson
* explictly adding PREEMPTIVE to all DwGetFileVersionInfo codepaths.
Omair Majid [Mon, 11 May 2020 15:58:20 +0000 (11:58 -0400)]
Add some upcoming distro RIDs
This adds some RIDs that we know are current/upcoming:
- Fedora 33 is in development, and the version after this is most likely
going to be Fedora 34. Adding this RID now, so we can get this RID in
all current releases when it comes time to build on Fedora 34
- RHEL has generally committed to doing a major release every 3 years.
With RHEL 8 released in 2019, RHEL 9 is under development. There's
even a plan on how to create that from Fedora here:
https://fedoraproject.org/wiki/Changes/ELN_Buildroot_and_Compose
- If there's a RHEL 9, there will most likely be an equivalent CentOS 9.
Lets add that too.
- CentOS 7 has an aarch64 port. As does CentOS 8.
Steve Harter [Mon, 11 May 2020 15:54:41 +0000 (10:54 -0500)]
Improve deserialization perf for case-insensitive and missing-property cases (#35848)
Eric Erhardt [Mon, 11 May 2020 14:47:01 +0000 (09:47 -0500)]
Return the correct OSVersion on OSX like systems. (#36029)
* Return the correct OSVersion on OSX like systems.
Fix #34977
* Rename files to not have Linux when they aren't Linux specific.
* Assert OSVersion Build number is valid.
* PR feedback
Move interop code to Common\src\Interop.
Specify the full path to libobjc.dylib.
Fix objc_msgSend_stret for ARM64.
* Specify full path to libproc.dylib.
Fix #24095
Jan Kotas [Mon, 11 May 2020 10:57:07 +0000 (03:57 -0700)]
Port GC changes from dotnet/corert (#36197)