Skip to content

Commit

Permalink
Ingest dotnet/runtime master (#385)
Browse files Browse the repository at this point in the history
* Remove dead code in MarshalNative (#44506)

* Update buildtriage.md (#44538)

* Remove internal NuGet.config that is not needed anymore (#44507)

* Convert aka.ms links to https (#44501)

* Add signing information to asset manifest (port #41889 and #42688) (#43896)

* Post build signing

* Add PostBuildSign flag

* Drop support for IID_ICorDebugProcess10 and fix thread suspend logic (#44549)

* Stop providing IID_ICorDebugProcess10

Prevent older VS versions from setting managed data breakpoints.

* Simplify the thread collision logic to prevent deadlock

This is a simplification of https://github.com/dotnet/runtime/pull/44539
as proposed by @kouvel

* Use fcntl(F_FLUSHFSYNC) on OSX and make FlushAsync() to behave like Flush(false) on Unix (#44443)

* Use fcntl(F_FLUSHFSYNC) on OSX and make FlushAsync to behave like Flush on Unix

* Remove HAVE_F_FULLFSYNC from mono/cmake/config.h.in

* Address FlushAsyncInternal feedback

* Address feedback: use fcntl only for OSX

* Add Type.GetMethod overload that takes Name, BindingFlags, and Parameter Types (#44529)

* Add Type.GetMethod overload that takes Name, BindingFlags, and Parameter Types

Adding overloads to GetConstructor and GetMethod that don't take a Binder or parameter modifiers.

Fix #42753

* Fix arm64 disasm failures (#44547)

GTF_ICON_STATIC_HDL and GTF_ICON_FTN_ADDR can't be converted
to names using eeGetFieldName and eeGetMethodFullName, respectively.
So, just print out the type of the target.

Fixes #40354

* A couple of R2RDump fixes (#44558)

* Fix StartInfo test (#44392)

* Stabilize StartInfo_NotepadWithContent_withArgumentList

* Add state in failed SetApartmentState exception

* Same for other tests

* Extract common code

* Modify

* Extract common code

* Pass down throwOnError

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* feedback

* Add process for disposal

* Make slow test outer loop

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Crossgen2 support for System.Private.CoreLib compilation in CoreCLR build (#44090)

This change moves the logic for crossgenning System.Private.CoreLib to the crossgen-corelib.proj script, no longer calling out to the OS-specific scripts crossgen-corelib.cmd / crossgen-corelib.sh, and adds the support for using Crossgen2 for the System.Private.CoreLib compilation. As of this commit Crossgen2 is not set as the default because the System.Utf8.Experimental libraries tests fail with Crossgen2-compiled CoreLib. I'm working on fixing this as the next step.

Thanks

Tomas

* docs: fix MSBuild property InvariantGlobalization (#44572)

* Fix remote-unwind for TARGET_ARM crossdac (#44553)

* Remove unused Crst entries and regenerate header. (#44556)

* Remove unused Crst entries and regenerate header.

* Remove unused RCW/CCW code paths (#44121)

* Remove unused checks for DCOM proxies.

* Remove empty API for WinRT scenarios.

* Remove unused static functions from runtimecallablewrapper.cpp.

* Remove unused functions in comcallablewrappers.

* Remove unused or irrelevant functions in interoputil.cpp.

Remove WinRT focused code path in ComInterfaceMarshaler.
  - ICOMInterfaceMarshalerCallback usage

* [RyuJIT] Unroll single-iteration loops (#43947)

* Unroll empty loops

* Unroll single-iteration loops

* Update optimizer.cpp

* clean up

* Update optimizer.cpp

* Fix RCS1049: Simplify boolean comparison (#44564)

* Santiago's suggestion (#44554)

* Fix race condition in Hosting test (#44548)

Change Task.Delay(1) to Task.Yield() to avoid a super race condition.

Fix #43389

* Copy OpenSSL binaries (#44577)

This PR could resolve some failures mentioned in https://github.com/dotnet/runtime/issues/44306

* Use Dictionary for underlying cache of ResourceSet (#44521)

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Fix 5-minute hang in Process tests (#44571)

* Remove LazyInitializer usage from corelib (#44409)

It's fine for higher layers, but in corelib we don't want to forcibly prevent LazyInitializer from being trimmed nor pay the overheads of additional cached delegates.

* Make PhysicalFilesWatcher exclusively use polling when pollForChanges=true and no FSW is provided (#41426)

When a FileSystemWatcher is not passed to the PhysicalFileWatcher
we'll permit construction (if polling is enabled) and have it behave as
exclusively polling.

The PhysicalFileProvider will use this mode when both
UsePollingFileWatcher and UseActivePolling are set which is what happens
when the DOTNET_USE_POLLING_FILE_WATCHER environment variable is set.

* Remove dependency on System.Linq from debug build (#44531)

* [Android] Use Android SDK instead of OpenSSL where possible (#43740)

This PR redirects all RandomNumberGenerator, MD5, Sha1-512, HMAC and AES APIs to use Android SDK instead of OpenSSL.

* Validate ref/src parameter names (#43838)

Ensure our reference assembly parameter names match implementation.  Align all current mismatches.

* Special-case SocketsHttpHandler.MaxResponseDrainTime == 0 (#44568)

If the drain size is set to 0, any attempts to drain end up failing with a 1st-chance exception that's logged and eaten, when we should just be skipping all the associated work and failing immediately.

* Override Read/Write for spans on ConsoleStream (#44597)

Console.WriteLine ends up calling Write(span) in some cases, which incurs unnecessary additional cost to call through to Write(byte[], ...).

* OSX Add option -no_code_signature_warning (#44604)

When building on Apple Silicon the stripping pass warns about breaking signing
despite not having signed the binary yet. Disable the warning

* Mark R2RDumpTests as incompatible with GC stress (#44586)

The purpose of this test is not to stress the runtime, it's relatively
lengthy as it processes the entire System.Private.CoreLib framework
assembly and so it's timing in GC stress runs.

Thanks

Tomas

* Fix zh cultures parent chain (#44607)

* Reduce Process test time (#44593)

Fix a test that was taking 30 seconds, and make another test outerloop.

* Remove the experimental Utf8String type and tests from the runtime repo (#44574)

* [Android] Split android_security.c into multiple files (#44603)

* Fix trimming linker tests (#44613)

* Fix race conditions in CG2 runs (#44492)

While we do lock the test folder during CG2 compilation, we always
run the compilation which means that it can race with execution of
the already CG2-compiled executable which also locks the PE file.

While I'm not super happy about introducing more state, I believe
the easiest way to fix this is the same way CG1 works - compiling
opportunistically upon first build of the project and skipping the
compilation subsequently.

Thanks

Tomas

* Subtle fixes for JIT build mode (#44615)

Maoni expressed interest in experimenting with the R2RTest tool
for the purpose of running arbitrary CoreCLR test subsets. As
until now we've seldom used the tool in JIT mode, this naturally
uncovered a bit of bitrot, frankly speaking less than I expected.

Thanks

Tomas

* Switch to new Microsoft.DotNet.SharedFramework.Sdk and refactor Host/Installer build subsets (#38457)

* Start creating runtime, apphost, and targeting packs using the new SDK in the NewSFX subset.

* Fix generation of runtime package, runtime symbols package, and host symbols package.

* Correcly include hosting files and DIA in the shared framework archives and packages

* Include PackageOverrides.txt in the ref pack.

* Fix product brand prefix.

* Add the shared host installer.

* Add the hostfxr build and clean up MacOS building.

* Rename host and hostfxr projects to ensure we don't collide with the nuget packaging projects.

* Add bundle installer.

* Update platform manifest entries to include linux/mac file variations from the runtime.

* Update apphost pack to match master.

* Fix typo

* Include manpages and fix linux package properties.

* Fix linux package properties.

* Match short-description from packages in master.

* Update to uploaded package.

* Update metadata and SDK to generate an exact match of the productbuild xml file.

* First draft moving crossgen2 to new SDK.

* Get crossgen2 pack working with updated SDK.

* Build archives from the installer and bundle projects.

* Move the dotnet-runtime-deps installers to use the new SDK.

* Rough attempt to convert the build to use the new sfx sdk.

* Remove now empty subsets.

* Update installer subsets for testing.

* Remove non-existent packaging project from subsets.

* Add missing Windows api shim dll to platform manifest.

* Update sharedfx sdk.

* Add both versions of the long-name dac to the platform manifest.

* Skip builds for non-relevant components on Mono.

* Remove installer tests by default temporarily to validate product build.

* Remove pkgprojs subset from mono installer build since it doesn't build the hosts.

* Skip the apphost pack on mono.

* Update host test infra to use the new sfx projects.

* Delete an out of date test (the alternative case this test exercises is now the only case in this repo)

* Fix packaging tests and remove NETStandard packaging tests since we aren't producing that ref pack any more.

* Fixes for test official build failures. Re-eneable installer tests by default.

* Fix condition for building linux installers.

* Exclude Mono header files from the deps.json. They don't need to be in it.

* Don't include the host files on the sfxproj.

* Add mono-specific files to the platform manifest.

* Remove extra copy step in installer job.

* Include libmonosgen-2.0.a in platform manifest.

* Fix change in linux-x64 test steps.

* Fix display name of linux package steps.

* Build the installers based on the portable build when applicable so they can find their artifacts.

* The installer build no longer consumes Microsoft.NETCore.Platforms and Microsoft.NETCore.Targets, try removing the dependency on the AllConfigurations leg from the installer build.

* Set PackageBrandNameSuffix for runtime-deps packages.

* Updated sharedfx sdk

* Fix debian runtime-deps dependency elements.

* Add new platform manifest entries.

* Add icudt.dat to the platform manifest.

* Invert conditions to correctly skip generating installers on non-applicable platforms.

* Create extra installer subset so we can build just the installers (and avoid double-building nuget packages). Rename the newsfx subset and folder to sfx.

* Fix Crossgen2 package name.

* Clean up some dead MSBuild goo and update the sharedfx package so we can override the crossgen2 package name without breaking the default package id logic.

* Update SharedFX SDK.

* Fix discovery of the built dotnet layout for installer tests. Clean up some MSBuild along this path.

* Update to use the new refactored packages.

* Fix macOS build failures.

* Fix linux installer build.

* Upgrade to newest version of the SDK and centrally manage versions.

* Update SDK to fix build skipping for the shared framework sdk.

* Update SDK with full fix for skipbuild with packaging.

* Another try for fixing the build-skip infra.

* Upgrade SDK.

* Fix package ids for mono packages.

* Fix installer tests after update.

* Add System.Private.Runtime.InteropServices.Javascript.dll to platform manifest

* Fix Crossgen2 package to place all files in the tools folder.

* Update to SDK with validation targets.

* Add new ICU files to manifest.

* Crossgen2 doesn't need to go through framework resolution so we can permit non-file-versioned dlls. (jitinterface.dll is currently unversioned).

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Put the property in a property group.

* Ensure we build corehost before sfx since we no longer directly build the project from the sfx projects.

* Add missing entry for additional ICU data file.

* Remove step downloading all artifacts and remove MSBuild glue to hook up looking up artifacts in the full download.

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Update SDK

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Update SDK to get MSI fix.

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Don't even try building the hosting, crossgen2, or bundle installers when RuntimeFlavor is Mono.

* Remove out of date comment.

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Rename subsets based on PR discussion.

* Update platform manifest and fix path to 3rd party notices for installer.

* Remove test feed.

* Update subset references I missed.

* Fixed the subset arguments in other yaml files.

* Add NuGet metadata to packs.

* Add diagnostics-specific incremental signing in CoreCLR when the files are produced so the installer portion doesn't need to sign them.

* Pass sign type to job.

* Add new WASM files.

* Enable static graph restore for the whole repo

* Fix nits

* Add back the runtime-deps packages. They were lost when we moved away from globs.

* Don't disable NuGet static graph restore.

* Make sure we sign the cross-arch same-os DAC

* Update installers package.

* Update Installers package from arcade

* Update installers package.

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>

* increase timeout on WebRequest timeout test (#44612)

* update assemblyVersion, packageIndex & resources data (#44373)

* updated package indes

* Fix the failures in all config build

* add "5.0.0.0" : "5.0.0" entry

* correct the system.net.quic and system.security.access control

* add inbox libraries for net6.0

* fix system.net.quic

* disable closure verify for net6.0

* harvest net5.0 asset and include net6.0 asset in package

* some extra changes reverted

* updating some other assembly verisons

* remove package version and use major and minor version to get the assembly version

* Update Directory.Build.props

* Don't force unused reg arg to the stack. (#44555)

* Don't force unused reg arg to the stack.

* Add example to test doc for generating Core_Root without building tests (#44504)

* Doubly linked freelist fix (#44585)

Details:

In gc_heap::allocate_uoh_object. we set the background mark bit if the new object is in a range that has mark bits committed.

However, if the object is in a segment that is allocated during background_sweep, we won't actually sweep the segment, and so the background mark bits stays on, causing confusion in the next background GC - the object itself will survive, but we won't keep the objects that it points at, so we'll have heap corruption.

* [master] Update dependencies from mono/linker (#44557)

Microsoft.NET.ILLink.Tasks
 From Version 6.0.0-alpha.1.20560.1 -> To Version 6.0.0-alpha.1.20561.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>

* Adjust method table pointer masks (#44637)

* Adjusting more places where method table pointers get masked.

* Put the Crossgen2 assertion check in sync with actual intrinsic count (#44624)

* Put the Crossgen2 assertion check in sync with actual intrinsic count

Recent removal of two intrinsics from the CorInfoIntrinsics enumeration
started tripping the assertion failure verifying the expected number
of intrinsics. I'm just updating the expected count.

* Remove the assertion per JanK's PR feedback

* Fix race condition in TestExited_SynchronizingObject test (#44627)

* Move PollingFileProviderShouldntConsumeINotifyInstances to outerloop (#44651)

* Enable WASM AOT option in build and update MonoAOTCompiler (#44468)

Allows creating AOT images for WASM with the AOT compiler and consuming them in the runtime.

Use `make build AOT=1` in `src/mono/netcore/sample/wasm/console` to try it out.

--

Also fix a regression in aot-compiler.c regarding SPC->corlib assembly name:

In https://github.com/dotnet/runtime/commit/035ebeab160b9a281e5fbb3fa0c237f244c81b7a we added a simplified prefix for symbol names in System.Private.CoreLib.
However this shouldn't happen for the actual assembly name otherwise we aren't able to find the AOT module linked statically into the binary.

* RuntimeResourceSet improvements (#44454)

* RuntimeResourceSet improvements

- remove unnecessary base class calls to trim more of base type
- remove code paths which were never executed
- replaced nested locking with simple locks
- fix caching for case insensitive mode
- add tests for more code paths

* Move local caseInsensitiveTable initialisation

* Clean up unused code

* Revert "Clean up unused code"

It's actually used via reflection in System.Resources.Extensions

* update version (#44478)

* Don't build archives or installers for Mono builds. (#44656)

* Add link to github issues (#44650)

* Add feature switch for disabling startup hooks (#44050)

* Introduce feature switch for startup hook

* Add test

* Update md

* Update src/coreclr/src/System.Private.CoreLib/src/System/StartupHookProvider.cs

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Add UnreferencedCode attribute

* Apply suggestions from code review

Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>

* Update message

* Update baseline

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>

* Support multi-buffer sends in WebAssembly WebSockets (#44611)

* Support multi-buffer sends in WebAssembly WebSockets

Proposed fix for https://github.com/dotnet/runtime/issues/44551

* Update BrowserWebSocket.cs

* Whitespace

* TryGetBuffer

* Check args before asking runtime to resolve fqns to avoid assert (#44635)

* Add allocation-free StringInfo APIs, improve unit tests (#44609)

* Remove extraneous dependency ignore. (#44672)

* Fix MONO exports not actually being callable through Module (#44634)

* Only sign in the official build pipeline, not in any other pipeline (#44668)

* Only sign in the official build pipeline, not in any other pipeline (was breaking the perf pipeline).

* Pass signBinaries directly to crossdac-build

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Only install MicroBuild when we are signing.

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Fix Android runtime tests to upload .apk per work item (#44662)

Instead of uploading all .apk's as a correlation payload.

* Remove allocations from IsCustomAttributeDefined (#44694)

* improve parsing network files on WSL (#44680)

* improve parsing network files on WSL

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Fixed various comments and minor refactor ServiceController. (#44014)

* Fixed various comments in ServiceController.

1. Fixed comments, so that VS can infer and show in tooltip.
2. Removed redundant base constructor call.
3. Used auto-properties.

* Addressed PR feedback

* Update src/libraries/System.ServiceProcess.ServiceController/src/System/ServiceProcess/ServiceController.cs

Co-authored-by: Dan Moseley <danmose@microsoft.com>

* Fix `-output_mch_path` argument to superpmi.py (#44693)

Convert the given path argument to an absolute path. Without this,
the `collect` command changes the current directory before doing its
work, so the file doesn't end up where you expeect it to.

Also, print the given argument in any error message.

* Organize SendReceive tests and isolate non-parallel test collection (#44591)

Some `SendReceive` socket tests may be prone to timing issues on CI. This seems to be the root cause of #1712. We need a reliable way to run such tests to unblock the work on new UDP socket API-s in #33418.

This PR defines a new `SendReceiveNonParallel` test group, moving `SendToRecvFrom_Datagram_UDP` into that group. Since this is already a significant reorganization, it seemed reasonable to also:
- Harmonize naming: all SendReceive test classses are now named either  `SendReceive_[SubVariant]` 
 or `SendReceiveNonParallel_[SubVariant]`
- Split `SendReceive.cs` into multiple files:
    - `SendReceive.cs` for the parallel variants
    - `SendReceiveNonParallel.cs` for the new, non-parallel variants
    - Rename the non-generic class `SendReceive` to `SendReceiveMisc` (to avoid name collision and confusion with `SendReceive<T>`) and move it to `SendReceiveMisc.cs` 
    - Move `SendReceiveListener` and `SendReceiveUdpClient` to separate files, rename `SendReceiveListener` to `SendReceiveTcpClient`

* Delete unnecessary entry in global.json (#44709)

* Support System.Type.Missing arguments for late bound calls to IDynamicObject methods with 8 or more arguments (#44434)

* Avoid MemoryMarshal.Cast unaligned accesses in Marvin (#44617)

* Fix RCS1036: Remove redundant empty line (#44631)

Sync with PowerShell/PowerShell#13404

* Make System.Guid readonly (#44629)

* System.Memory.Data (#44633)

* Add BinaryData

Ported from https://github.com/Azure/azure-sdk-for-net/commit/995a13b14c5f635b293c117bfb657d9532b2a202

* Make System.Memory.Data build and fix tests

* Simplify type default

* Respond to feedback

* Use common ReadOnlyMemoryStream

Make common ReadOnlyMemoryStream support compiling for NETFramework and
NETStandard2.0, and add ObjectDisposedException checking.

* Add tests cases for null objects/types

* Fix System.Text.Json reference

* Simplify ReadOnlyMemoryStream.Dispose

* Throw on Disposed for more cases in ReadOnlyMemoryStream

Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>

* Make DirectoryInfoWrapper better handle missing directories (#44671)

EnumerateFileSystemInfos tries to noop when root directory does not exist
but the directory might be deleted between the time it checks Exists and
begins enumerating.  The value for Exists might also be stale as it is cached.

* arm64 osx: support byte sizes from lowering to codegen. (#43024)

* arm64 osx: support byte sizes from lowering to codegen.

* a better message about GT_PUTARG_SPLIT.

* Fix arm

* Response review.

* format GenTreePutArgStk(genTreeOps.

* response Egor's review.

* Harmonize pointer type handling (#44465)

* CoreCLR treats pointer types as UIntPtr in a couple places.

* Regression test

* Avoid MediaTypeHeaderValue.ToString allocation when no parameters (#44750)

* Remove unnecessary closure / delegate allocation from CallSiteFactory.GetCallSite (#44755)

Nothing is ever removed from the cache, and CreateCallSite is already storing the newly created ServiceCallSite into the dictionary, so GetOrAdd isn't providing any meaningful value: we can simply TryGetValue and then call CreateCallSite if it fails.

* Drop ReadOnlyCollection dependency from TaskExceptionHolder (#44757)

it's used only to copy data aroud locally

* Special-case zero parameters in GetParameters (#44759)

* Replace Tuples with ValueTuples (#44712)

Some help to remove allocation, some just help to avoid pulling in Tuple and likely increasing build size.

* Update src/libraries/Common/src/System/Security/Cryptography/Pkcs12Kdf.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>

* Remove ALT_JIT define and replace with runtime logic (#44565)

* Remove ALT_JIT define and replace with runtime logic

* Fix SuperPMI for new altjit jit flag

Co-authored-by: Bruce Forstall <brucefo@microsoft.com>

* Remove use of Tuple<> from corelib (#44706)

* Adjust Mono EventPipe/DiagnosticServer C library to better support CoreCLR shim. (#44527)

* Adjust EventPipe/DiagnosticServer C library to support CoreCLR shim.

Adjustments done to better align with implementation of CoreCLR shim
using CoreCLR artifacts and C++ code (CoreCLR implementation done in
separate PR).

Disconnect runtime specific shim info from shared sources, all included
shim files handled through defines.

Exception safety and improved error handling, adding error checking
and error returns into shim container functions.

Walkthrough of codebase, aligning with gaps from CoreCLR + port of
sample profiler and json file serializer.

Implement core dump diagnostic command and runtime layer (needed by CoreCLR,
currently not implemented on Mono).

Implemented process env diagnostic command and runtime layer.

Implemented profiler attach diagnostic command and runtime layer (needed by
CoreCLR, currently not implemented on Mono).

Fix native EventPipe test aligning with changes.

* Fix build errors.

* Review feedback.

* Avoid string/StringBuilder/char[] allocation in LogValuesFormatter's ctor (#44746)

This is producing thousands of allocations at ASP.NET startup, due to almost 1000 call sites to LoggerMessage.Define.

* Don't use interfaces for sharing Tuple implementation methods (#44684)

* Added condition of empty for concurrent dictionary (#44581)

* Added condition of empty for concurrent dictionary

Collection is already empty why to initialize it again with new emtpy tables.

* Made AreAllBucketsEmpty method private from local function.

Addressed PR feedback.

* Addressed PR feedback.

Comment corrected.

Co-authored-by: Stephen Toub <stoub@microsoft.com>

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Make ImmutableArray readonly (#44640)

* Add reference to Unsafe.

* Mark ImmutableArray as readonly struct.

* Update ImmutableInterlocked to use Unsafe.As.

* Also include S.R.CS.Unsafe for netstandard1.0.

* Add explicit '=default' to avoid CS0649.

* Use Unsafe.AsRef instead of Unsafe.As.

* Fix full-aot support for unmanaged function pointers. (#44783)

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

* Enables the interpreter on Android (#44649)

To enable on tests, you can pass MonoForceInterpreter=true as an extra MSBuild property.

AndroidAppBuilder now has an ForceInterpreter property which will flow the setting down
to the device / simluator.

* Avoid unnecessary LINQ and string joins in JsonConfigurationFileParser (#44734)

* Add workflow to update solution files with SlnGen and update them initially (#44703)

* Add slngen infra

* Update all solution files

* Use new CoreDisTools package (#44490)

R2RDump and GCStress use a version of coredistools produced from https://github.com/dotnet/jitutils

* Optimize HelloWorld usage (#44711)

* Fix the culture parent chain for zh-Han[s|t]-* (#44737)

* Signing cleanup (#44658)

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>

* Add the emscripten version to the wasm runtime pack and check it at app build time when relinking the wasm runtime. (#44715)

* Add the emscripten version to the wasm runtime pack and check it at app build time when relinking the wasm runtime.

* Update src/mono/wasm/Makefile

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>

* Handle unicode and e-notation differences between S.T.J and J.N tests (#35042)

* Handle unicode and e-notation differences between S.T.J and J.N tests

Fixes #32350

* Remove TODO

* Bumping CI

* Bump CI

* Handle relaxed escaping and precision properly

* Move else if

* Move else if back

* Remove relaxedEscaping param and skip whitespace

* Apply Jozkee final touches

* Add missing period

Co-authored-by: David Cantu <dacantu@microsoft.com>

* [Android] Add ability to set env vars via command line (#44644)

* Remove HashProviderDispenser.Android.cs (#44814)

* Update archives package to fix zip/tar naming. (#44827)

* Remove some overhead from Process.Start (#44691)

- Avoid StringBuilder marshaling
- Let CreateProcess{WithLogonW} determine the current working directory
- Avoid creating SafeHandles for GetCurrentProcess()
- Avoid forcing ProcessStartInfo.ArgumentList into existence just to check if it contains anything
- Prefer using ProcessStartInfo.Arguments in Start(string, IEnumerable<string>) if there's only one string in the enumerable
- Use ValueStringBuilder instead of StringBuilder to build up arguments, so as to use stack space / pooled char[]s and avoid actually needing to produce strings.
- Avoid unnecessary SafeHandle for PROCESS_INFORMATION.hThread

* Return pooled arrays in Regex.Replace when no replacements (#44833)

When Regex.Replace doesn't actually need to replace anything, we're inadvertently not returning a previously rented ArrayPool array to the pool.  On repeated use, that drains the pool of the desired size, such that every attempt ends up allocating a new array, even if there are no replacements to be made.

The fix is to lazily rent from the pool.  This not only fixes the problem, but helps perf further by not taking the rental cost unless we actually need an array to store a replacement segment.

* Fix non-thread-safe EntityTagHeaderValue.Any (#44802)

* Fix non-thread-safe EntityTagHeaderValue.Any

It was being published before fully populated.

* Address PR feedback

* Update EntityTagHeaderValue.cs

* Restore Snapcraft files. (#44812)

* Fix building host lineup packages. (#44839)

* Fix building host lineup packages.

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Update src/installer/pkg/projects/host-packages.proj

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>

* [wasm] Use the functions in emscripten/stack.h to compute stack bounds. (#44819)

Co-authored-by: vargaz <vargaz@users.noreply.github.com>

* Trigger SuperPMI collection pipeline if JIT-EE GUID changes (#44846)

Changing the JIT-EE GUID invalidates previous SuperPMI collections,
necessitating a re-collection. As a proxy for determining whether
the JIT-EE GUID has changed, just trigger anytime the corinfo.h file
changes.

* Update nullability on some LINQ expression methods (#44844)

- MethodCallExpression can take nullable instance when static method
- LambdaExpression.Update does not return null in any case

Resolves #44821
Resolves #44822

* Make $(TargetOS) lowercase windows in eng/coredistools.target (#44845)

* Make $(TargetOS) lowercase windows in eng/coredistools.target

* Make $(TargetOS) lowercase windows in src/tests/Common/Directory.Build.targets

* Fix NRE when default value is null and ServiceCallSite is not found (#44675)

* Fix NRE when default value is null and ServiceCallSite is not found

* Enable nullable annotations for M.E.L.Abstractions (#43892)

* Enable nullable annotations for M.E.L.Abstractions

* Corrections from review

* LoggerExtensions.cs: params object?[] -> params object?[]

* using Nullable Annotations,
to allow annotations on relevant projects, not yet enabled

* formatter not null

* Fix decoding GC information in R2RDump (#44682)

* [master] Update dependencies from dotnet/arcade (#44835)

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

Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.GenAPI , Microsoft.DotNet.GenFacades , Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.ApiCompat
 From Version 6.0.0-beta.20552.5 -> To Version 6.0.0-beta.20563.2

* Update global.json

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Juan Hoyos <juan.hoyos@microsoft.com>

* few minor MemoryCache perf improvements (#44797)

* make ValidateCacheKey and CheckDisposed inlinable by moving throws to separate methods

* ensure that the check for expiration does not require a method call for the most common case

* update the last expiration scan when the Scan Task starts actual work

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Integrate misc fixes from dotnet/runtimelab:NativeAOT (#44851)

* Use read-only auto-implemented property (#44677)

* Use read-only auto-implemented property in src\libraries\Common

Use read-only auto-implemented property (RCS1170)

https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1170.md

* Revert changes except to ComEventsMethod

* Remove unnecessary suppression (#44811)

* [browser][wasm] Cleanup debug statement (#44870)

* Fix a comment in the bundle marker (#44874)

* Remove most LINQ usage from Microsoft.Extensions.Configuration (#44825)

Resulting in several hundred Func, IEnumerable, set, and string allocations at startup.

* GetUninitializedObject fixes & improved tests (#44843)

* Improve unit test coverage for GetUninitializedObject
* Normalize most checks between coreclr and mono

* Avoid string.Concat(params string[]) in SimpleConsoleFormatter.CreateDefaultLogMessage (#44765)

It's resulting in a string[] allocation and a string allocation, when we can instead just make a few more individual calls to Write and stackalloc the integer.

* Restore the Microsoft.NETCore.DotNetAppHost package since the SDK transitively uses it through the Microsoft.NETCore.DotNetHostResolver package. (#44883)

* Remove closure allocations from ServiceCollectionDescriptorExtensions (#44696)

* Avoid string.Split in LoggerRuleSelector.IsBetter (#44753)

* Change SuperPMI collection to not use altjit mechanism (#44834)

* Change SuperPMI collection to not use altjit mechanism

The SuperPMI collection process interposes a "shim" JIT between the JIT and EE.
As it is inconvenient to physically replace the existing JIT, currently this
is done by enabling altjit compilation and setting `COMPlus_AltJitName` to the
name of the shim JIT. This creates other inconvenience, especially with the
new way of saving the altjit flag in the JIT flags, by requiring us to
force the altjit flags bit to not be set, and force unset all the altjit flags.
It also makes it inconvenient to collect and/or replay with an actual altjit.

Change this collection mechanism to use the newly restored `COMPlus_JitName`
variable to allow specifying the JIT, and use that to specify the SuperPMI shim.

In addition, do not record in the MC file the `COMPlus_EnableExtraSuperPmiQueries`
variable. This is only used during collections to attempt to make replays more
flexible, but we never want to tell the JIT during replay that this is set.

* Enable `COMPlus_JitName` for crossgen as well

* Fix issue with empty collection args

* Fix ComponentDocumentDesigner references in DesignerAttribute to include right base type (#44774)

* Fix IComponent Designer attribute that was missing base designer type

* Fix IRootDesigner references to use assembly qualified name

* Fix build failures

* Fix nullable annotations on HttpClient.Post/Put/PatchAsync (#44880)

Null content is allowed.

* Remove some allocations from ManifestBuilder.CreateManifestString (#44532)

For the RuntimeEventSource, this removes around 30K of allocation, though that's only ~3% of what gets allocated.

* Delete now unused target in crossgen2.csproj. (#44888)

Signed-off-by: Jeremy Koritzinsky <jekoritz@microsoft.com>

* Remove unnecessary GetTypeInfo from Microsoft.Extensions. (#44891)

I also made a slight optimization to CallSiteFactory to use ToArray instead of ToList.

* Add test for Timer.Elapsed DateTime (#44881)

* Fix discuss #44785:optimize constructor of ElapsedEventArgs (#44853)

* optimize constructor of ElapsedEventArgs

* delete the old ctor

* Improve dumping GC info in R2RDump (#44857)

The --raw command-line option used to dump bytes prefixed with their RVAs for all structures except GC blobs, which were dumped with file offsets instead. This change fixes that inconsistency. It also fixes the size reported by x86.GcInfo, which determines how many bytes to dump. In addition I simplified ReadyToRunMethod's code to store just the GC blob's RVA and avoid the delegate allocation.

* Fix illumos managed build (#44386)

* Fix illumos managed build
* Fix CA1823 (unused private field) in `NetworkChange` partial for
  `UnknownUnix`.
* Use official casing `illumos` in MSBuild property names (as done for
  iOS).
* Fix Solaris version in test with SDK's PlatformDetection.
  * only major version is needed.

* Implement Enviornment.WorkingSet for SunOS
Difference between Linux and SunOS procfs is that files in latter
contain binary data, so we need `read(2)` and cast into corresponding
struct. Redeclaring system structs in managed code is not ideal, as
they do change across the major versions of OS, which inevitably
requires recompilation of binaries and replicating them in C# as is
means additional/unnecessary maintenance of code.

* Address CR feedback

* Make minor change to corinfo.h to test SuperPMI AzDO job trigger (#44893)

* Change gtGetThisArg not to return nullptr. (#44398)

* Don't wrap string literal const as nop for CoreRT.

It was probably an old workaround for another Jit bug, it is most likely fixed by now.

* Change `gtGetThisArg` not to return `nullptr`.

There was only 1 case where a null return was tolerated - for a tail call in `optAssertionGen` marked as virtual.
However, a transformed tail call is never a virtual, fix `fgMorphTailCallViaJitHelper` to unset virtual flag.

* Keep x86 tail call via jit helper as a virtual stub call.

* Verify that OCSP and CRL checks fall back.

Test that a CRL timeout chain build will use OCSP, and that an OCSP timeout chain build will use CRL.

* For x86/x64, call a stack probe helper for all frame sizes equal or over one page (#44664)

* Fix ListSeparator with ICU (#44732)

* Sync SPC File.cs implementation with full the implementation in SIF (#44902)

* Ensure Debugging assets are signed. (#44915)

* Fix regression in XDocumentType (#44868)

* Use simple array for AggregateException inner exceptions storage (#44787)

* Use simple array for AggregateException inner exceptions storage

* Replace cases which called into InnerExceptions inside SPC

* Update src/libraries/System.Private.CoreLib/src/System/AggregateException.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Fix typo

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Fix s390x unwinding and remove need for backchain pointer (#44927)

Fix unwinding for s390x. Removes the `-mbackchain` flag that had been used in the past when unwinding stack frames but has not been required for sometime. This should also improve performance.

Co-authored-by: nealef <nealef@users.noreply.github.com>

* Add AOT support for the EntryPoint property for UnmanagedCallersOnly. (#44809)

* Change mono_reflection_create_custom_attr_data_args_noalloc () so it returns the beginning of the metadata string so its length can be computed.

* Add AOT support for the EntryPoint property for UnmanagedCallersOnly.

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

* Update src/mono/mono/mini/driver.c

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>

* Move EventPipe C library into shared location. (#44791)

* Move C EventPipe library into shared location.

* Fix CMake build and add CMake eventpipe test runner build.

* Increment breaking change no for doubly linked freelists (#44800)

Update breaking change number because doubly linked free lists use one additional bit in the method table pointer at the beginning of objects now.

Added a comment noting that gcDacVars->major_version_number that is set in gc.cpp is not actually checked by SOS, so SOS_BREAKING_CHANGE_VERSION should be updated if GC changes in a way that is incompatible with the existing SOS.

* [mono] Unconditionally check llvm::Expected<T> for success (#44908)

`assert()` will expand to a no-op if NDEBUG is defined, which can
cause an assertion-enabled LLVM to trap if an `llvm::Expected<T>` is
destroyed before having had `operator bool` applied to it.

* [mono] Re-enable /JIT/HardwareIntrinsics/General/NotSupported_{r,ro}/ (#44930)

* Delete coreconsole test hosts (#44933)

Superceded by the shipping single-file hosts

Contributes to #44848

* Speed up Crossgen2 by 10% (#44917)

Server GC looks to improve Crossgen2 compile times by up to 15% so use it by default.

* Fix issue 44646 - ILAsm incorrectly handles method .custom attribute when we have generic type constraint (#44850)

* Fix issue 44646 - ILAsm incorrectly handles method .custom attribute when we have generic type constraint

The IL Assembler incorrectly dropped a .custom attribute for the method
This only occurred when the inline syntax for generic type parameters was used in the method definition.
This behavior can also occur for a generic class definition.

* Fix typo in comment

* Fix SoD input path (#44954)

* Consolidate RID and native file naming in MSBuild scripts (#43804)

* Consolidate RID and native file naming in MSBuild scripts
* Use short variable names for native files naming convention, that are
  used by `framework.sharedfx.targets` in arcade, and cleanup
  redefinitions from crossgen2 and installer. e.g. `ExeSuffix` instead
  of `ApplicationFileExtension`, `LibSuffix` instead of
  `LibraryFileExtension` and so on.
* Calculate `TargetArchitecture`, `NonPortableRuntimeOS` (for
  `PortableBuild`) and `PackageRID` values once for the entire
  livebuild, inside `eng/Configurations.props`. This implementation is
  a union of three varied implementations that are being deleted.
* Import `names.props` once in `eng/Configurations.props` based on
  calculated `PackageRID` and cleanup imports of this file from various
  places.
* Combine OS targets definition in MSBuild scripts.

* Delete legacy tooling properties

* Delete legacy tooling properties

* Delete NetEventSource.IsEnabled (#44901)

* Delete NetEventSource.IsEnabled

These were all meant to be changed to NetEventSource.Log.IsEnabled(), and there are almost 900 occurrences of that pattern.  But there are still 9 stragglers, and the method itself.  Deleting the method and fixing the call sites.

* Fix uses in NetEventSource itself

* Fix NRE on EmitCalli (#44452)

* Remove temporary SuperPMI scripting code (#44962)

Now that we have new SPMI collections, after
https://github.com/dotnet/runtime/pull/44834,
remove temporary scripting code.

* Mark stress log critical section as compatible with shutdown (#44937)

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

* Use multibyte character path for bundle_probe (#44466)

* Custom attribute properties were not always applied correctly (#44813)

* Run class cctor in RuntimeHelpers.GetUninitializedObject(type). (#44898)

* Run class cctor in RuntimeHelpers.GetUninitializedObject(type).

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

* Reenable test.

* Don't run the cctor for beforefieldinit classes.

* Fix post build signing props and enable post build signing. (#44951)

* Move xunit test harness to its own directory under core_root (#44921)

Running `xunit.console` from within the CoreRoot directory is problematic. It is executed by the shared runtime but has a full copy of the runtime and framework libraries next to it from which assemblies are getting loaded despite being for a pre-release test runtime.

Place the xunit assemblies under `<core_root>/xunit` and update the places that invoke it in local and Helix test runs.

The loaded tests do reference the xunit assemblies so they need to also be available in core_root for when the tests run (with the exception of the harness specific assemblies like xunit.console).

* Use simple convert method for internal bool to ulong enum conversion (#44942)

* Enables the interpreter on iOS (#44911)

To enable on tests, you can pass MonoForceInterpreter=true as an extra MSBuild property.

AppleAppBuilder will also have a ForceInterpreter property on it in order to flow down to device / simulator.

* Fix syntax error in Signing.props (#44971)

* Fix handling of \G in Regex.Split/Replace (#44975)

In our optimized Regex.Split loop, we failed to update runtextstart, which means the \G anchor (aka starting where the previous match ended).

* Build osx-x64 Crossgen2 package (#44984)

* Removed unwanted ManualResetEvent from ServiceController (#44716)

* Removed unwanted ManualResetEvent from ServiceController

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

* Addressed PR feedback.
Added delay of 250 ms.

* Fix pal cgroup v2 implementation (#44990)

* Fix pal cgroup v2 implementation

Fixes two issues in src/pal/src/misc/cgroup.cpp:

* No subsystem match must be performed for cgroup v2.
* Incorrect arguments for sscanf_s when reading cgroup path.

The src/gc/unix/cgroup.cpp implementation doesn't have these issues.

* Rename is_subsystem_match to isSubsystemMatch

* Preserve symbols in dbgshim (#44970)

* Preserve symbols in the dbgshim

* Remove unused library group option.

* Increase Hosting test delay to fix flaky BackgroundServiceAsyncExceptionGetsLogged test. (#44953)

* Increase Hosting test delay to fix flaky BackgroundServiceAsyncExceptionGetsLogged test.

Fix #43389

* Use a Task to control the delay on the background service.

* Fix parsed RID condition for VS (#44998)

* Use substitute SHA-1 implementation in wasm (#44982)

* Use different managed SHA-1 implementation

* Add missing call to Start

* Use TryParseUInt32HexNumberStyle directly from Guid.TryParse (#44918)

Skips public entry points of uint.TryParse, including argument validation, branches for style, but most impactfully fetching the current number culture when it won't actually be needed.

* Disable on Server Core a couple tests that use notepad (#44972)

* Fix CFB8 with Zero padding

* Fix add user secrets (#44838)

* [mono] Define ENABLE_MONOTOUCH and MONOTOUCH when building iOS/tvOS AOT cross compilers (#45005)

* Updated mono testing doc (#44360)

* Update testing.md

* Create testing-mono.md

* Update mono testing doc

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* PR feedback

* Fix format

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* PR feedback

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Update docs/workflow/testing/mono/testing.md

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Replace bullet points with sub-headers

* Update sub-headers to remove the duplicated part

Co-authored-by: Ryan Lucia <rylucia@microsoft.com>

* Add Linux ARM64 runs (#44887)

* Add chmod for the SoD tool (#45014)

* Add chmod for the SoD tool

* crossgen.out input path

* Add missing XML docs to System.Security.* (#44461)

* Add missing XML docs to System.Security.*

* add missing <

* Apply suggestions from code review

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>

* Update src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampTokenInfo.cs

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>

* apply feedback

* fix merge conflict (renamed parameters)

* Apply suggestions from code review

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>

* Update src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampTokenInfo.cs

Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
Co-authored-by: Jeremy Barton <jbarton@microsoft.com>

* Register allocation cleanup (#44977)

* Register allocation cleanup

- Comment updates
- Misc code cleanup

* jit format

* Fix buffer comparison in stream conformance tests (#45012)

* avoid using Assert.Equals for buffer comparison in stream conformance tests because it's super, super slow

* Apply suggestions from code review

update span comparisons

Co-authored-by: Stephen Toub <stoub@microsoft.com>

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Remove Convert.ToByte usage from Enum (#45004)

* Remove LINQ usage from EnvironmentVariablesConfigurationProvider (#44923)

* Remove more LINQ usage from various dotnet/runtime libraries (#44964)

* Remove unnecessary OrderBy / copy from MemoryCache.Compact

* Replace First() in ILEmitResolverBuilder with [0]

* Remove stale "using System.Linq;" from System.Text.Json

* Remove stale "using System.Linq;" from System.Security.Cryptography.X509Certificates

* Remove some LINQ usage from System.Security.Cryptography.Pkcs

* Remove System.Linq reference from System.Private.Xml

* Remove System.Linq reference from System.Net.WebHeaderCollection

* Remove stale "using System.Linq;" from CookieContainer

* Remove stale "using System.Linq;" from AltSvcHeaderParser

* Remove Enumerable.Contains on a string from System.IO.Packaging

* Remove System.Linq dependency from System.Diagnostics.Process

* Remove LINQ usage from Microsoft.Extensions.Options

* Remove LINQ usage from Microsoft.Extensions.Logging

* Remove LINQ usage from Microsoft.Extensions.Logging.Console

* Remove LINQ from CollectionExtensions.GetAssets/RuntimeFiles

* Update src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/Rfc3161TimestampToken.cs

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>

Co-authored-by: Jeremy Barton <jbarton@microsoft.com>

* Add GetCiphertextLength for CBC, CFB, and ECB.

* Hide DispatchTailCalls helper in stacktraces (#45019)

Fixes #45011

* [browser][tests] Standup System.Net.WebSockets.Client.Tests in CI (#44781)

* [browser][tests] Standup System.Net.WebSockets.Client.Tests in CI

* Just a small test to see if tests are actually kicked off and failing.

* Remove comment from ActiveIssue to pass tests

* Address review comments

- mark the loopback issues as activeIssue - [ActiveIssue("https://github.com/dotnet/runtime/issues/34690", TestPlatforms.Browser)]

* Address review comments

* Correct confusion I caused

* Remove extra extra exclusion that snuck in

* Make browser specific failure browser specific

Co-authored-by: Larry Ewing <lewing@microsoft.com>

* Use OutputRid for host packs (#45041)

* Correct nullability annotation for IDataRecord (#44938)

Fixes #44886

* Implement getMethodModule (#45046)

R2R testing was failing by hitting an assert about unimplemented
getMethodModule, called as part of R2R-only devirtualization handling
in the JIT.

I didn't determine why this regressed now.

Fixes #45016

* Handle non-ASCII strings in GetNonRandomizedHashCodeOrdinalIgnoreCase (#44688)

* Fix GetNonRandomizedHashCodeOrdinalIgnoreCase

* Add a test

Co-authored-by: Levi Broderick <levib@microsoft.com>

* Use HexConverter directly when producing hex representation of enum value (#44945)

instead of hopping over layers of ToString indirections which end up calling HexConvertor anyway.

* Drop Convert static constructor dependency from RuntimeType (#45054)

* Drop Convert static constructor dependency from RuntimeTypeto make it trimmable

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Fix Typos (#45024)

* Delete unused WinRT related strings (#45067)

Fix a few typos

* Improve throughput of Environment.GetEnvironmentVariables() (#45057)

Use IndexOf to search for positions rather than open-coded loops, taking advantage of vectorization to improve throughput.

* Create cancellation token registration wrapper only when it's needed (#45075)

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* disable ReadWrite_Success_Large test for CryptoStream because it takes too long to run (#45081)

Co-authored-by: Geoffrey Kizer <geoffrek@windows.microsoft.com>

* Skip Invariant initialization test for CultureData.Invariant (#45064)

* Skip Invariant initalization test for CultureData.Invariant

* Feedback

* [Android] Introduce AndroidApkFileReplacerTask task (#44993)

* Add support for stack walks on wasm for the reflection methods which need them. (#45076)

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

* Use `argIsInvariant` instead of `argNode->OperIsConst()` for inlining observations. (#44790)

* Use `argIsInvariant` instead of `argNode->OperIsConst()`.

* add a small repro test for the current issue.

* Use Type.EmptyTypes consistently (#45112)

We currently have several hundred uses of `Array.Empty<Type>()` and several hundred uses of `Type.EmptyTypes`.  This just changes the repo to use the latter consistently.

* Update ILVerify readme (#45123)

ILVerify is published on nuget now. It is not required to use the nightly feed anymore.

* Remove most uses of RuntimeTypeHandle.Allocate (#45085)

- Refactoring paves way for related work in https://github.com/dotnet/runtime/pull/32520
- Fixes some possible GC holes in the reflection stack

* Fix native build on arm and arm64. (#45131)

* Fix native build on arm and arm64.

* Fix a typo.

* Fix CoreRT frozen strings handling. (#45095)

* Fix CoreRT frozen strings handling.

* Review response.

* Delete noway_assert.

* Additional checks.

* Fix failures.

* Update nullability.md

* Reduce RuntimeType.MakeGenericType overheads (#45137)

- Avoid an extra GetGenericArguments() call for all arities.
- Special-case a Type[] with just one type.  In looking at all calls to MakeGenericType when starting up a basic ASP.NET MVC app, 70% were for a single generic argument (the rest were for two).

* Handle inconsistent \0 in Pkcs9Document{Name|Description}

* add support for less standard serial port speeds on macOS (#44052)

* add support for less standard serial port speeds on macOS

* s/ifdef/if

* Delay initialization of Task related properties which are rarely used (#45127)

* Delay initialization of Task related properties which are rarely used

to reduce the dependencies chain

* Apply PR review suggestions

* fix up previous commit

* Update src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>

Co-authored-by: Stephen Toub <stoub@microsoft.com>

* Fix Full Width Chars Casing (#45079)

* JIT: change basic block weight to float (#45052)

Change the core data type for basic block weights from unsigned to float,
to simplify overall calculations and allow for a wider dynamic range.

Many changes are straightforward, but a few are worth noting:
* LSRA needs a true max weight, so had to introduce infinity
* I removed some of the overflow checking as floats naturally saturate.
* The simple geometric loop weight scaling (*8 per loop nest level) leads
  to some very large counts in some tests (15 level loop nests). We may
  want to rethink this and scale less aggressively in deep nests.
* Morph's use of the weighted ref counts for RCS_EARLY is nonstandard
  and the values are not actually weights, so I just added a cast back to unsigned.
* Several places in the jit seem to try and compare or combine unweighted
  and weighted counts; I don't think this makes sense. But have left as is.
* Lower, LIR, and Decompose were passing around weights but never using them.
* I had to introduce a special new weight for the inline projection we do
  for the prejit root.

These changes lead to small numbers of diffs, mostly places where small rounding
changes have altered heuristics; notably:
* cse weights
* LSRA's initial take on whether a parameter should be enregistered

Overall diff impact is a wash.

There are almost no diffs without PGO/IBC data. Diffs are slightly more
prominent in the Roslyn assemblies prejitted with some IBC.

I've tried to keep the format of weights the same in dumps (in most places)
and see minimal diffs in dumps too.

* Reduce SafeHandle allocation in CertEnumCertificatesInStore (#45166)

And avoiding leaving the last invalid one for finalization.

* Fix work item exit code for helix tests (#45164)

* Fix work item exit code for helix tests

The helix work items are only supposed to return non-zero if they fail
to report tests for some reason.

* Fix if

* Keep precise argument sizes between import and morph. (#43130)

Create `GT_PUTARG_TYPE` when signature type does not match node type.
Check in morph that this information has survived inlining and other phases between.

* Remove ForceAsync from CryptoStream (#45150)

* Remove redundant ExecutionContext private ctor parameter (#45173)

* Fix Activity Start Time Precision (#45175)

* Skip some PKCS9 tests on NetFx (#45199)

* Fix Socket telemetry outerloop test failures (#45170)

Based purely on code inspection, since I couldn't repro the failures happening in the lab, I believe what's happening is we're not outputting the right events if the connect ends up completing so fast that it's treated as a synchronous completion.  The fix is to move the relevant tracing to be done when the work completes, regardless of the completion mode.

I was able to simulate at least one set of failures by delaying the calling thread before it reaches a particular point, and this fixes that issue, so even if it's not fixing all known problems (hopefully it is), it's at least fixing some.

* Implement TCP Keep-Alive for WinHttpHandler (#44889)

Implements the final version of the API proposal in #44025 except the [SupportedOSPlatform("windows10.0.2004")] bits

* Fix spelling of OverideEventProvider (#45113)

* Fix spelling of OverideEventProvider

* Fix a few more "overrides" in comments

* [master] Update dependencies from dotnet/icu  dotnet/llvm-project dotnet/arcade dotnet/runtime-assets dotnet/xharness (#44459)

[master] Update dependencies from dotnet/icu  dotnet/llvm-project dotnet/arcade dotnet/runtime-assets dotnet/xharness


 - Merge branch 'master' into darc-master-f04f89fe-a712-45ce-96bf-a8d278fcda72

 - Revert changes to dotnet sdk in global.json

See https://github.com/dotnet/runtime/pull/45108#pullrequestreview-536374298

* [wasm] change filtering system timezones from zone.tab as a task parameter (#45138)

* change filtering system timezones from zone.tab as a task parameter

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

* Remove unused Enum::InternalFlagsFormat parameter (#45196)

* Mono: switch to CMake build on Windows (#44976)

This unifies the build with the other platforms.

Hooks up the versioning targets so the mono libraries get the correct version.

* Fix ninja package name (#45217)

* Disabled test, fixed some typos as well. (#45212)

* Initial version of class profiling for PGO (#45133)

* Initial version of class profiling for PGO

Add support to the jit and runtime so that PGO can determine the distribution of
classes at virtual and indirect call sites.

Use this information when jitting to enable guarded devirtualization, if there
is a suitably likely class to guess for.

Enable by setting:
```
COMPlus_TieredCompilation=1
COMPlus_TieredPGO=1
COMPlus_JitClassProfiling=1
COMPlus_JitEnableGuardedDevirtualization=1
```
impact can be enhanced by also setting
```
COMPlus_TC_QuickJitForLoops=1
```
to allow more methods to pass through Tier0.

* Handle unsupported browser warnings (#43363)

* Handle browser warnings

* Apply feedback, revert updates handled with different PRs

* Add misssing diagnotic id

* Address multitargeted warnings

* Apply feedback

* Small type/comment updates

* Apply more feedback

* Use project settings instead adding Directory.Build.props

* Annotate APIs injecting unsupported type through DI

* Fix window support related warnings found with generic type parameter

* Fix another browser warning found with generic type parameter bug fix

* All public APIs of ConsoleLoggerExtensions are unsupported, so marking entire type as unsupported on browser

* Try handle mono warnings

* Revert mono related changes, it was mistake

* Try handle browser warninga in mono

* Apply feedback and fix new warnings caused from corelib changes

* Review update

* Apply feedback

* Move platform specific section from HttpTelemetry

* Revering unwanted changes

* Remove redundant attributes

* Exclude cross platform build with browser target

* small updates

* Annotate entire type DiagnosticCounter unsupported

* Apply feedback, improve suppression comments

* Remove Unsupported browser from TypeDescriptor.CreateInstance, TypeDescriptionProvider.CreateInstance and related updates

* Disabled Http2_PingKeepAlive (#45214)

Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Jan Jahoda <jajahoda@microsoft.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com>
Co-authored-by: Matt Mitchell <mmitche@microsoft.com>
Co-authored-by: Steve MacLean <Steve.MacLean@microsoft.com>
Co-authored-by: David Cantú <dacantu@microsoft.com>
Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Co-authored-by: Bruce Forstall <brucefo@microsoft.com>
Co-authored-by: Andrew Au <andrewau@microsoft.com>
Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Tomáš Rylek <trylek@microsoft.com>
Co-authored-by: 谭九鼎 <109224573@qq.com>
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
Co-authored-by: Egor Bogatov <egorbo@gmail.com>
Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com>
Co-authored-by: Sergey Andreenko <seandree@microsoft.com>
Co-authored-by: Fan Yang <52458914+fanyang-mono@users.noreply.github.com>
Co-authored-by: Marek Safar <marek.safar@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
Co-authored-by: Tarek Mahmoud Sayed <tarekms@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Tomas Weinfurt <tweinfurt@yahoo.com>
Co-authored-by: Anirudh Agnihotry <anirudhagnihotry098@gmail.com>
Co-authored-by: Carol Eidt <carol.eidt@microsoft.com>
Co-authored-by: Peter Sollich <petersol@microsoft.com>
Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Mateo Torres-Ruiz <mateoatr@users.noreply.github.com>
Co-authored-by: Vitek Karas <vitek.karas@microsoft.com>
Co-authored-by: Brennan <brecon@microsoft.com>
Co-authored-by: Katelyn Gadd <kg@luminance.org>
Co-authored-by: Ben Adams <thundercat@illyriad.co.uk>
Co-authored-by: Shreyas Jejurkar <shreyasjejurkar123@live.com>
Co-authored-by: Anton Firszov <Anton.Firszov@microsoft.com>
Co-authored-by: Charles Stoner <chucks@microso…
  • Loading branch information
Show file tree
Hide file tree
Showing 1,513 changed files with 50,791 additions and 41,322 deletions.
8 changes: 7 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "1.0.0-prerelease.20559.2",
"version": "1.0.0-prerelease.20574.2",
"commands": [
"xharness"
]
},
"microsoft.visualstudio.slngen.tool": {
"version": "4.4.0",
"commands": [
"slngen"
]
}
}
}
18 changes: 0 additions & 18 deletions Build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@
<ProjectReference Include="@(ProjectToBuild)" />
</ItemGroup>

<!--
Exclude installer depproj and pkgproj from static graph restore. We restore them below.
Remove when https://github.com/NuGet/Home/issues/9398 is fixed.
-->
<ItemGroup Condition="'$(MSBuildRestoreSessionId)' != ''">
<ProjectReference Remove="@(DepprojProjectToBuild)" />
<ProjectReference Remove="@(PkgprojProjectToBuild)" />
<ProjectReference Remove="@(BundleProjectToBuild)" />
</ItemGroup>

<!-- Custom arcade target which isn't available in Microsoft.Build.Traversal. -->
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />

Expand All @@ -36,12 +26,4 @@
<MSBuild Projects="$(RepoTasksDir)tasks.proj"
Targets="BuildAndRestoreIncrementally"/>
</Target>

<Target Name="RestoreWithoutStaticGraph"
BeforeTargets="Restore">
<MSBuild Projects="@(DepprojProjectToBuild);@(PkgprojProjectToBuild);@(BundleProjectToBuild)"
Properties="MSBuildRestoreSessionId=$([System.Guid]::NewGuid());RestoreUseStaticGraphEvaluation=false"
Targets="Restore" />
</Target>

</Project>
4 changes: 1 addition & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppCurrent)', 'publish'))</WasmAppBuilderDir>
<WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppCurrent)', 'publish'))</WasmBuildTasksDir>
<MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppCurrent)'))</MonoAOTCompilerDir>

<AppleAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))</AppleAppBuilderTasksAssemblyPath>
<AndroidAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll'))</AndroidAppBuilderTasksAssemblyPath>
<WasmAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll'))</WasmAppBuilderTasksAssemblyPath>
Expand Down Expand Up @@ -105,8 +105,6 @@
</PropertyGroup>

<PropertyGroup>
<!-- Default to portable build if not explicitly set -->
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
<!-- Default to discarding symbols if not explicitly set -->
<KeepNativeSymbols Condition="'$(KeepNativeSymbols)' == ''">false</KeepNativeSymbols>
<!-- Used for launchSettings.json and runtime config files. -->
Expand Down
8 changes: 4 additions & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@
-->
<ItemGroup>
<KnownFrameworkReference Include="Microsoft.NETCore.App"
DefaultRuntimeFrameworkVersion="5.0.0-rc.1.20451.14"
DefaultRuntimeFrameworkVersion="$(MicrosoftNETCoreAppVersion)"
IsTrimmable="true"
LatestRuntimeFrameworkVersion="5.0.0-rc.1.20451.14"
LatestRuntimeFrameworkVersion="$(MicrosoftNETCoreAppVersion)"
RuntimeFrameworkName="Microsoft.NETCore.App"
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86;ios-arm64;ios-arm;ios-x64;ios-x86;tvos-arm64;tvos-x64;android-arm64;android-arm;android-x64;android-x86;browser-wasm"
TargetFramework="$(NetCoreAppCurrent)"
TargetingPackName="Microsoft.NETCore.App.Ref"
TargetingPackVersion="5.0.0-rc.1.20451.14" />
TargetingPackVersion="$(MicrosoftNETCoreAppVersion)" />

<KnownAppHostPack Include="Microsoft.NETCore.App"
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
AppHostPackVersion="5.0.0-rc.1.20451.14"
AppHostPackVersion="$(MicrosoftNETCoreAppVersion)"
AppHostRuntimeIdentifiers="linux-arm;linux-arm64;linux-musl-arm64;linux-musl-x64;linux-x64;osx-x64;rhel.6-x64;tizen.4.0.0-armel;tizen.5.0.0-armel;win-arm;win-arm64;win-x64;win-x86"
TargetFramework="$(NetCoreAppCurrent)" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion docs/coding-guidelines/adding-api-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Recommended reading to better understand this document:

### Determine what library

- Propose a library for exposing it as part of the [API review process](http://aka.ms/apireview).
- Propose a library for exposing it as part of the [API review process](https://aka.ms/apireview).
- Keep in mind the API might be exposed in a reference assembly that
doesn't match the identity of the implementation. There are many reasons for this but
the primary reason is to abstract the runtime assembly identities across
Expand Down
16 changes: 8 additions & 8 deletions docs/coding-guidelines/api-guidelines/nullability.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Nullability annotations

C# 8 provides an opt-in feature that allows for the compiler to track reference type nullability in order to catch potential null dereferences. We are adopting that feature across .NET's libraries, working up from the bottom of the stack. We're doing this for three primary reasons, in order of importance:
As of C# 8 and improved in C# 9, the C# language provides an opt-in feature that allows the compiler to track reference type nullability in order to catch potential null dereferences. We have adopted that feature set across .NET's libraries, working up from the bottom of the stack. We've done this (and continue to do so for all new library development) for three primary reasons, in order of importance:

- **To annotate the .NET surface area with appropriate nullability annotations.** While this could be done solely in the reference assemblies, we're doing it first in the implementation to help validate the selected annotations.
- **To help validate the nullability feature itself.** With millions of lines of C# code, we have a very large and robust codebase with which to try out the feature and find areas in which it shines and areas in which we can improve it. The work to annotate System.Private.CoreLib in .NET Core 3.0 helped to improve the feature as shipped in C# 8, and annotating the rest of the libraries will continue to be helpful in this regard.
- **To find null-related bugs in .NET Runtime itself.** We expect to find relatively few meaningful bugs, due to how relatively well-tested the codebases are and how long they've been around.
- **To annotate the .NET surface area with appropriate nullability annotations.** While this could be done solely in the reference assemblies, we do it in the implementation to help validate the selected annotations.
- **To help validate the nullability feature itself.** With millions of lines of C# code, we have a very large and robust codebase with which to try out features and find areas in which it shines and areas in which we can improve it. The work to annotate System.Private.CoreLib in .NET Core 3.0 helped to improve the feature as shipped in C# 8, and the rest of the core libraries being annotated in .NET 5 helped to further flesh out the design for C# 9.
- **To find null-related bugs in .NET Runtime itself.** We have found few meaningful bugs, due to how relatively well-tested the codebases are and how long they've been around. However, for new code, the annotations do help to highlight places where null values may be erroneously dereferenced, helping to avoid NullReferenceExceptions in places testing may not yet be adequate.

## Breaking Change Guidance

We are striving to get annotations correct the "first time" and are doing due-diligence in an attempt to do so. However, we acknowledge that we are likely to need to augment and change some annotations in the future:
We strive to get annotations correct the "first time" and do due-diligence in an attempt to do so. However, we acknowledge that we are likely to need to augment and change some annotations in the future:

- **Mistakes.** Given the sheer number of APIs being reviewed and annotated, we are likely to make some errors, and we'd like to be able to fix them so that long-term customers get the greatest benefit.
- **Breadth.** Annotation takes time, so annotations will roll out over time rather than being released all at once.
- **Breadth.** Annotation takes time, so annotations have rolled out and will continue to roll out over time rather than all at once for the whole stack.
- **Feedback.** We may need to revisit some "gray area" decisions as to whether a parameter or return type should be nullable or non-nullable (more details later).

Any such additions or changes to annotations can impact the warnings consuming code receives if that code has opted in to nullability analysis and warnings. Even so, for at least the foreseeable future we may still do so. We will be very thoughtful about when and how we do.
Any such additions or changes to annotations can impact the warnings consuming code receives if that code has opted-in to nullability analysis and warnings. Even so, for at least the foreseeable future we may still do so, and we will be very thoughtful about when and how we do.

## Annotation Guidance

Expand All @@ -23,7 +23,7 @@ Nullability annotations are considered to represent intent: they represent the n
- **DO** annotate all new APIs with the desired contract.
- **CONSIDER** changing that contract if overwhelming use suggests a different de facto contract. This is particularly relevant to virtual/abstract/interface methods defined in a library where all implementations may not be under your control, and derived implementations may not have adhered to the original intent.
- **DO** respect documented behaviors. Nullability annotations are about codifying a contract, and documentation is a description of that contract. If, for example, a base abstract or virtual method says that it may throw an exception if `null` is passed in, that dictates that the argument should be non-nullable.
- **DO** continue to validate all arguments as you would have prior to nullability warnings. In particular, if you would have checked an argument for `null` and thrown an `ArgumentNullException` if it was `null`, continue to do so, even if the parameter is defined as non-nullable. Many consumers will not have nullability checked enabled, either because they're using a language other than C#, they're using an older version of C#, they simply haven't opted-in to nullability analysis, or the compiler isn't able to detect the misuse.
- **DO** continue to validate all arguments as you would have prior to nullability warnings. In particular, if you would have checked an argument for `null` and thrown an `ArgumentNullException` if it was `null`, continue to do so, even if the parameter is defined as non-nullable. Many consumers will not have nullability checked enabled, either because they're using a language other than C#, they're using an older version of C#, they simply haven't opted-in to nullability analysis, they've explicitly suppressed warnings, or the compiler isn't able to detect the misuse.
- **DO NOT** remove existing argument validation when annotating existing public/protected APIs. If through the course of annotating it becomes clear that internal/private surface area is unnecessarily checking for nulls when nulls aren't possible (i.e. you found dead code), such use can be removed or replaced by asserts.
- **AVOID** making any changes while annotating that substantively impact the generated IL for an implementation (e.g. `some.Method()` to `some?.Method()`). Any such changes should be thoroughly analyzed and reviewed as a bug fix. In some cases, such changes may be warranted, but they're a red flag that should be scrutinized heavily.

Expand Down
8 changes: 4 additions & 4 deletions docs/design/coreclr/jit/lsra-detail.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ well as supporting components) in more depth.
- `LinearScan::identifyCandidates`

- This mostly duplicates what is done in
`Compiler::lvaMarkLocalVars(). There are differences in what
`Compiler::lvaMarkLocalVars()`. There are differences in what
constitutes a register candidate vs. what is tracked, but we
should probably handle them in `Compiler::lvaMarkLocalVars()`
when it is called after `Lowering`.
Expand Down Expand Up @@ -445,7 +445,7 @@ node, which builds `RefPositions` according to the liveness model described abov

- First, we create `RefPosition`s to define any internal registers that are required.
As we create new `Interval`s for these, we add the definition `RefPosition` to an array,
`InternalDefs`. This allows us to create the corresponding uses of these internal
`internalDefs`. This allows us to create the corresponding uses of these internal
registers later.

- Then we create `RefPosition`s for each use in the instruction.
Expand Down Expand Up @@ -474,7 +474,7 @@ node, which builds `RefPositions` according to the liveness model described abov
we need to ensure that the other source isn't given the same register as the
target. For this, we annotate the use `RefPosition` with `delayRegFree`.

- Next we create the uses of the internal registers, using the `InternalDefs` array.
- Next we create the uses of the internal registers, using the `internalDefs` array.
This is cleared before the next instruction is handled.

- Next, any registers in the kill set for the instruction are killed. This is performed
Expand Down Expand Up @@ -652,7 +652,7 @@ LinearScanAllocation(List<RefPosition> refPositions)
- When `COMPlus_EnableEHWriteThru == 0`, any variable that's
live in to an exception region is always referenced on the stack.

- See [Enable EHWriteThru by default](#enable-EHWriteThru-by-default).
- See [Enable EHWriteThru by default](#enable-ehwritethru-by-default).

- Code generation (genGenerateCode)

Expand Down
6 changes: 3 additions & 3 deletions docs/design/features/globalization-invariant-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ Applications can enable the invariant mode by either of the following:
1. in project file:

```xml
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Globalization.Invariant" Value="true" />
</ItemGroup>
<PropertyGroup>
<InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>
```

2. in `runtimeconfig.json` file:
Expand Down
7 changes: 7 additions & 0 deletions docs/design/features/host-startup-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,10 @@ be defined either in the app or within the first hook that uses it:
The type should be made `internal` to prevent exposing it as API
surface to any managed code that happens to have access to the startup
hook dll. However, the feature will also work if the type is `public`.

### Incompatible with trimming

Startup hooks are disabled by default on trimmed apps. The usage of
startup hooks on a trimmed app is potentially dangerous since these
could make use of assemblies, types or members that were removed by
trimming, causing the app to crash.
1 change: 1 addition & 0 deletions docs/infra/buildtriage.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The main meta-bug linking to currently tracked issues is [here](https://github.c
- [runfo Documentation](https://github.com/jaredpar/devops-util/tree/master/runfo)
- [Internal Build Definition](https://dev.azure.com/dnceng/internal/_build?definitionId=679)
- [Public Build Definition](https://dev.azure.com/dnceng/public/_build?definitionId=686)
- [Runtime dependency status](https://maestro-prod.westus2.cloudapp.azure.com/1296/https:%2F%2Fgithub.com%2Fdotnet%2Fruntime/latest/graph)

## Build Rotation for upcoming months

Expand Down
2 changes: 1 addition & 1 deletion docs/project/api-review-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ APIs and some code samples that show how it should be used. If changes are neces

There are three methods to get an API review:

* **Get into the backlog**. Generally speaking, filing an issue in `dotnet/runtime` and applying the label `api-ready-for-review` on it will make your issue show up during API reviews. The downside is that we generally walk the backlog oldest-newest, so your issue might not be looked at for a while. Progress of issues can be tracked via http://aka.ms/ready-for-api-review.
* **Get into the backlog**. Generally speaking, filing an issue in `dotnet/runtime` and applying the label `api-ready-for-review` on it will make your issue show up during API reviews. The downside is that we generally walk the backlog oldest-newest, so your issue might not be looked at for a while. Progress of issues can be tracked via https://aka.ms/ready-for-api-review.
* **Fast track**. If you need to bypass the backlog apply both `api-ready-for-review` and `blocking`. All blocking issues are looked at before we walk the backlog.
* **Dedicated review**. This only applies to area owners. If an issue you are the area owner for needs an hour or longer, send an email to FXDC and we book dedicated time. Rule of thumb: if the API proposal has more than a dozen APIs and/or the APIs have complex policy, then you need 60 min or more. When in doubt, send mail to FXDC.

Expand Down
10 changes: 5 additions & 5 deletions docs/project/linux-performance-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ CoreCLR supports two different mechanisms for tracing .NET applications on Linux

## Required Tools ##
- **perfcollect**: Bash script that automates data collection.
- Available at <http://aka.ms/perfcollect>.
- Available at <https://aka.ms/perfcollect>.
- **PerfView**: Windows-based performance tool that can also analyze trace files collected with Perfcollect.
- Available at <http://aka.ms/perfview>.
- Available at <https://aka.ms/perfview>.

## Preparing Your Machine ##
Follow these steps to prepare your machine to collect a performance trace.

1. Download Perfcollect.

> ```bash
> curl -OL http://aka.ms/perfcollect
> curl -OL https://aka.ms/perfcollect
> ```

2. Make the script executable.
Expand Down Expand Up @@ -212,7 +212,7 @@ Traces are best viewed using PerfView on Windows. Note that we're currently loo

### Open the Trace File ###
1. Copy the trace.zip file from Linux to a Windows machine.
2. Download PerfView from <http://aka.ms/perfview>.
2. Download PerfView from <https://aka.ms/perfview>.
3. Run PerfView.exe

> ```cmd
Expand Down Expand Up @@ -269,7 +269,7 @@ dotnet-trace collect --process-id <PID>
```

## Viewing the Trace ##
The resulting trace can be viewed in [PerfView](http://aka.ms/perfview) on Windows. Alternatively on Linux/macOS, it can be viewed on [SpeedScope](https://speedscope.app) if you convert the trace format to speedscope by passing `--format speedscope` argument when collecting the trace.
The resulting trace can be viewed in [PerfView](https://aka.ms/perfview) on Windows. Alternatively on Linux/macOS, it can be viewed on [SpeedScope](https://speedscope.app) if you convert the trace format to speedscope by passing `--format speedscope` argument when collecting the trace.

## More Information ##
To read more about how to use dotnet-trace, please refer to the [dotnet-trace documentation](https://github.com/dotnet/diagnostics/blob/master/documentation/dotnet-trace-instructions.md).
Expand Down
3 changes: 1 addition & 2 deletions docs/workflow/editing-and-debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ more on Markdown in general.

# Visual Studio Solutions

The repository has a number of Visual Studio Solutions files (`*.sln`) that are useful for editing parts of
what are in the repository. In particular
The repository has a number of Visual Studio Solutions files (`*.sln`) that are useful for editing parts of the repository. In particular

* `src\coreclr\src\System.Private.CoreLib\System.Private.CorLib.sln` - This solution is for all managed (C#) code that is defined
in the runtime itself. This is all class library support of one form or another.
Expand Down
4 changes: 2 additions & 2 deletions docs/workflow/requirements/linux-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Install the following packages for the toolchain:
- libkrb5-dev
- libnuma-dev (optional, enables numa support)
- zlib1g-dev
- ninja (optional, enables building native code with ninja instead of make)
- ninja-build (optional, enables building native code with ninja instead of make)

The following dependencies are needed if Mono Runtime is enabled (default behavior):

Expand All @@ -62,7 +62,7 @@ The following dependencies are needed if Mono Runtime is enabled (default behavi
sudo apt-get install -y cmake llvm-9 clang-9 autoconf automake \
libtool build-essential python curl git lldb-6.0 liblldb-6.0-dev \
libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev \
libssl-dev libnuma-dev libkrb5-dev zlib1g-dev ninja
libssl-dev libnuma-dev libkrb5-dev zlib1g-dev ninja-build
```

You now have all the required components.
Loading

0 comments on commit 679ec40

Please sign in to comment.