David Fowler [Tue, 22 Jun 2021 21:07:54 +0000 (14:07 -0700)]
Improve performance of IsRootScope check (#54555)
- Stash a field instead of doing an equality comparison.
Fixes #54351
Andrew Au [Tue, 22 Jun 2021 20:28:59 +0000 (13:28 -0700)]
Fix a memory corruption caused by an integer overflow (#54510)
Maoni Stephens [Tue, 22 Jun 2021 20:27:31 +0000 (13:27 -0700)]
get rid of an unnecessary join (#54312)
I think this join was left there by accident when we were doing the write watch feature. I'm puzzled why I didn't notice it. the comment was also inconsistent which strengthens my belief that this was a mistake. we don't need a join here (there used to not be a join) and disabling the dirty pages tracking can be done anywhere while the EE is stopped since write barriers cannot be invoked.
Bruce Forstall [Tue, 22 Jun 2021 20:12:05 +0000 (13:12 -0700)]
Disable failing test BasicTestWithMcj under GCStress (#54566)
Tracking: https://github.com/dotnet/runtime/issues/54203
Steve Pfister [Tue, 22 Jun 2021 19:00:17 +0000 (15:00 -0400)]
[Android] Fix AndroidAppBuilder to work w/ AOT+LLVM (#53643)
We were missing a few key additions to make sure we can test against AOT+LLVM. This change will make sure we link against all the .dll-llvm.o files produced from the AOT compiler and include the right mtriple for each architecture.
Fixes #53628
Fan Yang [Tue, 22 Jun 2021 17:36:57 +0000 (13:36 -0400)]
[mono]Re-enable runtime tests on Android arm64 (#49662)
* Re-enable runtime tests on Android arm64
* disable irrelevant CI lanes
* Disable more dotnet-linker-tests and runtime-dev-innerloop CI lanes
* Comment out definition for DISABLE_LOGGING
* Remove defining logging for android
* Extend app installation timeout limit
* Fix command prefix for windows
* Enable tests excluded only for Android arm64
* Disable failed test on arm64
* Revert hacks
* Revert unintended changes
* More...
* Only run tests on arm64 for rolling build
* Fix merge error
Bruce Forstall [Tue, 22 Jun 2021 16:57:09 +0000 (09:57 -0700)]
Disable failing tests under GCStress (#54532)
https://github.com/dotnet/runtime/issues/51477
https://github.com/dotnet/runtime/issues/53359
Steve Pfister [Tue, 22 Jun 2021 16:44:55 +0000 (12:44 -0400)]
Import the correct MacCatalyst workload pack (#54558)
In https://github.com/dotnet/runtime/pull/54361 there was an incorrect import of the maccatalyst aot workload pack. This fix corrects the problem.
Fixes https://github.com/dotnet/runtime/issues/54494
Ankit Jain [Tue, 22 Jun 2021 16:35:38 +0000 (12:35 -0400)]
[wasm] Collect, and process satellite assemblies automatically (#53656)
Jeremy Koritzinsky [Tue, 22 Jun 2021 16:32:53 +0000 (09:32 -0700)]
Fail COM CoClass creation during construction instead of during jitting (#54508)
Andrew Au [Tue, 22 Jun 2021 16:00:43 +0000 (09:00 -0700)]
Fix deadlock (#54426)
Stephen Toub [Tue, 22 Jun 2021 13:44:28 +0000 (09:44 -0400)]
Fix XML in Version.Details.xml
Pavel Savara [Tue, 22 Jun 2021 13:02:45 +0000 (15:02 +0200)]
[WIP][wasm][testing] remote loop network tests via xharness and websocket (#54289)
Makes it possible to run LoopbackServer tests with WASM
- conditional compilation of LoopbackServer via #if TARGET_BROWSER
- minimal implementation of WebSocketStream for the unit tests
- simple SocketWrapper class to abstract Socket and WebSocket close/dispose/shutdown
- added handling of CORS headers and pre-flight requests as necessary
- new xharness web server middleware
- adding it to helix payload
Přemek Vysoký [Tue, 22 Jun 2021 11:20:02 +0000 (13:20 +0200)]
Revert "[main] Update dependencies from 9 repositories (#54218)" (#54541)
This reverts commit
04ad80aff37e2ef5eac0cc6d2a895ccf0f9d65a3.
dotnet-maestro[bot] [Tue, 22 Jun 2021 09:53:13 +0000 (09:53 +0000)]
[main] Update dependencies from 9 repositories (#54218)
[main] Update dependencies from 9 repositories
- Merge branch 'main' into darc-main-
b0a81754-f267-416d-a8e2-
cf56f8c1ee3e
- PInvoke warnings fixes for OOB assemblies
- Update testPackages.proj
- Update testPackages.proj
- Update dependencies from https://github.com/dotnet/arcade build
20210621.1
- Merge branch 'main' into darc-main-
b0a81754-f267-416d-a8e2-
cf56f8c1ee3e
Conflicts:
eng/Version.Details.xml
eng/Versions.props
- Fix xml
- Update dependencies from https://github.com/dotnet/xharness build
20210622.2
Michael Simons [Tue, 22 Jun 2021 08:14:07 +0000 (03:14 -0500)]
ArPow stage 1: local source-build infrastructure (#53294)
* Initial arcade-powered source-build infra
* Add patches, fixup from 5.0
* Rename patches to match 6.0-p1 work
* Add source-build specific build script
* Incorporate build-source-build.sh, into eng/
* Run inner build script, through coreclr
* Initial source-build args based on live build (not props file)
* Cleanup: add RID comments, rm empty/absolute args
* Fix subsets
* Disable sourcelink in env, not args
* Fix CI NZEC
* Revert "Use same code to DetectCiphersuiteConfiguration for portable and non-portable builds"
This reverts commit
464010d9d0241bbdcbfbda25b32e78991ddf6093.
* Fix portability
* Fix AllJits build
* Fix missing crossgen2 for non-portable RID
* Create supplemental intermediate nupkgs
* Tweak category names
* Use centralized supplemental nupkg infra
* Add additional 6.0 patches
* Patch updates after merging in main
* SourceBuild.props cleanup
* Fix issue with incorrect patch merge
* Patch updates
* Edit clr.tools patch
* patch updates
* Revert patch integration
* Patch updates
* Edits per code review feedback
* ILAsm workaround
* patch updates
* Move logic to set ILAsmToolPath for source-build
* Update eng/SourceBuild.props
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* Remove libraries specific patches
* Patch updates necessary with latest main merge
* Add back libraries-packages.proj harvesting patch
* Refactor intermediate package split to be chunkier
* Integrate patch 0017
* Subsets update per code review
* Remove obsolete patch
* Removed patches that were integrated into main
* Remove two additional patches
* Remove remaining patches
Co-authored-by: Davis Goodin <dagood@microsoft.com>
Co-authored-by: dseefeld <dseefeld@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Aaron Robinson [Tue, 22 Jun 2021 06:44:16 +0000 (23:44 -0700)]
Convert some COM object checking functions to managed code (#54471)
* Convert COM object checking to managed code
* Convert IsComWrapperClass to a managed "can cast to" implementation.
* Add testing for updates.
Fan Yang [Tue, 22 Jun 2021 01:58:30 +0000 (21:58 -0400)]
[Test] Move leakwheel to Pri1 (#54522)
* Move to Pri1
* Remove leakwheel from issues.targets file for mono
Manish Godse [Tue, 22 Jun 2021 01:52:40 +0000 (18:52 -0700)]
removing more crossgen code from being built. (#54458)
Should improve build times further.
Prashanth Govindarajan [Tue, 22 Jun 2021 01:22:30 +0000 (18:22 -0700)]
More Parse tests for double, single and Half (#50394)
* Test ibm-fpgen locally for validation
* sq
Bruce Forstall [Tue, 22 Jun 2021 01:10:58 +0000 (18:10 -0700)]
Disable mainv1 and mainv2 for GCStress due to #54203 (#54514)
Kevin Jones [Mon, 21 Jun 2021 23:36:51 +0000 (19:36 -0400)]
SYSLIB0026: Obsolete mutable X509 certificate APIs
Oded Hanson [Mon, 21 Jun 2021 22:14:16 +0000 (01:14 +0300)]
Add name of corrupted certificate to CryptographicException on Mac
* Add name of corrupted certificate to CryptographicException on Mac
When trying to create a CertificateData out of raw X509 byte array it might throw if the data is corrupted. The existing exception message does not provide any information which might help the user identify the corrupted certificate and fix it.
This change, makes a native call to SecCertificateCopySubjectSummary which will provide a human readable summary of the certificate, and will generate an exception message using this string.
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>
Oded Hanson [Mon, 21 Jun 2021 22:12:18 +0000 (01:12 +0300)]
Dispose transient CFData in Interop.AppleCrypto.X509GetRawData
Layomi Akinrinade [Mon, 21 Jun 2021 22:08:27 +0000 (15:08 -0700)]
Add code to flush JSON writer after root-level fast-path serialization (#54502)
James Newton-King [Mon, 21 Jun 2021 21:45:57 +0000 (09:45 +1200)]
HTTP/3: Fix header field length calculation (#54442)
Fan Yang [Mon, 21 Jun 2021 20:04:39 +0000 (16:04 -0400)]
[Mono] Enable runtime tests to run on Android x64 with interpreter (#54084)
* Enable Android x64 with interpreter
* Make variable RuntimeVariant available for testenvironment
* Pass down runtimeVariant
* Verify that tests are running with interpreter
* Pass MONO_ENV_OPTIONS value to the app
* Set ForceInterpreter to true
* Change default value for interp to false
* dummy commit
* dummy commit 2
* dummy commit
* Configure interp for Android
* Pass RuntimeVariant down as a parameter
* Add issue link
* Enable Mono with interpreter on desktop
* Disable Android x64 with JIT
* Revert hacks to enable all lanes
* revert unintentional change
* Disable Vector128_1_r*
Thad House [Mon, 21 Jun 2021 19:56:27 +0000 (12:56 -0700)]
Switch MsQuicOpen to MsQuicOpenVersion (#54443)
* Switch MsQuicOpen to MsQuicOpenVersion
MsQuicOpenVersion is designed so we can update the API without breaking old consumers. The version of MsQuic specified in the readme already has this change, so it is safe to completely switch over.
Also switches the API to function pointers, as it was easier then updating the delegate too.
* Add version contant
Jo Shields [Mon, 21 Jun 2021 19:30:03 +0000 (15:30 -0400)]
Add UnixFilePermissions.xml for Mono AOT compilers (#54501)
* Add UnixFilePermissions.xml for Mono AOT compilers
Ref: https://github.com/dotnet/runtime/issues/53545
Ref: https://github.com/dotnet/sdk/issues/16894
Ref: https://github.com/xamarin/xamarin-macios/pull/11869
Ref: https://github.com/xamarin/xamarin-android/pull/6010
* Only set permissions on !windows
Steve MacLean [Mon, 21 Jun 2021 19:10:16 +0000 (15:10 -0400)]
Add Cross DAC documentation (#54498)
* Add Cross DAC documentation
Stephen Toub [Mon, 21 Jun 2021 17:59:46 +0000 (13:59 -0400)]
Avoid Attribute.InternalGetCustomAttributes overheads when inherit==true is useless (#54402)
Stephen Toub [Mon, 21 Jun 2021 17:59:28 +0000 (13:59 -0400)]
Special-case no attributes in GetCustomAttributeData (#54405)
Michael Simons [Mon, 21 Jun 2021 17:42:57 +0000 (12:42 -0500)]
Build for any RID if building from source (#54223)
Eric Erhardt [Mon, 21 Jun 2021 17:10:47 +0000 (12:10 -0500)]
Remove BitmapSelector.Suffix property (#54364)
With https://github.com/dotnet/runtime/issues/22761 and https://github.com/dotnet/corefx/pull/22833, BitmapSelector.Suffix will always be null. This means this feature is dead code, and users are unable to use it.
Removing this dead code because:
1. It doesn't do anything.
2. It is causing ILLink warnings, and it is easier to delete than to try to address the warnings.
I logged https://github.com/dotnet/runtime/issues/54363 to follow up and either re-implement this feature, or obsolete the attributes that no longer have any effect on the app.
Takym (たかやま) [Mon, 21 Jun 2021 17:06:29 +0000 (02:06 +0900)]
Syntax highlighted `type-loader.md` (#54497)
* Syntax-highlighted `type-loader.md`
* Update type-loader.md
David Fowler [Mon, 21 Jun 2021 15:24:16 +0000 (08:24 -0700)]
Fix the slot calculation for multiple services (#54462)
xtqqczze [Mon, 21 Jun 2021 15:21:52 +0000 (16:21 +0100)]
Clarify Visual Studio minimum requirement (#52820)
Daniel Genkin [Mon, 21 Jun 2021 14:10:58 +0000 (10:10 -0400)]
[WASM] Converted mono-config.js to mono-config.json (#53606)
* converted mono-config.js to mono-config.json
* Fixed test
* fixed handling of case where Module isn't defined
* Fixed remaining failing tests
* Replaced alerts with console.log to fix Helix test
* replaced all vars with consts
* use fetch
* clean syntax
* prevent timeouts when the mono-config file fails to load
* Moved config file loading to preInit
* Fixed tests
* Adjusted file linking
* removed the unnecessary js_support.js
* cleaned up function
* updated samples
* removed lingering pre-js flag
* Fixed trimming tests
* addressed PR comments
* removed useless function
Maxim Lipnin [Mon, 21 Jun 2021 07:20:03 +0000 (10:20 +0300)]
Remove redundant P/Invoke-s in S.D.Process on Apple platforms (#54273)
* Remove P/Invoke to SystemNative_ConfigureTerminalForChildProcess which doesn't exist on Apple platforms
* Address the feedback based on the ifdef approach
* Add IsiOSLike property
* Use a partial method approach
* Address the feedback
Aleksey Kliger (λgeek) [Mon, 21 Jun 2021 07:13:44 +0000 (03:13 -0400)]
Allow mono samples to build and run again (#54089)
Eric StJohn [Sat, 19 Jun 2021 20:31:12 +0000 (13:31 -0700)]
Remove System.Security.Cryptography.Cng from ASP.NET transport package (#54428)
Bruce Forstall [Sat, 19 Jun 2021 17:07:59 +0000 (10:07 -0700)]
Disable tests for #54007 (#54207)
Tomas Weinfurt [Sat, 19 Jun 2021 00:37:42 +0000 (02:37 +0200)]
enable ZeroByteRead_BlocksUntilDataAvailableOrNops test for quic (#54431)
Bruce Forstall [Fri, 18 Jun 2021 23:57:05 +0000 (16:57 -0700)]
Remove crossgen from test build and run scripts (#54348)
Bruce Forstall [Fri, 18 Jun 2021 23:51:50 +0000 (16:51 -0700)]
Fix AMD64 epilog ABI (#54357)
* Fix AMD64 epilog ABI
The Windows AMD64 epilog ABI states that an `lea rsp,[rbp+constant]` instruction
may only be used if a frame pointer has been reported to the OS in the prolog
unwind info, otherwise an `add rsp, constant` instruction must be used.
There were a number of cases where the JIT used the `lea` form simply because
a frame pointer had been established and was available, even though it had not
been reported to the OS (and, thus, the frame was effectively an `rsp` frame).
Fix this by using the same condition in the epilog for determining which form
to use, `lea` or `add`, that was used in the prolog to determine whether or not
to report the frame pointer in the unwind info.
Fixes #54320
* Formatting
* Fix OSR
Bruce Forstall [Fri, 18 Jun 2021 23:48:58 +0000 (16:48 -0700)]
Disable two Interop tests failing in outerloop under crossgen2 (#54435)
https://github.com/dotnet/runtime/issues/54379
https://github.com/dotnet/runtime/issues/54316
Ankit Jain [Fri, 18 Jun 2021 22:40:07 +0000 (18:40 -0400)]
[wasm][aot] Add support for passing items to the aot/helix test project (#54425)
Vladimir Sadov [Fri, 18 Jun 2021 20:48:22 +0000 (13:48 -0700)]
Enable loading composite r2r images from a singlefile bundle (#53739)
* Enable loading composite r2r images from a singlefile bundle
Eirik Tsarpalis [Fri, 18 Jun 2021 20:17:18 +0000 (23:17 +0300)]
Backport bugfixes, infrastructural changes and perf improvements from the polymorphism feature branch (#54420)
* backport opportunistic bugfixes
* strengthen debug assertions and add clarifying comments
* Rework WriteStack/ReadStack implementations
* Use array instead of list for storing frames. Previous frames can now be passed by reference
* Ensure that the _count field always reflects the current depth.
* Remove StackFrame.Reset() methods which are occassionally a source of dirty frames being reused.
* Take advantage of JIT optimizations in the serialization hot path
* address PR feedback
Tomas Weinfurt [Fri, 18 Jun 2021 19:40:18 +0000 (21:40 +0200)]
set UsableAfterCanceledReads for QUIC tests (#54416)
Bruce Forstall [Fri, 18 Jun 2021 19:23:40 +0000 (12:23 -0700)]
Create a summary Markdown file for all asm diffs (#54430)
Create a per-MCH file summary.md file, then accumulate them all into
a single overall summary Markdown file, for use in GitHub comments.
Uses the existing `jit-analyze --md` functionality.
Also, change asm diffs to not report missing data or asm diffs as a
replay failure.
Finally, don't overwrite superpmi.log files (or the new diff_summary.md files):
create new, unique file names for each run.
Elinor Fung [Fri, 18 Jun 2021 14:55:08 +0000 (07:55 -0700)]
Make some p/invokes blittable (#54370)
Tomas Weinfurt [Fri, 18 Jun 2021 14:03:39 +0000 (16:03 +0200)]
fix some failing quic tests (#54326)
* fix some failing quic tests
* feedback from review
* add comment
Michael Simons [Fri, 18 Jun 2021 13:26:13 +0000 (08:26 -0500)]
Condition MibcArgs for source-build (#54225)
Gleb Balykov [Fri, 18 Jun 2021 12:38:22 +0000 (15:38 +0300)]
Fix Linux x86 build (#50836)
James Newton-King [Fri, 18 Jun 2021 10:49:46 +0000 (22:49 +1200)]
HTTP/3: Remove ASP.NET Core specific code from QPackEncoder (#54378)
Michael Simons [Fri, 18 Jun 2021 07:52:22 +0000 (02:52 -0500)]
Exclude experimental projects from source-build (#54222)
Tomas Weinfurt [Fri, 18 Jun 2021 07:00:05 +0000 (09:00 +0200)]
fix MsQuicStream counting on failure (#54249)
Tanner Gooding [Fri, 18 Jun 2021 02:06:29 +0000 (19:06 -0700)]
Implement NativeMemory (#54006)
* Implement NativeMemory
* Exposing additional APIs as approved
* Ensure we have a test covering alignment and size being less than sizeof(void*)
* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeMemory.Unix.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Responding to PR feedback
* Adding additional alignment test coverage for 1 to 16384
* Add coverage for 65k and 1/2/4MB alignments
* Fixing the Native\Unix\System.Native\CMakeLists.txt
* Update src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/NativeMemory.Unix.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Don't call Buffer.Memmove in NativeMemory.AlignedRealloc if ptr is null
* Updating NativeMemory.AlignedRealloc to correctly copy only the size of the last allocation
* Ensure check_symbol_exists(HAVE_ALIGNED_ALLOC) is under the non-apple paths
* Check for malloc_usable_size in malloc_np for FreeBSD and ensure tests compile
* Fix the ReallocSmallerToLargerTest test
* Handle that posix_memalign differs from aligned_alloc for size == 0
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Larry Ewing [Fri, 18 Jun 2021 01:23:29 +0000 (20:23 -0500)]
Fix casing (#54384)
Larry Ewing [Fri, 18 Jun 2021 00:25:44 +0000 (19:25 -0500)]
Only include Microsoft.NET.Runtime.RuntimeConfigParser.Task on mobile (#54361)
* Only include Microsoft.NET.Runtime.RuntimeConfigParser.Task on mobile
* Add maccatalyst target imports per request
Stephen Toub [Thu, 17 Jun 2021 23:58:30 +0000 (19:58 -0400)]
Lazy-allocate ValidationState.CurPos (#54346)
The array is only used for a subset of validators; no point in paying for this array for every ValidationState instance even if it's not going to be used.
Stephen Toub [Thu, 17 Jun 2021 23:57:43 +0000 (19:57 -0400)]
Fix lots of unnecessary XmlValueGetter delegate allocations (#54344)
Fredrik Høisæther Rasch [Thu, 17 Jun 2021 22:15:45 +0000 (00:15 +0200)]
Ms.Ext.Options.OptionsBuilder.BindConfiguration adds ConfigurationChangeTokenSource to DI (#46740)
Mateo Torres-Ruiz [Thu, 17 Jun 2021 22:09:27 +0000 (15:09 -0700)]
Codesign apphosts on Mac (#53913)
* Add CodeSign to HostWriter
* Fix test
* PR feedback
* Add EnableMacOSCodeSign to CreateAppHost
Add tests
* Check that OSPlatform is OSX before running codesign.
* Guard from filepaths containing spaces
* Move apphost exceptions to a single file
Modify apphost exceptions inheritance
* Move AppHostUpdateException
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Add exit code to AppHostSigningException
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Bruce Forstall [Thu, 17 Jun 2021 21:13:47 +0000 (14:13 -0700)]
Update superpmi_setup.py script with more exclusions (#54309)
I noticed a bunch of failures trying to run crossgen2 on these binaries
in one of our collections.
Also, make the checking case-insensitive: I saw that we were failing to
match "corerun.exe" against "CoreRun.exe" that was in the exclusion list.
Vitek Karas [Thu, 17 Jun 2021 20:21:55 +0000 (22:21 +0200)]
Add a test for Expression.Property and its handling of property accessors (#54279)
* Add a test for Expression.Property and its handling of property accessors
This mostly a linker test as this effectively validates linker feature from https://github.com/mono/linker/pull/1880.
But having a clean trimming tests here is better validation for this specific case.
* Add one more test case as per feedback
* Remove debugging leftover
imhameed [Thu, 17 Jun 2021 17:04:56 +0000 (10:04 -0700)]
[mono] Enable more HardwareIntrinsics tests and fix more amd64 intrinsics bugs (#54127)
Enables nearly all disabled `JIT/HardwareIntrinsics` tests.
`StoreNonTemporal_{r,ro}` and `Sse42.X64/Crc32_{r,ro}` remain disabled due to
issues that are out of scope for this PR.
Changes:
* Enable `pclmul` and `aes` when AOT compiling runtime tests.
* Add a `immediate_unroll_unreachable_default`, used to mark the default case
in an unrolled immediate switch as unreachable.
* Fix `OP_MULX_HL{32,64}`: the low-word address is sometimes an integer produced
by ptrtoint
Fixes compilation of `JIT/HardwareIntrinsics/X86/Bmi2/Bmi2_{r,ro}/**`
and `JIT/HardwareIntrinsics/X86/Bmi2.X64/Bmi2.X64_{r,o}/**`.
* Implement immediate unrolling for `Ssse3.AlignRight`
Fixes `JIT/HardwareIntrinsics/X86/Ssse3/Ssse3_{r,ro}/**`.
* Implement the 3-argument overload of `Bmi1.BitFieldExtract`
Fixes `JIT/HardwareIntrinsics/X86/Bmi1/Bmi1_{r,ro}/**` and
`JIT/HardwareIntrinsics/X86/Bmi1.X64/Bmi1.X64_{r,ro}/**`.
* Implement immediate unrolling for `Aes.KeygenAssist`
Fixes `JIT/HardwareIntrinsics/X86/Aes/Aes_{r,ro}/**`.
* Implement immediate unrolling for `Sse41.MultipleSumAbsoluteDifferences`
Fixes
`JIT/HardwareIntrinsics/X86/Sse41/MultipleSumAbsoluteDifferences_{r,ro}/**`.
* Mask vector selection index in `OP_XEXTRACT_*` and `OP_XINSERT_*`
LLVM `insertelement` and `extractelement` yield poison values for lane
indices that are out of bounds, but the underlying instructions on amd64 only
care about the lower few bits in the immediate octet and the
`Extract.UInt64.129` etc. tests in
`JIT/HardwareIntrinsics/X86/Sse41.X64/Sse41.X64_r` test for this.
Also, rename `OP_SSE41_INSERT` to `OP_SSE41_INSERTPS` and specialize this to
the `insertps` overload of `Sse41.Insert`.
Implement immediate unrolling for `OP_SSE41_INSERTPS`.
Fixes `JIT/HardwareIntrinsics/X86/Sse41.X64/Sse41.X64_{r,ro}/**` and .
`JIT/HardwareIntrinsics/X86/Sse41/Sse41_{r,ro}/**`.
* Copy the upper lanes over to the destination in `OP_SSE_CMPSS` and `OP_SSE2_CMPSD`
Also fix the overloaded types associated with SSE saturating arithmetic LLVM
intrinsic functions.
Fixes `JIT/HardwareIntrinsics/X86/Sse2/Sse2_{r,ro}/**` and
`JIT/HardwareIntrinsics/X86/Sse/Sse_{r,ro}/**`.
* Implement immediate unrolling for `Pclmulqdq.CarrylessMultiply`
Fixes `JIT/HardwareIntrinsics/X86/Pclmulqdq/Pclmulqdq_{r,ro}`.
Bruce Forstall [Thu, 17 Jun 2021 17:01:49 +0000 (10:01 -0700)]
Fix SuperPMI handling of resolveVirtualMethod (#54315)
Change #53567 introduced new functionality to the JIT-EE
resolveVirtualMethod() API. This fixes the SuperPMI implementation
in the case where the API returns `false`, where some data fields
are not initialized.
Fixes crossgen2 SuperPMI collections.
Fixes #54310
Tarek Mahmoud Sayed [Thu, 17 Jun 2021 16:23:07 +0000 (09:23 -0700)]
Fix Activity last tag deletion (#54306)
Stephen Toub [Thu, 17 Jun 2021 15:27:09 +0000 (11:27 -0400)]
Remove some overhead from XmlNode.SelectSingleNode (#54299)
* Remove unnecessary cost from XmlNode.SelectSingleNode
It's currently implemented by delegating to SelectSingleNodes and returning the first one. While the list is lazily-populated, this still entails creating an `XPathNodeList`, creating a `List<XmlNode>`, storing the enumerated into the list, and then returning the element from the list, which is then thrown away. With just a few lines, we can cut through all of that.
* Make XPathScanner and XPathParser into structs
No need for these to be allocated classes. They can just live on the stack where they're created.
* Reduce ScanName overhead
This shows up on the hot path of parsing the xpath expression. We can use a span to avoid bounds checking.
* Avoid bounds check in NextChar
NextChar is used by lots of routines to advance to the next character. We can streamline it to avoid the bounds check when indexing into the string.
* Optimize SkipSpace for there not being any
The typical case is there isn't any whitespace, so inline that fast check. This was showing up as a few percentage of a simple scenario.
Stephen Toub [Thu, 17 Jun 2021 14:43:27 +0000 (10:43 -0400)]
Delete invalid assert in PathInternal.CaseSensitivity (#54325)
* Delete invalid assert in PathInternal.CaseSensitivity
* Update PathInternal.CaseSensitivity.cs
Jose Perez Rodriguez [Thu, 17 Jun 2021 13:49:13 +0000 (06:49 -0700)]
Resolving first part of System.Drawing.Common IlLink warnings (#54076)
* Resolving first part of System.Drawing.Common IlLink warnings
* Address PR feedback
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Viktor Hofer [Thu, 17 Jun 2021 13:19:05 +0000 (15:19 +0200)]
Add Dependency for wcf projects to compat pack (#54319)
Wraith [Thu, 17 Jun 2021 13:14:16 +0000 (14:14 +0100)]
Add PipeWriter CanGetUnflushedBytes and UnflushedBytes properties (#54164)
* Add PipeWriter CanGetUnflushedBytes and UnflushedBytes properties and covering tests
* address feedback
Aleksey Kliger (λgeek) [Thu, 17 Jun 2021 13:05:14 +0000 (09:05 -0400)]
[mono] Add accessors m_method_is_final and m_method_is_abstract (#54271)
* [metadata] Cleanup redundant logic
Follow-up to
4e03f3665ad197b005b361b3b7cdf7fcac298ef2
* Add m_method_is_abstract and m_method_is_final accessors
Anton Lapounov [Thu, 17 Jun 2021 11:33:13 +0000 (04:33 -0700)]
Fix profiling R2R code on Windows x64 (#54318)
The kernel requires the function table to be 4-byte aligned.
Vlad Brezae [Thu, 17 Jun 2021 08:40:36 +0000 (11:40 +0300)]
[mono] Fix comparisons between non runtime types (#54062)
* [interp] Fix comparisons between non runtime types
We know that the result of object.GetType and ldftn + GetTypeFromHandle are runtime types and we track it on the compilation stack. If type equality operator is applied on two runtime types we use reference equality comparison, otherwise we use the managed implementation which uses Type.Equals.
* [mini] Fix comparisons between non runtime types
We know that the result of object.GetType and ldftn + GetTypeFromHandle are runtime types and we track it on the compilation stack. If type equality operator is applied on two runtime types we use reference equality comparison, otherwise we use the managed implementation which uses Type.Equals.
* [interp] Resolve GetType on constrained valuetype to the actual type
Steve Dunn [Thu, 17 Jun 2021 04:15:52 +0000 (05:15 +0100)]
Issue 36015 new BinderOption to throw on missing configuration (#53852)
Bruce Forstall [Wed, 16 Jun 2021 22:50:31 +0000 (15:50 -0700)]
Improve live variable JitDump output (#54256)
The variable live range output is unnecessarily verbose. Simplify it; clean it up;
make it smaller; use standard dumpers.
Example, before:
```
////////////////////////////////////////
////////////////////////////////////////
Variable Live Range History Dump for Block 2
IL Var Num 0:
[rcx [ (G_M13669_IG02,ins#0,ofs#0), (G_M13669_IG03,ins#1,ofs#2) ]; rbp[16] (1 slot) [ (G_M13669_IG03,ins#1,ofs#2), NON_CLOSED_RANGE ]; ]
IL Var Num 1:
[rsi [ (G_M13669_IG03,ins#1,ofs#2), NON_CLOSED_RANGE ]; ]
////////////////////////////////////////
////////////////////////////////////////
End Generating code for Block 2
```
After:
```
Variable Live Range History Dump for BB02
V00 this: rcx [(G_M13669_IG02,ins#0,ofs#0), (G_M13669_IG03,ins#1,ofs#2)]; rbp[16] (1 slot) [(G_M13669_IG03,ins#1,ofs#2), ...]
V01 loc0: rsi [(G_M13669_IG03,ins#1,ofs#2), ...]
```
And the end-of-dump output, before:
```
////////////////////////////////////////
////////////////////////////////////////
PRINTING VARIABLE LIVE RANGES:
IL Var Num 0:
[rsi [18 , B5 )rsi [100 , 13A )rsi [14D , 186 )rsi [196 , 1C5 )rsi [1E3 , 271 )rsi [280 , 285 )]
IL Var Num 1:
[rdi [18 , B9 )rdi [100 , 137 )rdi [14D , 184 )rdi [196 , 1C2 )rdi [1E3 , 271 )rdi [280 , 288 )]
IL Var Num 2:
[rbx [18 , CA )rbx [100 , 10D )rbx [14D , 15A )rbx [196 , 1C7 )rbx [1E3 , 271 )rbx [280 , 28B )]
IL Var Num 3:
[rbp [3A , F0 )rbp [100 , 141 )rbp [14D , 18C )rbp [196 , 1D6 )rbp [1E3 , 275 )]
IL Var Num 4:
[r14 [3E , EC )r14 [100 , 13D )r14 [14D , 188 )r14 [196 , 1D2 )r14 [1E3 , 271 )]
IL Var Num 5:
[rcx [22A , 263 )]
////////////////////////////////////////
////////////////////////////////////////
```
After:
```
VARIABLE LIVE RANGES:
V00 arg0: rsi [18, B5); rsi [100, 13A); rsi [14D, 186); rsi [196, 1C5); rsi [1E3, 271); rsi [280, 285)
V01 arg1: rdi [18, B9); rdi [100, 137); rdi [14D, 184); rdi [196, 1C2); rdi [1E3, 271); rdi [280, 288)
V02 arg2: rbx [18, CA); rbx [100, 10D); rbx [14D, 15A); rbx [196, 1C7); rbx [1E3, 271); rbx [280, 28B)
V03 loc0: rbp [3A, F0); rbp [100, 141); rbp [14D, 18C); rbp [196, 1D6); rbp [1E3, 275)
V04 loc1: r14 [3E, EC); r14 [100, 13D); r14 [14D, 188); r14 [196, 1D2); r14 [1E3, 271)
V05 loc2: rcx [22A, 263)
```
Bruce Forstall [Wed, 16 Jun 2021 22:48:09 +0000 (15:48 -0700)]
Remove duplicate tests (#54230)
csgen.1 also exists in src\tests\Regressions\coreclr\0582
simple1 also exists in src\tests\JIT\Directed\Arrays
Eric Erhardt [Wed, 16 Jun 2021 22:47:59 +0000 (17:47 -0500)]
Remove System.Drawing code that doesn't work (#54245)
This code only runs on macOS, and expects mono's System.Windows.Forms assembly is loaded into the process. This is causing trim warnings, and it is easier just to delete this code than try to make ILLink happy.
This code is only called from Graphics.FromHwnd, which doesn't work because the Carbon.framework no longer exists on macOS. Issue https://github.com/dotnet/runtime/issues/22221 is tracking the test failures that use FromHwnd.
Emmanuel André [Wed, 16 Jun 2021 22:41:57 +0000 (00:41 +0200)]
Improve cancellation in StreamPipeReader.ReadAtLeastAsync (#53306)
* Improve cancellation in StreamPipeReader.ReadAtLeastAsync
* Introduce task variable
Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Fix tests
* Expect TaskCanceledException on canceled token
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Jeremy Koritzinsky [Wed, 16 Jun 2021 22:05:54 +0000 (15:05 -0700)]
Follow the same failure behavior for [ComImport] classes on Windows with built-in COM disabled as non-Windows. (#54298)
Alex Perovich [Wed, 16 Jun 2021 21:07:27 +0000 (14:07 -0700)]
Update to latest version of source index package (#54292)
Fan Yang [Wed, 16 Jun 2021 21:02:14 +0000 (17:02 -0400)]
[Mono] Fix memory leak during data registration (#54045)
* Fix memory leak
* Update src/mono/mono/mini/mini-generic-sharing.c
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
* Update src/mono/mono/mini/mini-generic-sharing.c
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
* Fix the return
Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
Jeremy Koritzinsky [Wed, 16 Jun 2021 20:55:33 +0000 (13:55 -0700)]
Remove the `sealed` blittable layoutclass correctness fix because of backcompat. (#54235)
Ankit Jain [Wed, 16 Jun 2021 20:47:40 +0000 (16:47 -0400)]
[wasm][aot][tests] Enable libraries that have been consistently passing (#54291)
* [wasm][aot][tests] Enable libraries that have been consistently passing
.. on the tracking PR.
- `System.Linq.Tests`
Fixes https://github.com/dotnet/runtime/issues/51722
- `System.Runtime.Extensions.Tests`
- `System.IO.Pipelines.Tests`
- the failing tests have been disabled
* [wasm][aot][tests] Disable more tests that depend on stacktraces
.. in System.Runtime.Tests . The library is still disabled for AOT,
because it hasn't been stable only for the last 7 days.
* Re-enable System.Runtime.Loader.Tests which is passing now.
Ankit Jain [Wed, 16 Jun 2021 19:30:01 +0000 (15:30 -0400)]
[wasm][aot] Disable tests that are failing because they depend on stacktrace API (#54286)
Miha Zupan [Wed, 16 Jun 2021 18:00:47 +0000 (11:00 -0700)]
Don't use a remote server in SendAsync_HttpTracingEnabled_Succeeds (#54240)
Bill Wert [Wed, 16 Jun 2021 17:07:27 +0000 (10:07 -0700)]
Remove crossgen tests (#54252)
Stephen Toub [Wed, 16 Jun 2021 16:56:03 +0000 (12:56 -0400)]
Fix packaging test use of Stream.Read (#54233)
Read returning the number of bytes requested is not guaranteed.
Kevin Jones [Wed, 16 Jun 2021 16:20:33 +0000 (12:20 -0400)]
Remove uses of Rijndael from EncryptedXml where possible (#54238)
Also dispose of AES usages to match behavior of the .NET Framework.
Ankit Jain [Wed, 16 Jun 2021 16:00:12 +0000 (12:00 -0400)]
[wasm] Disable unsupported Stacktrace test, on AOT (#54206)
```
[22:22:31] fail: [FAIL] System.Tests.EnvironmentStackTrace.StackTraceDoesNotStartWithInternalFrame
[22:22:31] info: System.NullReferenceException : Object reference not set to an instance of an object.
[22:22:31] info: at System.Reflection.RuntimeMethodInfo.Invoke(Object , BindingFlags , Binder , Object[] , CultureInfo )
```
Issue: https://github.com/dotnet/runtime/issues/51676
GitHubPang [Wed, 16 Jun 2021 15:16:20 +0000 (23:16 +0800)]
Fix typo in comments in ConsoleLifetimeOptions.cs (#54255)
Fan Yang [Wed, 16 Jun 2021 14:34:02 +0000 (10:34 -0400)]
Fix wrong indices for MobileAppHandler (#54275)
Jo Shields [Wed, 16 Jun 2021 10:24:01 +0000 (06:24 -0400)]
Change condition for stripping to per-file (#54224)
Previously, stripping of all produced libraries (libmono-component-*) was based on the file type of libmonosgen. That would fail to do stripping in the corner case of producing a static libmonosgen but dynamic components. This eliminates that problem.
Zoltan Varga [Wed, 16 Jun 2021 09:52:37 +0000 (05:52 -0400)]
[mono][wasm] Fix the usage of function pointers in mixed mode. (#54098)
* [mono][wasm] Fix the usage of function pointers in mixed mode.
The llvm compiled code expects function pointers to be a MonoFtnDesc*, while
the interpreter expects them to be a InterpMethod*. Use a MonoFtnDesc in
both cases.
* Reenable some tests.
* Add caching.
Aleksey Kliger (λgeek) [Wed, 16 Jun 2021 09:51:46 +0000 (05:51 -0400)]
[mono] Search for components using mono_dl_build_path (#54237)
It knows how to try various combinations of prefixes and suffixes on various
platforms. In particular it knows to look for .dylib files on Apple platforms.
Fixes iOS simulator component search
Manish Godse [Wed, 16 Jun 2021 04:08:41 +0000 (21:08 -0700)]
Remove unsigned executable entitlement (#51294)