Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge main into feature/use-dllimport-generator #59119

Merged

Conversation

jkoritzinsky
Copy link
Member

This PR should be merged with "Create a merge commit".

uweigand and others added 30 commits August 30, 2021 15:22
* Add linux-s390x and linux-musl-s390x as UnofficialBuildRID
  Ensures RIDs are present in DotNetHost* dispatcher packages
…#56426)

* Make isMSBuildOnNETCoreSupported return true on s390x
  (fixes generating version headers)

* Add s390x platform-specific library name in find_unwind_libs
  (enables linking against system-provided libunwind)
* Add missing clause setting the _ep_arch_info variable
…dotnet#58064)

This largely mirrors the approach of SpecialFolders handling on iOS, and should give the same output from that structure as legacy Xamarin

Fixes: dotnet#35490
A number of tests using `dynamic` can't work on iOS devices due to "dynamic invoke" (where Mono does an indirect runtime invoke using a single universal invoke wrapper) not being supported, added PlatformDetection checks for System.Reflection.Emit since that is a close enough approximation for those.

A few other tests run into an "Attempting to JIT compile method" issue that is tracked by dotnet#58204
…dotnet#58215)

* [mini] Dynamically allocate a buffer for large runtime invoke results

   If the return type is a struct that's bigger than our buffer, malloc a buffer for it instead of using a fixed-size stack buffer

   Also take the ref-return logic from dotnet#52501 and add it to the non-LLVM runtime-invoke

   This makes the `System.Runtime` testsuite (particularly `InvokeRefReturnNetcoreTests`) pass on M1 MacCatalyst FullAOT.

  Related to dotnet#58190

* Throw nullbyrefreturn exception for non-LLVM dyn invoke

   Fixes various tests in InvokeRefReturnNetcoreTests
…net#58164)

ep_rt_atomic_compare_exchange_size_t was always truncated to gint32 on
Mono 64-bit platforms. This commit use 32 or 64-bit cas version
depending on SIZEOF_SIZE_T. NOTE, CoreCLR used a template function for
this and already picks 32 or 64 bit version depending on size of size_t.

ep_rt_atomic_compare_exchange_size_t is currently used to reflect size
of EventPipe buffer manager buffers and will most likely never need
more than 2GB of data, but better to fix it and inline with CoreCLR shim
implementation.
Add new task URL option to filter bench tasks and measurements.

Example use:

    http://.../?task=Json:des     run only Json deserialization
                                  measurements

    http://.../?task=Json:non.*des,Exceptions:Inline
                                  run Json non ASCII deserialization
                                  measurements and Exceptions
                                  measurements containing Inline
                                  in the name
New tests that extend the System.Private.CoreLib API should add to the ref assemblies in src/libraries and the tests themselves should be library tests.

Updated the workflow doc: the Clr.Native subset is all that is need if we're interested in testing Mono.

Contributes to dotnet#58266

