platform/upstream/dotnet/runtime.git
2 years agoFaster Math.Max/Min on arm64 (#65584)
Egor Bogatov [Sat, 19 Feb 2022 23:51:48 +0000 (02:51 +0300)]
Faster Math.Max/Min on arm64 (#65584)

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
2 years agoPropagate native references to merged project wrapper outputs (#65592)
Tomáš Rylek [Sat, 19 Feb 2022 13:52:17 +0000 (14:52 +0100)]
Propagate native references to merged project wrapper outputs (#65592)

When building tests in merged mode, we need to copy the native
references along with the component test dlls to the output folder
to make them discoverable by the OS loader.

Thanks

Tomas

2 years agoDon't mark prefldinit4 as requiring process isolation (#65596)
Tomáš Rylek [Sat, 19 Feb 2022 13:51:29 +0000 (14:51 +0100)]
Don't mark prefldinit4 as requiring process isolation (#65596)

Turns out this particular test doesn't actually need process
isolation, I overzealously marked it as such in a previous wave
just because it's a static initialization test. This lets us
postpone dealing with out-of-process ilproj tests to a later
phase.

Thanks

Tomas

2 years agoFix HelperMethodFrame::UpdateRegDisplay on x86 (#65589)
Jan Vorlicek [Sat, 19 Feb 2022 07:20:29 +0000 (08:20 +0100)]
Fix HelperMethodFrame::UpdateRegDisplay on x86 (#65589)

While running managed debugger tests with x86 runtime debug build, I was
hiting an assert in MachineState::pRetAddress() method in a couple of
tests.
It turns out there was a bug in the HelperMethodFrame::UpdateRegDisplay
introduced about 5 years ago that only happens in DAC. The m_MachState
can be uninitialized when we enter the method and we were calling
m_MachState.pRetAddr() before performing the initialization.

This change fixes it.

2 years agoRemove ExactSpelling from GeneratedDllImport (#65343)
Jeremy Koritzinsky [Sat, 19 Feb 2022 06:51:27 +0000 (22:51 -0800)]
Remove ExactSpelling from GeneratedDllImport (#65343)

* Update conversion code fix to offer multiple fixes for appending each previously probed entry-point suffix when ExactSpelling is false.

* Remove ExactSpelling property and move properties that were relying on ExactSpelling = false to use explicit entrypoint names.

* Emit ExactSpelling = true for all of our emitted target DllImports.

* Fix a few entry points

* Add a comment around CharSet.Auto

* Update compatibility doc.

* Update docs/design/libraries/DllImportGenerator/Compatibility.md

Co-authored-by: Elinor Fung <elfung@microsoft.com>
Co-authored-by: Elinor Fung <elfung@microsoft.com>
2 years ago[wasm] Trigger all wasm jobs, if `eng/Version.Details.xml` has any chan… (#65451)
Ankit Jain [Sat, 19 Feb 2022 01:08:37 +0000 (20:08 -0500)]
[wasm] Trigger all wasm jobs, if `eng/Version.Details.xml` has any chan… (#65451)

* [wasm] Trigger all wasm jobs, if eng/Version.Details.xml has any changes, so we run a full check on emsdk updates

* fix yml

* Fix merge

* [wasm] Pass isRollingBuild to runtime-extra-platforms-wasm template, to correctly trigger the EAT/AOT builds

* .. and pass isWasmOnlyBuild also

2 years agoAllow Trace Samplers to Modify the Activity Trace State (#65530)
Tarek Mahmoud Sayed [Sat, 19 Feb 2022 00:46:07 +0000 (16:46 -0800)]
Allow Trace Samplers to Modify the Activity Trace State (#65530)

2 years ago[wasm] Make the sanitize pass less aggressive (#65571)
Larry Ewing [Fri, 18 Feb 2022 23:09:37 +0000 (17:09 -0600)]
[wasm] Make the sanitize pass less aggressive (#65571)

* Make the sanitize pass less aggressive

2 years agoDisable System.Diagnostics.Tests.EventLogRecordTests.ExceptionOnce on Windows Server...
Elinor Fung [Fri, 18 Feb 2022 23:06:24 +0000 (15:06 -0800)]
Disable System.Diagnostics.Tests.EventLogRecordTests.ExceptionOnce on Windows Server 2022 (#65588)

2 years ago[wasm] Implicit NodeJS version on Helix (#65514)
Marek Fišera [Fri, 18 Feb 2022 22:14:22 +0000 (23:14 +0100)]
[wasm] Implicit NodeJS version on Helix (#65514)

- Read first directory name under node instead of hardcoded version.

2 years agoImprove SuperPMI script robustness (#65586)
Bruce Forstall [Fri, 18 Feb 2022 21:33:17 +0000 (13:33 -0800)]
Improve SuperPMI script robustness (#65586)

1. Be more robust to temp directory removal failure

If we fail to remove a temporary directory, don't crash. Log the failure
and the set of directories and files still remaining, and continue.

We have seen this failure in at least one Linux x64 PMI coreclr_tests
SuperPMI collection:
```
[Errno 39] Directory not empty: '/datadisks/disk1/work/B18E0979/t/tmpov3b4_qa'
```

2. Limit the length of file names created by `make_safe_filename`. We were creating
file names out of full path names, where those paths contained long temporary directory
paths, and thus we were exceeding the maximum allowed file name component.

2 years agoClean-up slngen related logic (#65507)
Viktor Hofer [Fri, 18 Feb 2022 21:03:14 +0000 (22:03 +0100)]
Clean-up slngen related logic (#65507)

* Clean-up slngen related logic

* Update dotnet-tools.json

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2 years agoSkip RegexOptions.NonBacktracking phase 3 for some patterns (#65531)
Stephen Toub [Fri, 18 Feb 2022 20:41:08 +0000 (15:41 -0500)]
Skip RegexOptions.NonBacktracking phase 3 for some patterns (#65531)

* Skip RegexOptions.NonBacktracking phase 3 for some patterns

If a pattern doesn't have any captures and if any match of that pattern will always be the same length, we can skip the Phase 3 computation as, given the computed starting position of the match, we know exactly where it's going to end.

* Add example to the phase comments

2 years agoAllow constant propagation of Vector.Zero. (#65028)
Will Smith [Fri, 18 Feb 2022 19:51:53 +0000 (11:51 -0800)]
Allow constant propagation of Vector.Zero. (#65028)

* Initial work

* Added a comma to display

* Cleanup

* Fixing build

* More cleanup

* Update comment

* Update comment

* Added CompareEqual Vector64/128 with Zero tests

* Do not contain op1 for now

* Wrong intrinsic id used

* Removing generated tests

* Removing generated tests

* Added CompareEqual tests

* Supporting containment for first operand

* Fix test build

* Passing correct register

* Check IsVectorZero before not allocing a register

* Update comment

* Fixing test

* Minor format change

* Fixed formatting

* Renamed test

* Adding AdvSimd_Arm64 tests:

* Adding support for rest of 'cmeq' and 'fcmeq' instructions

* Removing github csproj

* Minor test fix

* Fixed tests

* Fix print

* Minor format change

* Fixing test

* Initial commit for Vector.Create to Vector.Zero normalization

* Added some emitter tests

* Feedback

* Update emitarm64.cpp

* Feedback

* Handling variations of Vector.Create

* Use Operands iterator instead of edges

* Fix condition

* Simplify

* format

* Fixed IsFloatPositiveZero

* Uncomment

* Updated tests to include Vector64.Create/Vector128.Create for ARM64

* Making implementation of IsFloatPositiveZero explicit

* Update src/coreclr/jit/gentree.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Feedback

* Update comment

* Update comment

* Do not perform optimization when VN CSE phase

* use ResetHWIntrinsicId

* Assert !optValnumCSE_phase

* Simplify IsVectorZero

* Simplify IsVectorZero

* Simplify some uses of Vector*_get_Zero

* Added another test

* Fixed formatting

* Revert lowering removal

* Initial work for optimizations on VectorZero value numbering

* Allowing all Vector.Zero to be constant prop'ed. Added VNFuncSimdTypeInfo.

* Update gentree.h

* Quick rename

* Removed extra variable

* Added default case

* Format

* Fixed vnDumpSimdType to take into account CorInfoType

* Fixed gtNewSimdZeroNode to produce the right Vector*_get_Zero based on simdSize

* Formatting

* Feedback and a loop test

* Added another test. Formatting fixes

* Added GetSimdBaseJitPreciseType

* Feedback

* Minor fix

* Minor comment update

* Added another comment

* Added another comment

* Added another comment

* Update comment

* Formatting

* Feedback

* Fixing build

* Feedback

* Update assertionprop.cpp

* Formatting

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
2 years agoFix Vector256.IsHardwareAccelerated in R2R binaries (#65351)
David Wrighton [Fri, 18 Feb 2022 19:35:57 +0000 (11:35 -0800)]
Fix Vector256.IsHardwareAccelerated in R2R binaries (#65351)

* Fix Vector256.IsHardwareAccelerated in R2R binaries
- If a function had a dependency on Vector256<T> but not on any Avx2 functionality then we would fail to produce an R2R image using a debug version of the compiler, and would generate an incorrect function where the result of calling Vector256.IsHardwareAccelerated would produce the wrong result.
- To fix this we now annotate the VectorXXX instruction sets so that if there is a negative depenedency on them during R2R generation, that the function is not available for use if the underlying actual instruction set is available to use at runtime.
- Adjust test Runtime_34587 to test instruction set manner in a way that allows testing crossgen2 instruction set variation
  - Move instruction set issupported checks into standalone functions to isolate the tests in the JIT/Crossgen2 compiler to better see exactly what is happening
  - Add diagnostic output to test, for better diagnosis of future failures.

2 years agoClass types with layout that inherit from System.Object should be ManagedSequential...
Jeremy Koritzinsky [Fri, 18 Feb 2022 18:05:18 +0000 (10:05 -0800)]
Class types with layout that inherit from System.Object should be ManagedSequential (#65447)

2 years agoForward DefaultDllImportSearchPathsAttribute to the inner P/Invoke. (#65458)
Jeremy Koritzinsky [Fri, 18 Feb 2022 18:04:03 +0000 (10:04 -0800)]
Forward DefaultDllImportSearchPathsAttribute to the inner P/Invoke. (#65458)

2 years agoFix missing zero-offset sequences and add checking (#64805)
SingleAccretion [Fri, 18 Feb 2022 17:51:51 +0000 (20:51 +0300)]
Fix missing zero-offset sequences and add checking (#64805)

* Add checking for zero-offset FldSeq addition

* Add a test

* Fix ADDR(LCL_VAR) Zero [FldSeq]

* Always add NotAField field sequences

* NotAField printing improvements

2 years agoFix assert (#65564)
SingleAccretion [Fri, 18 Feb 2022 17:48:22 +0000 (20:48 +0300)]
Fix assert (#65564)

We only require the "greater than" condition on x86.

2 years agoNew Arcade Installers package with Mariner cm.2 change (#65542)
Nikola Milosavljevic [Fri, 18 Feb 2022 16:51:48 +0000 (08:51 -0800)]
New Arcade Installers package with Mariner cm.2 change (#65542)

2 years ago[wasm] Ensure NodeJS for running tests isn't too old (#65549)
Marek Fišera [Fri, 18 Feb 2022 16:47:17 +0000 (17:47 +0100)]
[wasm] Ensure NodeJS for running tests isn't too old (#65549)

2 years ago[wasm] Rationalize wasm jobs run on CI (#65035)
Ankit Jain [Fri, 18 Feb 2022 16:16:31 +0000 (11:16 -0500)]
[wasm] Rationalize wasm jobs run on CI (#65035)

* Rationalize wasm jobs run on CI

Essentially:
- For rolling builds, we want to run all the wasm jobs, unconditionally
   - And `runtime-extra-platforms` runs the tests that were not in `runtime`, and `runtime-staging`
- For PRs, we use the various path checks

Changes:
- split wasm jobs into various templates
- combine, and simplify some jobs

* `runtime-extra-platforms`, and `runtime-wasm` run only when manually
  triggered with a comment - `/azp run <pipeline-name>`
* `runtime`, and `runtime-staging`, run jobs only when relevant paths
  change. And for `EAT`, and `AOT`, only smoke tests are run.
* And when `runtime-wasm` is triggered manually, it runs *all* the wasm
  jobs completely

| .                 | runtime               | runtime-staging         | runtime-extra-platforms(manual only) | runtime-wasm (manual only) |
| ----------------- | --------------------  | ---------------         | ------------------------------------ | -------                    |
| libtests          | linux: all,   only-pc | windows: all,   only-pc | linux+windows: all, only-pc          | linux+windows: all, always |
| libtests eat      | linux: smoke, only-pc | -                       | linux:         all, only-pc          | linux:         all, always |
| libtests aot      | linux: smoke, only-pc | windows: smoke, only-pc | linux+windows: all, only-pc          | linux+windows: all, always |
|                   |                       |                         |                                      |                            |
| Wasm.Build.Tests  | linux:        only-pc | windows:        only-pc | linux+windows: only-pc               | linux+windows              |
| Debugger tests    | -                     | linux+windows:  only-pc | linux+windows: only-pc               | linux+windows              |
| Runtime tests     | linux:        only-pc | -                       | linux: only-pc                       | linux                      |

* `runtime`, and `runtime-staging`, run all the wasm jobs unconditionally, but `EAT`, and `AOT` still run only smoke tests.
* `runtime-extra-platforms` also runs by default. And it runs only the cases not covered by the above two pipelines.

* jobs w/o `only-pc` are always run

| .                 | runtime                   | runtime-staging       | runtime-extra-platforms (always run) | runtime-wasm (manual only) |
| ----------------- | -------------             | ---------------       | ------------------------------------ | ------                     |
| libtests          | linux: all(v8/chr/node)   | windows: all          | linux+windows: all with node         | N/A                        |
| libtests eat      | linux: smoke              | -                     | linux: all                           |                            |
| libtests aot      | linux: smoke              | windows: smoke        | linux+windows: all                   |                            |
|                   |                           |                       |                                      |                            |
| Wasm.Build.Tests  | linux: always             | windows: always       | none                                 |                            |
| Debugger tests    | -                         | linux+windows: always | none                                 |                            |
| Runtime tests     | linux: always             | -                     | none                                 |                            |

* [wasm] Run tests with node only on runtime-wasm

2 years agoImprove PipeWriterTests.CompleteWithLargeWriteThrows (#65506)
Alexander Köplinger [Fri, 18 Feb 2022 13:46:35 +0000 (14:46 +0100)]
Improve PipeWriterTests.CompleteWithLargeWriteThrows (#65506)

Allocate the buffer outside of the loop so we don't hit OOM issues.

While looking at the test I noticed that it actually had a bug too:
Nothing was asserting that we indeed throw an InvalidOperationException when the writer is completed. Adding `Assert.ThrowsAsync` revealed that the current loop iteration count was too low to hit the exception reliably
within the 10ms delay so instead check for the execution time.

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

2 years agoSupport resumable serialization in NullableConverter<T> (#65524)
Eirik Tsarpalis [Fri, 18 Feb 2022 10:44:23 +0000 (10:44 +0000)]
Support resumable serialization in NullableConverter<T> (#65524)

* Support resumable serialization in NullableConverter<T>

* use null instead of default

2 years agoFix XNodeReaderFunctionalTests (#65500)
Krzysztof Wicher [Fri, 18 Feb 2022 08:12:10 +0000 (09:12 +0100)]
Fix XNodeReaderFunctionalTests (#65500)

* Fix XNodeReaderFunctionalTests

* cleanup Flush/Dispose

* cleanup few more flushes

2 years ago[LoongArch64] JIT/EE interface for getting ABI-info (#62893)
Qiao Pengcheng [Fri, 18 Feb 2022 08:07:48 +0000 (16:07 +0800)]
[LoongArch64] JIT/EE interface for getting ABI-info (#62893)

* [LoongArch64] add ToolBox directory about jitinterace for getting ABI-info. (#59561)

Co-authored-by: Loongson's .NET-teams
* [LoongArch64] add new interace for getting ABI-info. (#59561)

* [LoongArch64] add the linking page for LoongArch64 ABI-info. (#59561)

* [LoongArch64] moved ThunkInput.txt to #62885.

* [LoongArch64] moved vm/jitinterface.cpp to #62885.

* remove the JIT/EE interface back from #62885..

* [LoongArch64] Fix the compiling error after merge.

* [LoongArch64] add comments for the returned value of `getFieldTypeByHnd`.

* [LoongArch64] rename getFieldTypeByHnd to getFieldSizeClassificationByHnd.
Also add macro define for returned value of `getFieldSizeClassificationByHnd`.

* [LoongArch64] Delete the interface `getArgType2`.
And refactor the returned values of `getFieldSizeClassificationByHnd`.

* [LoongArch64] delete `GetArgType` within `ToolBox/superpmi`.

* [LoongArch64] rename `getFieldSizeClassificationByHnd` to
`getLoongArch64PassStructInRegisterFlags`.

* [LoongArch64] amend the floating-ABI for native-struct.

* [LoongArch64] update all related `GetFieldSizeClassificationByHnd`
by `GetLoongArch64PassStructInRegisterFlags` and amend some comments.

* [LoongArch64] replace `LookupApproxFieldTypeHandle()`
by `GetFieldTypeHandleThrowing()`.

* [LoongArch64] implements the crossgen2 for LoongArch64.

* Revert "[LoongArch64] implements the crossgen2 for LoongArch64."

This reverts commit b05a2b90e8d8a2f6d1cf7f101ddfc9d4ed8d984e.

The crossgen2 for LoongArch64 will be submitted by a new PR.

* [LoongArch64] update the `GUID JITEEVersionIdentifier`.
Also delete some unused comments.

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years ago[wasm] Replace active issue for browser platform with NodeJS only (#65505)
Marek Fišera [Fri, 18 Feb 2022 07:55:22 +0000 (08:55 +0100)]
[wasm] Replace active issue for browser platform with NodeJS only (#65505)

2 years agoFileSystemWatcher.Linux: handle races while adding child directories. (#64906)
Tom Deseyn [Fri, 18 Feb 2022 07:49:37 +0000 (08:49 +0100)]
FileSystemWatcher.Linux: handle races while adding child directories. (#64906)

* FileSystemWatcher.Linux: handle races while adding child directories.

This handles the child directory getting removed or replaced by a file
while we are adding a watch for it or enumerating its subdirectories.

* Pass other enumeration exceptions to the user.

2 years agoUse CopyContext to restore saved context on X86 (#65490)
Vladimir Sadov [Fri, 18 Feb 2022 07:09:20 +0000 (23:09 -0800)]
Use CopyContext to restore saved context on X86 (#65490)

* Use CopyContext to restore saved context on X86

* PR feedback

* more PR feedback

2 years ago[mono] Cache aotdata file in AOTCompiler task (#65472)
Steve Pfister [Fri, 18 Feb 2022 03:29:36 +0000 (22:29 -0500)]
[mono] Cache aotdata file in AOTCompiler task (#65472)

This change improves the inner devloop experience by making sure to cache the .aotdata file when it's generated. Otherwise, if you clean your artifacts directory and no aot changes have been made, it will not be generated again.  The result being an error when building an app.

I believe this mostly impacts iOS configurations.

2 years ago[mono][wasm] Link the aot profiler into dotnet.wasm by default in debug mode. (#63262)
Zoltan Varga [Fri, 18 Feb 2022 02:25:10 +0000 (21:25 -0500)]
[mono][wasm] Link the aot profiler into dotnet.wasm by default in debug mode. (#63262)

Enable it using a define instead of generating code into driver-gen.c.

Co-authored-by: Larry Ewing <lewing@microsoft.com>
2 years ago[wasm] Rollback emscripten to 2.0.23 (#65517)
Radek Doulik [Fri, 18 Feb 2022 01:02:47 +0000 (02:02 +0100)]
[wasm] Rollback emscripten to 2.0.23 (#65517)

* [wasm] Rollback emscripten to 2.0.23

* Enable disabled tests

2 years agoAdd line break to please Firefox
Immo Landwerth [Fri, 18 Feb 2022 00:37:39 +0000 (16:37 -0800)]
Add line break to please Firefox

2 years ago[wasm] Disable wasm aot tests hitting OOM on all platforms (#65521)
Elinor Fung [Fri, 18 Feb 2022 00:25:49 +0000 (16:25 -0800)]
[wasm] Disable wasm aot tests hitting OOM on all platforms (#65521)

2 years agoUpdate main branding to preview 3 (#65346)
Santiago Fernandez Madero [Thu, 17 Feb 2022 23:12:54 +0000 (15:12 -0800)]
Update main branding to preview 3 (#65346)

2 years agoMove IsKnownConstant handling to ExtendedDefaultPolicy (#64809)
Egor Bogatov [Thu, 17 Feb 2022 22:36:15 +0000 (01:36 +0300)]
Move IsKnownConstant handling to ExtendedDefaultPolicy (#64809)

2 years agoPGO: Profile isinst/castclass (#65460)
Egor Bogatov [Thu, 17 Feb 2022 22:25:44 +0000 (01:25 +0300)]
PGO: Profile isinst/castclass (#65460)

Co-authored-by: Andy Ayers <andya@microsoft.com>
2 years agoMove architecture-specific code out of codegencommon.cpp (#65488)
Bruce Forstall [Thu, 17 Feb 2022 22:25:16 +0000 (14:25 -0800)]
Move architecture-specific code out of codegencommon.cpp (#65488)

Move about 3300 lines of architecture-specific code to the
architecture-specific codegen files (codegenarm.cpp, codegenarm64.cpp,
codegenarmarch.cpp, codegenxarch.cpp). Much of this is prolog/epilog
generation.

A new set of arch-specific functions, genZeroInitFrameUsingBlockInit,
is added to extract a huge amount of arch-specific code from genZeroInitFrame.

The moved code wasn't altered except to remove unnecessary ifdefs.

Minor:
- inlined and removed getAdjustSP
- removed unused Compiler versions of GetHasTailCalls/SetHasTailCalls

2 years agoUpdate tests to help uncover CrossGen2 scenario validation (#65477)
Aaron Robinson [Thu, 17 Feb 2022 21:19:18 +0000 (13:19 -0800)]
Update tests to help uncover CrossGen2 scenario validation (#65477)

* Update CrossGen2 to support ByRef fields in all scenarios

* Update tests to help uncover CrossGen2 scenario validation

* Add support in Mono for the ByReference`1 being considered a ref field
  during Explicit offset validation.

2 years agoReplace picture of API review process with diagram (#65527)
Immo Landwerth [Thu, 17 Feb 2022 20:36:25 +0000 (12:36 -0800)]
Replace picture of API review process with diagram (#65527)

2 years agoJIT: better addressing mode for floating point on arm64 (#65468)
Egor Bogatov [Thu, 17 Feb 2022 20:12:26 +0000 (23:12 +0300)]
JIT: better addressing mode for floating point on arm64 (#65468)

2 years agoAdd retries to SPMI download (#65516)
Jakob Botsch Nielsen [Thu, 17 Feb 2022 19:36:02 +0000 (20:36 +0100)]
Add retries to SPMI download (#65516)

2 years agoClear GC info when consuming GT_PUTARG_SPLIT nodes (#65432)
Jakob Botsch Nielsen [Thu, 17 Feb 2022 19:22:10 +0000 (20:22 +0100)]
Clear GC info when consuming GT_PUTARG_SPLIT nodes (#65432)

Fix #65395

2 years agoFix ping tests on OSX (#65508)
Radek Zikmund [Thu, 17 Feb 2022 18:02:06 +0000 (19:02 +0100)]
Fix ping tests on OSX (#65508)

Test against both IPv4 and IPv6 addresses when pinging using "localhost" hostname

2 years agoAdd Nullable.GetValueRefOrDefaultRef API (#64677)
Sergio Pedri [Thu, 17 Feb 2022 17:53:08 +0000 (18:53 +0100)]
Add Nullable.GetValueRefOrDefaultRef API (#64677)

* Update Nullable.cs

* Add Nullable.GetValueRefOrDefaultRef tests

* Update XML docs

Co-Authored-By: Stephen Toub <stoub@microsoft.com>
* Add unit test for writes to null T? instance

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2 years agoDisable R2R code for all associated components of a composite image (#65482)
David Wrighton [Thu, 17 Feb 2022 17:22:57 +0000 (09:22 -0800)]
Disable R2R code for all associated components of a composite image (#65482)

- When loading a composite image, capture the detail that the composite image code cannot be used into the NativeImage structure, and flow that data into all associated ReadyToRunInfo structures.

Fixes #61471

2 years agoUse `push` for 8/12 byte struct args on x86 (#65387)
SingleAccretion [Thu, 17 Feb 2022 17:18:35 +0000 (20:18 +0300)]
Use `push` for 8/12 byte struct args on x86 (#65387)

* Refactor struct PUTARG_STK codegen

Two changes:

 1) Outline cases for GC pointers from "genPutStructArgStk" into
    their own functions. Helps with readability, will be used in
    the substative portion of the change.
 2) Do not use "Kind::Push" for a case of a struct less than 16
    bytes in size, that does not have GC pointers, on x86. With
    this, we will now always call "genStructPutArgUnroll" for
    the "Unroll" kind. This means "genAdjustStackForPutArgStk"
    has to special-case that. This will go away in the final
    version of the change.

No diffs on x86 or Unix-x64 (the only two affected platforms).

* Remove the LSRA quirk

We're not using XMMs on the "push" path.

* Use "push" for structs less than 16 bytes in size

It is smaller and a little faster than using an XMM
register to first load and then store the struct.

* Add an assert to genStructPutArgPush

2 years agoAdding Mariner 2.0 deps project (#65442)
Nikola Milosavljevic [Thu, 17 Feb 2022 16:37:12 +0000 (08:37 -0800)]
Adding Mariner 2.0 deps project (#65442)

2 years agoAdd xargs for dotnet format command (#65090)
Jeremy Koritzinsky [Thu, 17 Feb 2022 15:48:53 +0000 (07:48 -0800)]
Add xargs for dotnet format command (#65090)

* Add xargs for dotnet format command

This is needed to correctly pass the file names to `dotnet format`

* Update eng/formatting/format.sh

2 years agoMove MacCatalyst arm64 leg definitions from runtime-staging to runtime-extra-platform...
Maxim Lipnin [Thu, 17 Feb 2022 15:03:18 +0000 (18:03 +0300)]
Move MacCatalyst arm64 leg definitions from runtime-staging to runtime-extra-platforms pipeline (#65427)

It's a follow-up on #64452.

The change is to move MacCatalyst Arm64 legs (basic and sandbox-enabled) from runtime-staging to runtime-extra-platforms pipeline. Those legs will be available for manual per-PR run as we have enough devices for that.

2 years agoAdd @teo-tsirpanis to community triagers (#65503)
Eirik Tsarpalis [Thu, 17 Feb 2022 13:06:33 +0000 (13:06 +0000)]
Add @teo-tsirpanis to community triagers (#65503)

2 years ago[wasm] HTTP tests on NodeJS (#65303)
Marek Fišera [Thu, 17 Feb 2022 13:06:17 +0000 (14:06 +0100)]
[wasm] HTTP tests on  NodeJS (#65303)

- Use `node-fetch` and `node-abort-controller` polyfills.
- Always use `node_fs` on node in `fetch_like` to get runtime assets.
- Disable tests that are not supported on node.

2 years agoRemove OpenSSL error queue checking after initialization (#65435)
Radek Zikmund [Thu, 17 Feb 2022 12:13:23 +0000 (13:13 +0100)]
Remove OpenSSL error queue checking after initialization (#65435)

2 years agoProcess.Unix: reap all processes when running as pid 1. (#65061)
Tom Deseyn [Thu, 17 Feb 2022 12:01:28 +0000 (13:01 +0100)]
Process.Unix: reap all processes when running as pid 1. (#65061)

* Process.Unix: reap all processes when running as pid 1.

pid 1 (the init daemon) is responsible for reaping orphaned children.
Because containers usually don't have an init daemon .NET may be pid 1.

* pal_signal: also use g_pid when raising signal.

2 years ago[wasm][debugger] Fix exceptions on eval (#64374)
Ilona Tomkowicz [Thu, 17 Feb 2022 11:22:39 +0000 (12:22 +0100)]
[wasm][debugger] Fix exceptions on eval (#64374)

* Fixed surfacing ReturnAsError exceptions to browser and VS.

* Added stack trace to the custom exception.

* Update src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs

Typo fix, thanks @lewing.

Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Removed unnecessary changes.

* Refactor.

* Restored exception throwing on both null arguments.

* Update src/mono/wasm/debugger/BrowserDebugProxy/EvaluateExpression.cs

Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Applied @radical suggestions.

* Getter fix.

* Arguments reduction.

* Remove IsErr.

Co-authored-by: Larry Ewing <lewing@microsoft.com>
2 years agoRemove dead code in illink.targets (#65494)
Viktor Hofer [Thu, 17 Feb 2022 10:54:31 +0000 (11:54 +0100)]
Remove dead code in illink.targets (#65494)

That target still gets executed but as `ILLinkTrimAssembly` doesn't get set anymore by binplacing and instead in the libs's Directory.Build.targets file, it doesn't serve a purpose anymore.

2 years ago[main] Update dependencies from dotnet/linker (#65374)
dotnet-maestro[bot] [Thu, 17 Feb 2022 09:35:09 +0000 (10:35 +0100)]
[main] Update dependencies from dotnet/linker (#65374)

* Update dependencies from https://github.com/dotnet/linker build 20220214.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22107.1 -> To Version 7.0.100-1.22114.1

* Update dependencies from https://github.com/dotnet/linker build 20220215.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22107.1 -> To Version 7.0.100-1.22115.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoFix verification of open delegates (#65425)
Jan Kotas [Thu, 17 Feb 2022 08:08:03 +0000 (00:08 -0800)]
Fix verification of open delegates (#65425)

Fixes #65010

2 years agoAvoid additional AssemblyInfo output file (#65465)
Viktor Hofer [Thu, 17 Feb 2022 07:57:36 +0000 (08:57 +0100)]
Avoid additional AssemblyInfo output file (#65465)

Avoid the additional AssemblyInfo file which is placed under
"$(IntermediateOutputPath)_AssemblyInfo.cs/vb" and remove the
"_WriteNonStringAssemblyInfoAttributes" target that isn't necessary
anymore now that msbuild supports specifying assembly attributes with
non string types.
https://github.com/dotnet/msbuild/commit/c4cda20d0720ba3d467df7ef487b63f79eb848a0

2 years agoMorph `Vector.Create(0)` to `Vector.Zero` (#63821)
Will Smith [Thu, 17 Feb 2022 07:53:58 +0000 (23:53 -0800)]
Morph `Vector.Create(0)` to `Vector.Zero` (#63821)

* Initial work

* Added a comma to display

* Cleanup

* Fixing build

* More cleanup

* Update comment

* Update comment

* Added CompareEqual Vector64/128 with Zero tests

* Do not contain op1 for now

* Wrong intrinsic id used

* Removing generated tests

* Removing generated tests

* Added CompareEqual tests

* Supporting containment for first operand

* Fix test build

* Passing correct register

* Check IsVectorZero before not allocing a register

* Update comment

* Fixing test

* Minor format change

* Fixed formatting

* Renamed test

* Adding AdvSimd_Arm64 tests:

* Adding support for rest of 'cmeq' and 'fcmeq' instructions

* Removing github csproj

* Minor test fix

* Fixed tests

* Fix print

* Minor format change

* Fixing test

* Initial commit for Vector.Create to Vector.Zero normalization

* Added some emitter tests

* Feedback

* Update emitarm64.cpp

* Feedback

* Handling variations of Vector.Create

* Use Operands iterator instead of edges

* Fix condition

* Simplify

* format

* Fixed IsFloatPositiveZero

* Uncomment

* Updated tests to include Vector64.Create/Vector128.Create for ARM64

* Making implementation of IsFloatPositiveZero explicit

* Update src/coreclr/jit/gentree.cpp

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
* Feedback

* Update comment

* Update comment

* Do not perform optimization when VN CSE phase

* use ResetHWIntrinsicId

* Assert !optValnumCSE_phase

* Simplify IsVectorZero

* Simplify IsVectorZero

* Simplify some uses of Vector*_get_Zero

* Added another test

* Fixed formatting

* Revert lowering removal

* Update gentree.h

* Feedback

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
2 years agoFix OP_FMAX an OP_FMIN on amd64 and lift the arch limitation (#65445)
Fan Yang [Thu, 17 Feb 2022 04:07:52 +0000 (23:07 -0500)]
Fix OP_FMAX an OP_FMIN on amd64 and lift the arch limitation (#65445)

2 years agoAdd reminder for package authoring (#65480)
Dan Moseley [Thu, 17 Feb 2022 03:32:54 +0000 (20:32 -0700)]
Add reminder for package authoring (#65480)

2 years ago[JIT] More ARM64 comparison instruction optimizations with Vector.Zero (#64783)
Will Smith [Thu, 17 Feb 2022 02:32:20 +0000 (18:32 -0800)]
[JIT] More ARM64 comparison instruction optimizations with Vector.Zero   (#64783)

* Normalizing instructions with an implicit vector zero as the second operand

* Checking number of operands before looking at opernads

* Remove assert

* Check commutative flag

* Fixed commutative check

* Handling more HW intrinsics

* Finishing up

* Finishing up

* Formatting

* numOperands = 1

* Feedback

* Added HW_Flag_SupportsContainmentZero

* Added extra assert

* Removing flag and simplifying codegen for containment with zeros

2 years ago[mono][interp] Add checks for interpreter stack overflow. (#65315)
Zoltan Varga [Thu, 17 Feb 2022 02:02:19 +0000 (21:02 -0500)]
[mono][interp] Add checks for interpreter stack overflow. (#65315)

These could show up as random crashes esp. on wasm.

2 years ago[mono][jit] Compute the type of generic context used by static virtual calls properly...
Zoltan Varga [Thu, 17 Feb 2022 02:01:08 +0000 (21:01 -0500)]
[mono][jit] Compute the type of generic context used by static virtual calls properly. (#65459)

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

2 years agoupdate SSL tests to deal better with disabled protocols (#65120)
Tomas Weinfurt [Thu, 17 Feb 2022 01:26:59 +0000 (17:26 -0800)]
update SSL tests to deal better with disabled protocols (#65120)

* update SSL tests to deal better with disabled protocols

* Improve detection of Null encryption on Windows

* update expectation for Mismatched protocols

* update detection

* wrap win32 exception

* update ProtocolMismatchData sets

* remove debug print

* final cleanup

* generate mismatch data

* avoid SslProtocols.Default

2 years agoDisable component governance for musl runs (#65454)
Andy Gocke [Thu, 17 Feb 2022 01:20:00 +0000 (17:20 -0800)]
Disable component governance for musl runs (#65454)

2 years agoRemove or move some expensive low-value testing (#65453)
Andy Gocke [Thu, 17 Feb 2022 01:19:29 +0000 (17:19 -0800)]
Remove or move some expensive low-value testing (#65453)

When PGO was added, I added it in PR as well just to help with monitoring
At this point it's very stable and expensive to run, so we should probably move it out.

Single-file is still tested in our unit tests, but these runs were mainly to test the
compatibility of APIs with single-file. We've found that the analyzer does a pretty good
job of verifying that without testing, and we still have verification via NativeAOT, which
I think is a superset of the testing as a whole.

2 years agoFix PerformanceCounter's when running with Globalization Invariant Mode (#65414)
Tarek Mahmoud Sayed [Thu, 17 Feb 2022 00:54:55 +0000 (16:54 -0800)]
Fix PerformanceCounter's when running with Globalization Invariant Mode (#65414)

2 years ago[wasm] Disable aot tests failing due to OOM (#65413)
Ankit Jain [Thu, 17 Feb 2022 00:40:13 +0000 (19:40 -0500)]
[wasm] Disable aot tests failing due to OOM (#65413)

* [wasm] Disable aot tests failing due to OOM

- https://github.com/dotnet/runtime/issues/65356 - OOM while linking
    `System.Text.Json.SourceGeneration.Roslyn3.11.Tests`

- https://github.com/dotnet/runtime/issues/65411 - possible OOM when
  compiling `System.Text.Json.SourceGeneration.Roslyn4.0.Tests.dll.bc` -> `.o`
     `System.Text.Json.SourceGeneration.Roslyn4.0.Tests`

- https://github.com/dotnet/runtime/issues/61524 - OOM while linking
    `System.Text.Json.Tests`

* Disable System.Collections.Immutable.Tests due to #65335

2 years ago[MAUI][PERF] Reenable Maui w/o package injection (#65409)
Parker Bibus [Wed, 16 Feb 2022 23:56:21 +0000 (17:56 -0600)]
[MAUI][PERF] Reenable Maui w/o package injection (#65409)

* Reenable stuff for android startup.

* Disable package replacement and temporarily most of the perf.yml files.

* Reenable full perf.yml for final test.

2 years ago[LoongArch64] add gc directory for LoongArch64. (#63071)
Qiao Pengcheng [Wed, 16 Feb 2022 22:08:13 +0000 (06:08 +0800)]
[LoongArch64] add gc directory for LoongArch64. (#63071)

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years agoMerge a couple NativeAOT smoke tests (#65426)
Michal Strehovský [Wed, 16 Feb 2022 22:07:57 +0000 (07:07 +0900)]
Merge a couple NativeAOT smoke tests (#65426)

Shaves off a couple dozen seconds of test build time.

2 years ago[LoongArch64] add the `coreclr/unwinder/loongarch64` from the #62979. (#63489)
Qiao Pengcheng [Wed, 16 Feb 2022 20:34:06 +0000 (04:34 +0800)]
[LoongArch64] add the `coreclr/unwinder/loongarch64` from the #62979. (#63489)

* [LoongArch64] add the `coreclr/unwinder/loongarch64` from the #62979.

* [LoongArch64] replace the `__in` with `_In_`.

* [LoongArch64] update the version of the `LICENSE description`.

* [LoongArch64] update the macro-define for crossgen2.

* [LoongArch64] amend the comment notes.

Co-authored-by: qiaopengcheng <qiaopengcheng-hf@loongson.cn>
2 years agoProposed changes to ECMA 335 for ref field support (#63659)
David Wrighton [Wed, 16 Feb 2022 20:16:04 +0000 (12:16 -0800)]
Proposed changes to ECMA 335 for ref field support (#63659)

* Initial proposed changes for ref fields

* Fix end of line issue

* Update docs/design/specs/Ecma-335-Augments.md

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
* Update local signature wording

Co-authored-by: Aaron Robinson <arobins@microsoft.com>
2 years agoGracefully emit a diagnostic when the GeneratedDllImport attribute didn't parse quite...
Jeremy Koritzinsky [Wed, 16 Feb 2022 19:51:17 +0000 (11:51 -0800)]
Gracefully emit a diagnostic when the GeneratedDllImport attribute didn't parse quite right and we don't have a valid AttributeData object (#65344)

2 years ago[main] Update dependencies from 9 repositories (#65252)
dotnet-maestro[bot] [Wed, 16 Feb 2022 19:00:47 +0000 (11:00 -0800)]
[main] Update dependencies from 9 repositories (#65252)

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , 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.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.22110.7 -> To Version 2.5.1-beta.22111.10

* Update dependencies from https://github.com/dotnet/emsdk build 20220211.1

Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.0-alpha.2.22104.1 -> To Version 7.0.0-alpha.2.22111.1

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220212.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22112.1

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

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

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220213.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22113.1

* Set warnaserror false for send to helix steps

* PR Feedback

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , 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.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.22110.7 -> To Version 2.5.1-beta.22114.7

* Update dependencies from https://github.com/dotnet/icu build 20220214.1

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 7.0.0-preview.2.22107.1 -> To Version 7.0.0-preview.2.22114.1

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.22110.1 -> To Version 1.0.0-prerelease.22114.1

* Update dependencies from https://github.com/dotnet/runtime-assets build 20220215.1

Microsoft.DotNet.CilStrip.Sources , System.ComponentModel.TypeConverter.TestData , System.Drawing.Common.TestData , System.IO.Compression.TestData , System.IO.Packaging.TestData , System.Net.TestData , System.Private.Runtime.UnicodeData , System.Runtime.Numerics.TestData , System.Runtime.TimeZoneData , System.Security.Cryptography.X509Certificates.TestData , System.Text.RegularExpressions.TestData , System.Windows.Extensions.TestData
 From Version 7.0.0-beta.22107.1 -> To Version 7.0.0-beta.22115.1

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220214.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22114.1

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

Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
 From Version 1.0.2-alpha.0.22107.2 -> To Version 1.0.2-alpha.0.22114.2

* Update dependencies from https://github.com/dotnet/llvm-project build 20220214.2

runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk , runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
 From Version 11.1.0-alpha.1.22107.4 -> To Version 11.1.0-alpha.1.22114.2

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

Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework , 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.XUnitExtensions , Microsoft.DotNet.GenAPI , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.GenFacades , Microsoft.DotNet.SharedFramework.Sdk , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk
 From Version 2.5.1-beta.22110.7 -> To Version 2.5.1-beta.22114.7

* Update dependencies from https://github.com/dotnet/icu build 20220215.2

Microsoft.NETCore.Runtime.ICU.Transport
 From Version 7.0.0-preview.2.22107.1 -> To Version 7.0.0-preview.3.22115.2

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20220215.3

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.22109.1 -> To Version 7.0.0-preview1.22115.3

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
Co-authored-by: Juan Hoyos <juan.s.hoyos@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
2 years agoAdd linux-musl entry for FALLBACK_HOST_RID (#65339)
Adeel Mujahid [Wed, 16 Feb 2022 18:43:41 +0000 (20:43 +0200)]
Add linux-musl entry for FALLBACK_HOST_RID (#65339)

* Add linux-musl entry for FALLBACK_HOST_RID

* Stay consistent about host vs. target

* Classify linux-musl agnostic of distro

2 years agoSeparate capturing from normal states (#65340)
Olli Saarikivi [Wed, 16 Feb 2022 18:01:46 +0000 (10:01 -0800)]
Separate capturing from normal states (#65340)

This reduces memory usage for NonBacktracking to what it was before capturing support.

2 years agoExplicitly check for TTL expiration when using Ping utility (#65312)
Radek Zikmund [Wed, 16 Feb 2022 15:01:16 +0000 (16:01 +0100)]
Explicitly check for TTL expiration when using Ping utility (#65312)

* Explicitly check for TTL expiration when using Ping utility

* Fixes

* Improve the implementation

2 years agoHosting: ConfigDoesReload tests: increase timeout. (#64976)
Tom Deseyn [Wed, 16 Feb 2022 10:50:23 +0000 (11:50 +0100)]
Hosting: ConfigDoesReload tests: increase timeout. (#64976)

2 years agoJIT: Consider local var reads to be outstanding only if they are values (#65309)
Jakob Botsch Nielsen [Wed, 16 Feb 2022 10:21:50 +0000 (11:21 +0100)]
JIT: Consider local var reads to be outstanding only if they are values (#65309)

For unused indirs off of local variables we produce GT_NULLCHECK nodes
on arm64. The "CheckLclVarSemanticsHelper" class considers indirs off of
local vars to be local var reads and record these as outstanding in this
debug check, expecting to see a later use. However GT_NULLCHECK is not a
value so we never find such a use.

It is not clear that it is correct to consider an indir off of a local
var to be an outstanding read in general, but it seems that we currently
do not see cases that trip this check, so leaving it in for now.

Fix #65307

2 years agoSuppress warnings in NativeAOT smoke tests (#65423)
Michal Strehovský [Wed, 16 Feb 2022 07:44:33 +0000 (16:44 +0900)]
Suppress warnings in NativeAOT smoke tests (#65423)

2 years agoDisable core dumps when running libraries tests on macOS (#65405)
Elinor Fung [Wed, 16 Feb 2022 02:51:06 +0000 (18:51 -0800)]
Disable core dumps when running libraries tests on macOS (#65405)

2 years agoUpdate the ConvertToGeneratedDllImport code-fix to support stripping out PreserveSig...
Jeremy Koritzinsky [Wed, 16 Feb 2022 00:49:41 +0000 (16:49 -0800)]
Update the ConvertToGeneratedDllImport code-fix to support stripping out PreserveSig and transforming the signature when PreserveSig was set to true (#65169)

2 years ago[mini] fix static virtual constrained calls in non-generic interfaces (#65390)
Aleksey Kliger (λgeek) [Wed, 16 Feb 2022 00:42:10 +0000 (19:42 -0500)]
[mini] fix static virtual constrained calls in non-generic interfaces (#65390)

if the callee interface method is not generic, but the constained constraint
uses a generic var or mvar, do the indirect interface call.

fixes https://github.com/dotnet/runtime/issues/65384

2 years agoMake sure we have GCGenerationRanges events when using Generation-Aware analysis...
Andrew Au [Wed, 16 Feb 2022 00:24:51 +0000 (16:24 -0800)]
Make sure we have GCGenerationRanges events when using Generation-Aware analysis on Linux (#65338)

2 years agoAsk helix to run tiering test when it's requested (#65359)
Michal Strehovský [Tue, 15 Feb 2022 23:48:12 +0000 (08:48 +0900)]
Ask helix to run tiering test when it's requested (#65359)

2 years agoCouple optimizations to MultiRegStoreLoc (#64857)
Egor Chesakov [Tue, 15 Feb 2022 23:33:10 +0000 (15:33 -0800)]
Couple optimizations to MultiRegStoreLoc (#64857)

* For StoreLoc prefer allocating a multireg local def in the same registers as src in src/coreclr/jit/lsrabuild.cpp

* Properly check for the last use of a field of a multi-reg local in LinearScan::BuildStoreLocDef() in src/coreclr/jit/lsrabuild.cpp

2 years ago[mono][llvm] Add missing OP_RCONV_TO_I opcode. (#65389)
Zoltan Varga [Tue, 15 Feb 2022 23:12:40 +0000 (18:12 -0500)]
[mono][llvm] Add missing OP_RCONV_TO_I opcode. (#65389)

2 years agoEnsure that tls_destructionMonitor is initialized if a thread is attached to the...
Vladimir Sadov [Tue, 15 Feb 2022 22:33:05 +0000 (14:33 -0800)]
Ensure that tls_destructionMonitor is initialized if a thread is attached to the runtime. (#65358)

* Ensure that tls_destructionMonitor is initialized if a thread is attached to the runtime.

* relax the assert

* no call to `EnsureTlsDestructionMonitor` on unsetting a thread.

* remove obsolete comment

2 years ago[wasm] Clean unused files from emsdk when provisioning (#65116)
Larry Ewing [Tue, 15 Feb 2022 22:02:41 +0000 (16:02 -0600)]
[wasm] Clean unused files from emsdk when provisioning (#65116)

* Clean unused files from emsdk

* Add the ability to update npm instead

2 years ago[Android] Fix leftover direct invocation of clock_nanosleep (#65373)
Simon Rozsival [Tue, 15 Feb 2022 21:53:07 +0000 (22:53 +0100)]
[Android] Fix leftover direct invocation of clock_nanosleep (#65373)

This is a follow-up of #64679

I realized that one invocation of `clock_nanosleep` wasn't replaced with `g_clock_nanosleep`.

2 years agoUpdate library dependencies to the latest (#65381)
Viktor Hofer [Tue, 15 Feb 2022 21:27:19 +0000 (22:27 +0100)]
Update library dependencies to the latest (#65381)

* Update library dependencies to the latest

* Update ILCompiler.Reflection.ReadyToRun.csproj

2 years agoIncorporate review feedback from #64646 (#65376)
Eirik Tsarpalis [Tue, 15 Feb 2022 21:02:39 +0000 (21:02 +0000)]
Incorporate review feedback from #64646 (#65376)

* Incorporate review feedback from
#64646

* Prevent trimming of unused CachingContext.Count method

* use correct syntax for nested types

2 years agoChange SslStream's internal adapter interface to use static abstract interface method...
Stephen Toub [Tue, 15 Feb 2022 20:33:41 +0000 (15:33 -0500)]
Change SslStream's internal adapter interface to use static abstract interface methods (#65239)

* Use static abstract interface methods in Ssl/NegotiateStream adapters

* Remove unnecessary argument from a bunch of methods

It's only used to add duplicative information to an exception message, and in doing so it makes the async methods it's used in more expensive.

2 years agoImprove regex optimizations around repetitions of the same character (#65273)
Stephen Toub [Tue, 15 Feb 2022 20:32:58 +0000 (15:32 -0500)]
Improve regex optimizations around repetitions of the same character (#65273)

- For concatenations, we currently do two passes over its nodes: one that coalesces adjacent characters into strings, and one that coalesces adjacent loops.  This swaps the order so that we first coalesce adjacent loops.  We want to coalesce loops first so that we prioritize associating a One with an adjacent loop rather than with an adjacent string.  This is primarily beneficial later on for auto-atomicity.  Consider `a+ab` composed of a loop, a One 'a', and a One 'b'.  We're either going to make that into a loop `a{2,}` followed by `b` or into a loop `a+` followed by the multi `ab`.  We want to do the former, as then when we apply auto-atomicity to the `a{2,}`, we'll see that it's followed by something non-overlapping ('b'), and make the loop atomic.  In constrast, if we joined the `a` and `b`, then auto-atomicity for the `a+` would see it's followed by an `a` and it wouldn't be upgraded.
- Currently, the adjacent loop coalescing logic joins two individual One nodes with the same Ch value into a repeater.  That's actually a deoptimization, so this stops doing so.  We'd rather have `aa` be evaluated as a Multi of two characters rather than as an `a{2}` repeater, as we're able to apply better optimizations with multis, e.g. taking advantage of StartsWith for matching.
- Also in the adjacent loop logic, we're already checking for a loop followed by a one but we're not checking for a loop followed by a multi.  For the same auto-atomicity benefits discussed earlier, we want to shift any adjacent text from a multi following a loop back into the loop, as it makes it more likely we'll then be able to upgrade that loop to atomic. (We could also add logic for a multi followed by a loop, but the benefits there are less obvious.)
- When creating repeaters, we're actually better off creating multis, for the same reasons outlined earlier.  But we don't want to create massive strings in the super rare case where large repeaters for single chars are used, so we only do so up to a limit.
- When emitting generated code for a One repeater, which might be used to implement the required portion of other loops, emit it as a multi match for short enough repetitions.

2 years ago#51017 enable tests for android (#64743)
Meri Khamoyan [Tue, 15 Feb 2022 20:02:13 +0000 (00:02 +0400)]
#51017 enable tests for android (#64743)

Enables a handful of suites that were previously skipped due to https://github.com/dotnet/runtime/issues/51017

2 years agoRemove default BuildInParallel attributes (#65378)
Viktor Hofer [Tue, 15 Feb 2022 19:45:46 +0000 (20:45 +0100)]
Remove default BuildInParallel attributes (#65378)

Cleanup: Remove BuildInParallel=false attributes which are the default setting.

2 years agoEnable build of arm64 RPM packages (#65345)
Nikola Milosavljevic [Tue, 15 Feb 2022 18:37:31 +0000 (10:37 -0800)]
Enable build of arm64 RPM packages (#65345)

* Enable rpm build for Linux_arm64

* New Arcade Installers infra with Linux packaging update