platform/upstream/dotnet/runtime.git
2 years agoHandle ambient activities in EventSource test (#56442)
John Salem [Fri, 30 Jul 2021 16:20:29 +0000 (09:20 -0700)]
Handle ambient activities in EventSource test (#56442)

2 years agoRemove unused AssemblyMetadataAttribute and TargetFrameworkAttribute defines (#56591)
Eric Erhardt [Fri, 30 Jul 2021 15:20:49 +0000 (09:20 -0600)]
Remove unused AssemblyMetadataAttribute and TargetFrameworkAttribute defines (#56591)

2 years ago[icall] If Stream:BeginWrite/EndWrite are linked out, they're not overridden (#56559)
Aleksey Kliger (λgeek) [Fri, 30 Jul 2021 15:19:40 +0000 (11:19 -0400)]
[icall] If Stream:BeginWrite/EndWrite are linked out, they're not overridden (#56559)

Add the same logic that we already have for BeginRead/EndRead - if we can't
find a vtable slot that has the method in the base class, it must have been
linked out, so a subclass can't possibly override it.

Fixes https://github.com/dotnet/runtime/issues/56315

2 years agopull client certificate fixes from MsQuic (#56588)
Tomas Weinfurt [Fri, 30 Jul 2021 14:59:05 +0000 (07:59 -0700)]
pull client certificate fixes from MsQuic (#56588)

2 years agodisable test parallelization for http3 (#56413)
Tomas Weinfurt [Fri, 30 Jul 2021 14:12:33 +0000 (07:12 -0700)]
disable test parallelization for http3 (#56413)

2 years agoFix evaluate-changed-paths.sh script (#56617)
Alexander Köplinger [Fri, 30 Jul 2021 14:12:26 +0000 (16:12 +0200)]
Fix evaluate-changed-paths.sh script (#56617)

https://github.com/dotnet/runtime/pull/56479 uncovered a bug in the script where it didn't append the full `tmp` array to `include_paths` and `exclude_paths` but just the first element.
Shellcheck actually complained about this with "SC2128: Expanding an array without an index only gives the first element."

The old bash in macOS has a quirk where this doesn't happen so we didn't see it before https://github.com/dotnet/runtime/pull/56479.

2 years ago[libraries][Android] Move System.Text.RegularExpressions edge case tests to separate...
Mitchell Hwang [Fri, 30 Jul 2021 14:00:31 +0000 (10:00 -0400)]
[libraries][Android] Move System.Text.RegularExpressions edge case tests to separate issue (#56410)

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
2 years agoFix bad inlining in DateTime (#56466)
Pent Ploompuu [Fri, 30 Jul 2021 13:55:56 +0000 (16:55 +0300)]
Fix bad inlining in DateTime (#56466)

2 years agoRevert recent update of a docker image in eng/common (#56540)
Jan Vorlicek [Fri, 30 Jul 2021 13:54:55 +0000 (15:54 +0200)]
Revert recent update of a docker image in eng/common (#56540)

This change (if it was really needed) should be made in the arcade repo as this
file is regularly updated from there. However, I can see that the change I am
reverting was not really needed as the docker image is meant for managed stuff
only and so it doesn't need to be updated to the new version that added the
LLD linker.

2 years agoRemove redundant assembly loader tests (#56505)
Elinor Fung [Fri, 30 Jul 2021 13:52:29 +0000 (06:52 -0700)]
Remove redundant assembly loader tests (#56505)

2 years agoFix BufferedStream outerloop test (#56618)
Miha Zupan [Fri, 30 Jul 2021 13:26:44 +0000 (06:26 -0700)]
Fix BufferedStream outerloop test (#56618)

2 years agoFix QUIC stream handle leak (#56550)
Natalia Kondratyeva [Fri, 30 Jul 2021 12:58:13 +0000 (14:58 +0200)]
Fix QUIC stream handle leak (#56550)

2 years agoAccount for AddressFamily pairs in NameResolution telemetry (#56614)
Miha Zupan [Fri, 30 Jul 2021 12:52:48 +0000 (05:52 -0700)]
Account for AddressFamily pairs in NameResolution telemetry (#56614)

2 years agoCheck _abortException before checking _shutdown flag (#56552)
Alexander Nikolaev [Fri, 30 Jul 2021 12:21:00 +0000 (14:21 +0200)]
Check _abortException before checking _shutdown flag (#56552)

In case of an error aborting the connection, there is a race between a thread creating new `Http2Stream` to send a request and the thread looping in `ProcessIncomingFrames` that sets _shutdown flag and `_abortException`. If the request thread first sees `_shutdown == true`, then it won't see the `_abortException` even if it's set, so the request will be retried when it shouldn't.

This PR adds `_abortException` check just before the `_shutdown == true` check to make sure an abort exception is observed.

Fixes #1581
Fixes #56138
Fixes #56026

2 years agoEnable BeginAcceptV4BoundToAnyV4_Success with better timeout handling (#56406)
Anton Firszov [Fri, 30 Jul 2021 12:15:09 +0000 (14:15 +0200)]
Enable BeginAcceptV4BoundToAnyV4_Success with better timeout handling (#56406)

2 years agoMake LocalEndPointTest and some Connect tests non-parallel (#56399)
Anton Firszov [Fri, 30 Jul 2021 12:11:24 +0000 (14:11 +0200)]
Make LocalEndPointTest and some Connect tests non-parallel (#56399)

2 years agoDisable Alpn_H3_Success (#56610)
Karel Zikmund [Fri, 30 Jul 2021 12:08:57 +0000 (14:08 +0200)]
Disable Alpn_H3_Success (#56610)

Test: System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http3_MsQuic.Alpn_H3_Success

Disabled test tracked by #56609

2 years agoEnable and tweak ThreadTests on Android (#56578)
Steve Pfister [Fri, 30 Jul 2021 12:01:57 +0000 (08:01 -0400)]
Enable and tweak ThreadTests on Android (#56578)

Many ThreadTests should be working on Android, so they were enabled.  ApartmentState_AttributePresent was changed to skip permanently on Android.

Fixes https://github.com/dotnet/runtime/issues/50577

2 years agoEnable skipped CodeDom tests on Android (#56581)
Steve Pfister [Fri, 30 Jul 2021 11:59:52 +0000 (07:59 -0400)]
Enable skipped CodeDom tests on Android (#56581)

Some C# and VB code generation tests were being skipped due to UseSystemResourceKeys being enabled. It no longer is.

Fixes #50879

2 years ago[loader] Call managed resolving events for the default ALC (#56398)
Aleksey Kliger (λgeek) [Fri, 30 Jul 2021 11:36:45 +0000 (07:36 -0400)]
[loader] Call managed resolving events for the default ALC (#56398)

* [loader] Call managed resolving events for the default ALC

Refine the work in
https://github.com/dotnet/runtime/commit/f70b5b7aef21a70478e9b86dba7d996a57a9add9

The issue is that even if we know that the ALC gchandle points to null in
native, we can't automatically skip the call to the managed resolving
event (for native library, for example) because the native event is indirectly
responsible for creating the default ALC managed object.

Instead, check in native if the gchandle is equal to the default ALC's
gchandle (which is initially allocated with a null target) and if so pass
IntPtr.Zero to the managed code, which will call
`AssemblyLoadContext.GEtAssemblyLoadContext (IntPtr gch)` which in turn will
construct the managed object for the default ALC.

Fixes https://github.com/dotnet/runtime/issues/55921

* remove one more early exit

* make a helper function

2 years agoFix divide-by-zero in RuntimeEventSourceHelper.GetCpuUsage on Windows (#56547)
Stephen Toub [Fri, 30 Jul 2021 10:58:47 +0000 (06:58 -0400)]
Fix divide-by-zero in RuntimeEventSourceHelper.GetCpuUsage on Windows (#56547)

2 years agoRemove IIDToInterfaceTemplateCache (#56596)
Elinor Fung [Fri, 30 Jul 2021 10:38:23 +0000 (03:38 -0700)]
Remove IIDToInterfaceTemplateCache (#56596)

2 years agos390x: Additional float32 fixes (#56360)
Neale Ferguson [Fri, 30 Jul 2021 10:32:36 +0000 (20:32 +1000)]
s390x: Additional float32 fixes (#56360)

- Add rmove specification in cpu-s390x.md
    - OP_RMOVE implementation in mini-s390x.c
    - Correct float instruction lengths
    - Disable debug code
    - Correct RCONV_TO_I4/RCONV_TO_U4

2 years agoEnable disabled QUIC tests (#56590)
Tomas Weinfurt [Fri, 30 Jul 2021 09:56:18 +0000 (02:56 -0700)]
Enable disabled QUIC tests (#56590)

With update updated MsQuic on Linux in place (PR #56429) we should pass few more disabled tests.
I did ~200 local runs and I did not see any problems

Fixes #55242
Fixes #55746

2 years agoDisable test SendMoreThanStreamLimitRequests_Succeeds for all QUIC (#56566)
Karel Zikmund [Fri, 30 Jul 2021 09:23:15 +0000 (11:23 +0200)]
Disable test SendMoreThanStreamLimitRequests_Succeeds for all QUIC (#56566)

Disable the test also for MsQuic, not just Mock.

Test types:
- System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http3_MsQuic
- System.Net.Http.Functional.Tests.SocketsHttpHandlerTest_Http3_Mock

Disabled test tracked by #55957

2 years agoFix System.Configuration.ConfigurationManager.Tests on Android and reenable on non...
Alexander Köplinger [Fri, 30 Jul 2021 09:06:25 +0000 (11:06 +0200)]
Fix System.Configuration.ConfigurationManager.Tests on Android and reenable on non-Windows platforms (#56558)

The test assembly got changed to `$(NetCoreAppCurrent)-windows` in https://github.com/dotnet/runtime/commit/809a06f45161ae686a06b9e9ccc2f45097b91657#diff-4d639cb37fe53cdeae4262c1f5be7936cdd81e3b4f256f9c59ad02ec69b300d9R7 but when talking to Viktor we're not sure why, probably a mistake.

Target `$(NetCoreAppCurrent)` instead so it runs on all platforms and fix a test issue that occurs on Android due to BaseDirectory not having a trailing slash. Fixes https://github.com/dotnet/runtime/issues/37071
Incidentally, that's likely also the reason why the .csproj set `TestDisableAppDomain` so we can remove that as well.

Also replace `TestDisableParallelization` with the assembly attribute equivalent which is what we use everywhere else.

2 years agoMove the logic to grow the mark list outside of #ifdef GC_CONFIG_DRIVEN. (#56451)
Peter Sollich [Fri, 30 Jul 2021 07:07:03 +0000 (09:07 +0200)]
Move the logic to grow the mark list outside of #ifdef GC_CONFIG_DRIVEN. (#56451)

I put it there by mistake, and didn't notice because for coreclr.dll, GC_CONFIG_DRIVEN is enabled. For clrgc.dll it is not, and when I did perf experiments with regions, I noticed that sometimes we would take very long in plan_phase.

2 years agoOptimize region count (#56471)
Peter Sollich [Fri, 30 Jul 2021 07:05:34 +0000 (09:05 +0200)]
Optimize region count (#56471)

We have a couple of arrays with an entry per region - instead of iterating over all the regions that we have reserved address space for, iterate just over the regions actually in use.

Arrays affected by this are mark_list_piece_start, mark_list_piece_end, survived_per_region and old_card_survived per_region.

To avoid having inconsistent counts, we get the count of regions actually in use at the start of mark_phase. Any regions added during GC should not matter, because they shouldn't contain any marked objects.

While the region allocator has provisions to allocate regions from the highest addresses down, we don't use that facility now. If we do, the code to iterate through the used regions will need to get more sophisticated. I put an assert that would fire in this case.

2 years agofail fast if the delegate was collected prematurely (#56523)
Pavel Savara [Fri, 30 Jul 2021 05:56:22 +0000 (07:56 +0200)]
fail fast if the delegate was collected prematurely (#56523)

2 years agoWork around a Linux arm32 unaligned data issue in SuperPMI (#56517)
Bruce Forstall [Fri, 30 Jul 2021 04:50:22 +0000 (21:50 -0700)]
Work around a Linux arm32 unaligned data issue in SuperPMI (#56517)

* Work around a Linux arm32 unaligned data issue in SuperPMI

impImportStaticReadOnlyField reads the data at the address returned by
getFieldAddress. SuperPMI saves and replays this data, but it doesn't
store it at a naturally aligned address. For int64/double (at least),
this is a problem on Linux arm32, which raises a SIGBUS exception on
such unaligned access.

This works around the problem by copying the potentially unaligned data
to a known aligned spot before reading it. This is only done under DEBUG
and when we know we are replaying under SuperPMI.

A proper fix would be to teach SuperPMI about alignment, but that would be
a large and risky change, compared to this small and isolated workaround.

The fixes the non-determinism of #56156.

* Only add alignment adjustment when required

2 years agoWasm.Build.Tests: `RunProcess` - wait for all async handlers to complete (#56520)
Ankit Jain [Fri, 30 Jul 2021 03:24:48 +0000 (23:24 -0400)]
Wasm.Build.Tests: `RunProcess` - wait for all async handlers to complete (#56520)

2 years agoTest issue for reference tracking in Objective-C (#56441)
Aaron Robinson [Fri, 30 Jul 2021 02:55:40 +0000 (19:55 -0700)]
Test issue for reference tracking in Objective-C (#56441)

* Test issue for reference count in Objective-C

* Review feedback.

2 years agoRemove requirement that --input-bubble be specified if an instruction set is specifie...
David Wrighton [Fri, 30 Jul 2021 01:38:50 +0000 (18:38 -0700)]
Remove requirement that --input-bubble be specified if an instruction set is specified (#56571)

- This was here to protect against ABI breaking changes causing R2R misbehavior
- We don't actually need this as if there is an ABI breaking change, we can detect it at runtime by looking at a combination of the R2R version and the required instruction sets encoded in the R2R image

2 years agoWorkaround crossgen2/ilasm CI test pass incompatibility (#56572)
David Wrighton [Fri, 30 Jul 2021 01:37:04 +0000 (18:37 -0700)]
Workaround crossgen2/ilasm CI test pass incompatibility (#56572)

- The scripts for running crossgen on the app are incompatible with the ilasm/ildasm scripts
- We don't have many of these tests, and they don't test many interesting details for ilasm/ildasm
- Simply disable these tests in the ILasm/ildasm test passes

Fixes #56484

Also, a small drive by fix to not attempt to compile the composite-r2r image. This makes it simple to force the test to re-run crossgen2 by just deleting the IL-CG2 subdirectory of the test

2 years agoissue-50839 handle large int write input. (#53338)
LateApexEarlySpeed [Fri, 30 Jul 2021 00:15:02 +0000 (08:15 +0800)]
issue-50839 handle large int write input. (#53338)

* issue-50839 handle large int write input.

* Also fix Write(ReadOnlySpan); Remove test case because it allocates large object

* Fix comment: add tests.

* Fix comment: use get_position to return _pos; Fix indentation issue.

* Fix spacing

Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeff.handley@microsoft.com>
2 years agoAdd .* and .+ grouping tests for Regex (to capture aspnetcore scenario from recent...
Prashanth Govindarajan [Thu, 29 Jul 2021 22:58:53 +0000 (15:58 -0700)]
Add .* and .+ grouping tests for Regex (to capture aspnetcore scenario from recent regression) #56108

* Add a unit test from aspnetcore

* Expand regex backtracking test cases for ASP.NET

* None and Compiled are already covered; remove loop

* Fix typo in comment

* Make corrections to the new unit tests

Co-authored-by: Jeff Handley <jeff.handley@microsoft.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2 years agoAvoid throwing in ToString() if the process has already exited (#53979)
Ilya [Thu, 29 Jul 2021 22:46:54 +0000 (03:46 +0500)]
Avoid throwing in ToString() if the process has already exited (#53979)

* Avoid throwing in ToString() if the process has already exited

* Fix test

2 years agoEnable ComWrappers API for cross-platform (#54838)
alesomas [Thu, 29 Jul 2021 22:09:56 +0000 (00:09 +0200)]
Enable ComWrappers API for cross-platform (#54838)

* Product changes to enable comwrappers on linux

* Some enhancement (ArraySize, Stowed exception exclusion, etc.)

* Further enhancements + gcenv.ee.cpp change for build failures

* Array size definition moved below windows.h

* MockReferenceTrackerRuntime test project changes for Linux

* Use FALLTHROUGH macro in place of [[fallthrough]]

* WeakReference test project changes for Linux

* Moved back comhelpers.h code from xplatform.h

* OBJC_TEST logic to avoid OSX errors

* Fix for GCC pipeline errors

* Arraysize result comparison error

* Fix IID_IReferenceTracker GUID typo

* QueryInterface implementation and other minor changes

* UnknowImpl fix to remove WIN32 constructor cases

* UnknownImpl error fix

* Included ComWrappers Managed tests

* Excluded Unix ComWrappers test for Mono

* Disabled comwrappers test for mono + other code enhancements

* Enable interop info sync block cleanup under FEATURE_COMWRAPPERS

* Fix local instance ComWrappers WeakReference tests

* Enable NativeComWeakHandleInfo under FEATURE_COMWRAPPERS

* weakreferencenative.cpp and ComHelpers.h code enhancements

Co-authored-by: Ubuntu <creditsuisse@BuildVM.hqykqmymov3ebcqudt35mscinc.ax.internal.cloudapp.net>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
2 years agoFix HTTP/3 ALPN (#56215)
Natalia Kondratyeva [Thu, 29 Jul 2021 21:39:44 +0000 (23:39 +0200)]
Fix HTTP/3 ALPN (#56215)

* Fix HTTP/3 ALPN

* Add tests

2 years agoEnable FileStream length caching with FileShare.Delete (#56465)
Pent Ploompuu [Thu, 29 Jul 2021 21:19:10 +0000 (00:19 +0300)]
Enable FileStream length caching with FileShare.Delete (#56465)

* Enable FileStream length caching with FileShare.Delete

* Address PR feedback

2 years agoFix System.Diagnostics Triple Slashes Comments (#56582)
Tarek Mahmoud Sayed [Thu, 29 Jul 2021 20:55:17 +0000 (13:55 -0700)]
Fix System.Diagnostics Triple Slashes Comments (#56582)

2 years agoimprove quic client cert validation options on server (#56491)
Tomas Weinfurt [Thu, 29 Jul 2021 20:53:40 +0000 (13:53 -0700)]
improve quic client cert validation options on server (#56491)

2 years agoDelete Microsoft.Private.CoreFx.OOB meta package (#56551)
Viktor Hofer [Thu, 29 Jul 2021 20:41:52 +0000 (22:41 +0200)]
Delete Microsoft.Private.CoreFx.OOB meta package (#56551)

The AzDO feed shows that the package isn't anymore
(255 total downloads across all 6.0 versions). To help with the pkgproj
to csproj conversion and to simplify meta package infrastructure,
deleting the package.

In addition to that, the meta package was already missing many OOB
libraries, i.e. all Microsoft.Extensions projects and others as they
don't have a pkgproj anymore which the meta package relied on.

2 years agoAPI fix to System.Data batching API (#56525)
Shay Rojansky [Thu, 29 Jul 2021 20:38:03 +0000 (22:38 +0200)]
API fix to System.Data batching API (#56525)

Allow implementations of DbBatchCommandCollection to hide the indexer
with a narrower-typed version for their own implementation of
DbBatchCommand, as elsewhere in ADO.NET.

Fixup for #54467, part of #28633

2 years ago[main] Update dependencies from mono/linker (#56461)
dotnet-maestro[bot] [Thu, 29 Jul 2021 20:31:06 +0000 (15:31 -0500)]
[main] Update dependencies from mono/linker (#56461)

* Update dependencies from https://github.com/mono/linker build 20210727.1

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21376.2 -> To Version 6.0.100-preview.6.21377.1

* Update dependencies from https://github.com/mono/linker build 20210728.1

Microsoft.NET.ILLink.Tasks
 From Version 6.0.100-preview.6.21376.2 -> To Version 6.0.100-preview.6.21378.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agopull in new Helix Fedora image (#56429)
Tomas Weinfurt [Thu, 29 Jul 2021 20:28:32 +0000 (13:28 -0700)]
pull in new Helix Fedora image (#56429)

* pull in new fefora images

* updated image

2 years agoFix Apple arm64 SIMD12(SIMD16) passing. (#56521)
Sergey Andreenko [Thu, 29 Jul 2021 19:57:56 +0000 (12:57 -0700)]
Fix Apple arm64 SIMD12(SIMD16) passing. (#56521)

* reenable tests

* Fix the issue.

2 years agoConsole.Unix: support backspace during Console.Read (#49649)
Tom Deseyn [Thu, 29 Jul 2021 19:23:01 +0000 (21:23 +0200)]
Console.Unix: support backspace during Console.Read (#49649)

* Console.Unix: support backspace during Console.Read

* Perform \n to \r conversion earlier.

2 years agoAdd Pettis-Hansen sort based on call graph data from .mibc file (#56472)
Jakob Botsch Nielsen [Thu, 29 Jul 2021 19:08:03 +0000 (21:08 +0200)]
Add Pettis-Hansen sort based on call graph data from .mibc file (#56472)

Can be used by specifying --methodorder PettisHansen when a .mibc file
is passed that has the necessary call graph information. By default,
create-mibc adds this information when kernel call stacks are included in
the trace.

2 years agoAdd timeouts to SendAsync_CorrectVersionSelected_LoopbackServer (#56546)
Miha Zupan [Thu, 29 Jul 2021 18:47:37 +0000 (11:47 -0700)]
Add timeouts to SendAsync_CorrectVersionSelected_LoopbackServer (#56546)

2 years agoMake sure we did suppress console output from tests by using the assemblyLoadContextL...
Andrew Au [Thu, 29 Jul 2021 18:09:53 +0000 (11:09 -0700)]
Make sure we did suppress console output from tests by using the assemblyLoadContextLoader (#56503)

2 years agoundo gcname while running crossgen2 within standalone CI (#56361)
Manish Godse [Thu, 29 Jul 2021 17:56:07 +0000 (10:56 -0700)]
undo gcname while running crossgen2 within standalone CI (#56361)

* undo gcname while running crossgen2

* Fix couple more R2R tests to ignore standalone gc

* Fix comments based on CR

2 years ago[mono] Fix the long opcode decompose pass when using llvm. (#56535)
Zoltan Varga [Thu, 29 Jul 2021 17:30:34 +0000 (13:30 -0400)]
[mono] Fix the long opcode decompose pass when using llvm. (#56535)

It was replacing 64 bit opcodes with 32 bit ones while keeping the input/output 64 bit
vregs, leading to memory overwrites in later passes. Instead simply keep the 64
bit opcodes, llvm can handle them.

Fixes https://github.com/dotnet/runtime/issues/53546.

2 years ago[wasm][debugger] Fix javascript tests (#56489)
Thays Grazia [Thu, 29 Jul 2021 17:13:48 +0000 (14:13 -0300)]
[wasm][debugger] Fix javascript tests (#56489)

* Avoid throwing an exception outside the try catch when trying to get DebuggerDisplay and break the debugger.

* Fixing debugger tests that debug JS.

* revert unrelated changes on monosdbhelper.

* Update src/mono/wasm/debugger/DebuggerTestSuite/CallFunctionOnTests.cs

Co-authored-by: Ankit Jain <radical@gmail.com>
* Addressing @radical comments.

Co-authored-by: Ankit Jain <radical@gmail.com>
2 years agoAvoid capturing current SynchronizationContext in SocketPal.SendPacketsAsync (#56512)
Stephen Toub [Thu, 29 Jul 2021 16:54:22 +0000 (12:54 -0400)]
Avoid capturing current SynchronizationContext in SocketPal.SendPacketsAsync (#56512)

2 years agoChange area ownership for R2R (#56557)
Manish Godse [Thu, 29 Jul 2021 16:53:06 +0000 (09:53 -0700)]
Change area ownership for R2R (#56557)

* update owners

* Fix whitespace

2 years ago[mono][aot] Emit extra interp entry wrappers for long signatures. (#56414)
Zoltan Varga [Thu, 29 Jul 2021 15:56:14 +0000 (11:56 -0400)]
[mono][aot] Emit extra interp entry wrappers for long signatures. (#56414)

Fixes https://github.com/dotnet/runtime/issues/55051.

2 years agoJIT: fix pred list maintenance during fgUpdateFlowGraph (#56509)
Andy Ayers [Thu, 29 Jul 2021 15:53:42 +0000 (08:53 -0700)]
JIT: fix pred list maintenance during fgUpdateFlowGraph (#56509)

Handle case where a BBJ_COND block both falls through and branches to
another block, and we want to introduce a block to re-route the fall through.

Closes #56495.

2 years ago[mono] Export jit icalls on osx/catalyst as well. (#56545)
Zoltan Varga [Thu, 29 Jul 2021 15:53:18 +0000 (11:53 -0400)]
[mono] Export jit icalls on osx/catalyst as well. (#56545)

Fixes https://github.com/dotnet/runtime/issues/55000.

2 years agoFix IsolatedStorage initialization on Android (#56534)
Alexander Köplinger [Thu, 29 Jul 2021 15:19:16 +0000 (17:19 +0200)]
Fix IsolatedStorage initialization on Android (#56534)

Android doesn't set an entry assembly so we need to handle that case.

Fixes https://github.com/dotnet/runtime/issues/52332

2 years ago[mono] Fix an uninitialized memory access in the ABCREM pass. (#56508)
Zoltan Varga [Thu, 29 Jul 2021 14:49:44 +0000 (10:49 -0400)]
[mono] Fix an uninitialized memory access in the ABCREM pass. (#56508)

Detected by valgrind.

2 years ago[debugger] Improve debug after hot reload (#55869)
Thays Grazia [Thu, 29 Jul 2021 14:41:43 +0000 (11:41 -0300)]
[debugger] Improve debug after hot reload (#55869)

* Creating more test for hot reload debugging.

* Fixing step on android after hot reload.

* Fix get document information from enc pdb.

* Addressing Aleksey comments.

* Addressing @lambdageek comments and fixing implementation of mono_ppdb_lookup_location

* Fixing compilation on ios.

* Fix android compilation.

2 years agoFix StreamWindowScaleThresholdMultiplier_HighValue_WindowScalesSlower (#56373)
Anton Firszov [Thu, 29 Jul 2021 13:57:36 +0000 (15:57 +0200)]
Fix StreamWindowScaleThresholdMultiplier_HighValue_WindowScalesSlower (#56373)

2 years agoRevert "JIT: Drop redundant static initializations from (Equality)Comparer<T>.Default...
Egor Bogatov [Thu, 29 Jul 2021 13:08:42 +0000 (16:08 +0300)]
Revert "JIT: Drop redundant static initializations from (Equality)Comparer<T>.Default (#50446)" (#56400)

This reverts commit 46e5fe1c9a4584b006601d46063b353338219af0.

2 years ago[mono] remove redundant DISABLE_PERF_COUNTERS option (#56420)
Aleksey Kliger (λgeek) [Thu, 29 Jul 2021 13:05:58 +0000 (09:05 -0400)]
[mono] remove redundant DISABLE_PERF_COUNTERS option (#56420)

* [mono] remove redundant DISABLE_PERF_COUNTERS option

There is already a `DISABLE_PERFCOUNTERS` option, which is always set in src/mono/CMakeLists.txt

* fix log profiler in Android builds

2 years ago[libraries][Android] Re-enable test suites no longer failing with JSON parsing except...
Mitchell Hwang [Thu, 29 Jul 2021 12:58:21 +0000 (08:58 -0400)]
[libraries][Android] Re-enable test suites no longer failing with JSON parsing exception for Android arm64 (#56411)

* Temporarily remove test suites from proj level skip to evaluate JSON parsing

* Temporarily enable tests ran on this draft PR

* Remove temporary disabling of arm lanes for Android runtime-staging

Co-authored-by: Mitchell Hwang <mitchell.hwang@microsoft.com>
3 years agoFix the build of a couple SLNs (#56483)
Eric StJohn [Thu, 29 Jul 2021 11:32:37 +0000 (04:32 -0700)]
Fix the build of a couple SLNs (#56483)

Build in VS was broken because of missing projects from SLN and VS
attempting to call GetTargetPath on outer build of AnalyzerReference projects.

3 years agoDisable test ResponseHeadersRead_SynchronizationContextNotUsedByHandler for WinHttpHa...
Karel Zikmund [Thu, 29 Jul 2021 10:35:05 +0000 (12:35 +0200)]
Disable test ResponseHeadersRead_SynchronizationContextNotUsedByHandler for WinHttpHandler on Win7/Win81 (#56490)

Disable test ResponseHeadersRead_SynchronizationContextNotUsedByHandler for WinHttpHandler on Win7/Win81
Test types:
- System.Net.Http.Functional.Tests.PlatformHandler_HttpClientHandler_Asynchrony_Test
- System.Net.Http.Functional.Tests.PlatformHandler_HttpClientHandler_Asynchrony_Http2_Test

Disabled test tracked by #54034

3 years agoRemove Reflection.Emit APIs (#56153)
Bar Arnon [Thu, 29 Jul 2021 08:22:03 +0000 (11:22 +0300)]
Remove Reflection.Emit APIs (#56153)

* Remove Reflection.Emit APIs

Removes all unused leftover APIs

Fix #49452

* Fix the api-compat baseline

* Remove the baseline altogether

* Remove fIsTransient refs from .cpp (as well as .h)

* Remove nIsTransientInternal

* Remove DefineDynamicModule & DefineDocument

* Revert "Remove the baseline altogether"

This reverts commit ddb0303af94e6126848ef18cd09a70b55775a43b.

* API compat baseline for GetModuleHandleImpl

* Fix Mono

* Match changes in Mono runtime

3 years agoFix two issues with budget smoothing: (#56467)
Peter Sollich [Thu, 29 Jul 2021 08:03:31 +0000 (10:03 +0200)]
Fix two issues with budget smoothing: (#56467)

- We smoothed budgets *across* LOH and POH by mistake
- We didn't do any budget smoothing for LOH and POH in background GCs.

3 years agoUse Ubuntu instead of macOS pool for evaluate-paths-job.yml (#56479)
Alexander Köplinger [Thu, 29 Jul 2021 07:57:55 +0000 (09:57 +0200)]
Use Ubuntu instead of macOS pool for evaluate-paths-job.yml (#56479)

The script can run on Ubuntu as well so we can take some work off of the congested macOS pool.

Also set a fetch depth of 2 since that's all we need to calculate the changed paths, this shaves ~40 seconds off that step.

3 years agoPass excludemonofailures in managed test build job for mono (#56434)
Elinor Fung [Thu, 29 Jul 2021 05:45:28 +0000 (22:45 -0700)]
Pass excludemonofailures in managed test build job for mono (#56434)

* Pass excludemonofailures in managed test build job for mono
* Make test build scripts pass RuntimeFlavor when building tests (not just wrappers)

3 years agoavoid NRE in MsQuicConnection ConnectAsync (#56283)
Tomas Weinfurt [Thu, 29 Jul 2021 05:02:14 +0000 (22:02 -0700)]
avoid NRE in MsQuicConnection ConnectAsync (#56283)

* avoid NRE in MsQuicConnection ConnectAsync

* enable disabled test

* one more place where we set ConnectTcs to null

* use local variable

* feedback from review

3 years agoSupport 8-byte alignment for 12-byte structs on ARM32 (#56375)
Jakob Botsch Nielsen [Thu, 29 Jul 2021 03:45:51 +0000 (05:45 +0200)]
Support 8-byte alignment for 12-byte structs on ARM32 (#56375)

* Support 8-byte alignment for 12-byte structs on ARM32

Through explicit attributes it is possible that 8-byte aligned structs
are 12 bytes in size, so handle this in arm32 when we figure out if we
need an extra spill to keep the alignment.

Fix #42723

* Add a regression test

3 years agoAlter RuntimeComponentManifest.targets to use the correct runtime pack (#56431)
Steve Pfister [Thu, 29 Jul 2021 03:26:01 +0000 (23:26 -0400)]
Alter RuntimeComponentManifest.targets to use the correct runtime pack (#56431)

3 years agoFix EventSource shutdown deadlock (#56453)
Noah Falk [Thu, 29 Jul 2021 02:44:49 +0000 (19:44 -0700)]
Fix EventSource shutdown deadlock (#56453)

Fixes https://github.com/dotnet/runtime/issues/48342

A deadlock was occuring because we held the EventListenersLock
while calling into EventUnregister which will take ETW's own native
lock. In the case of ETW sending an enable/disable notification
these locks are taken in reverse order which triggers a deadlock.

The fix is to ensure that we always order the locks so that any code
path taking both locks always takes the ETW lock first. In this case
it meant accumulating the list of event sources to dispose under
the lock but then exiting the lock prior to calling Dispose() which
will eventually call EventUnregister.

3 years agoReenable DiagnosticSource tests (#56500)
Noah Falk [Thu, 29 Jul 2021 02:43:50 +0000 (19:43 -0700)]
Reenable DiagnosticSource tests (#56500)

A few years ago this test was timing out on ARM64 because of hardware
constraints. I am re-enabling the test to see if this is still an issue
or if the situation has been resolved since then.

3 years agoValidate ref project references (#56488)
Eric StJohn [Thu, 29 Jul 2021 00:45:49 +0000 (17:45 -0700)]
Validate ref project references (#56488)

* Validate that reference assembly projects only reference other reference assembly projects

* Permit ref->src reference if src project produces reference assembly

* Move target to references.targets

3 years agoCovariant return updates to ecma augments (#56496)
David Wrighton [Thu, 29 Jul 2021 00:43:46 +0000 (17:43 -0700)]
Covariant return updates to ecma augments (#56496)

* Covariant return updates to ecma augments

3 years agoRefTypeZeroInit doesn't need treeNode (#56333)
Kunal Pathak [Wed, 28 Jul 2021 22:47:00 +0000 (15:47 -0700)]
RefTypeZeroInit doesn't need treeNode (#56333)

* RefTypeZeroInit doesn't need treeNode

* Add a test case

3 years agoAdd missing doc comments (#56499)
Noah Falk [Wed, 28 Jul 2021 22:35:49 +0000 (15:35 -0700)]
Add missing doc comments (#56499)

3 years ago[wasm] Fix Publish for Blazorwasm projects on VS17 (#56432)
Ankit Jain [Wed, 28 Jul 2021 21:34:02 +0000 (17:34 -0400)]
[wasm] Fix Publish for Blazorwasm projects on VS17 (#56432)

TL;dr `publish` fails on any blazorwasm project with VS17

A recent commit[1] moved initializing `$(_WasmIntermediateOutputPath)` from
a target, to project level `PropertyGroup`. It is set as:

`<_WasmIntermediateOutputPath>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'wasm'))</_WasmIntermediateOutputPath>`

The `NormalizeDirectory` call converts this to a full path, presumably
using the current directory.

Because we are setting `$(_WasmIntermediateOutputPath)` at the project
level, it gets evaluated during the evaluation phase. And the current
directory doesn't seem to be set to the project directory at that point
in VS. So, `$(_WasmIntermediateOutputPath)` gets a wrong path like:

`C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\obj\Release\net6.0\wasm`.

And then when actually publishing, it fails to create this directory
with:

`Unable to create directory "C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\obj\Release\net6.0\wasm\". Access to the path 'C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\IDE\obj\Release\net6.0\wasm\' is denied.`

Fix:
Set the property in `_InitializeCommonProperties` *target*, at which
point the current directory is correctly set.

Note:
- This doesn't seem to be reproducible outside VS
- It happens only on `publish`, because that's when the wasm targets
  come into play.

--
1.
```
commit d574b032793ae752387d32b97ff9840de17420a2
Author: Ankit Jain <radical@gmail.com>
Date:   Mon Jul 19 01:02:01 2021 -0400

    [wasm] Add support for using custom native libraries (#55797)
```

3 years agoFix redhat arm64 (#52244)
Jan Vorlicek [Wed, 28 Jul 2021 20:51:25 +0000 (22:51 +0200)]
Fix redhat arm64 (#52244)

* Fix RHEL 8 ARM64

Clang on ARM64 places the .rodata section into the same segment
as .text. On RHEL 8 ARM64, the kernel is configured for 64kB
memory pages. When we flip the page protection of the page containing
the GS cookie to RW and back to RO, we assume that the cookie lives
in a non-executable memory. This assumption is broken on RHEL 8 and
we end up setting protection of a part of the coreclr code to read
only instead of back to RX.

This change switches the linker we use to lld from the previously
used gnu linker. That linker places .rodata into a different segment
than .text by default. Moreover, I was planning to move to using
lld anyways to use all build tools from LLVM.

* Fix ARM build to use PC relative addresses only

The lld linker has revealed that we were using absolute addresses in some
asm helpers and so load time relocation was necessary. This change fixes
it by replacing all of those by PC relative ones.

* Update docker images used for building runtime

Use new images that have lld linker

* Disable lld linker for s390x

3 years agoEventSource Manifest Trimmer test (#56463)
Lakshan Fernando [Wed, 28 Jul 2021 20:50:19 +0000 (13:50 -0700)]
EventSource Manifest Trimmer test (#56463)

* EventSource Manifest Trimmer test

* FB

3 years agoFix fr-CA culture time formatting and parsing (#56443)
Tarek Mahmoud Sayed [Wed, 28 Jul 2021 20:02:39 +0000 (13:02 -0700)]
Fix fr-CA culture time formatting and parsing (#56443)

3 years agoUpdate area-owners.md (#56481)
Dan Moseley [Wed, 28 Jul 2021 19:55:10 +0000 (13:55 -0600)]
Update area-owners.md (#56481)

* Update area-owners.md

added area-codeflow so that maestro PR's don't make noise by tagging the infrastructure areas.

* Update area-owners.md

3 years agoAssert if we find undefined use during interval validation (#56439)
Kunal Pathak [Wed, 28 Jul 2021 19:43:39 +0000 (12:43 -0700)]
Assert if we find undefined use during interval validation (#56439)

* Assert if we find undefined use during interval validation

* Include lastUse check

3 years agoJIT: properly update loop memory dependence when loops are removed (#56436)
Andy Ayers [Wed, 28 Jul 2021 19:39:15 +0000 (12:39 -0700)]
JIT: properly update loop memory dependence when loops are removed (#56436)

If a loop is removed (because of unrolling) then the loop dependence
tracking introduced in #55936 and #56184 may not properly update.

So when a loop is removed, walk up the chain of parent loops looking
for one that is not removed, and record the dependence on that parent.

Addresses last part of #54118.

3 years agoBuild support for s390x: corehost (#53949)
Ulrich Weigand [Wed, 28 Jul 2021 19:07:32 +0000 (21:07 +0200)]
Build support for s390x: corehost (#53949)

* Build the (non-Windows) host binaries with either runtime flavor

* s390x architecture support in get_arch utility

3 years agoFix an assert in PoolingAsyncValueTaskMethodBuilder (#56468)
Stephen Toub [Wed, 28 Jul 2021 18:23:01 +0000 (14:23 -0400)]
Fix an assert in PoolingAsyncValueTaskMethodBuilder (#56468)

3 years agoRe-enable System.IO.FileSystem.DriveInfoTests.DriveInfoUnixTests.PropertiesOfValidDri...
Maxim Lipnin [Wed, 28 Jul 2021 18:19:20 +0000 (21:19 +0300)]
Re-enable System.IO.FileSystem.DriveInfoTests.DriveInfoUnixTests.PropertiesOfValidDrive on Android (#56462)

Contributes to #42548.

Based on akoeplinger's suggestion #42209 (comment)

3 years agoAdd validation for MetadataType attribute - Issue #46678 (#51772)
Matthew Hill [Wed, 28 Jul 2021 18:15:42 +0000 (06:15 +1200)]
Add validation for MetadataType attribute - Issue #46678 (#51772)

* MetadataType attribute class properties are now validated.

Fix #46678

* Clean up PR #51772

Co-authored-by: Brice Lambson <brice@bricelam.net>
3 years agoFix createdump segfault writing crash report json (#56437)
Mike McLaughlin [Wed, 28 Jul 2021 17:35:57 +0000 (10:35 -0700)]
Fix createdump segfault writing crash report json (#56437)

3 years agoUpdate libraries solution and NuGet.config files (#56430)
Viktor Hofer [Wed, 28 Jul 2021 16:44:17 +0000 (18:44 +0200)]
Update libraries solution and NuGet.config files (#56430)

* Update slngen and invocation

* Update NuGet.config files

* Update solution files with slngen

3 years ago[wasm] Wasm.Build.Tests - try to close down the stdout/err readers (#56180)
Ankit Jain [Wed, 28 Jul 2021 16:35:23 +0000 (12:35 -0400)]
[wasm] Wasm.Build.Tests - try to close down the stdout/err readers (#56180)

3 years agoFix Neutral Culture Names (#56321)
Tarek Mahmoud Sayed [Wed, 28 Jul 2021 16:23:51 +0000 (09:23 -0700)]
Fix Neutral Culture Names (#56321)

* Fix Neutral Culture Names

3 years agoRemove MONO_IOMAP / portability from mono (#56458)
Alexander Köplinger [Wed, 28 Jul 2021 15:10:27 +0000 (17:10 +0200)]
Remove MONO_IOMAP / portability from mono (#56458)

It's not used in netcore mono (since it only works in mono but not the PAL) and judging by the discussion in https://github.com/dotnet/runtime/issues/35299 the consensus is that we should not bring that feature back.

3 years agoIntroduce new AddEventListener and RemoveEventListener APIs on JSObject (#55849)
Katelyn Gadd [Wed, 28 Jul 2021 14:59:44 +0000 (07:59 -0700)]
Introduce new AddEventListener and RemoveEventListener APIs on JSObject (#55849)

Introduces new AddEventListener and RemoveEventListener methods on JSObject that create a delegate wrapper with its lifetime managed by the JavaScript GC instead of managed types, to ensure that delegates don't go away while JS is still using them. Migrates BrowserWebSocket to use the new APIs.

3 years agoBuild runtime.native.System.IO.Ports on linux-s390x (#56424)
Ulrich Weigand [Wed, 28 Jul 2021 14:31:32 +0000 (16:31 +0200)]
Build runtime.native.System.IO.Ports on linux-s390x (#56424)

* Add RID to runtime.native.System.IO.Ports/netcoreapp.rids.props

* Update runtime.native.System.IO.Ports.pkgproj file.

3 years agoDisable ResolutionsWaitingOnQueue_ResolutionStartCalledBeforeEnqueued on Mono interpr...
Miha Zupan [Wed, 28 Jul 2021 13:44:03 +0000 (06:44 -0700)]
Disable ResolutionsWaitingOnQueue_ResolutionStartCalledBeforeEnqueued on Mono interpreter (#56457)