* [tests] Use RuntimeFlavor to build ReferenceSystemPrivateCoreLib tests

   When building tests that reference System.Private.CoreLib, use the one from the specified RuntimeFlavor (or fall back to coreclr if it's unset - although src/tests/build.sh sets it always)

* Update docs: We only need to build the Clr.Native subset if we're interested in testing Mono.

* flavor the pipelines to build the runtime-specific System.Private.CoreLib for the runtime tests.

* Don't build ReferenceSystemPrivateCoreLib tests with Mono

   We should avoid adding new ReferenceSystemPrivateCoreLib tests
…en they don't override the preconfigured value (dotnet#57699)

* Fix `ThreadPool.SetMinThreads` and `SetMaxThreads` to return false when they don't override the preconfigured value

Fixes dotnet#1872
* Set generic type arguments nullability for value types
This changes the JIT to keep track of the non standard arg kinds that
are added to the arg info table. We currently have several places
(`fgResetArgInfo`, morph for tailcall-via-helpers) that make "blind"
assumptions on which arg is which depending on certain flags set in the
call. This change makes `fgResetArgInfo` more general and allows us to
add asserts to the tailcall logic to verify that we are removing the
args we expect.
* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210827.6

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21425.6 -> To Version 1.0.0-prerelease.21427.6

* Update dependencies from https://github.com/dotnet/arcade build 20210827.6

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , 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.21425.3 -> To Version 6.0.0-beta.21427.6

* Update dependencies from https://github.com/dotnet/xharness build 20210827.1

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21426.1 -> To Version 1.0.0-prerelease.21427.1

* Update dependencies from https://github.com/dotnet/msquic build 20210826.1

System.Net.MsQuic.Transport
 From Version 6.0.0-preview.7.21425.1 -> To Version 6.0.0-preview.7.21426.1

* Update dependencies from https://github.com/dotnet/hotreload-utils build 20210827.1

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.21425.1 -> To Version 1.0.2-alpha.0.21427.1

* Update dependencies from https://github.com/dotnet/sdk build 20210828.10

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21426.17 -> To Version 1.0.0-rc.1.21428.10

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210828.5

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21425.6 -> To Version 1.0.0-prerelease.21428.5

* Fix IDE0062 warning in NumberFormatInfo.cs

* Downgrade Compatibility package upgrade

* Update Versions.props

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20210829.2

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21425.6 -> To Version 1.0.0-prerelease.21429.2

* Update dependencies from https://github.com/dotnet/runtime build 20210830.3

Microsoft.NETCore.ILAsm , Microsoft.NETCore.DotNetHostPolicy , Microsoft.NETCore.DotNetHost , Microsoft.NETCore.App.Runtime.win-x64 , runtime.native.System.IO.Ports , Microsoft.NET.Sdk.IL , System.Text.Json , System.Runtime.CompilerServices.Unsafe
 From Version 7.0.0-alpha.1.21422.3 -> To Version 7.0.0-alpha.1.21430.3

* Update dependencies from https://github.com/dotnet/sdk build 20210830.5

Microsoft.DotNet.Compatibility
 From Version 1.0.0-rc.1.21426.17 -> To Version 1.0.0-rc.1.21430.5

* Update Version.Details.xml

* Update Versions.props

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Viktor Hofer <[email protected]>
…et#58385)

Equivalent of dotnet#35429 for mono.proj.

This allows lldb to load the separate .dwarf file with debug symbols automatically, instead of needing to manually run `add-dsym <path to .dwarf>`
…et#57603)

* fix to adjust the memory operand size

* Reenable test

* Add under DEBUG

* jit format
…ent` №2 (dotnet#58308)

* Remove attributes on Equals since `true` no longer means `text` is not `null`.
* Fix detection of unsupported links

* Add Directory.Exists check

* Fix CI issue caused by local testing code
* roll r2r jobs into crossgen2-outerloop

* Build win arm libraries

* PR Feedback

* update scehdule comment
…#58346)

* [mono] Skip m2n wrapper for mono_gc_wbarrier_generic_nostore_internal

There is no need for a m2n transition since the method just marks the card table. No exception can be thrown, no marshalling is required, no gc can happen during its execution etc. In addition to the redundancy of the wrapper, it also contains gc safepoints which is wrong. Having a GC between the ref store and the corresponding card table marking can in theory crash the GC.

* [mono] Disable safepoints in write barrier wrapper

This wrapper is called immediately after a store to a ref field. The ref store and the card table marking should be atomic in relation to GCs. Therefore we shouldn't have a safepoint in the wrapper.

* [mono] Refactor disabling of safepoints on GC wrappers
* fix fgValueNumberArrIndexVal for wide reads

* Update test

* Fix regressions

* Update valuenum.cpp
* Share compiler configurations across libs & coreclr

* Add comment about suppression

* Address CR feedback
…tnet#57756)

* Socket: check connect result when non-blocking connect completes.

In addition to checking whether the socket is writable to know the
connect completed, also read SO_ERROR to know if the connect was
succesful before setting the Socket state to connected.

* Avoid EADDRNOTAVAIL on Windows/OSX by connecting to port 1 instead of 0.

* We don't expect InProgress result from reading SO_ERROR.

* Handle platform differences.

* Poll timeout is microseconds instead of milliseconds.

* PR feedback

* PR feedback
eiriktsarpalis and others added 13 commits September 14, 2021 15:22
* add the property to reference assembly

* update tests

* implementation

* Apply suggestions from code review

Co-authored-by: Stephen Toub <[email protected]>

* Apply suggestions from code review

Co-authored-by: Eric Erhardt <[email protected]>

* update comment

Co-authored-by: Stephen Toub <[email protected]>
Co-authored-by: Eric Erhardt <[email protected]>
"use strict" for all wasm JavaScript

Co-authored-by: Daniel Genkin <[email protected]>
Co-authored-by: Pavel Savara <[email protected]>
* Elide SocketFlags in Socket API

Fix dotnet#43934

* Fix SocketAsyncEventArgs tests

* Cosmetics

* Elide SocketFlags in tests

* Comments
The pthread_kill can fail with ENOTSUP on macOS when the target thread
is a dispatch queue thread. Instead of aborting the process, it is
better to fail to inject the activation and rely on return address
hijacking and other means of syncing with GC.
* add yml files

* add file version and condition package reference on source build

* to avoid copying the file from the cache
…nation (dotnet#59069)

LLVM 8 introduced `"frame-pointer"="all"` as a substitute for
`"no-frame-pointer-elim"="true"`. LLVM 10 outright removed
`"no-frame-pointer-elim"`.

Fixes dotnet#58998.
LLVM's SROA can decompose loads and stores of aggregate type into a
sequence of aggregate-element-typed loads and stores. Before this
change, Mono translated .NET-level value types into LLVM IR-level
structs containing nothing but `i8` elements.

When a value type field has reference type, and a value of this value
type is copied using a `memcpy` intrinsic or an LLVM IR load followed by
a store, LLVM will emit code that loads managed references in multiple
byte-sized fragments before reconstructing the original pointer using a
sequence of ALU ops. This causes sgen to fail to pin the referent.

This change works around this by translating value types to LLVM IR
structs with pointer-sized fields. Packed value types with non-standard
alignment will be translated into LLVM IR structs containing
alignment-sized fields.

Note that this does not completely guarantee that the code we generate
will respect sgen's requirements. No specific guarantees are provided
about the translation of non-atomic LLVM IR loads and stores to machine
code. And we'll need some alternative means (perhaps a special
`gc_copy_unaligned` runtime call or similar) to copy packed or
misaligned value types that contain managed references. For stronger
LLVM IR-level guarantees, we'll want to make use of unordered atomic
loads and stores and unordered atomic memcpy, but that work is out of
scope for this change.

Fixes dotnet#58062, but see the previous paragraph for caveats.

See:
- https://github.com/dotnet/llvm-project/blob/release/11.x/llvm/lib/Transforms/Scalar/SROA.cpp#L3371-L3388
- https://github.com/dotnet/llvm-project/blob/release/11.x/llvm/lib/Transforms/Scalar/SROA.cpp#L3327-L3340
@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@jkoritzinsky jkoritzinsky merged commit 111f57b into dotnet:feature/use-dllimport-generator Sep 15, 2021
@jkoritzinsky jkoritzinsky deleted the merge-main branch September 15, 2021 20:03
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.