Viktor Hofer [Wed, 9 Jun 2021 15:46:44 +0000 (17:46 +0200)]
Fix failing SetCookies_Success test (#53932)
* Fix failing SetCookies_Success test
Pavel Savara [Wed, 9 Jun 2021 15:32:58 +0000 (17:32 +0200)]
[wasm][testing] hosting echo server in xharness process (#52923)
- move tests to inner loop
- include echo middleware in xharness server
- improve doc
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53592 for lack of TRACE
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53591 for content on GET/HEAD
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53874 for HttpRequestMessage.Headers.Host
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53872 for NPE on System.Net.Http.BrowserHttpHandler
- more granular ActiveIssue https://github.com/dotnet/runtime/issues/53876
- include middleware in Helix correlation payload
Adam Sitnik [Wed, 9 Jun 2021 13:49:14 +0000 (15:49 +0200)]
move the validaiton logic to FileStreamOptions (#53869)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Lakshan Fernando [Wed, 9 Jun 2021 11:01:26 +0000 (04:01 -0700)]
Fixes Trim HelloWorld (#53912)
so [Wed, 9 Jun 2021 11:01:05 +0000 (19:01 +0800)]
Release configuration resource. (#53857)
Co-authored-by: shuxinqin <shuxinqin@outlook.com>
Peter Sollich [Wed, 9 Jun 2021 09:03:40 +0000 (11:03 +0200)]
Fix process background segment end (#53879)
Fix issue found in GetAllocatedBytesForCurrentThread with regions enabled.
The issue was traced to a region that had become empty in a background GC, but was still considered valid in the next ephemeral GC, so because there were cards set, we marked objects referenced from dead objects in the segment.
When a segment becomes completely empty in background GC, but is the start segment for the generation, we don't delete it, so we still need to reset heap_segment_allocated and decommit pages.
Egor Bogatov [Wed, 9 Jun 2021 08:36:24 +0000 (11:36 +0300)]
Inliner: new observations (don't impact inlining for now) (#53670)
Co-authored-by: Andy Ayers <andya@microsoft.com>
Alexander Köplinger [Wed, 9 Jun 2021 05:59:06 +0000 (07:59 +0200)]
Disable RegisterFromSTAThreadThatGoesAway_MessageStillDelivered test on Mono on Windows (#53893)
It started failing after https://github.com/dotnet/runtime/pull/53700 because the missing Dispose() caused the failure to not be reported.
Bruce Forstall [Wed, 9 Jun 2021 05:48:46 +0000 (22:48 -0700)]
Improve clrjit.natvis (#53910)
1. Add LclFld output: same as LclVar plus offset
2. Remove extra trailing GenTree brace
Jeremy Barton [Wed, 9 Jun 2021 05:30:32 +0000 (22:30 -0700)]
Add non-cryptographic hash algorithms library
* Adds a new package, System.IO.Hashing (netstandard2.0, net461 to reduce netfx restore graph sizes, and net6.0)
* Provides implementations for four hash algorithms
* CRC-32 (the variation used by IEEE 802.3 (Ethernet))
* CRC-64 (the variation used by ECMA-182)
* XxHash32, with optional seed
* XxHash64, with optional seed
* The tests are structured so that algorithm tests just need to provide their test vectors and do some boilerplate overrides to get variation testing across the instance methods and static methods.
Andy Ayers [Wed, 9 Jun 2021 00:59:13 +0000 (17:59 -0700)]
JIT: fix OSR reporting for special stack slots (#53897)
Revise the reporting of the special stack slots for OSR to be more uniform.
* Always record the original method FP-relative offset.
* Always apply the same adjustment for original method slosts i the OSR frame
* Handle caller-SP relative adjustment in `lvaToCallerSPRelativeOffset`
In particular, this fixes #43534 where we were reporting the wrong caller SP
for the profiler exit hook.
Andrew Au [Wed, 9 Jun 2021 00:50:18 +0000 (17:50 -0700)]
Make sure EnsureInitialize() loads the GcInfo if it is there (#53896)
Kunal Pathak [Wed, 9 Jun 2021 00:42:24 +0000 (17:42 -0700)]
Display LSRA stats in method summary (#53901)
* Lsrstats
* jit format
* use blocks iterator
Tanner Gooding [Wed, 9 Jun 2021 00:37:36 +0000 (17:37 -0700)]
Do byref liveness updates for same register GPR moves (#53684)
* Do byref liveness updates for same register GPR moves on x86/x64
* Change where emitLastEmittedIns is tracked
* Ensure emitLastEmittedIns isn't tracked across instruction groups
MichalPetryka [Tue, 8 Jun 2021 23:46:57 +0000 (01:46 +0200)]
Add unsigned variants for BitConverter float bit APIs (#53784)
* Add unsigned variants for BitConverter bit APIs
Adds DoubleToUInt64Bits, UInt64BitsToDouble, SingleToUInt32Bits,
UInt32BitsToSingle, HalfToUInt16Bits and UInt16BitsToHalf.
Implementations were based on existing signed integer variants.
Convert usages of existing APIs to unsigned variants when appropriate.
Fix #36469
* Revert comment change
Reverted a comment change made in the existing code by mistake.
* Use existing code for implementations
Use the existing signed methods with a cast, less code with the same codegen.
* Cast correction
Corrected the type used in a cast.
Eric Erhardt [Tue, 8 Jun 2021 22:25:11 +0000 (17:25 -0500)]
Fix InvariantGlobalization=false in a trimmed app (#53453)
* Fix InvariantGlobalization=false in a trimmed app.
Move the LoadICU logic into a static ctor, so it runs early in the process, but not as part of querying the GlobalizationMode.Invariant property. This allows for LoadICU to still be invoked, even when the app is trimmed and GlobalizationMode.Invariant is hard-coded by the linker.
While I was changing this code, I also removed the workaround in Browser builds for swallowing errors being returned from LoadICU.
Fix #49073
Fix #49391
* Add trimming tests for InvariantGlobalization
* Update the LoadICU message for mobile workloads.
* Respond to PR feedback.
- Split the substitutions of GlobalizationMode.Invariant between true and false
- Add a trimming test that ensures Invariant=true trims everything it is supposed to
* Add checks for all mobile platforms
Viktor Hofer [Tue, 8 Jun 2021 21:36:01 +0000 (23:36 +0200)]
Include NetCoreAppCurrent configs in packages (#53439)
* Include NetCoreAppCurrent configs in packages
The NetCoreAppCurrent configurations were omitted from packages to avoid
ever growing packages. Now that we adhere to the support policy for
packages we don't need to exclude them anymore as the policy defines a
baseline for .NETCoreApp configurations.
This will remove an artificial difference when source building the
repository and also make it so that partner repositories which don't
depend on a transport package like windowsdesktop (winforms) receive
the very latest assets that are included in the shared framework as
well.
* Fix package validation for non exposed inbox libs
Andrew Au [Tue, 8 Jun 2021 21:32:45 +0000 (14:32 -0700)]
Remove an erroneous check (#53889)
Andrew Au [Tue, 8 Jun 2021 21:32:14 +0000 (14:32 -0700)]
Improve GC stress log instrumentation (#53547)
Ulrich Weigand [Tue, 8 Jun 2021 21:24:52 +0000 (23:24 +0200)]
Build support for s390x: clr.iltools and clr.paltests (#53289)
* Add dummy support for s390x in vm, jit, debug, and unwinder
* This suffices to make clr.iltools and clr.paltests buildable
Ulrich Weigand [Tue, 8 Jun 2021 21:23:31 +0000 (23:23 +0200)]
Build support for s390x: libunwind (#53286)
* Merge https://github.com/libunwind/libunwind/pull/245
* Add s390x support to local CMake files
Ulrich Weigand [Tue, 8 Jun 2021 21:21:46 +0000 (23:21 +0200)]
Build support for s390x: PAL layer (#53287)
* Add PAL implementation for Linux on s390x
* Define BIGENDIAN on s390x when compiling coreclr
* Provide a default HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE
value in eng/native/tryrun.cmake
Miha Zupan [Tue, 8 Jun 2021 20:47:09 +0000 (22:47 +0200)]
Modernize DiagnosticsHandler tests (#53870)
* Modernize DiagnosticsHandler tests
* Address PR feedback
SemaphoreSlim => TCS, Guid => nosuchhost.invalid, Http20 => Http2
Steve MacLean [Tue, 8 Jun 2021 20:05:25 +0000 (16:05 -0400)]
Apple Silicon reenable 49365 (#52197)
Kunal Pathak [Tue, 8 Jun 2021 19:03:34 +0000 (12:03 -0700)]
Update instruction table to capture the correct state of EFlags (#53806)
* Update instruction table with accurate EFlags information
* Revert "Add issues.targets entry for the GitHub_13822 test to make CI green (#53789)"
This reverts commit
bd9ba598a0a3417510d318472d3c0f6641cdba93.
* minor fixup
* Fix some more instructions
* review comments
Steve MacLean [Tue, 8 Jun 2021 18:49:25 +0000 (14:49 -0400)]
Fix Apple Silicon shuffle thunks (#53250)
* Fix Apple Silicon shuffle thunks
Fixes 47294
* Set and use m_hfaFieldSize for stack arguments
m_hfaFieldSize is needed to calculate correct shuffle size.
Jo Shields [Tue, 8 Jun 2021 18:29:16 +0000 (14:29 -0400)]
Strip libmonosgen linked library (#53240)
It seems in the .symbols.nupkg package, instead of a stripped .dylib/so and companion .dwarf/.dbg, we've just been shipping unstripped libs. This commit largely duplicates the functions from eng/native/functions.cmake into an MSbuild proj, as our entire logic is already in MSbuild not CMake.
Andrii Kurdiumov [Tue, 8 Jun 2021 18:12:07 +0000 (00:12 +0600)]
Fix compilation errors if host does not support AVX2 (#50316)
* Fix compilation errors if host does not support AVX2
* Add comments to empty preprocessor branches
* Explicitly ask for architecture support
* Apply -march-native only on GCC
* Make sure if clang on x64 would be used
it actually pass -march=native, otherwise AVX2 would not be enabled.
* Ask test use AVX2 when run on Windows.
Aaron Robinson [Tue, 8 Jun 2021 17:44:02 +0000 (10:44 -0700)]
Check if the marshalling of a field is possible across all platforms. (#53194)
* Check if the marshalling of a field is possible across all platforms.
* Add test for the generic field generation for IClassX.
Zoltan Varga [Tue, 8 Jun 2021 17:22:12 +0000 (13:22 -0400)]
[mono][llvm] Access mono_polling_required directly instead of loading its value from a GOT slot in static mode. (#53776)
This will potentially avoid one load in the GC safe point code.
Bruce Forstall [Tue, 8 Jun 2021 17:05:29 +0000 (10:05 -0700)]
Distinguish Debug and Checked builds in version resource (#53847)
In the Win32 version resource, this changes the "Comment" field
from:
```
Flavor=Checked
```
to:
```
Flavor=Debug
```
It also properly sets `BUILDENV_DEBUG=1` for debug builds (only used in
exactly one place: gc.cpp).
David Fowler [Tue, 8 Jun 2021 15:47:49 +0000 (08:47 -0700)]
Fire diagnostic source events from IHostBuilder.Build (#53757)
* Fire diagnostic source events from IHostBuilder.Build
- We want to enable getting access to the IHostBuilder and IHost during the call to IHostBuilder.Build so that we can access the application's IServiceProvider from various tools. Usually, this is enabled by exposing a different entry point from the application but this technique allows us to let the application execute normally and hook important events via a diagnostic source.
- Add support for the new pattern in HostFactoryResolver
- Added support for resolving an IServiceProvider using the new diagnostics source pattern (which doesn't require a different entrypoint)
- Detect the version of Microsoft.Extensions.Hosting before waiting for events to fire
- We want to fail fast if we know this version of hosting will never fire events of if the hosting assembly fails to load. Added a version check.
- Allow the caller to specify a wait timeout.
- Added a flag to allow running the application to completion
Steve Pfister [Tue, 8 Jun 2021 14:48:52 +0000 (10:48 -0400)]
Multi-target RuntimeConfigParser Task (#53827)
Fixes https://github.com/dotnet/runtime/issues/53811
The props were not taking into account the right paths.
Tom Deseyn [Tue, 8 Jun 2021 14:47:16 +0000 (16:47 +0200)]
Sockets.tests: TcpReceiveSendGetsCanceledByDispose: remove Timeout. (#52599)
* Sockets.tests: TcpReceiveSendGetsCanceledByDispose: remove Timeout.
This timeout is not needed and masks a more useful exception thrown
by the test.
* Add WaitAsync to timeout on all async operations
* Add missing timeout
David Mason [Tue, 8 Jun 2021 09:55:52 +0000 (02:55 -0700)]
add support for unwinding function fragments in the dac (#53765)
Mitchell Hwang [Tue, 8 Jun 2021 07:23:54 +0000 (03:23 -0400)]
[libraries] Fix metadata name following arcade change to stop supporting multiple targets in helix sdk (#53828)
Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
dotnet-maestro[bot] [Tue, 8 Jun 2021 02:53:35 +0000 (02:53 +0000)]
[main] Update dependencies from dotnet/runtime dotnet/hotreload-utils dotnet/xharness (#53787)
[main] Update dependencies from dotnet/runtime dotnet/hotreload-utils dotnet/xharness
Bruce Forstall [Mon, 7 Jun 2021 23:16:51 +0000 (16:16 -0700)]
Add more iterators to JIT (#52515)
Add more iterators compatible with range-based `for` syntax for various data structures. These iterators all assume (and some check) that the underlying data structures determining the iteration are not changed during the iteration. For example, don't use these to iterate over the predecessor edges if you are changing the order or contents of the predecessor edge list.
- BasicBlock: iterate over all blocks in the function, a subset starting not at the first block, or a specified range of blocks. Removed uses of the `foreach_block` macro. E.g.:
```
for (BasicBlock* const block : Blocks()) // all blocks in function
for (BasicBlock* const block : BasicBlockSimpleList(fgFirstBB->bbNext)) // all blocks starting at fgFirstBB->bbNext
for (BasicBlock* const testBlock : BasicBlockRangeList(firstNonLoopBlock, lastNonLoopBlock)) // all blocks in range (inclusive)
```
- block predecessors: iterate over all predecessor edges, or all predecessor blocks, e.g.:
```
for (flowList* const edge : block->PredEdges())
for (BasicBlock* const predBlock : block->PredBlocks())
```
- block successors: iterate over all block successors using the `NumSucc()/GetSucc()`, or `NumSucc(Compiler*)/GetSucc(Compiler*)` pairs, e.g.:
```
for (BasicBlock* const succ : Succs())
for (BasicBlock* const succ : Succs(compiler))
```
Note that there already exists the "AllSuccessorsIter" which iterates over block successors including possible EH successors, e.g.:
```
for (BasicBlock* succ : block->GetAllSuccs(m_pCompiler))
```
- switch targets, (namely, the successors of `BBJ_SWITCH` blocks), e.g.:
```
for (BasicBlock* const bTarget : block->SwitchTargets())
```
- loops blocks: iterate over all the blocks in a loop, e.g.:
```
for (BasicBlock* const blk : optLoopTable[loopInd].LoopBlocks())
```
- Statements: added an iterator shortcut for the non-phi statements, e.g.:
```
for (Statement* const stmt : block->NonPhiStatements())
```
Note that there already exists an iterator over all statements, e.g.:
```
for (Statement* const stmt : block->Statements())
```
- EH clauses, e.g.:
```
for (EHblkDsc* const HBtab : EHClauses(this))
```
- GenTree in linear order (but not LIR, which already has an iterator), namely, using the `gtNext` links, e.g.:
```
for (GenTree* const call : stmt->TreeList())
```
This is a no-diff change.
Zoltan Varga [Mon, 7 Jun 2021 23:02:04 +0000 (19:02 -0400)]
[mono][wasm] Avoid AOTing methods with clauses, use the interpreter instead. (#52883)
Jose Perez Rodriguez [Mon, 7 Jun 2021 22:25:38 +0000 (15:25 -0700)]
Resolving ILLink warnings on Microsoft.Extensions.Options.ConfigurationManager (#53552)
* Resolving ILLink warnings on Microsoft.Extensions.Options.ConfigurationManager
* Fix message
* Addressing messages feedback
* Update src/libraries/Microsoft.Extensions.Logging.Configuration/ref/Microsoft.Extensions.Logging.Configuration.cs
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
* Update remaining messages with suggestion.
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Bruce Forstall [Mon, 7 Jun 2021 22:00:52 +0000 (15:00 -0700)]
Fix superpmi.py/jitrollingbuild.py to handle large REST results (#53750)
The Azure Storage REST API returns a maximum of 5000 results in
a single query. We have more results in the JIT rolling build set,
so we weren't finding queried git_hash values.
Generalize the query to loop using the "marker" continuation functionality.
We currently have about 800 superpmi collections results, but update
the superpmi.py script similarly for future proofing.
I also changed the query used by jitrollingbuild.py to specify a prefix,
to avoid requiring so many results. Probably should do the same thing for
SuperPMI collections. The downside is the REST api doesn't have a facility
for the prefix to be case-insensitive. I think it's ok to be case-sensitive,
but we'd need to verify that.
Miha Zupan [Mon, 7 Jun 2021 21:54:00 +0000 (23:54 +0200)]
Throw ArgumentNull instead of NullReference for null requests (#53742)
* Throw ArgumentNull instead of NullReference for null requests
* Don't use Send on browser
Buyaa Namnan [Mon, 7 Jun 2021 21:48:17 +0000 (14:48 -0700)]
Add PlatformNeutralAssembly property for targeted builds of cross platform assembly (#53626)
dotnet-maestro[bot] [Mon, 7 Jun 2021 21:12:38 +0000 (21:12 +0000)]
[main] Update dependencies from dnceng/internal/dotnet-optimization (#53672)
[main] Update dependencies from dnceng/internal/dotnet-optimization
Jo Shields [Mon, 7 Jun 2021 21:09:38 +0000 (17:09 -0400)]
Create Sdk.props in AOT compilers with a template (#53685)
* Create Sdk.props in AOT compilers with a template
Fixes https://github.com/dotnet/runtime/issues/53653
Example:
```
sudo cat Sdk/Sdk.props
<Project>
<ItemGroup>
<MonoAotCrossCompilerPath Include="$(MSBuildThisFileDirectory)..\tools\mono-aot-cross" RuntimeIdentifier="iossimulator-arm64" />
</ItemGroup>
</Project>
```
Andrew Au [Mon, 7 Jun 2021 21:03:16 +0000 (14:03 -0700)]
Implement descr_generations_to_profiler for regions (#53706)
Levi Broderick [Mon, 7 Jun 2021 20:29:51 +0000 (13:29 -0700)]
Add string.ReplaceLineEndings and MemoryExtensions.EnumerateLines (#53115)
Viktor Hofer [Mon, 7 Jun 2021 20:26:48 +0000 (22:26 +0200)]
Remove HarvestVersionValidation from pkg testing (#53818)
* Remove HarvestVersionValidation from pkg testing
As packages assets aren't redistributed anymore, harvesting doesn't need to rely on exact versions and thus the task isn't necessary anymore.
Eric StJohn [Mon, 7 Jun 2021 20:11:29 +0000 (13:11 -0700)]
Change package testing to use RuntimeTargets rather than RID-specific restore (#53575)
* Change package testing to use RuntimeTargets rather than RID-specific restore
* Upload binlogs for package testing
* Address feedback
Simplify outer build of package tests to just use InnerTargets extension point.
Use Helix's work-item isolated packages folder
Give a better name to binlogs
* Cleanup old suppressions
* Use ReferenceCopyLocalPaths for runtime testing
This item will be conflict-resolved whereas RuntimeCopyLocalItems was not.
Also fix the case where a package intentionally provides no assets (yet installs)
* Don't include runtime dependencies when reference was excluded by conflict resolution
* Fix import conventions in outer build
* Workaround conflict resolution on .NETStandard runtime
.NETStandard doesn't conflict resolve runtime assets.
Workaround by feeding .NETStandard references as runtime for purposes of conflict resolution.
Zoltan Varga [Mon, 7 Jun 2021 18:53:01 +0000 (14:53 -0400)]
[mono] Avoid some unnecessary null checks in wrappers using the .no opcode prefix. (#53817)
Viktor Hofer [Mon, 7 Jun 2021 18:31:50 +0000 (20:31 +0200)]
Update the Compatibility package for Cng (#53816)
The `System.Security.Cryptography.Cng` package doesn't built live anymore.
Fan Yang [Mon, 7 Jun 2021 18:14:16 +0000 (14:14 -0400)]
Add runtime test logs to HELIX_WORKITEM_UPLOAD_ROOT (#53798)
Stephen Toub [Mon, 7 Jun 2021 16:52:49 +0000 (12:52 -0400)]
Add ChannelReader<T>.CanPeek/TryPeek (#53436)
Kevin Jones [Mon, 7 Jun 2021 16:51:44 +0000 (12:51 -0400)]
Use HMAC one-shot where appropriate
Marie Píchová [Mon, 7 Jun 2021 16:40:11 +0000 (18:40 +0200)]
Alt-Svc tests enabled and fixed for H/3 (#53786)
* Alt-Svc tests enabled and fixed for H/3
* Addressed feedback.
alesomas [Mon, 7 Jun 2021 16:17:36 +0000 (18:17 +0200)]
Added some logic to include rcwrefcache references required by feature_comwrappers (#53503)
* Set rcwrefcache related references only for feature_comwrappers
Co-authored-by: Ubuntu <creditsuisse@BuildVM.hqykqmymov3ebcqudt35mscinc.ax.internal.cloudapp.net>
Sergey Andreenko [Mon, 7 Jun 2021 15:39:13 +0000 (08:39 -0700)]
Revert "Reenable a disabled test. (#53779)" (#53791)
This reverts commit
2e7e66d3be35861e39c2043f8be921622bc05ec8.
Marie Píchová [Mon, 7 Jun 2021 12:36:04 +0000 (14:36 +0200)]
Fixed copy-paste error. (#53801)
Tomas Weinfurt [Mon, 7 Jun 2021 09:54:30 +0000 (11:54 +0200)]
allow late certificate with disabled renegotiation (#53719)
Zoltan Varga [Mon, 7 Jun 2021 08:23:05 +0000 (04:23 -0400)]
[mono] Disable null checks in ghsaredvt wrappers, they are not needed, (#53775)
and they take up a lot of space since these wrappers are very common.
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)