Viktor Hofer [Thu, 22 Apr 2021 10:40:51 +0000 (12:40 +0200)]
Remove harvesting of M.E.DependencyModel (#51582)
* Remove harvesting of M.E.DependencyModel
The netstandard1.6 configuration of Microsoft.Extensions.DependencyModel
isn't built anymore. Instead the already built matching binary from the
latest available package version is redistributed when packaging the
DependencyModel library.
Also dropping the netstandard1.3 asset and the net451 one as the
minimum supported set of platforms are ones that support netstandard2.0.
In addition to the harvesting removal, cleaning up the src project which
had an unnecessary condition and property set.
Contributes to https://github.com/dotnet/runtime/issues/47530
dotnet-maestro[bot] [Thu, 22 Apr 2021 10:10:10 +0000 (10:10 +0000)]
Update dependencies from https://github.com/mono/linker build
20210421.3 (#51683)
[main] Update dependencies from mono/linker
dotnet-maestro[bot] [Thu, 22 Apr 2021 07:26:07 +0000 (09:26 +0200)]
[main] Update dependencies from mono/linker (#51558)
* Update dependencies from https://github.com/mono/linker build
20210419.2
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.2.21217.1 -> To Version 6.0.100-preview.2.21219.2
* Update dependencies from https://github.com/mono/linker build
20210421.1
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.2.21217.1 -> To Version 6.0.100-preview.2.21221.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Andrew Au [Thu, 22 Apr 2021 06:16:49 +0000 (23:16 -0700)]
Fix a build error when USE_REGIONS is turned on (#51660)
Ankit Jain [Thu, 22 Apr 2021 04:43:06 +0000 (00:43 -0400)]
[wasm] Correctly set PATH for node, and python (#51509)
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Mike McLaughlin [Thu, 22 Apr 2021 04:37:19 +0000 (21:37 -0700)]
Fix Type.GetFields() after EnC/Hot reload update (#51649)
Fix Type.GetFields() after EnC/Hot reload update
Switch to the EncApproxFieldDescIterator in the GetFields() FCall.
Issue: https://github.com/dotnet/runtime/issues/51517
Fix debug build assert in ApplyUpdate
Added MethodDesc::ResetCodeEntryPointForEnC() that reset the entry point without
the asserts that caused the problem.
Introduced in the fix for https://github.com/dotnet/runtime/issues/50445
Elinor Fung [Thu, 22 Apr 2021 01:33:11 +0000 (18:33 -0700)]
Add Get/SetLastPInvokeError and Get/SetLastSystemError APIs (#51505)
Steve Pfister [Thu, 22 Apr 2021 00:58:25 +0000 (20:58 -0400)]
Shift Most of Wasm AOT test build to helix (#48226)
Since AOT'ing each test suite takes between 3-9 min, we need to shift the burden over to helix.
## This is done by:
1. building the test assemblies on the build machine
- the wasm part of the build is not executed on the build machine,
because it has the AOT build part
2. Zip up the test assembly+friends, *and* any bits required to run the wasm
app build for that on helix (eg. emsdk, wasm app targets, cross compiler etc)
3. Send all this to helix, and use a custom `aot-build.proj`
- which recreates all the build inputs for the `WasmBuildApp` target
using the paths for the assets on helix
- then we can run `WasmBuildApp` for the build, resulting in a wasm app
bundle.
4. Run the tests!
- We already have the bits required for building wasm apps on helix, supported
for `Wasm.Build.Tests`, which we can use here too.
## Trimming:
- Since, AOT can be so expensive, we use `EnableAggressiveTrimming=true`(EAT), but
that means that we could have issues due to trimming.
- And it can sometimes be unclear whether the build/test failures are due to trimming
or AOT.
- Because these builds+test runs are different from other builds, owing to the
"build partially on helix" step, a normal EAT build would not be the same as
- to help with testing this, we add two lanes to `runtime-staging`:
- `*_Mono_AOT`: builds AOT+EAT on helix
- `*_Mono_EAT`: builds EAT, on helix
- this is required because we want to run almost the same kinda
build: 1. build test assembly; *2. send to helix; 3. build wasm app;* 4. run tests
- This should effectively mean that we can see which errors might be due to EAT, and
which are clearly because of EAT+AOT.
Co-authored-by: Steve Pfister <steve.pfister@microsoft.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Layomi Akinrinade [Thu, 22 Apr 2021 00:42:24 +0000 (17:42 -0700)]
Add Put/Post methods to HttpClientJsonExtensions that take type metadata (#51609)
* Add Put/Get methods to HttpClientJsonExtensions that take type metadata
* Make JsonContentOfT derive directly from HttpContent
* Fix linker error
* Rename Helper to JsonHelpers
Ankit Jain [Wed, 21 Apr 2021 23:46:16 +0000 (19:46 -0400)]
[wasm] Use response files for `emcc` invocations (#51530)
* [wasm] Use response files for `emcc` invocations
This adds response file for the linker command line, which will be the
longest one. And it uses a known name for the response file.
In future, once we have dependency checking, we can use such response
files for that too.
Fixes #51437 .
* [wasm] Emit emcc arguments, one per line in the rsp file
Having the arguments one per line, also means that we don't have to
quote the file paths. And it is more readable.
* [wasm] Revert to quote file paths even in response file for emcc
Suggested by Pranavkm:
```
.. their format does require whitespaces to be quoted:
https://github.com/emscripten-core/emscripten/blob/main/tools/response_file.py#L16-L53.
```
Anton Lapounov [Wed, 21 Apr 2021 23:34:42 +0000 (16:34 -0700)]
Improve arguments handling in build-runtime.cmd (#51639)
Levi Broderick [Wed, 21 Apr 2021 22:38:03 +0000 (15:38 -0700)]
Add internal Array.Clear method (#51548)
David Pine [Wed, 21 Apr 2021 21:30:39 +0000 (16:30 -0500)]
Add and update `///` comments to help consumers of these APIs (#51629)
* Added some API comments to help consumers have a better understanding of the order of operations, added unit tests, fixed redundancy in comment
* Update test to call UseEnv more than once directly
Alex-ABWorld [Wed, 21 Apr 2021 21:24:23 +0000 (22:24 +0100)]
Remove outdated mention of "COMObject.cpp" (#51644)
Aaron Robinson [Wed, 21 Apr 2021 20:37:21 +0000 (13:37 -0700)]
Simplify some CallConv logic (#51596)
* Simplify some CallConv logic
Reuse the CallConvBuilder class in more places
Unify CharSet logic for UnmanagedFunctionPointer and DllImport
* Add needed cast.
* Explicitly handle the 0 case for the CorNativeLinkType enum.
* Comment update.
* Review feedback.
* Update dllimport.cpp
Style feedback.
Andrew Au [Wed, 21 Apr 2021 20:32:41 +0000 (13:32 -0700)]
Allow region_allocator to allocate from the right (#50973)
Aleksey Kliger (λgeek) [Wed, 21 Apr 2021 19:48:27 +0000 (15:48 -0400)]
[mono] Add HAVE_PTHREAD_JIT_WRITE_PROTECT_NP to cmake config.h.in (#51610)
* [mono] Add HAVE_PTHREAD_JIT_WRITE_PROTECT_NP to cmake config.h.in
Otherwise mono_codeman_enable_write is a no-op
Should fix jiting on Apple ARM64
* [cmake] Use check_symbol_exists(pthread_jit_write_protect_np)
check_function_exists doesn't look at the headers, only at linking, so it can't detect functions marked unavailable in Apple headers.
Fixes #49042
Fan Yang [Wed, 21 Apr 2021 19:36:19 +0000 (15:36 -0400)]
Disable failing runtime tests on Android x64 (#51514)
James Newton-King [Wed, 21 Apr 2021 18:36:16 +0000 (06:36 +1200)]
Fix encoding non-static QPack HTTP status (#51614)
Larry Ewing [Wed, 21 Apr 2021 18:32:04 +0000 (13:32 -0500)]
[wasm][aot] Stop hardcoding artifacts from the runtime pack (#51628)
Tanner Gooding [Wed, 21 Apr 2021 18:29:06 +0000 (11:29 -0700)]
Don't have gtAuxiliaryJitType and gtOtherReg share a union (#51627)
* Don't have gtAuxiliaryJitType and gtOtherReg share a union
* Applying formatting patch
Stephen Toub [Wed, 21 Apr 2021 18:04:26 +0000 (14:04 -0400)]
Fix thread-safety of TypeDescriptor.Refresh enumerating hashtable (#51621)
Viktor Hofer [Wed, 21 Apr 2021 17:30:34 +0000 (19:30 +0200)]
Remove stale property (#51615)
The by the SDK default included netframework reference assembly are used instead of the old microsoft.netframework.targetingpack. Removing the stale property.
Natalia Kondratyeva [Wed, 21 Apr 2021 16:49:32 +0000 (18:49 +0200)]
Merge Start into ctor and Close into Dispose for QuicListener (#51512)
Fixes #2262
Zoltan Varga [Wed, 21 Apr 2021 15:04:48 +0000 (11:04 -0400)]
Add wasm runtime debugging docs. (#51623)
Johan Lorensson [Wed, 21 Apr 2021 07:22:32 +0000 (09:22 +0200)]
Lazy init of ThreadWaitInfo in Thread.Mono.cs to prevent crash on external attached threads. (#51483)
* Init ThreadWaitInfo to prevent crash on external attached threads.
Commit https://github.com/dotnet/runtime/commit/
457f58cd30082c9de0be9ca62e64fa179c37dab3
added a new managed object into Mono's managed thread object, _waitInfo.
This new object was initialized in Thread managed constructor, problem
with that is for all threads that gets their thread object created in
native code, create_thread_object, that code did the same thing as
constructor before commit, since managed constructor called down into
native code calling the same native method as create_thread_object meaning
a thread object created from managed or native would be initialized
identical.
After above commit this is no longer true, meaning that all managed thread
objects created in native code (like attached external threads) won't
get _waitInfo initialized and that leads to a crash when OnThreadExiting
gets called from Finalizer thread.
Fix is to make sure _waitInfo get initialize regardless of thread object
gets created from managed or native code.
This fix implements a lazy init as part of property access, I tested a
native version of the fix, calling back into managed to init managed
parts of thread when tread gets created in native, but turns out that
such a fix gets a little complicated, since some of the threads are
created early when it's not possible to run managed code, so that in turn
needed additional changes into the init order, that in turn has bigger
impact and could cause other unwanted side effects.
Fixing it in managed using lazy/on demand init is simpler/cleaner approach
but might come with a small performance hit for callers of WaitInfo property
(will add volatile read and conditional branch), but looking at callers
of the property, they appear in functions with rather high "cost",
like Sleep, NewMutex, Wait, SignalAndWait, Interrupt and
RelinquishOwnership.
Levi Broderick [Wed, 21 Apr 2021 07:13:48 +0000 (00:13 -0700)]
Add internal Array.NativeLength property (#51589)
Andrew Au [Wed, 21 Apr 2021 04:31:53 +0000 (21:31 -0700)]
Nuget package for ILCompiler.Reflection.ReadyToRun (#48182)
Nuget package for ILCompiler.Reflection.ReadyToRun
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
Jan Kotas [Wed, 21 Apr 2021 03:57:02 +0000 (20:57 -0700)]
Simplify non-generic ArrayEnumerator (#51351)
* Simplify non-generic ArrayEnumerator
* Implement GetFlattenedIndex for Mono
Andy Ayers [Wed, 21 Apr 2021 03:31:34 +0000 (20:31 -0700)]
JIT: revise inlinee scale computations (#51593)
Rework the inlinee profile scale computations so that all scaling happens
during the profile incorporation phase, rather than sometimes deferring
the scaling until inlining. Because of this we no longer need to record
the scale on the inline info.
Toss out profile data if all counts are zero.
Update the edge profile solver to handle a special case where no return block
was executed, but edges within the method had counts. In such cases the entry
block count can end up zero and blocking proper scaling computations. For this
case, try and deduce a plausible count in this case from nearby blocks and edges.
Fix the edge weight computations to tolerate inconsistent data rather than
to assert.
Jan Kotas [Wed, 21 Apr 2021 03:05:05 +0000 (20:05 -0700)]
Fix LatencyRoundtrips test failures (#51603)
Disable the tests for values are not guaranteed to roundtrip depending on the GC settings. We have more extensive test coverage for the latency modes under runtime tests.
Kevin Jones [Wed, 21 Apr 2021 01:22:16 +0000 (21:22 -0400)]
Use Apple's CCRandomGenerateBytes in GetCryptographicallySecureRandomBytes. (#51526)
The Apple API offers significant performance improvements (an order of a magnitude) over
reading from /dev/urandom.
Andy Ayers [Wed, 21 Apr 2021 00:19:38 +0000 (17:19 -0700)]
Add MCS jitflags support for the new GetLikelyClass PGO record type (#51578)
Records of this type are created when class profile histograms in dynamic PGO
data are summarized by the static PGO tooling.
These records can appear in both prejit and jit schemas when the static PGO data is
passed back to the jit.
David Pine [Wed, 21 Apr 2021 00:01:24 +0000 (19:01 -0500)]
Fix issue #48696 (#51520)
There appeared to be two issues, where the config.GetReloadToken().RegisterChangeCallback was registered after the updates were made.
Zoltan Varga [Tue, 20 Apr 2021 23:59:43 +0000 (19:59 -0400)]
[wasm] Allocate a variable for all ref typed vregs and mark them as volatile. (#51580)
This forces the llvm backend to allocate a stack location for them, so they
get GC tracking.
Ankit Jain [Tue, 20 Apr 2021 23:33:50 +0000 (19:33 -0400)]
[wasm] Set runtime pack directory to the nuget path, if not set (#51347)
* [wasm] Set runtime pack directory to the nuget path, if not set
* Update src/mono/wasm/build/WasmApp.targets
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Layomi Akinrinade [Tue, 20 Apr 2021 22:45:26 +0000 (15:45 -0700)]
[JSON source gen 3/3] Add new methods to JsonSerializer and System.Net.Http.Json APIs that take type metadata (#51528)
* Add new methods to JsonSerializer and System.Net.Http.Json APIs that take type metadata
* Address review feedback
Jeff Handley [Tue, 20 Apr 2021 22:30:36 +0000 (15:30 -0700)]
Simplify logic for IncludePlatformAttributes (#51575)
Levi Broderick [Tue, 20 Apr 2021 22:10:34 +0000 (15:10 -0700)]
Avoid conv.i opcodes in hot paths in CoreLib (#51190)
dotnet-maestro[bot] [Tue, 20 Apr 2021 21:43:33 +0000 (21:43 +0000)]
[main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project dotnet/runtime-assets (#51488)
[main] Update dependencies from dotnet/runtime dotnet/arcade dotnet/icu dotnet/xharness dotnet/llvm-project dotnet/runtime-assets
Eric StJohn [Tue, 20 Apr 2021 20:32:40 +0000 (13:32 -0700)]
Disable source generators from binplacing (#51539)
* Disable source generators from binplacing
* Ensure APICompat doesn't run for non-Source projects
Konrad Kokosa [Tue, 20 Apr 2021 20:09:55 +0000 (22:09 +0200)]
Add link to my deep .NET GC Internals series (#51551)
It's 14 hours of lectures about how .NET GC is implemented.
David Wrighton [Tue, 20 Apr 2021 20:03:35 +0000 (13:03 -0700)]
Add standard mibc to build pack (#51531)
Jeremy Koritzinsky [Tue, 20 Apr 2021 18:41:04 +0000 (11:41 -0700)]
Use adjusted parent layout size to handle a non-zero-sized class inheriting from a zero-sized class that inherits from another zero-sized class. (#50861)
Stephen Toub [Tue, 20 Apr 2021 18:27:54 +0000 (14:27 -0400)]
Remove FileStream long pinning, and simplify synchronization (#51462)
* Remove pinning in BufferedFileStreamStrategy
* Simplify code/synchronization in ValueTaskSource
Stephen Toub [Tue, 20 Apr 2021 18:27:14 +0000 (14:27 -0400)]
Add metadata update handler to System.ComponentModel.TypeConverter (#51466)
* Add metadata update handler to System.ComponentModel.TypeConverter
* Update src/libraries/System.ComponentModel.TypeConverter/src/System/ComponentModel/ReflectTypeDescriptionProvider.cs
Jan Kotas [Tue, 20 Apr 2021 18:09:27 +0000 (11:09 -0700)]
Fix GCSettings.LatencyMode test TODO (#51547)
Ben Adams [Tue, 20 Apr 2021 17:48:11 +0000 (18:48 +0100)]
Increase SslStream Frameoverhead estimation for newer TLS protocols (#51320)
Geoff Kizer [Tue, 20 Apr 2021 16:30:38 +0000 (09:30 -0700)]
fix zero byte Send on linux (#51473)
* fix zero byte send on linux and update tests
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Jeremy Barton [Tue, 20 Apr 2021 16:26:50 +0000 (09:26 -0700)]
Use EVP_PKEY for RSA public key operations
Also change the storage model to SafeEvpPKeyHandle,
only import and export use legacy SafeRsaHandle.
Johan Lorensson [Tue, 20 Apr 2021 15:01:33 +0000 (17:01 +0200)]
Mono runtime component infrastructure including EventPipe/DiagnosticsServer as a Mono runtime component. (#50837)
Implementation of Mono runtime component infrastructure, https://github.com/dotnet/runtime/blob/main/docs/design/mono/components.md.
This commit also includes a port of Mono EventPipe/DiagnosticsServer library over to new runtime component infrastructure.
Before all packaging/deploy have been fixed for platforms that will switch over to hosting components as shared libraries, all components will be build and linked using the static linkage scenario outline in document above. Once package and deploy is resolved for dynamic linking scenarios, we will switch this for corresponding platforms in follow up commits.
Lakshan Fernando [Tue, 20 Apr 2021 12:07:36 +0000 (05:07 -0700)]
Fix EventSource trimmer warning (#51237)
* eh fix
* test change that inadvertently got checked in earlier
* Suppresses the trimmer warning on TypeAnalysis ctor
* Incorporating FB
* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Diagnostics.DiagnosticSource/src/System/Diagnostics/DiagnosticSourceEventSource.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Fix DynamicDependency as per PR feedback
* an earlier change got reverted
* fixed proj file netcore app condition check
* fixed NETCORE_ENGINEERING_TELEMETRY build failures
* fixeing another NETCORE_ENGINEERING_TELEMETRY build failures
* Adding RequiresUnreferencedCode to TypeAnalysis ctor instead of suppressing the warning to get FB, not fully fixed
* PR FB and suppressing warnings for safe calls
* propagated the warning all the way up
* CI build break fix for one file
* excluding NativeRTEventSrc from being build in a project
* Missed couple of supppressions on NativeRTEventSrc
* build break fixes
* Trimmer warning fix related to EventSource manifest creation
* incorporate fb
* fix build break in some configs
* comment feedback
* build break
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Maxim Lipnin [Tue, 20 Apr 2021 10:14:32 +0000 (13:14 +0300)]
Mark System.Console APIs as unsupported on Android (#50931)
Annotated public System.Console APIs throwing PNSE on Android.
Part of #47911.
Jeff Handley [Tue, 20 Apr 2021 04:52:12 +0000 (21:52 -0700)]
Refactor build to use SupportedOSPlatforms instead of IsWindowsSpecific (#51450)
Elinor Fung [Tue, 20 Apr 2021 02:57:28 +0000 (19:57 -0700)]
Put Marshal.GetHINSTANCE under ifdef for Windows instead of COM (#51523)
Andy Ayers [Tue, 20 Apr 2021 02:53:40 +0000 (19:53 -0700)]
Fix SPMI handling of PGO schemas with class profiles (#51521)
SPMI wasn't capturing enough data for PGO schemas that had class profiles,
leading to replay failures.
Kunal Pathak [Tue, 20 Apr 2021 01:34:06 +0000 (18:34 -0700)]
Enable superpmi collection for libraries tests (#51507)
* Run SPMI collection on libraries-tests
* Only run for libraries-tests and change GUID
* fix error
* fix the collection name
* fix the timeoutInMinutes
* Download libraries test artifacts
* try to fix the libs+tests artifacts name
* Use artifacts name as is
* Fix the libraries test artifacts name
* Use librares_test.zip
* Modify the filter to unzip all *Tests.dll files
* Revert "Modify the filter to unzip all *Tests.dll files"
This reverts commit
b62f7132ec084453495a92a3e336688585366908.
* Try to unzip libraries_zipped
* overwriteExistingFiles=true
* Fix the asset extension
- Also exclude files present in core_root
* fix artifacts name
* remove extra .
* Ignore permission error
* Copy common test files in CORE_ROOT
- And do not copy not *.Tests.dll" for PMI
* Perform collection for all libraries_tests assets
* Add UnicodeEncodeError EH
* Add PermissionError for copy2
* Copy all the test assests to core_root
* Make input_directory readonly
* make ch_mod recursive
* Add option of error_limit to superpmi.py
* Pass -failureLimit flag to parallel mode
* Revert "Only run for libraries-tests and change GUID"
This reverts commit
7f4cdda9cf4f49fc21a354f616a67554f65cd6ea.
Tanner Gooding [Tue, 20 Apr 2021 00:55:09 +0000 (17:55 -0700)]
Updating Vector<T> to support nint and nuint (#50832)
* Refactoring GenTreeJitIntrinsic to expose SimdSize and SimdBaseType via methods
* Updating the JIT to pass through the CORINFO_TYPE for hardware intrinsics
* Adding support for Vector<nint> and Vector<nuint> to managed code
* Updating the vector tests to cover nint and nuint
* Recognize Vector<nint> and Vector<nuint> in the JIT
* Updating Vector64/128/256<T> NotSupportedTest metadata to include type name
* Updating the Vector64/128/256<T> tests to have NotSupported validation for nint/nuint
* Splitting ThrowHelper.ThrowForUnsupportedVectorBaseType into separate functions for Numerics vs Intrinsics
* Updating Utf16Utility.Validation to directly use Vector<nuint>
* Don't use the auxiliary type to hold a SIMD type, since it can be trivially pulled from the operand instead
* Split the mono handling for ThrowForUnsupportedVectorBaseType into ThrowForUnsupportedNumericsVectorBaseType and ThrowForUnsupportedIntrinsicsVectorBaseType
* Add basic handling for MONO_TYPE_I and MONO_TYPE_U to simd-intrinsics.c
* Ensure simd-intrinsics.c in Mono handles `MONO_TYPE_I` and `MONO_TYPE_U` on relevant code paths
* Ensure we don't assert when encountering synthesized Vector128<nint> handles
* Applying formatting patch
* Fix the handling for Crc32 and Crc32C on ARM64
* Updating Mono mini-amd64 to handle MONO_TYPE_I and MONO_TYPE_U for SIMD operations
* Handle OP_XCOMPARE.CMP_GE_UN for MONO_TYPE_U
* Handle MONO_TYPE_I and MONO_TYPE_U for Vector types in mini-llvm
Jose Perez Rodriguez [Mon, 19 Apr 2021 22:59:38 +0000 (15:59 -0700)]
Address remaining warnings from DataContractSerialization (#51200)
* Address remaining warnings from DataContractSerialization
* Refactor MemberTypes declaration
* Remove Unused UnconditionalSuppressMessages
* Addressing some PR Feedback
* Suppress MakeGenericMethod calls in AccessorBuilder
* Suppressing error in NullPrimitiveDataContract constructor
* Suppress other MakeGenericMethod linker warnings
* Address remaining feedback and move trimmer string to DataContract
* Addressing some nits
* Fix typo and remove unnecesary usings
James Newton-King [Mon, 19 Apr 2021 21:30:51 +0000 (09:30 +1200)]
HTTP/3: Fix variable length encoding (#51486)
Valentin Grigorev [Mon, 19 Apr 2021 21:28:08 +0000 (00:28 +0300)]
Fix issue #51468 (#51469)
Co-authored-by: Valentin Grigorev <valentin.grigorev@jetbrains.com>
Sergey Andreenko [Mon, 19 Apr 2021 20:34:19 +0000 (13:34 -0700)]
Add quotes around method.Name for crossgen2 replay instruction. (#51453)
Carlos Sanchez [Mon, 19 Apr 2021 20:11:19 +0000 (13:11 -0700)]
Cbor docs - Fix SA1121: Use built-in type alias (#51516)
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Omair Majid [Mon, 19 Apr 2021 20:08:34 +0000 (16:08 -0400)]
Cleanup memory on error in consoleargs.cpp (#50289)
David Pine [Mon, 19 Apr 2021 19:00:01 +0000 (14:00 -0500)]
Add ConfigureHostOptions extension method on IHostBuilder (#51410)
- Add two `ConfigureHostOptions` extension methods
- Two overloads exist, per [Maryam's comment](https://github.com/dotnet/runtime/pull/49502/files#r596466330)
- Add corresponding unit tests to ensure these new methods function correctly
Fixes #48743
Jakob Botsch Nielsen [Mon, 19 Apr 2021 18:59:20 +0000 (20:59 +0200)]
Fix contract violation when reporting tailcall stub loader (#51485)
Fix #51476
Matt Thalman [Mon, 19 Apr 2021 18:53:52 +0000 (13:53 -0500)]
Refactor interop usage in DirectoryServices (#51325)
Omair Majid [Mon, 19 Apr 2021 18:38:01 +0000 (14:38 -0400)]
Fix ./build.sh --portableBuild false
Non-portable builds are used by source-build and also use for
testing/debugging things, like trying out upcoming versions of OpenSSL.
Dong-Heon Jung [Mon, 19 Apr 2021 18:37:25 +0000 (03:37 +0900)]
Fix armel cross build error (#51479)
- Failed by https://github.com/dotnet/runtime/pull/51349
Eirik Tsarpalis [Mon, 19 Apr 2021 17:46:43 +0000 (18:46 +0100)]
Backport of CBOR documentation (#49506)
* initial backport of CBOR documentation
* apply manual fixups to documentation
* Update src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/Reader/CborReader.Map.cs
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
* Update src/libraries/System.Formats.Cbor/src/System/Formats/Cbor/Writer/CborWriter.Map.cs
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Viktor Hofer [Mon, 19 Apr 2021 17:36:03 +0000 (19:36 +0200)]
Bump installer tests timeout to 90m (#51494)
They timed out in https://dev.azure.com/dnceng/public/_build/results?buildId=1095082&view=logs&jobId=
d900f740-c9a5-5bf8-c5f6-
bf1e5b71239a&j=
d900f740-c9a5-5bf8-c5f6-
bf1e5b71239a&t=
8d9f84ed-f820-5356-7f05-
f798e3a00bae.
devsko [Mon, 19 Apr 2021 17:25:32 +0000 (19:25 +0200)]
Fix TimeOnly format O (#51484)
David Pine [Mon, 19 Apr 2021 17:23:36 +0000 (12:23 -0500)]
Update HostTests.cs (#51495)
Filip Navara [Mon, 19 Apr 2021 17:08:53 +0000 (19:08 +0200)]
Use same TimeZoneInfo implementation on iOS/tvOS as on browser (#51457)
Ref: https://github.com/xamarin/xamarin-macios/pull/11175#issuecomment-
821969933, https://unicode-org.atlassian.net/browse/ICU-21591
There seems to be a bug in ICU that leads to deadlock when the time zone data are stripped. Since dotnet/icu uses the same stripping of data on all the platforms the time zone data are also not present on iOS/tvOS or any platform that consumes it. So even if the deadlock itself is resolved at some point it makes sense to use the same implementation for all the platforms that rely on the filtered app-local ICU data.
I also enabled to code path on MacCatalyst to keep it consistent with iOS. I am open to change that. Android may need to be treated the same way too.
Aaron Robinson [Mon, 19 Apr 2021 16:52:27 +0000 (09:52 -0700)]
Create standalone class for CallConv parsing. (#51441)
* Create standalone class for CallConv parsing.
Natalia Kondratyeva [Mon, 19 Apr 2021 16:26:55 +0000 (18:26 +0200)]
[QUIC] Add ShutdownCompleted method and fix receive and shutdown behavior in tests (#50930)
This PR fixed QuicStreamTests.BasicTest and QuicStreamTests.MultipleReadsAndWrites.
Contributes to #49157
GilesDMiddleton [Mon, 19 Apr 2021 14:42:33 +0000 (15:42 +0100)]
.vsconfig update for .NET 4.8 (#51464)
.vsconfig was missing the missing
the .NET 4.8 Targetting pack option.
Fix #51455
Michal Strehovský [Mon, 19 Apr 2021 14:16:30 +0000 (16:16 +0200)]
Fix System.Runtime tests for single file runner (#50996)
Allows us to test the documented single file behaviors.
Not adding a new `PlatformDetection` thing for this since we don't really have a way to detect single file that wouldn't end us up testing a tautology.
Ben Adams [Mon, 19 Apr 2021 13:42:49 +0000 (14:42 +0100)]
Reduce unnecessary casting in SslStreamPal (#51324)
devsko [Mon, 19 Apr 2021 10:34:11 +0000 (12:34 +0200)]
Simplify trimming non significant digits in JsonUtf8Writer (#51367)
* simplify trimming non significant digits
* PR feedback
* fixed formatting
Layomi Akinrinade [Mon, 19 Apr 2021 08:03:50 +0000 (01:03 -0700)]
Add JSON source generator (#51300)
* Add JSON source generator
* Address review feedback
* Address review feedback
* Align project structure with src-gen conventions
* Fix enum (de)serialization
dotnet-maestro[bot] [Sun, 18 Apr 2021 06:22:28 +0000 (08:22 +0200)]
[main] Update dependencies from dotnet/arcade dotnet/icu dotnet/xharness dotnet/runtime-assets (#51307)
* Update dependencies from https://github.com/dotnet/arcade build
20210414.5
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.PackageValidation , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21212.6 -> To Version 6.0.0-beta.21214.5
* Update dependencies from https://github.com/dotnet/xharness build
20210415.2
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21214.1 -> To Version 1.0.0-prerelease.21215.2
* Update dependencies from https://github.com/dotnet/arcade build
20210415.5
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.PackageValidation , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21212.6 -> To Version 6.0.0-beta.21215.5
* Update dependencies from https://github.com/dotnet/runtime-assets build
20210415.1
System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
From Version 6.0.0-beta.21212.1 -> To Version 6.0.0-beta.21215.1
* Update dependencies from https://github.com/dotnet/arcade build
20210416.2
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.PackageValidation , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
From Version 6.0.0-beta.21212.6 -> To Version 6.0.0-beta.21216.2
* Update dependencies from https://github.com/dotnet/icu build
20210416.2
Microsoft.NETCore.Runtime.ICU.Transport
From Version 6.0.0-preview.4.21212.2 -> To Version 6.0.0-preview.5.21216.2
* Update dependencies from https://github.com/dotnet/xharness build
20210416.1
Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
From Version 1.0.0-prerelease.21214.1 -> To Version 1.0.0-prerelease.21216.1
* Update dependencies from https://github.com/dotnet/runtime-assets build
20210416.1
System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Windows.Extensions.TestData
From Version 6.0.0-beta.21212.1 -> To Version 6.0.0-beta.21216.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Geoff Kizer [Sun, 18 Apr 2021 05:42:42 +0000 (22:42 -0700)]
Rework request retry logic to be based on retry count limit (#48758)
* rework request retry logic to be based off a fixed retry limit (MaxConnectionFailureRetries) instead of isNewConnection logic
* be more conservative about request retries -- only allow on receiving EOF or GOAWAY from the server
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Geoff Kizer [Sun, 18 Apr 2021 02:40:53 +0000 (19:40 -0700)]
add Task-based DisconnectAsync and refactor APM methods on top of it (#51213)
* add Task-based DisconnectAsync and refactor APM methods on top of it
* fix BeginDisconnect to throw synchronously and add relevant tests
* remove #region stuff in Socket.cs and add link to github issue
Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Mike McLaughlin [Sat, 17 Apr 2021 21:25:10 +0000 (14:25 -0700)]
MacOS single-file diagnostic support changes (#51425)
* MacOS single-file support changes
Use dysymtab_command to just load the extern/export symbols. Don't read
the whole symbol string table; read the symbol name a char at a time.
https://github.com/dotnet/runtime/issues/38901
* Don't add null to symbol name
* Code review feedback
* Code review feedback
* Code review feedback fix
dotnet-maestro[bot] [Sat, 17 Apr 2021 16:11:48 +0000 (09:11 -0700)]
Update dependencies from https://github.com/mono/linker build
20210417.1 (#51435)
Microsoft.NET.ILLink.Tasks
From Version 6.0.100-preview.2.21215.2 -> To Version 6.0.100-preview.2.21217.1
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Andy Ayers [Sat, 17 Apr 2021 15:45:20 +0000 (08:45 -0700)]
JIT: generalize the branch around empty flow optimization (#51409)
If a BBJ_COND block falls through to an empty block which then jumps to some other
block, see if reversing the branch condition might simplify flow.
Resolves #46592.
Huo Yaoyuan [Sat, 17 Apr 2021 12:08:56 +0000 (20:08 +0800)]
Add Array.GetMaxLength<T> (#43301)
* Add Array.GetMaxLength<T> implementation.
* Implement Array.MaxLength and fix all remaining references
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Apply suggestions from code review
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update src/libraries/System.Collections/tests/Generic/Stack/Stack.Generic.Tests.cs
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Stephen Toub [Sat, 17 Apr 2021 12:07:41 +0000 (08:07 -0400)]
Couple of small perf tweaks to InterpolatedStringBuilder (#51356)
* Change InterpolatedStringBuilder to store bool for custom formatter
* Use new string rather than ToString in InterpolatedStringBuilder
* Address PR feedback
Alexander Köplinger [Sat, 17 Apr 2021 08:33:34 +0000 (10:33 +0200)]
Pass linker flags to Mono build on Android correctly (#51403)
We were setting `_MonoLDFLAGS` in mono.proj but never passed the values down into CMake.
Levi Broderick [Sat, 17 Apr 2021 08:29:50 +0000 (01:29 -0700)]
Optimize Span<T>.Fill implementation (#51365)
Eric Erhardt [Sat, 17 Apr 2021 07:55:45 +0000 (02:55 -0500)]
Update DynamicallyAccessedMembersAttribute documentation. (#51408)
Describe what it means to be applied to class, interface, or struct.
Levi Broderick [Sat, 17 Apr 2021 07:16:43 +0000 (00:16 -0700)]
Replace some uses of Span.Fill with Span.Clear (#51428)
Anirudh Agnihotry [Sat, 17 Apr 2021 06:45:41 +0000 (23:45 -0700)]
update branding to preview5 (#51407)
Emmanuel André [Sat, 17 Apr 2021 05:33:16 +0000 (07:33 +0200)]
Handle completed FlushResult on CopyToAsync (#51147)
* Handle completed FlushResult on CopyToAsync
* Avoid the async state machine if write finishes synchronously
* Add test case for resume after target pipe is completed
Bruce Forstall [Sat, 17 Apr 2021 05:05:39 +0000 (22:05 -0700)]
Fix tree threading in fgOptimizeBranch (#51422)
In case `fgOptimizeBranch` gets far enough to calculate the cost of
statements it is considering duplicating, then it calls `gtPrepareCost` =>
`gtSetEvalOrder` to compute a statement's costs. Unfortunately, that
can reverse operands (and in this case, did). `fgOptimizeBranch` is
called only by `fgReorderBlocks` which is called by `fgInsertGCPolls`,
late enough that the tree is already threaded with gtNext/gtPrev links.
(The test case inserted multiple GC polls for SuppressGCTransitionAttribute
code.) When the operands of the tree were swapped, nobody fixed up these links.
The only other caller of `fgReorderBlocks` is `optOptimizeLayout`, which
comes before the trees are threaded.
The solution is to simply call `fgSetStmtSeq` if needed.
No SPMI x86, x64 asm diffs.
Fixes #51293, a failure in JIT/Performance/CodeQuality/Burgers/Burgers/Burgers.sh
on Linux arm32 under JitStress=1. There is IBC data, and setting
`COMPlus_JitDisablePgo=1` also fixes the failure.
Jakob Botsch Nielsen [Fri, 16 Apr 2021 23:33:13 +0000 (01:33 +0200)]
Fix GC hole with collectible assemblies and tailcalls (#51315)
We must take special care to keep the tailcall dispatcher targets alive
while tailcalls are in-flight. In particular, given the following
callstack:
[B]M2()
[SPC]DispatchTailCalls
[A]M()
it could happen that [B]M2() queued a tail call to a function [B]M3().
Since there is a live dispatcher on the call stack, this would result in
[B]M2() storing a function pointer pointing to [B]M3() and returning to
this dispatcher to let it take care of the tailcall.
If B was loaded in a collectible ALC, it would then be possible for
there to be nothing keeping this ALC alive, and for the assembly to be
unloaded before the dispatcher invoked the function pointer.
I was unable to come up with a test case where this happened without
making changes to the dispatcher; the window otherwise seems to be too
small. To reproduce the problem I thus had to add a Thread.Sleep(50)
into the dispatcher, which quickly resulted in an
AccessViolationException in the scenario above. With the changes in this
commit I was then no logner able to reproduce the problem.
Fix #41314
Mateo Torres-Ruiz [Fri, 16 Apr 2021 23:08:06 +0000 (16:08 -0700)]
Clean Installer test (#51373)
* Clean test
* Remove dir deletion
* Create parent dirs
Carlos Sanchez [Fri, 16 Apr 2021 23:03:28 +0000 (16:03 -0700)]
FileStream rewrite: Caching the ValueTaskSource in AsyncWindowsFileStreamStrategy (#51363)
* Caching the ValueTaskSource in AsyncWindowsFileStreamStrategy
* Add debug assert to WriteByteSlow for _writePos == _bufferSize
* Fix assertion failure
* Apply suggestions from code review
* Apply suggestions from code review
* some pedantic polishing
* fix the allocation bug: actually return the instance to the "pool"
* don't Dipose the handle if it has default value
* reset _result and _source in the Configure method
* delay the moment when the ValueTaskSource becomes ready to be reused to the moment after _source.SetException|SetResult is called
* apply Stephen suggestions
* implement Stephen idea
* use Reset in explicit way
* remove outdated comment
* address code review feedback
Co-authored-by: carlossanlop <carlossanlop@users.noreply.github.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Alexander Köplinger [Fri, 16 Apr 2021 21:26:26 +0000 (23:26 +0200)]
Skip forwarding entrypoint library name to Android application Main() (#51397)
Some of the Android runtime tests were recently broken because they got an "entryPointLibName=<test assembly name>" argument in their Main args.
This argument is normally used to run a specific test: https://github.com/dotnet/runtime/blob/
dd63ea2e6a9cc6f2661b817d15e558fc6605fa17/src/tests/JIT/HardwareIntrinsics/Arm/Shared/Program.cs#L24
After https://github.com/dotnet/runtime/commit/
1a98ba0ec20550c9e1ece5fff555d683dec3252b we were passing the `entryPointLibName` down to the managed app args even though it's only supposed to be used to tell the runtime which assembly to run.