Jan Kotas [Mon, 24 May 2021 04:36:09 +0000 (21:36 -0700)]
Optimise GetCustomAttributes - Part 1 (#53152)
- Use is/is not instead of ==/!=. Avoids overhead from operator overloading
- Pass ListBuilder as ref instead of out. Avoids redundant initialization to default.
- Use HashSet instead of Dictionary.
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
SingleAccretion [Mon, 24 May 2021 04:26:04 +0000 (07:26 +0300)]
Fix a 32-bit specific bug in `fgMorphCast` (#52828)
* Added a test
Verifying that checked '.un' casts from floats to small types are not treated as casts from unsigned types.
* Do not mark casts from FP types with GTF_UNSIGNED
It used to be that in the importer, whether the cast was to
be marked as GTF_UNSIGNED was decided exclusively based on
the incoming opcode. However, the flag only makes sense
for casts from integral sources, and it turns out morph
had a bug where it failed to clear this flag which resulted in
bad codegen.
The bug went as follows: "gtMorphCast" turns casts from an FP
type to a small integer into a chain of casts:
CAST(small integer <- FP) => CAST(small integer <- CAST(TYP_INT <- FP)).
On 32 bit platforms, the code failed to clear the GTF_UNSIGNED flag
from the original tree, which meant that the outer cast thought it
had TYP_UINT as the source. This matters for checked casts:
conv.ovf.i2.un(-2.0d), which is a legitimate conversion, was interpreted
wrongly as an overflowing one as the resulting codegen only checked the
upper bound via an unsigned compare.
The fix is two-fold: clear GTF_UNSIGNED for GT_CAST nodes with FP sources
on creation and unify the 64 bit and 32 bit paths in "gtMorphCast",
which, after the removal of GTF_UNSIGNED handling, are identical.
This is a zero-diff change across all SPMI collections for Windows x64, Linux x64,
Linux ARM64.
This **is not** a zero-diff change for Windows x86.
Instances of bad codegen have been corrected in some tests.
* Assert instead of normalizing
Instead of normalizing GTF_UNSIGNED for FP sources in "gtNewCastNode",
assert that it is not set in GenTreeCast's constructor and fix the
importer to respect that constraint.
SingleAccretion [Mon, 24 May 2021 04:25:13 +0000 (07:25 +0300)]
Some cleanup of `var_types` - related functions (#52418)
* Specified the parameter name for ReinterpretHexAsDecimal
* Refactored "genUnsignedType", now "varTypeToUnsigned"
Renamed "genUnsignedType" to "varTypeToUnsigned" to conform to the existing
naming convention, moved its definition from "compiler.hpp" to "vartype.h",
made it a templated function like all the other "varType*" functions.
Deleted the equivalent but unused "varTypeSignedToUnsigned".
* Deleted "genSignedType" and renamed "varTypeUnsignedToSigned"
"genSignedType" had confusing semantics where it only returned the actual
signed type for TYP_UINT and TYP_ULONG. Deleted the function and made
the callsites explicitly request that behavior.
Also renamed "varTypeUnsignedToSigned" to "varTypeToSigned" for parity
with "varTypeToUnsigned" and made it a templated function.
* Made "genActualType" a templated function
* Made "genTypeStSz" a templated function
Also renamed the parameters for it and "genTypeSize" to be
consistent with "genActualType".
Filip Navara [Sun, 23 May 2021 22:03:25 +0000 (00:03 +0200)]
[iOS] Re-enable Brotli tests (#53069)
Filip Navara [Sun, 23 May 2021 22:02:08 +0000 (00:02 +0200)]
[iOS] Re-enable System.Xml.XmlSchema.XmlSchemaValidatorApi.Tests (#53068)
Fixes #51338
Viktor Hofer [Sun, 23 May 2021 18:46:52 +0000 (20:46 +0200)]
Remove redundant GeneratePackageOnBuild condition (#53107)
* Remove redundant GeneratePackageOnBuild condition
Marek Safar [Sun, 23 May 2021 12:14:40 +0000 (14:14 +0200)]
Avoid dependency on LINQ orderby iterators when building exception messsage (#53123)
Saves about 2k compressed for Blazor default template
dotnet-maestro[bot] [Sun, 23 May 2021 03:58:33 +0000 (20:58 -0700)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210521.2 (#53124)
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21270.4 -> To Version 1.0.0-prerelease.21271.2
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
hrrrrustic [Sat, 22 May 2021 20:54:40 +0000 (23:54 +0300)]
System.Reflection.* missed Equals nullable annotations (#52162)
* add NotNullWhen attribute
Matt Johnson-Pint [Sat, 22 May 2021 18:50:14 +0000 (11:50 -0700)]
Allow TimeZoneInfo display names to use any of the installed Windows languages (#53119)
Jan Kotas [Sat, 22 May 2021 17:01:44 +0000 (10:01 -0700)]
Integrate misc changes from nativeaot (#53063)
* Integrate misc changes from nativeaot
* Fix RemoteStack serialization
* Delete confusing String.Empty comment
Marek Safar [Sat, 22 May 2021 11:12:19 +0000 (13:12 +0200)]
Move GlobalizationMode initialization into a nested class (#53082)
hrrrrustic [Sat, 22 May 2021 09:55:05 +0000 (12:55 +0300)]
remove pragma (#52481)
IchHabeKeineNamen [Sat, 22 May 2021 01:30:01 +0000 (09:30 +0800)]
Fix typos in comments (#53064)
Matt Johnson-Pint [Fri, 21 May 2021 23:35:34 +0000 (16:35 -0700)]
Revert "Allow TimeZoneInfo display names to use any of the installed Windows languages" (#53112)
This reverts commit
b54dbaf9adb2ec068098394b3f73e8e7cd0ec09c.
Matt Johnson-Pint [Fri, 21 May 2021 23:00:18 +0000 (16:00 -0700)]
Allow TimeZoneInfo display names to use any of the installed Windows languages (#52992)
Kevin Jones [Fri, 21 May 2021 22:12:18 +0000 (18:12 -0400)]
Implement Initialize on HashAlgorithm (#51402)
* Implement Initialize on HashAlgorithm derived types.
* Add test for SHA CryptoServiceProviders
* Implement reset for HMAC
* Remove const
* Fix header.
[sigh]
* Remove ZeroMemory
* Fix performance of CSP hash providers.
Jonas Nyrup [Fri, 21 May 2021 22:03:21 +0000 (00:03 +0200)]
Fix typo tihs -> this (#52398)
Geoff Kizer [Fri, 21 May 2021 21:25:01 +0000 (14:25 -0700)]
ensure we flush when a window limit is hit (#52797)
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Chris Ross [Fri, 21 May 2021 19:35:08 +0000 (12:35 -0700)]
Remove unused field (#53100)
Andy Ayers [Fri, 21 May 2021 19:19:25 +0000 (12:19 -0700)]
JIT: fix relop flags for peeled switch compare (#53096)
In particular we need to set `GTF_DONT_CSE` so that CSE doesn't
introduce commas under `GT_JTRUE` nodes.
Fixes #52785.
Mitchell Hwang [Fri, 21 May 2021 19:18:14 +0000 (15:18 -0400)]
Skip flakey mobile library test crashes (#52931)
* [mobile][libraries] Skip test suites failing on CI
* [libraries] Add more flakey test suite crashes
* [Android][libraries] Add DynamicChainTests.MismatchKeyIdentifiers failure
* Add issue to DynamicChainTests ActiveIssue
* [Android] Add more flakey test suite crashes for Android arm64
* [libraries] Add RunDisabledAndroidTests condition to be able to run tests on build lane
* [Android] Add even more flakey test suites that crash
* [iOS] Add System.Net.Security.Tests X509 Certificate not supported skips
* [libraries][Android] Add another round of test suite flakes for Android arm64
* Remove suites that had Package Installation Error failures
* [Android][libraries] Add more process crashed test suites
* Add more process crashed for Android arm and arm64
* Remove test suites that failed due to Package Installation Failure
* [Android][libraries] Add System.Diagnostics.Process.Tests active issue
* [Android] Add more flakey test suite crashing from json error
* [Android][libraries] JSON parsing exception section for suite skips
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Jakob Botsch Nielsen [Fri, 21 May 2021 18:35:06 +0000 (20:35 +0200)]
Override BaseType in TypeRefTypeSystemType (#52963)
* Override BaseType in TypeRefTypeSystemType
BaseType is being used to determine whether the type is a value type or
class type. This meant that `dotnet-pgo merge` would always produce
metadata saying that all types were class types.
In practice, this meant that we had the following behavior:
```
.\dotnet-pgo.exe merge --input IBCTrace28800.mibc --output identity.mibc
.\dotnet-pgo.exe merge --input IBCTrace28800.mibc --input identity.mibc --output foo.mibc
Opening D:\dev\dotnet\dotnet-optimization\output\temp\IBCTrace28800.mibc
Opening D:\dev\dotnet\runtime\artifacts\bin\coreclr\windows.x64.Debug\dotnet-pgo\foo.mibc
Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.ReadOnlySpan`1` used as both ValueType and non-ValueType
at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType.SetIsValueType(Boolean isValueType)
at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext.TypeRefSignatureParserProvider.GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, Byte rawTypeKind)
```
The same problem would occur when using compare-mibc to compare a
merged mibc file with some of its constituents. These scenarios work
now.
* Re-abstract BaseType in MetadataType
Tanner Gooding [Fri, 21 May 2021 18:22:39 +0000 (11:22 -0700)]
Fixing nullability annotations on DateOnly and TimeOnly (#53088)
* Fixing nullability annotations on DateOnly and TimeOnly
* Fix nullability annotatations for formats parameter on TryParseExact
dotnet-maestro[bot] [Fri, 21 May 2021 17:44:25 +0000 (10:44 -0700)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#52966)
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210518.8
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21267.7 -> To Version 1.0.0-prerelease.21268.8
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210519.5
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21267.7 -> To Version 1.0.0-prerelease.21269.5
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build
20210520.4
optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
From Version 1.0.0-prerelease.21267.7 -> To Version 1.0.0-prerelease.21270.4
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Andrii Kurdiumov [Fri, 21 May 2021 16:26:17 +0000 (22:26 +0600)]
Allow more efficient marshalling to IDispatch (#53065)
In NativeAOT scenario this allow to not rely on reflection to get GUID of the IDispatch, since it is well known.
Related to https://github.com/dotnet/runtimelab/pull/1142
Fan Yang [Fri, 21 May 2021 15:30:56 +0000 (11:30 -0400)]
Disable UnmanagedCallConvTest on Android (#53079)
Maxim Lipnin [Fri, 21 May 2021 13:48:49 +0000 (16:48 +0300)]
Mark some APIs as unsupported on MacCatalyst (#53075)
Lakshan Fernando [Fri, 21 May 2021 13:12:46 +0000 (06:12 -0700)]
Com trimming related work (#52940)
* COM related work and native host name changes
* FB
Viktor Hofer [Fri, 21 May 2021 13:11:41 +0000 (15:11 +0200)]
Fix creation of platforms and sources package (#53073)
* Fix creation of platforms and sources package
* Update Microsoft.Extensions.HostFactoryResolver.Sources.csproj
Ulrich Weigand [Fri, 21 May 2021 12:21:15 +0000 (14:21 +0200)]
Big-endian fix: JsonWriterHelper (#52790)
JsonWriterHelper.Transcoding.cs has endian-dependent code that is
guarded via a #if BIGENDIAN. However, nobody ever defines this
predefine (outside of System.Private.CoreLib) so this doesn't work.
Fixed by using BitConverter.IsLittleEndian like everywhere else.
Jakob Botsch Nielsen [Fri, 21 May 2021 10:24:28 +0000 (12:24 +0200)]
Implement 64-bit type handle histogram counts (#52898)
Tomas Weinfurt [Fri, 21 May 2021 10:01:36 +0000 (12:01 +0200)]
add SslStream_RandomWrites_OK test (#52682)
* add SslStream_RandomWrites_OK test
* update parameters
* feedback from review
* split RandomReadWriteSizeStream to separate file
* add comment
* feedback from review
* s/_maxSize/_maxChunkSize
Juan Hoyos [Fri, 21 May 2021 09:09:23 +0000 (02:09 -0700)]
Add mibc to the PE family of signatures (#53048)
Radek Doulik [Fri, 21 May 2021 07:29:14 +0000 (09:29 +0200)]
[wasm] Fix few paths (#53049)
To avoid parts of the path like:
artifacts\bin\native\net6.0-Browser-Debug-wasm\/dotnet.wasm
Jo Shields [Fri, 21 May 2021 07:07:34 +0000 (03:07 -0400)]
Rename Mac Catalyst dylib to libmonosgen, not libcoreclr (#53038)
Filip Navara [Fri, 21 May 2021 06:56:05 +0000 (08:56 +0200)]
Make DSA.Create, AesCcm, AesGcm, ChaCha20Poly1305 throw PNSE on iOS (#52978)
Elinor Fung [Fri, 21 May 2021 06:07:39 +0000 (23:07 -0700)]
Add UnmanagedCallConvAttribute (#52869)
SingleAccretion [Fri, 21 May 2021 03:48:30 +0000 (06:48 +0300)]
Add a missing end of line to JITDUMP in lclmorph.cpp (#53028)
Sergey Andreenko [Fri, 21 May 2021 03:27:02 +0000 (20:27 -0700)]
Delete an unnecessary pessimization for x86. (#52803)
Miha Zupan [Fri, 21 May 2021 02:45:15 +0000 (04:45 +0200)]
Fix DataCommonEventSource EnterScope (#53043)
Jose Perez Rodriguez [Thu, 20 May 2021 23:54:08 +0000 (16:54 -0700)]
Resolving ILLink warnings for Microsoft.Extensions.Configuration.Binder (#52795)
* Resolving ILLink warnings for Microsoft.Extensions.Configuration.Binder
* Addressing PR Feedback
Tomáš Rylek [Thu, 20 May 2021 23:22:54 +0000 (01:22 +0200)]
Disable crossgen2determinism test on OSX arm64 (#53045)
Steve Pfister [Thu, 20 May 2021 23:16:57 +0000 (19:16 -0400)]
Make the lookup for getApplicationProtocol optional (#53001)
* Make the lookup for getApplicationProtocol optional
The method getApplicationProtocol in javax.net.ssl.SSLEngine is only supported on API level 29 and above, so running on older devices would result in a crash. This change makes the initial method lookup optional and AndroidCryptoNative_SSLStreamGetApplicationProtocol in pal_sslstream.c will error if it is not supported.
Fixes https://github.com/dotnet/runtime/issues/52965
* Feedback
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Alexander Köplinger [Thu, 20 May 2021 23:15:59 +0000 (01:15 +0200)]
Fix OperatingSystem.IsAndroidVersionAtLeast() (#53034)
The implementation called into uname() which returns the Linux kernel version, but the API as specified in https://github.com/dotnet/designs/blob/main/accepted/2020/platform-checks/platform-checks.md expects the Android API level to be passed in and checked.
Also fix `OperatingSystem.IsLinux()` to return false on Android.
Andrii Kurdiumov [Thu, 20 May 2021 22:34:02 +0000 (04:34 +0600)]
Return null when Variant contains BSTR (#53030)
* Return null when Variant contains BSTR
I found this one when implement VARIANT marshalling for NativeAOT. Without that I have to resort to duplicate implementation in that class.
PR where I discover this - https://github.com/dotnet/runtimelab/pull/1142
Problem is `Marshal.PtrToStringBSTR` throw exception when passed `IntPtr.Zero`, but `Marshal.StringToBSTR` produce `IntPtr.Zero` when given null.
* Update nullable annotations
Ben Adams [Thu, 20 May 2021 22:26:21 +0000 (23:26 +0100)]
StringValues.Count test null first (#52508)
imhameed [Thu, 20 May 2021 21:44:36 +0000 (14:44 -0700)]
[mono] LLVM 11 compatibility fixes (#53019)
Fixes for minor source-level incompatibilities caught by
https://github.com/dotnet/runtime/pull/52984.
`AArch64Intrinsics` really should be `AARCH64Intrinsics`. And `llvm.floor`,
`llvm.ceil`, and `llvm.trunc` are architecture-independent intrinsics.
Also adds LLVM 11 linking flags to CMakeLists.txt.
Katelyn Gadd [Thu, 20 May 2021 21:07:45 +0000 (14:07 -0700)]
Support string interning for InvokeJS, address string interning performance hazard (#51576)
* In WASM builds, inflated lock words have an 'is interned' flag for strings to enable O(1) 'is interned' checks vs the previous hash lookup
* When the expression being passed to InvokeJS is interned, the binding_support string intern table is used to avoid marshaling the expression again
Steve Molloy [Thu, 20 May 2021 20:56:55 +0000 (13:56 -0700)]
Use Assembly.Load as first option to load TempAssembly. (#52429)
* Use Assembly.Load as first option to load TempAssembly.
Ivan Diaz Sanchez [Thu, 20 May 2021 19:46:20 +0000 (19:46 +0000)]
Print R2RDump Statistics in the Output File Instead of Console (#52278)
* Moved R2RDump statistics from console to --out file
* Automated the fixup statistics report into a self-maintaining component.
* Optimized the minimum values by setting them at the beginning, and removing the Math.Max() calls.
Vladimir Sadov [Thu, 20 May 2021 19:23:39 +0000 (12:23 -0700)]
make TestBasePriorityOnWindows not fail when ruinning tests with `-low` (#53003)
Andy Ayers [Thu, 20 May 2021 18:56:11 +0000 (11:56 -0700)]
JIT: fix invocation of unboxed entry when method returns struct (#52998)
If a value class method returns a struct, and its unboxed entry point
requires a type context argument, make sure to pass the context argument
properly.
Also, fetch the type context (method table) from the box, rather than
creating it from the class handle we have on hand; this tends to produce
smaller code as we're often fetching the method table for other reasons
anyways.
Closes #52975.
Steve Pfister [Thu, 20 May 2021 17:44:08 +0000 (13:44 -0400)]
Enable Android arm device tests (#52935)
As a result of dotnet/xharness#584 being fixed, we can now run arm 32 bit apps on our arm64 devices.
Alexander Köplinger [Thu, 20 May 2021 16:48:31 +0000 (18:48 +0200)]
Fix installer tests on runtime-staging (#53025)
* Fix installer tests on runtime-staging
After https://github.com/dotnet/runtime/pull/52548 some installer tests that were using `PlatformSpecific(TestPlatforms.Windows)` started failing in the runtime-staging pipeline on Linux, even though they shouldn't have been executing.
Turns out this is because with https://github.com/dotnet/runtime/commit/
81771effb2097045b2fca49d4ee4ca252f1e5a94 we're adding the `-trait category=failing` on the runtime-staging pipeline.
This doesn't work since `PlatformSpecific` attribute works by setting the "failing" category.
To fix this use a separate trait that can be used to only run the specific tests we want in runtime-staging.
* Fix: Trait only works on class
Steve Harter [Thu, 20 May 2021 16:39:28 +0000 (11:39 -0500)]
JsonNode trimmability improvements (#52934)
Vladimir Sadov [Thu, 20 May 2021 16:00:03 +0000 (09:00 -0700)]
Couple simple cleanups in singlefile/bundle (#52995)
* compress all kinds of files (except DepsJson and RuntimeConfigJson)
* outdated comment
Jan Vorlicek [Thu, 20 May 2021 09:02:22 +0000 (11:02 +0200)]
Move metadata off the executable heaps (#52912)
* Move metadata off the executable heaps
This change moves metadata structures that manage blocks of heap memory
out of the heaps in preparation for the W^X changes that will make the
heap memory read-execute only and modifying the metadata would require
unnecessary mappings and unmappings of the memory as read-write.
The structures moved in this change are the following:
* LoaderHeapBlock
* FreeBlock
* HeapList
* Remove unnecessary m_pCurBlock from the UnlockedLoaderHeap
Johan Lorensson [Thu, 20 May 2021 07:08:42 +0000 (09:08 +0200)]
Add native EventPipe event source generation into Mono build. (#52844)
Adjust existing genEventing.py/genEventPipe.py to work together with Mono C build. Gives Mono ability to use same set of generated event serializers already used in CoreCLR.
Commit adds support for a optional inclusion file when calling eventing scripts, only adding specific events into generated source files. Since Mono won't handle all native events supported by CoreCLR (just a small amount initially) using the inclusion file will dramatically reduce the size of eventpipe static library, if inclusion file is not used, all events will be included (current behaviour).
Commit also switch existing hand written native events currently used in Mono over to the native events generated by the eventing scripts.
Johan Lorensson [Thu, 20 May 2021 06:50:43 +0000 (08:50 +0200)]
Handle thread at safe point as managed frame in Sample Profiler. (#52972)
Viktor Hofer [Thu, 20 May 2021 06:28:04 +0000 (08:28 +0200)]
React to MSBuild Traversal and NoTargets SDK updates (#52895)
* Remove custom rebuild entry point in Build.proj
The rebuild target was added into the Traversal SDK here: https://github.com/microsoft/MSBuildSdks/commit/
fd7660d62b139f282926d98212b7aeb3e6460daa#diff-
ad560c0828c6bab536a01e43bb052bfce14a959b8df2c3f89cccfca0b399681c
* Update global.json
* Update global.json
* Update native-binplace.proj
* Update externals.csproj
* Update native-binplace.proj
* Update native-binplace.proj
* Default tfm for NoTargets projects
* Don't run GenFacades on ApiCompat.proj
* ApiCompat fix and packaging cleanup
* Fixes
* Only set if not multi-targeting
Aaron Robinson [Thu, 20 May 2021 06:27:43 +0000 (23:27 -0700)]
Ensure test delegates survive during native usage. (#53005)
Aaron Robinson [Thu, 20 May 2021 05:03:34 +0000 (22:03 -0700)]
Objective-C msgSend* support for pending exceptions in Release (#52849)
* Support checking for overridden methods during P/Invoke inline pass
* Objective-C runtime msgSend* functions are never inlinable.
* Update CrossGen2.
* Add comment on details of how we are testing the
SetMessageSendPendingException API.
* Disable the crossgen2smoke on OSX ARM64
David Wrighton [Thu, 20 May 2021 01:02:06 +0000 (18:02 -0700)]
Fix crossgen2 comp jobs (#52949)
- Remove experimental utf8 dll from list of dlls to compile
- Fix CORE_ROOT value to point at correct directory
- Add testResults.xml support for better test diagnostics
- Print out stdout and stderr for better debugging build time failures
hrrrrustic [Thu, 20 May 2021 00:34:49 +0000 (03:34 +0300)]
CoreLib missed Equals nullable annotations (#52167)
* add NotNullWhen attribute
Jeremy Koritzinsky [Wed, 19 May 2021 23:43:37 +0000 (16:43 -0700)]
Add basic natvis visualizations for some VM types (#52853)
Tlakaelel Axayakatl Ceja [Wed, 19 May 2021 20:04:03 +0000 (13:04 -0700)]
Enable single file analyzer in the runtime (#50894)
Summary:
Enables single file analyzer in the runtime by adding the ILLink.Analyzers package and the property EnableSingleFileAnalyzer equals to true
Deletes entries IL3000 and IL3001 in the CodeAnalysis.ruleset so the analyzer can actually produce these warnings otherwise the analyzer execution would be skipped. *Note*: tests warnings are controlled by CodeAnalysis.test.ruleset (this PR adds IL3002 to the CodeAnalysis.test.ruleset to disable the warning on tests)
Resolve warnings on single file dangerous patterns by:
- Annotating incompatible single file patterns with RequiresAssemblyFiles
- Suppressing the warning (because there is code that handles the incompatible code)
- Fixing the issue on code (remove the incompatible code and replace it with something that won't fail)
- Opening an issue to track fix and either annotate/suppress the current behavior
Sergey Andreenko [Wed, 19 May 2021 19:23:29 +0000 (12:23 -0700)]
Cut target.h into pieces. (#52952)
* Cut target.h into platform specific pieces.
* C_ASSERT is not used there.
* delete unused "REGNUM_MASK'.
* delete redefines of "REGMASK_BITS".
* add headers to JIT_HEADERS
Jose Perez Rodriguez [Wed, 19 May 2021 18:18:49 +0000 (11:18 -0700)]
Resolve ILLink warning on Microsoft.Extensions.Options.DataAnnotations (#52721)
* Resolve ILLink warning on Microsoft.Extensions.Options.DataAnnotations
* Fix build and add annotations to TOptions to try to keep as much as we can
Viktor Hofer [Wed, 19 May 2021 18:04:01 +0000 (20:04 +0200)]
Stop reading TargetFramework prop in props files (#52897)
* Stop reading TargetFramework prop in props files
The TargetFramework property isn't expected to be set in props files
before a project's body is evaluated.
Don't let BuildTargetFramework property fallback to TargetFramework as
BTF's sole intent is to convey the TargetFramework to filter to and not
the current selected TargetFramework. Reduce usage of BTF so that it is
only used in places where code is actually conditioned on filtering.
In addition to that, specify BuildTargetFramework as a global property for
all traversal builds so when invoking one of the traversal projects directly
(src.proj, ref.proj, etc.), BuildTargetFramework doesn't need to specified
manually to get the default behavior (filter on compatible to net6.0).
Remove the inferred BuildingNetCoreAppVertical because of that and
inline its meaning.
Make sendtohelix a normal NoTargets proj so that it has access to the
properties which were moved into the Directory.Build.targets file as
otherwise it wouldn't import that file.
Tarek Mahmoud Sayed [Wed, 19 May 2021 17:59:30 +0000 (10:59 -0700)]
Regression and Perf Fixes (#52956)
Fan Yang [Wed, 19 May 2021 17:29:51 +0000 (13:29 -0400)]
Disable a failing test (#52970)
Ulrich Weigand [Wed, 19 May 2021 17:29:39 +0000 (19:29 +0200)]
Add public Architecture enum value for s390x (#52906)
* Add S390x value to System.Runtime.InteropServices.Architecture enum
* Add native s390x architecture detection
Kevin Jones [Wed, 19 May 2021 16:55:29 +0000 (12:55 -0400)]
Support ChaChaPoly1305 on Android if available
In addition to making ChaCha/Poly work, this change refactors the "HasTag" implementation.
The CIPHER_HAS_TAG was used to determine if the GCMParameterSpec
configuration is needed for variable length tags.
While ChaCha20Poly1305 has authentication tags, it does not permit a tag
length other than 16 bytes, so there is nothing to configure.
This renames the CIPHER_HAS_TAG to be more specific that the cipher
supports more than one tag length, and removes it from ChaCha20Poly1305.
This simplifies the IV initialization a bit.
Filip Navara [Wed, 19 May 2021 16:23:22 +0000 (18:23 +0200)]
Implement iOS PAL for S.S.C.X509Certificates
Levi Broderick [Wed, 19 May 2021 16:08:44 +0000 (09:08 -0700)]
Obsolete SuppressIldasmAttribute and remove ildasm.exe support for it (#50951)
Mitchell Hwang [Wed, 19 May 2021 15:18:00 +0000 (11:18 -0400)]
[MacCatalyst][libraries] Add specific SkipOnPlatform and ActiveIssues instead of test level skip (#52859)
* [MacCatalyst][libraries] Add System.Console.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add System.Diagnostics.Process.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add Microsoft.Extensions.Hosting.Unit.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add System.Net.NetworkInformation.FunctionalTests SkipOnPlatform
* [MacCatalyst][libraries] Add System.IO.FileSystems.Tests SkipOnPlatform
* [MacCatalyst][libraries] Add Microsoft.VisualBasic.Core.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.Diagnostics.Process.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.Threading.Thread.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.IO.FileSystem.Tests ActiveIssue
* [MacCatalyst][libraries] Add System.Runtime.Extensions.Tests ActiveIssue
* [MacCatalyst][libraries] Remove test project level skips
* [MacCatalyst] Add forgotten PNSE and ActiveIssue
* [MacCatalyst][libraries] Coalesce MacCatalyst into iOS tvOS SkipOnPlatform
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Alexander Köplinger [Wed, 19 May 2021 11:24:49 +0000 (13:24 +0200)]
Fix link to servicing PR template (#52961)
The old URL didn't show the template anymore, just a generic GitHub page. Linking to the raw URL so `<!-- -->` comments are visible.
dotnet-maestro[bot] [Wed, 19 May 2021 08:04:07 +0000 (08:04 +0000)]
Update dependencies from https://github.com/dotnet/emsdk build
20210518.1 (#52932)
[main] Update dependencies from dotnet/emsdk
Kevin Jones [Wed, 19 May 2021 08:02:21 +0000 (04:02 -0400)]
Fix OpenSSL detection in PlatformDetection for Android (#52798)
Adam Sitnik [Wed, 19 May 2021 07:58:32 +0000 (09:58 +0200)]
Extend FileStreamOptions with BufferSize, allow to specify 0 to disable the buffering (#52928)
* extend FileStreamOptions with BufferSize
* allow to disable the buffering by setting bufferSize to 0
* Apply suggestions from code review
Co-authored-by: David Cantú <dacantu@microsoft.com>
Larry Ewing [Wed, 19 May 2021 07:57:52 +0000 (02:57 -0500)]
Remove exclusion for https://github.com/dotnet/runtime/issues/52384 (#52950)
Eric StJohn [Wed, 19 May 2021 06:22:04 +0000 (23:22 -0700)]
Remove the use of IsPartialFacadeAssembly in refererences (#52793)
* Remove the use of IsPartialFacadeAssembly in refererences
This flag requires assembly-re-writing to replace type-defs in reference
assemblies with type forwards, when the same type exists in references.
We've pretty much exclusively used this on .NETFramework, since it's
not friendly to source build (CCI isn't part of source build).
.NETFramework isn't going to be changing so it doesn't save us much
to generate these typeforwards in the build.
We also used these to make sure the netstandard surface area was
compatible with .NETFramework facades (we'd use the pre-rewritten
reference assemblies for contract), but this need goes away now that we
have package validation based APICompat that compares netstandard refs
to net4x facades.
* Fix some projects I missed after changing naming convention
* Fixup another project
* Fix build of System.System.Threading.AccessControl
* Adding a section to ref-source docs on .NETFramework facades
* Address feedback
Egor Bogatov [Wed, 19 May 2021 06:15:32 +0000 (09:15 +0300)]
JIT: Convert some of the old-style intrinsics to NamedIntrinsics (#52156)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Kunal Pathak [Wed, 19 May 2021 04:31:26 +0000 (10:01 +0530)]
Refactor LSRA's heuristics selection (#52832)
* refactor lsra
* Add missing return condition
* Minor cleanup
- summary docs
- Removed DEFAULT_ORDER
- Added order seq ID
* jit format
* fix linux build
* review feedback
* Remove TODO
Andy Ayers [Wed, 19 May 2021 03:09:27 +0000 (20:09 -0700)]
JIT: peel off dominant switch case under PGO (#52827)
If we have PGO data and the dominant non-default switch case has more than
55% of the profile, add an explicit test for that case upstream of the switch.
We don't see switches all that often anymore as CSC is quite aggressive about
turning them into if-then-else trees, but they still show up in the async
methods.
Ankit Jain [Wed, 19 May 2021 01:55:30 +0000 (21:55 -0400)]
[wasm] Cleanup native build parts of WasmApp.targets (#52732)
* [wasm] Split _WasmNativeBuild into separate targets, as steps
- this gives us more control over the flow, and will be useful for
dependency checking (future work)
* [wasm] WasmApp.targets: Decouple aot compilation from native relinking
* [wasm] Convert emcc flags from property to item, and use rsp files
The default arguments are still from `emcc-flags.txt`, which will get
converted into a rsp file and used with this, in a future PR.
* cleanup
* [wasm] Add new properties to explicitly control optimization level used
.. for compiling native files, and linking.
`$(WasmLinkOptimizationFlag)`, and `$(WasmCompileOptimizationFlag)`
note: right now `emcc-flags.txt` has flags already specified, but that
will go away in favor of only these flags (future work)
* [wasm] Add new properties to specify extra emcc flags
`$(EmccExtraLDFlags)`, `$(EmccExtraCFlags)`
* dummy
Eric Erhardt [Wed, 19 May 2021 01:51:44 +0000 (20:51 -0500)]
Remove From header validation from System.Net.Http (#52794)
* Remove From header validation from System.Net.Http
The From header is not commonly used and this logic adds a decent amount of code to System.Net.Http that can't be trimmed.
Fix #52664
Aaron Robinson [Wed, 19 May 2021 00:50:17 +0000 (17:50 -0700)]
Fix casting issue (#52948)
Alexander Köplinger [Tue, 18 May 2021 23:08:15 +0000 (01:08 +0200)]
Use OperatingSystem APIs instead of RuntimeInformation in more places (#52548)
* Use OperatingSystem APIs instead of RuntimeInformation in more places
These are recommended instead of the older APIs.
* PR feedback
Aleksey Kliger (λgeek) [Tue, 18 May 2021 21:36:02 +0000 (17:36 -0400)]
[build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms (#52915)
* [build] Define NO_UNALIGNED_ACCESS for 32-bit arm platforms
Possibly related to crashes on Android like this:
```
05-18 10:59:07.466 17076 17076 F libc : Fatal signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb9c95a41 in tid 17076 (simplehellomaui), pid 17076 (simplehellomaui)
05-18 10:59:07.501 17104 17104 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
05-18 10:59:07.502 989 989 I tombstoned: received crash request for pid 17076
05-18 10:59:07.503 17104 17104 I crash_dump32: performing dump of process 17076 (target tid = 17076)
05-18 10:59:07.512 17104 17104 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-18 10:59:07.512 17104 17104 F DEBUG : Build fingerprint: 'google/crosshatch/crosshatch:11/RQ2A.210405.005/
7181113:user/release-keys'
05-18 10:59:07.512 17104 17104 F DEBUG : Revision: 'MP1.0'
05-18 10:59:07.512 17104 17104 F DEBUG : ABI: 'arm'
05-18 10:59:07.515 17104 17104 F DEBUG : Timestamp: 2021-05-18 10:59:07+0200
05-18 10:59:07.515 17104 17104 F DEBUG : pid: 17076, tid: 17076, name: simplehellomaui >>> com.microsoft.simplehellomaui <<<
05-18 10:59:07.515 17104 17104 F DEBUG : uid: 10364
05-18 10:59:07.515 17104 17104 F DEBUG : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0xb9c95a41
05-18 10:59:07.515 17104 17104 F DEBUG : r0
bb4a5cd0 r1
b9c95a49 r2
00000000 r3
e94c7520
05-18 10:59:07.515 17104 17104 F DEBUG : r4
0000000c r5
00000000 r6
ff843c50 r7
ff843e70
05-18 10:59:07.515 17104 17104 F DEBUG : r8
b69547f8 r9
e99eac50 r10
00000000 r11
00000021
05-18 10:59:07.515 17104 17104 F DEBUG : ip
e94c74f0 sp
ff843c48 lr
bb31e0dd pc
bb3a4d24
05-18 10:59:07.531 709 709 E Layer : [Surface(name=Task=1)/@0x52e6b1a - animation-leash#0] No local sync point found
05-18 10:59:07.532 709 709 E Layer : [Surface(name=Task=1571)/@0x9c90165 - animation-leash#0] No local sync point found
05-18 10:59:07.706 17104 17104 F DEBUG : backtrace:
05-18 10:59:07.707 17104 17104 F DEBUG : #00 pc
000ddd24 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_method_to_ir+9232) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #01 pc
000d7777 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (inline_method+622) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #02 pc
000ec0a3 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_method_to_ir+67470) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #03 pc
000cda6d /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mini_method_compile+2264) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #04 pc
000cf413 /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_jit_compile_method_inner+50) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #05 pc
000d1d7f /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_jit_compile_method_with_opt+1766) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #06 pc
0012d94d /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (common_call_trampoline+832) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #07 pc
0012d5cb /data/app/~~J4DFQ3c1v2YGrEurX7TNjg==/com.microsoft.simplehellomaui-_jGGPiZpZ3yT-QCTNDcgvQ==/lib/arm/libmonosgen-2.0.so (mono_magic_trampoline+62) (BuildId:
d0a4e41a500357a621884b64f6ca8533b62a664b)
05-18 10:59:07.707 17104 17104 F DEBUG : #08 pc
0000006a <anonymous:
b7986000>
```
* move to host/target sections
Alexander Köplinger [Tue, 18 May 2021 21:24:24 +0000 (23:24 +0200)]
Fix backport GitHub Action (#52938)
The octokit client we get from @actions/github recently changed their API.
Egor Bogatov [Tue, 18 May 2021 20:35:20 +0000 (23:35 +0300)]
Don't call result.ToString() in Random.AssertInRange (#52918)
* Avoid calling result.ToString() when the Assert condition is not met
* handle other asserts
* Update Random.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Anirudh Agnihotry [Tue, 18 May 2021 20:03:27 +0000 (13:03 -0700)]
update branding (#52921)
Anton Firszov [Tue, 18 May 2021 19:22:32 +0000 (21:22 +0200)]
HttpStress: also disable firewall for HTTP2 (#52643)
We decided that we need to rule out the Windows Firewall as a cause for further failure types documented in #42211.
Miha Zupan [Tue, 18 May 2021 19:19:09 +0000 (21:19 +0200)]
Avoid test race condition between two completing requests (#52887)
hrrrrustic [Tue, 18 May 2021 19:16:09 +0000 (22:16 +0300)]
Obsolete Socket.UseOnlyOverlappedIO (#52475)
close #47163
Marek Safar [Tue, 18 May 2021 19:04:53 +0000 (21:04 +0200)]
Fix errors formatting to show full information in resources trimmed configs (#52305)
Egor Bogatov [Tue, 18 May 2021 18:28:30 +0000 (21:28 +0300)]
JIT: Optimize *x = dblCns to *x = intCns (#52298)
Nikola Milosavljevic [Tue, 18 May 2021 18:11:05 +0000 (11:11 -0700)]
Add CBL-Mariner deps package (#52924)