Zoltan Varga [Mon, 7 Jun 2021 08:22:41 +0000 (04:22 -0400)]
[mono] Disable the remove empty finally pass, it still causes failures. (#53799)
SingleAccretion [Mon, 7 Jun 2021 07:54:00 +0000 (10:54 +0300)]
Eliminate intermediate casts to double on ARM64 (#53748)
* Eliminate intermediate casts to double on ARM64
Enables the same optimization that has been there for
a while for AArch32 for AArch64 too.
* Fix a typo
dotnet-maestro[bot] [Mon, 7 Jun 2021 06:27:56 +0000 (08:27 +0200)]
[main] Update dependencies from mono/linker (#53596)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Bruce Forstall [Mon, 7 Jun 2021 01:23:02 +0000 (18:23 -0700)]
Optimize constant localloc on x64 (#53755)
* Optimize constant localloc on x64
Avoid popping off the outgoing arg space just to push it back later,
for constant size localloc. This typically removes two `sub rsp`
instructions per case, although we don't do the `push 0` "optimization",
so sometimes there are more instructions removed.
* Fix clang build error
Stephen Toub [Sun, 6 Jun 2021 21:23:38 +0000 (17:23 -0400)]
Add HttpHeaders.NonValidated (#53555)
This adds an HttpHeaders.NonValidated property, which returns a type that provides a non-validating / non-parsing / non-allocating view of headers in the collection. Querying the resulting collection does not force parsing or validation on the contents of the headers, handing back exactly the raw data that it contains; if a header doesn't contain a raw value but instead contains an already parsed value, a string representation of that header value(s) is returned. When using the strongly-typed members, querying and enumeration is allocation-free, unless strings need to be created to represent already parsed values.
Tomáš Rylek [Sun, 6 Jun 2021 20:56:12 +0000 (22:56 +0200)]
Add issues.targets entry for the GitHub_13822 test to make CI green (#53789)
Tomáš Rylek [Sun, 6 Jun 2021 16:41:22 +0000 (18:41 +0200)]
Fix for bug #53520, Entry point not found (#53772)
Manish investigated this issue and he found out that the problem
is caused by the fact that in the method
Newtonsoft.Json.Utilities.ReflectionUtils.GetFields
Crossgen2 produces a NewObject fixup for the incorrect type
System.Collections.Generic.List`1<System.Type>
instead of the right type
System.Collections.Generic.List`1<System.Reflection.MemberInfo>
This was caused by a bug in the token harvesting logic; at some
point resolveToken was asked to resolve the token 0x0A02BA,
string [System.Runtime/*
23000001*/]System.Type/*
01000019*/::get_Name() /*
0A0002BA */
As part of the token harvesting logic we looked at the
MethodReference.Parent (
01000019) and stored it in the harvesting
table along with the OwningType of the method. The problem is
that the translation of the MemberReference to MethodDesc
resolves the method on a base class,
string [System.Reflection/*
23000009*/]System.Reflection.MemberInfo/*
01000076*/::get_Name() /*
0A0002B5 */
As a result we were storing the incorrect [token - type] pair
[
01000019 - System.Reflection.MemberInfo] into the type token
translation table and that confused the signature encoder because
01000019 is System.Type.
The trivial solution is to separately translate the memberref
parent entity handle to the owning type entity instead than
extracting it from the MethodDesc. I have verified using R2RDump
that I now see the correct NewObject fixup getting generated
in the method.
Thanks
Tomas
Sergey Andreenko [Sun, 6 Jun 2021 16:14:13 +0000 (09:14 -0700)]
Reenable a disabled test. (#53779)
Nikola Milosavljevic [Sun, 6 Jun 2021 16:08:30 +0000 (09:08 -0700)]
Create dotnet symlink during RPM install (#53705)
Marie Píchová [Sun, 6 Jun 2021 11:08:37 +0000 (13:08 +0200)]
QUIC stream limits (#52704)
Implements the 3rd option Allowing the caller to perform their own wait from #32079 (comment)
Adds WaitForAvailable(Bidi|Uni)rectionalStreamsAsync:
- triggered by peer announcement about new streams (QUIC_CONNECTION_EVENT_TYPE.STREAMS_AVAILABLE)
- if the connection is closed/disposed, the method throws QuicConnectionAbortedException which fitted our H3 better than boolean (can be changed)
Changes stream limit type to int
Johan Lorensson [Sun, 6 Jun 2021 10:52:36 +0000 (12:52 +0200)]
Disable diagnostics support as default in Android sample app. (#53716)
Marek Safar [Sun, 6 Jun 2021 08:51:02 +0000 (10:51 +0200)]
Add Invariant check to DateTimeParse tokens codepaths (#53717)
Cuts about 7k for invariant mode
imhameed [Sat, 5 Jun 2021 21:49:23 +0000 (14:49 -0700)]
[mono] Check for `Vector{64,128,256}<T>` element type validity before emitting unchecked intrinsic IR for `AsByte` etc. (#53707)
dotnet-maestro[bot] [Sat, 5 Jun 2021 17:33:02 +0000 (10:33 -0700)]
[main] Update dependencies from dotnet/arcade dotnet/hotreload-utils (#53766)
* Update dependencies from https://github.com/dotnet/arcade build
20210604.1
Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21303.2 -> To Version 6.0.0-beta.21304.1
* Update dependencies from https://github.com/dotnet/hotreload-utils build
20210604.1
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
From Version 1.0.1-alpha.0.21303.1 -> To Version 1.0.1-alpha.0.21304.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Zoltan Varga [Sat, 5 Jun 2021 17:10:32 +0000 (13:10 -0400)]
[mono] Fix the remove finally pass. (#53738)
Instead of checking whenever the generated IR is empty, do the checking
in the front end, and save the result into bb->flags.
Manish Godse [Sat, 5 Jun 2021 07:25:40 +0000 (00:25 -0700)]
Fixing a regression compiling VT arrays (#53760)
* Fixing a regression compiling VT arrays
* Update src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Ryan Lucia [Sat, 5 Jun 2021 07:04:30 +0000 (03:04 -0400)]
Add GCHandle in native default ALC at creation (#53308)
This lets embedders have a handle to fetch and pass before the runtime is properly started up and the managed default ALC is not yet created. Once the managed counterpart is initialized, the handle's target is changed, but the handle stays the same.
Kunal Pathak [Sat, 5 Jun 2021 05:26:04 +0000 (22:26 -0700)]
Eliminate redundant test instruction (#53214)
* Correctly track how x86 instructions read/write flags
* For GT_EQ/GT_NE, reuse flag
* Explicit flags for jcc, setcc, comvcc
* Add reset flags
* remove duplicate enum
* Handle cases where shift-amount is 0
* Add helper method for Resets OF/CF flags
* Rename methods
* one more rename
* review feedback
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
dotnet-maestro[bot] [Sat, 5 Jun 2021 04:01:22 +0000 (00:01 -0400)]
[main] Update dependencies from dotnet/arcade dotnet/runtime-assets dotnet/hotreload-utils dotnet/xharness (#53595)
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Tom Deseyn [Sat, 5 Jun 2021 02:09:30 +0000 (04:09 +0200)]
Socket: don't assign right endpoint until the connect is successful. (#53581)
* Socket: don't assign right endpoint until the connect is successful.
'Right endpoint' must match the address family of the Socket or
we can't serialize the LocalEndPoint and RemoteEndPoint.
When multiple connect attempts are made against a DualMode Socket with
both IPv4 and IPv6 addresses, a failed attempt must not set 'right
endpoint'.
* SocketTaskExtensionsTest.EnsureMethodsAreCallable: update expected exceptions
* PR feedback
* EnsureMethodsAreCallable: move ReceiveFromAsync before ConnectAsync to avoid wildcard bind on Windows that leads to a different exception
Cam Sinclair [Sat, 5 Jun 2021 01:05:45 +0000 (21:05 -0400)]
Minor corrections to BotR intro chapter (#53746)
Just fixing up a couple of missing words I noticed in the intro chapter:
Missing "to" in "(more code that does not seem do much)"
Missing "a" in "This results in big productivity boost."
David Wrighton [Sat, 5 Jun 2021 00:02:48 +0000 (17:02 -0700)]
Build clr/libs dependencies of test build locally (#53696)
* Build clr/libs dependencies of test build locally
- Stop relying on the actual product build for these
- Should reduce long pole of running coreclr tests by removing need to wait for coreclr/libraries product builds to complete before test build can begin
- Evidence shows that the native lib build can also be elided, but that requires more complex build work
SingleAccretion [Fri, 4 Jun 2021 22:39:45 +0000 (01:39 +0300)]
Remove some unused defines and functions (#53724)
* Remove some unused defines and functions
* Delete the _CROSS_COMPILER_ define
It is also unused.
* Also fix a typo while I am here
* Delete #define DUMPER
* Delete #include's under #ifdef ICECAP
* Delete MAX/MIN_SHORT_AS_INT defines
Gleb Balykov [Fri, 4 Jun 2021 21:04:59 +0000 (00:04 +0300)]
Add background type preloading based on multicorejit (#52595)
* Add background type preloading based on multicorejit
This is a second part of #48326 change, which enables handling of methods loaded from r2r images. Background thread of multicorejit now not only jits methods but also loads methods from R2R images. This allows to load types in background thread.
This is required as part of https://github.com/dotnet/runtime/issues/45748 change (specifically, https://github.com/dotnet/runtime/issues/45748#issuecomment-
750889697), goal of which is to enable background type preloading using multicorejit.
Huo Yaoyuan [Fri, 4 Jun 2021 21:03:21 +0000 (05:03 +0800)]
Fix mono corelib path in build script (#53731)
Theodore Tsirpanis [Fri, 4 Jun 2021 20:46:38 +0000 (23:46 +0300)]
Remove the unused AEADBCryptHandles.cs file
Geoff Kizer [Fri, 4 Jun 2021 19:59:03 +0000 (12:59 -0700)]
Spanify some Linux SslStreamPal internals and refactor EncryptDecryptHelper (#53512)
* Spanify some SslStreamPal internals and refactor EncryptDecryptHelper
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Kevin Jones [Fri, 4 Jun 2021 19:57:12 +0000 (15:57 -0400)]
Add static one-shot methods for HMAC algorithms
Kunal Pathak [Fri, 4 Jun 2021 18:50:39 +0000 (11:50 -0700)]
Include LSRA block sequence progress in JitDump (#53714)
* Print LSRA block sequence progress
* review comment
Zoltan Varga [Fri, 4 Jun 2021 18:47:23 +0000 (14:47 -0400)]
[mono][wasm] Exit with a nonzero exit code on asserts. (#53734)
Michal Strehovský [Fri, 4 Jun 2021 18:01:11 +0000 (20:01 +0200)]
Update comments in type system tests (#53718)
These numbers changed in #53424. One of the reasons why I'm not a huge fan of too much commenting...
Zoltan Varga [Fri, 4 Jun 2021 16:31:21 +0000 (12:31 -0400)]
[mono] Disable the remove empty finally pass for now. (#53710)
It cannot determine whenever the finally clause is really empty, i.e. whenever
it can affect the rest of the program.
Fixes https://github.com/dotnet/runtime/issues/53697.
hrrrrustic [Fri, 4 Jun 2021 16:27:33 +0000 (19:27 +0300)]
Implement generic IEnumerable on various X509 collection types
X509Certificate2Collection gets it, X509CertificateCollection doesn't.
We don't really want people using the older collection type, and we have inheritance, and being both
`IEnumerable<X509Certificate>` and `IEnumerable<X509Certificate2>` makes some things weird.
Ankit Jain [Fri, 4 Jun 2021 16:22:41 +0000 (12:22 -0400)]
AOTCompilerTask: use assembly name to build the aot linking symbols (#53659)
`System.Runtime.Loader.DefaultContext.Tests` fail with `wasm+aot`
Fixes https://github.com/dotnet/runtime/issues/52383
From the issue:
```
[10:39:59] info: * Assertion at /__w/1/s/src/mono/mono/mini/aot-runtime.c:2330, condition `<disabled>' not met
[10:39:59] info:
[10:39:59] info: ABORT: undefined
[10:39:59] info: Stacktrace:
[10:39:59] info:
[10:39:59] info: Error
[10:39:59] info: at Object.onAbort (runtime.js:217:13)
[10:39:59] info: at abort (dotnet.js:1233:22)
[10:39:59] info: at _abort (dotnet.js:5561:7)
[10:39:59] info: at monoeg_assert_abort (<anonymous>:wasm-function[5943]:0xdadad)
[10:39:59] info: at monoeg_log_default_handler (<anonymous>:wasm-function[5960]:0xdb0c8)
[10:39:59] info: at monoeg_g_logstr (<anonymous>:wasm-function[5953]:0xdaf76)
[10:39:59] info: at monoeg_g_logv_nofree (<anonymous>:wasm-function[5951]:0xdaf28)
[10:39:59] info: at monoeg_assertion_message (<anonymous>:wasm-function[5956]:0xdaff2)
[10:39:59] info: at mono_assertion_message (<anonymous>:wasm-function[5958]:0xdb035)
[10:39:59] info: at mono_assertion_message_disabled (<anonymous>:wasm-function[5957]:0xdb008)
[10:39:59] info: at mono_aot_register_module (<anonymous>:wasm-function[5045]:0xbb12a)
[10:39:59] info: at register_aot_modules (<anonymous>:wasm-function[59156]:0x12f4753)
```
vargaz: This actually happens because the generated AOT linking symbol in driver-gen.c is not correct.
Its generated from the filename, which is System.Runtime.Loader.Noop.Assembly_test.dll, but the assembly name is System.Runtime.Loader.Noop.Assembly. So linking the final app should fail, but emscripten doesn't notice the missing symbol because of https://github.com/emscripten-core/emscripten/issues/14106 .
So this turns into a runtime assertion.
- Also, enable the tests.
Vladimir Sadov [Fri, 4 Jun 2021 15:43:10 +0000 (08:43 -0700)]
Possible leak of a weak handle in `Gen2GcCallback` (#53701)
Johan Lorensson [Fri, 4 Jun 2021 15:17:11 +0000 (17:17 +0200)]
Adapt more Mono profiler events into NativeRuntimeEvents. (#53677)
Natalia Kondratyeva [Fri, 4 Jun 2021 14:32:22 +0000 (16:32 +0200)]
[QUIC] Stream write cancellation (#53304)
Add tests to check write cancellation behavior, fix pre-cancelled writes and fix mock stream.
Add throwing on msquic returning write canceled status.
Fixes #32077
Vitek Karas [Fri, 4 Jun 2021 10:08:16 +0000 (12:08 +0200)]
Add better description of what to pass to `hostfxr_initialize_for_dotnet_command_line` (#53678)
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Tomáš Rylek [Fri, 4 Jun 2021 08:40:00 +0000 (10:40 +0200)]
46239 v2 (no runtime layout changes) (#53424)
The regression test
<code>src\tests\JIT\Regressions\JitBlue\Runtime_46239</code>
exercises various interesting corner cases of type layout that
weren't handled properly in Crossgen2 on x86 and ARM[32]. This
change fixes the remaining deficiencies and it also adds
provisions for better runtime logging upon type layout mismatches.
With this change, the only remaining pipelines using Crossgen1 are
"r2r.yml", "r2r-extra.yml" and "release-tests.yml". I haven't yet
identified the pipeline running the "release-tests.yml" script;
for the "r2r*.yml", these now remain the only pipelines exercising
Crossgen1. I don't think it makes sense to switch them over to
CG2 as we already have their CG2 counterparts; my expectation is
that, once CG1 is finally decommissioned, they will be just deleted.
Thanks
Tomas
Levi Broderick [Fri, 4 Jun 2021 05:48:54 +0000 (22:48 -0700)]
Reduce worst-case alg complexity of MemoryExtensions.IndexOfAny (#53652)
Peter Sollich [Fri, 4 Jun 2021 04:26:22 +0000 (06:26 +0200)]
Fix large object allocation (#53589)
* Fix the issue that with regions we are unable to allocate objects larger than 32 MB.
Method gc_heap::get_segment_for_uoh gets passed a size, but drops it on the floor in the region case.
The fix is simply to pass the size parameter through the various methods we call for allocating a large region, and to allocate a properly sized region in region_allocator::allocate_large_region.
Sergey Andreenko [Fri, 4 Jun 2021 04:03:04 +0000 (21:03 -0700)]
Retype calls as SIMD when applicable. (#53578)
* add a repro
* passed spmi.
* update comment.
* update the test
* improve the check.
* fix a stressfailure
* fix x64 unix diff
Huo Yaoyuan [Fri, 4 Jun 2021 03:46:31 +0000 (11:46 +0800)]
Replace remaining constants to Array.MaxLength (#53664)
* Replace constants to Array.MaxLength.
* Add comment for places can't be replaced.
* Mention SZArray in MaxLength docs.
Aaron Robinson [Fri, 4 Jun 2021 02:47:07 +0000 (19:47 -0700)]
Update feature-switches.md (#53639)
imhameed [Fri, 4 Jun 2021 01:05:53 +0000 (18:05 -0700)]
[mono] LLVM 11: Explicitly zero the unused bits of the result register for AddPairwiseScalar (#53694)
LLVM 11 and above optimize
%9 = extractelement <2 x float> %arm64_ld1, i32 0
%10 = extractelement <2 x float> %arm64_ld1, i32 1
%arm64_faddp_scalar = fadd float %9, %10
%11 = insertelement <2 x float> undef, float %arm64_faddp_scalar, i32 0
(which is translated to scalar `faddp`)
into
%shift = shufflevector <2 x float> %arm64_ld1, <2 x float> undef, <2 x i32> <i32 1, i32 undef>
%10 = fadd <2 x float> %arm64_ld1, %shift
%11 = shufflevector <2 x float> %10, <2 x float> undef, <2 x i32> <i32 0, i32 undef>
(which is translated to a sequence of `dup` and vector `fadd`).
This change works around this by explicitly zeroing the unused bits of the
results of `AddPairwiseScalar`; the generated code is noisier, but the
semantics are correct. The "Arm Architecture Reference Manual Armv8, for
Armv8-A architecture profile" version G.a calls out the zero-extending
semantics of scalar operations that use SIMD registers (see
"aarch64/functions/registers/V") but judging by the generated code it doesn't
look like LLVM exploits this for optimization.
This also affects `vpadds_f32` in Clang.
David Wrighton [Fri, 4 Jun 2021 00:29:24 +0000 (17:29 -0700)]
Add System.Runtime.CompilerServices.Unsafe.dll to the list of dlls not part of the composite image to make roslyn work with the composite build (#53691)
Vladimir Sadov [Fri, 4 Jun 2021 00:21:21 +0000 (17:21 -0700)]
Missing `Dispose` after `RemoteExecutor.Invoke` (#53700)
Andy Gocke [Thu, 3 Jun 2021 23:41:51 +0000 (16:41 -0700)]
Disable BundleExtractToSpecificPath tests on Linux due to same problems (#53690)
Jose Perez Rodriguez [Thu, 3 Jun 2021 23:10:12 +0000 (16:10 -0700)]
Resolving most of ILLink warnings on Microsoft.Extensions.Hosting (#53646)
* Resolving most of ILLink warnings on Microsoft.Extensions.Hosting
* Fix indentation issues
Filip Navara [Thu, 3 Jun 2021 22:38:13 +0000 (00:38 +0200)]
Specify kSecUseDataProtectionKeychain when generating RSA/ECC keys on macOS/iOS
Steve Pfister [Thu, 3 Jun 2021 22:36:15 +0000 (18:36 -0400)]
[iOS] Fix AppleAppBuilder to work w/ AOT+LLVM (#53651)
When LLVM is enabled, this change makes sure we're linking in the .ddl-llvm.o files
Sergey Andreenko [Thu, 3 Jun 2021 22:24:24 +0000 (15:24 -0700)]
disable a test (#53661)
Mike McLaughlin [Thu, 3 Jun 2021 22:02:51 +0000 (15:02 -0700)]
Improve ENC logging. (#53695)
Fix assert in CMiniMdRW::GetTableForToken. g_TblIndex entries for MethodImpl and NestedClass needed token values.
Filip Navara [Thu, 3 Jun 2021 21:40:15 +0000 (23:40 +0200)]
[iOS] Fix null dereference in AppleCryptoNative_SslIsHostnameMatch
monojenkins [Thu, 3 Jun 2021 20:27:39 +0000 (16:27 -0400)]
Fix for null pointer bug found by UBSAN (#53686)
Fix for null-pointer bug found with Clang's undefined-behavior-sanitizer using `-fsanitize=null`
https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
Co-authored-by: jbcoe <jbcoe@users.noreply.github.com>
Zoltan Varga [Thu, 3 Jun 2021 19:20:44 +0000 (15:20 -0400)]
[mono][llvm] Replace all remaining uses of SimdOp with the INTRINS_ enumeration. (#52593)
iinuwa [Thu, 3 Jun 2021 18:21:41 +0000 (13:21 -0500)]
Add support for TLS and connectionless LDAP connections on Linux (#52904)
* Set LDAP version with pointers on Linux
* Replace deprecated OpenLDAP methods
In OpenLDAP, ldap_simple_bind_s is deprecated in favor of
ldap_sasl_bind_s with the LDAP_SASL_SIMPLE auth method[1][].
Similarly, ldap_init is deprecated in favor of ldap_initialize[2][].
The newer APIs also allows us to specify a URI to use TLS with OpenLDAP.
[1]: https://git.openldap.org/openldap/openldap/-/blob/OPENLDAP_REL_ENG_2_4_58/include/ldap.h#L1278
[2]: https://git.openldap.org/openldap/openldap//blob/OPENLDAP_REL_ENG_2_4_58/include/ldap.h#L1513
* Add TLS and connectionless LDAP support to Linux
This commit manually specifies the LDAP URI option during connect
(but before binding). This is necessary because in order to know the
correct scheme, we need access to SessionOptions, which is not available
until after initialization.
Finally, it removes the PlatformUnsupportedException from the
SessionOptions.SecureSocketLayer property.
This makes it possible to use LDAP over TLS and connectionless (UDP)
LDAP.
* Add test configuration for LDAP TLS server
Tomas Weinfurt [Thu, 3 Jun 2021 16:53:57 +0000 (18:53 +0200)]
use QUIC_ADDRESS_FAMILY enum for assigning socket family (#53673)
Bill Holmes [Thu, 3 Jun 2021 15:07:42 +0000 (11:07 -0400)]
Fixing the GetInterfaceMap tests for mono in the runtime repo. (#52566)
Addressing 4 issues for GetInterfaceMap and default interface methods
- Only methods marked as virtual on on interface should be added to the
interface map. (no static or instance)
- If the found target method is ambiguous (a diamond) the target is
null.
- If the found target method's class in an interface, then the target
class is the interface class, else it is the class of the RuntimeType
(aka this)
- If the found target method is abstract (reabstraction) then the
target is null.
Fixes #34389
Jan Kotas [Thu, 3 Jun 2021 12:58:33 +0000 (05:58 -0700)]
Integrate changes from NativeAOT branch (#53650)
* Integrate changes from NativeAOT branch
Includes faster virtual method enumerator that should help crossgen2 too
* Fix tests
Johan Lorensson [Thu, 3 Jun 2021 10:18:24 +0000 (12:18 +0200)]
Add Execution Checkpoint EventPipe event used to track runtime init on Mono. (#53024)
Levi Broderick [Thu, 3 Jun 2021 07:46:51 +0000 (00:46 -0700)]
Add MemoryMarshal.GetArrayDataReference(Array) (#53562)
Günther Foidl [Thu, 3 Jun 2021 02:08:55 +0000 (04:08 +0200)]
StringSegment: more AsSpan overloads (#53463)
* Defined API
* Added tests
* Implementation
* Remove some branches
* PR Feedback
* Don't use default argument in ThrowInvalidArguments
Matt Johnson-Pint [Thu, 3 Jun 2021 02:04:54 +0000 (19:04 -0700)]
Add remarks to /// comments for TimeOnly.IsBetween (#53620)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Sergey Andreenko [Thu, 3 Jun 2021 01:04:39 +0000 (18:04 -0700)]
Fix SuperPMI dumping for replay. (#53649)
* Fix `SetShimDebugVariables` for counter and simple.
* fix dumps for replays
Andrew Au [Thu, 3 Jun 2021 00:33:18 +0000 (17:33 -0700)]
Relax a threading related assert (#53445)
Tarek Mahmoud Sayed [Thu, 3 Jun 2021 00:33:01 +0000 (17:33 -0700)]
Fix Culture Native and Display Names (#53468)
* Fix Culture Native and Display Names
* fix mono break
* Address the feedback
* Address more feedback
* Use ThreadCultureChange in the tests
* Exclude the test on mobile platfoms
Andrew Au [Thu, 3 Jun 2021 00:32:47 +0000 (17:32 -0700)]
Avoid setting the brick of the next region during sweep in plan (#53446)
Kevin Jones [Wed, 2 Jun 2021 23:53:45 +0000 (19:53 -0400)]
Unix: Additional check if the RSA key is external.
Currently we are checking the RSA_METHOD to see if an RSA key "external",
where the private key material may not be exportable. This may not work
because the RSA key itself can declare if it is external or not.
This also checks the flags of the RSA key object itself so attempting
to export the private key is not performed.
Elinor Fung [Wed, 2 Jun 2021 22:40:38 +0000 (15:40 -0700)]
Remove some unnecessary string copies in hosting layer (#53631)
Sung Yoon Whang [Wed, 2 Jun 2021 22:30:27 +0000 (15:30 -0700)]
Add test for EventListener consuming ThreadPool events (#48487)
Zoltan Varga [Wed, 2 Jun 2021 21:42:51 +0000 (17:42 -0400)]
[mono][aot] Compile llvm object files with -fPIC on android. (#53618)
Viktor Hofer [Wed, 2 Jun 2021 20:17:19 +0000 (22:17 +0200)]
Delete obsolete libraries package settings files (#53610)
Deleting package settings files as the package isn't produced anymore
or because the workaround was resolved (i.e. .NETStandard downgrades).
Andy Ayers [Wed, 2 Jun 2021 20:05:56 +0000 (13:05 -0700)]
JIT: relax immediate dominator check for jump threading (#53613)
When jump threading, we had been insisting that the redundant branch be
the immediate dominator (idom) of the branch being optimized. But now that we
are doing exact reachability checks, we can consider threading based on
redundant branches higher in the (original) dominator tree, provided that the
in-between branches have also been optimized.
This situation arises when there are repeated redundant branches in if-then
or if-then-else chains. Say there are 3 such branches. The algorithm works
top-down in the original dominator tree. To begin with, the second branch
in the chain is jump-threaded since it redundant to the first. As part
of this the second branch's block is modified to fall through. Now the
third branch's idom is the block that held the second branch, but this block
no longer ends with a branch. So the nearest redundant dominating branch is the
first branch in the chain. And this arrangement blocks jump-threading the third
branch as the redundant branch block is not in the idom block.
Jump threading will work correctly so long as there are unique paths from the
redundant branch outcomes to the branch being optimized. So we have appropriate
safety checks and can consider threading based on higher dominating branches.
Resolves #53501.
Jan Vorlicek [Wed, 2 Jun 2021 19:23:12 +0000 (21:23 +0200)]
Fix JIT debugger notification location (#53590)
* Fix JIT debugger notification location
My recent change to enable jitting into a scratch buffer has broken
debugging due to the notification to debugger being sent too early. This
change moves the notification after the call to WriteCode and also
removes the CallCompileMethodWithSEHWrapper completely, since its only
purpose was to call the notification in PAL_FINALLY and only when the
JITting succeeded.
* Fix #endif comment
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Sergey Andreenko [Wed, 2 Jun 2021 19:02:44 +0000 (12:02 -0700)]
Fix SPMI dump. (#53586)
* Fix SPMI dump.
* more fixes
Filip Navara [Wed, 2 Jun 2021 18:50:25 +0000 (20:50 +0200)]
Use weak linking for SecCopyErrorMessageString (#52760)
Improves error messages for System.Security.Cryptography methods on newer iOS/tvOS versions.
Pavel Savara [Wed, 2 Jun 2021 18:17:12 +0000 (20:17 +0200)]
[wasm] Enable more networking tests (#53027)
- enable System.Net.Http.Functional.Tests on browser
- System.Net.Http.Functional.Tests to run in chrome instead of V8 via WasmTestOnBrowser
- ActiveIssue https://github.com/dotnet/runtime/issues/34690 for WebSocket on Windows Mono
- fix Quic detection in test
- disable webSocket tests on Mono/Windows
- disable tests with MaxConnectionsPerServer not supported on Browser
- disable tests with Socket not supported on Browser
- disable tests with AutomaticDecompression not supported on Browser
- disable tests with UseProxy not supported on Browser
- disable tests with PreAuthenticate not supported on Browser
- disable tests with Credentials is not supported on Browser
- disable tests with Loopback server
- run outerloop on browser, rather than V8 only
- [ActiveIssue] #37669 for missing crypto MD5
- conditional tests with PlatformDetection.IsBrowserDomSupportedOrNotBrowser to allow System.Net.Http.Functional.Tests pass on V8
- disabled tests with https://github.com/dotnet/runtime/issues/53018
- disabled tests with https://github.com/dotnet/runtime/issues/53591
- disabled tests with https://github.com/dotnet/runtime/issues/53592
Alexander Köplinger [Wed, 2 Jun 2021 17:28:58 +0000 (19:28 +0200)]
Disable leakwheel test for mono (#53608)
This test is expected to fail on mono, since it seems to rely on finalizers being run in order to determine success of the test.
Bruce Forstall [Wed, 2 Jun 2021 17:19:05 +0000 (10:19 -0700)]
Add information about frame chaining to CLR ABI (#53563)
* Add information about frame chaining
Update links for per-platform ABI documentation.
A few editorial changes.
* Code review feedback
Marek Safar [Wed, 2 Jun 2021 17:17:55 +0000 (19:17 +0200)]
Remove more OSPlatformAttribute like attributes from wasm trimmed output (#53604)
Tomas Weinfurt [Wed, 2 Jun 2021 17:10:35 +0000 (19:10 +0200)]
add NegotiateClientCertificateAsync support on Windows (#51905)
* add NegotiateClientCertificateAsync support on Windows
* feedback from review and test update
* throw on data during renegotiation
* disable NegotiateClientCertificateAsync on Win7
* feedback from review
* use Interlocked.Exchang instead of CompareExchange
* add trace message
Aleksey Kliger (λgeek) [Wed, 2 Jun 2021 17:00:34 +0000 (13:00 -0400)]
[mono] Add a no-exec code manager for AOT compilation; switch Catalyst CI to JustInterp AOT mode (#53197)
* Initial pass at trying to run catalyst in aot interp only mode
* Cleanup
* Remove yml dup
* Incorporate changes and identify native libraries to skip during System.Diagnostics.FileVersionInfo test run
* [mini] Add a no-exec code manager for AOT compilation
Don't allocate pages with execute permission if we're never going to be executing code. Also don't try to toggle per-thread write protection if we're not expecting to write to executable pages.
* also set no_exec earlier and create the ALC codeman with noexec
* Don't assert on Catalyst in mono_codeman_enable_write
We defensively also toggle the page write protect bits when resolving some AOT patch targets in mono_resolve_patch_target_ext. Instead allow the call, but don't do anything.
* Set ENABLE_MONOTOUCH for MacCatalyst arm64. Define MONOTOUCH in one place
* [aot] mscorlib.dll isn't CoreLib on netcore
It's a forwarding assembly. Don't treat it specially
* [testing] In JustInterp mode, only AOT System.Private.CoreLib
We only need to AOT the trampolines in System.Private.CoreLib in interpreter-only mode. We don't need to AOT any of the user code in other assemblies.
Side effect: fixes the System.Runtime.Loader.DefaultContext testsuite in JustInterp mode. Still broken in Full AOT mode. (That testsuite references the System.Runtime.Loader.Noop.Assembly assembly, but with a different filename
System.Runtime.Loader.Noop.Assembly_test.dll which causes linking errors due to incorrect symbols in AOT module registration in AppleAppBuilder)
* Update iOS sample to use JustInterp
and adhoc signing
* Don't run iOS sample on the CI build machine
* Disable some tests
Fixes https://github.com/dotnet/runtime/issues/53106
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Steve Pfister <steve@Steves-M1.fios-router.home>
Ankit Jain [Wed, 2 Jun 2021 16:54:44 +0000 (12:54 -0400)]
[wasm][aot] Force python to default to UTF8 (#53557)
Andy Ayers [Wed, 2 Jun 2021 16:38:53 +0000 (09:38 -0700)]
JIT: update switch flags after peel (#53570)
If we introduce a temp for the switch operand, the switch node may have extra flags
set that it doesn't need. Reset these based on the operand.
Closes #53548.
Johan Lorensson [Wed, 2 Jun 2021 16:09:20 +0000 (18:09 +0200)]
Support PortableThreadPool native event sinks on Mono. (#53500)
imhameed [Wed, 2 Jun 2021 14:43:49 +0000 (07:43 -0700)]
Consolidate setret handling for diverging functions (#53535)
Some functions never associate the mini IR source registers used with their
`setret` instructions with LLVM values because they unconditionally throw.
`System.Runtime.Intrinsics.X86.Aes:Decrypt` is an example of such a function;
when compiled for arm64, it never returns a value and unconditionally throws a
`PlatformNotSupportedException`.
We already had support for handling this for some, but not all, return value
passing conventions. Deduplicate this support and apply it uniformly to all
return value passing conventions that expect a populated mini IR source
register.
Make `LLVMArgNone` specifically mean "no return value"/"`void` return
type".
Split from https://github.com/dotnet/runtime/pull/53132.
Partially fixes FullAOT compilation of System.Private.CoreLib.dll on arm64.
Marek Safar [Wed, 2 Jun 2021 14:31:56 +0000 (16:31 +0200)]
Update area-owners.md (#53605)
Koundinya Veluri [Wed, 2 Jun 2021 14:28:59 +0000 (07:28 -0700)]
Fix assertion failure / crash in multi-core JIT (#53573)
* Fix assertion failure / crash in multi-core JIT
- When the recorder times out it doesn't actually stop profiling, but writes out the profile
- The app may later stop profiling, and then it tries to write the profile again
- PR https://github.com/dotnet/runtime/pull/48326 fairly expected that the profile is only written once (some state is mutated)
- The non-timeout stop-profile path was also not stopping the timer
- Fix for https://github.com/dotnet/runtime/issues/53014 in main
dotnet-maestro[bot] [Wed, 2 Jun 2021 14:26:42 +0000 (14:26 +0000)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#53343)
[main] Update dependencies from dnceng/internal/dotnet-optimization
Aleksey Kliger (λgeek) [Wed, 2 Jun 2021 14:25:05 +0000 (10:25 -0400)]
Add hot reload test that adds custom attributes (#53387)
* Add hot reload test that adds custom attributes
This test adds new rows to the CustomAttribute table with both new a class and a new method as parents. That should result in an unsorted table, which CoreCLR should be able to handle.
* rework the test not to rely on Assembly.GetType
Looking up the new class using System.Reflection.Assembly.GetType wasn't working.
* clear reflection caches
imhameed [Wed, 2 Jun 2021 14:21:33 +0000 (07:21 -0700)]
[mono] Separate LLVM optimization and compilation into two separate functions. (#53536)
Dump optimized IR before attempting compilation to machine code. Makes
more information available when debugging.
Split from https://github.com/dotnet/runtime/pull/53132.
Tom Deseyn [Wed, 2 Jun 2021 14:08:27 +0000 (16:08 +0200)]
Remove unused Libraries.Libdl (#53585)
Zoltan Varga [Wed, 2 Jun 2021 13:28:24 +0000 (09:28 -0400)]
[mono][aot] Rework the code which handles llvmonly compilation failures and transition to the interpreter (#53485)
* [mono][aot] Rework the code which handles llvmonly compilation failures.
If llvm fails for a method, retry the compilation and emit
the interp entry code during the second try.
* Fix invalid llvm code generation in interp_entry_only mode, there is no need to create PHI nodes.
* Fix returning values from interp_entry_only methods.
Zoltan Varga [Wed, 2 Jun 2021 13:21:20 +0000 (09:21 -0400)]
[mono][aot] Pass the correct mtriple= argument to llc on android. (#53576)
Radek Doulik [Wed, 2 Jun 2021 10:21:53 +0000 (12:21 +0200)]
[wasm] Bump emscripten to 2.0.21 (#52870)
* Bump emscripten version
* Rename __padding to _padding to avoid warnings
And errors as we use `-Werror`:
error G94F6014A: identifier '__padding' is reserved because it starts with '__'
C99 and C++ standard defines indentifiers with `__` prefix as reserved.
* Fix cast warning/error
With latest emscripten we get this warning (and error as we use
`-Werror`):
src/libraries/Native/Unix/System.Native/pal_process.c(374,92): error G3DC5E52A: cast from 'void (*)(int, siginfo_t *, void *)' to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type]
void (*oldhandler)(int) = (((unsigned int)sa_old.sa_flags) & SA_SIGINFO) ? (void (*)(int))sa_old.sa_sigaction : sa_old.sa_handler;
* Add `-s DISABLE_EXCEPTION_CATCHING=0`
when building dotnet.js
* Use EMSDK_PYTHON
* Use delayed expansion
Before the `EMSDK_PYTHON` was evaluated before running
the `emsdk_env.bat` script.
* Replace deprecated EXTRA_EXPORTED_RUNTIME_METHODS
with EXPORTED_RUNTIME_METHODS
Build warning/error:
emcc : warning : EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated]
* Don't need to cast anymore
* 2.0.21 was just released, so try our luck ;-)
* Use new docker images with 2.0.21
* Use the sys includes fix on all platforms
* Remove deprecated --llvm-opts usage
Context: https://github.com/emscripten-core/emscripten/commit/
0691cc68eef89fe59f66eacdba245470bea2a113
* Update emscripten version in the workload manifest
* Update emscripten versions in the docs
* Update eng/ versions
* Add ActiveIssue attr in the MemoryCacheTest
* Add ActiveIssue attr to the FileSystem tests
* Update after merge
* Resolve one more conflict
* Add ActiveIssue to the MemoryMappedFiles tests
* Revert "Fix cast warning/error"
This reverts commit
0a1aa4a88c07bc48d3d35c68369d1dca4897d849.
* Unset HAVE_FORK for Browser
* Remove active issue
Fixed by https://github.com/dotnet/runtime/commit/
93cf5df65fc13bfbc29256acc8c9c0e102a1170b
* Set HAVE_FORK to 0
* Set HAVE_FORK to 0 instead if unsetting
* Remove -s DISABLE_EXCEPTION_CATCHING=0
It might not be needed anymore
Eirik Tsarpalis [Wed, 2 Jun 2021 05:56:50 +0000 (06:56 +0100)]
Fix MinBy and MaxBy handling of empty sources (#53544)
Addresses a bug where the empty source behaviour
is determined by the key type rather than the source type.
Tanner Gooding [Wed, 2 Jun 2021 05:23:01 +0000 (22:23 -0700)]
Ensure inst_Mov() is used rather than inst_RV_RV(ins_Copy()) (#53569)
hrrrrustic [Wed, 2 Jun 2021 05:05:20 +0000 (08:05 +0300)]
Some mixed missed Equals nullable annotations (#52166)
weilinwa [Wed, 2 Jun 2021 02:18:48 +0000 (19:18 -0700)]
Add support for AvxVnni instructions under Experimental. (#51998)
* Add support for AvxVnni instructions under Experimental.
* Add support for AvxVnni instructions
* Add preveiw feature attribute
* Handle operands in lsra
* Undo changes for Experimental
* Update JITEEVersionIdentifier and fix remaining issues
* Resolve Mono CI failure
* Disable tests
* Disable Vector128 tests
* Modify disable tests
Co-authored-by: Tanner Gooding <tagoo@outlook.com>