platform/upstream/dotnet/runtime.git
3 years agoUse constant ids for RoArrayType GetMethodsCore (#61177)
Buyaa Namnan [Thu, 4 Nov 2021 23:10:05 +0000 (16:10 -0700)]
Use constant ids for RoArrayType GetMethodsCore (#61177)

3 years agoimproved BDD Unicode table representation in NonBacktracking engine (#61142)
Margus Veanes [Thu, 4 Nov 2021 23:02:32 +0000 (16:02 -0700)]
improved BDD Unicode table representation in NonBacktracking engine (#61142)

* improved BDD Unicode table representation in NonBacktracking engine

* remove line

Co-authored-by: Dan Moseley <danmose@microsoft.com>
* improved bounds-check elimination

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* clearer notation of numbers

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

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years ago[mono][interp] Fix GetType called on ptr constrained to Nullable` (#61020)
Vlad Brezae [Thu, 4 Nov 2021 21:24:26 +0000 (23:24 +0200)]
[mono][interp] Fix GetType called on ptr constrained to Nullable` (#61020)

* [interp] Fix GetType called on ptr constrained to Nullable`

We were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value).

* Add test for GetType call on ptr constrained to nullable

3 years agoApplied @marek-safar review to exit the loop once the condition is fulfilled. (#61165)
Ilona Tomkowicz [Thu, 4 Nov 2021 12:08:52 +0000 (13:08 +0100)]
Applied @marek-safar review to exit the loop once the condition is fulfilled. (#61165)

3 years agoFix Assertion failed 'ins == INS_add' for madd/msub (#61171)
Egor Bogatov [Thu, 4 Nov 2021 11:41:54 +0000 (14:41 +0300)]
Fix Assertion failed 'ins == INS_add' for madd/msub (#61171)

Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
3 years agoSet IL offsets for calls created during devirtualization (#61189)
Jakob Botsch Nielsen [Thu, 4 Nov 2021 10:34:48 +0000 (11:34 +0100)]
Set IL offsets for calls created during devirtualization (#61189)

Since inlined statements use the IL location of the inliner's statement
all statements created while inlining devirtualized calls would get no
debug info before, while normally these will have IL location pointing
to the call statement in the root.

3 years ago[arm64] JIT: Recognize sbfiz/ubfiz idioms (#61045)
Egor Bogatov [Thu, 4 Nov 2021 08:51:29 +0000 (11:51 +0300)]
[arm64] JIT: Recognize sbfiz/ubfiz idioms (#61045)

3 years ago[DllImportGenerator] Fix stub generation for char array marshalling (#61188)
Elinor Fung [Thu, 4 Nov 2021 05:49:01 +0000 (22:49 -0700)]
[DllImportGenerator] Fix stub generation for char array marshalling (#61188)

3 years agolock protect nullability cache of symbolic regex node (#60942)
Margus Veanes [Wed, 3 Nov 2021 23:55:39 +0000 (16:55 -0700)]
lock protect nullability cache of symbolic regex node (#60942)

* fixed nullability checking to be threadsafe

* use volatile write for nullability cache

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* made read of nullability cache volatile and fixed other PR comments

* made non-lock-protected reads from SymbolicRegexBuilder._delta volatile

* Apply suggestions from code review

Co-authored-by: Stephen Toub <stoub@microsoft.com>
3 years agoMake System.Security.Cryptography.X509Certificates compliant with interop guidelines...
Badre BSAILA [Wed, 3 Nov 2021 19:18:46 +0000 (20:18 +0100)]
Make System.Security.Cryptography.X509Certificates compliant with interop guidelines - part 2

Convert more of S.S.C.X509Certificates to use correct interop style.

3 years agoJIT: limited version of forward substitution for some relops (#61023)
Andy Ayers [Wed, 3 Nov 2021 18:40:28 +0000 (11:40 -0700)]
JIT: limited version of forward substitution for some relops (#61023)

Add a new optimization to redundant branch opts that looks at prior statements
in the same block for redundant relop trees. If one is found, we check to see
if it can be forward-substituted down to the terminal jump tree. And if it can
we duplicate the computation down at the jump.

This removes many of the cases we see in our generated code where we materialize
a boolean value in a register and then immediately test that register to see if
it is true/false, and then use that second test to drive branching -- instead we
now use the initial test logic to drive the jump and so the boolean value only
exists in the flags.

3 years agoUpdate SDK to 6.0 RC2 (#60256)
Viktor Hofer [Wed, 3 Nov 2021 17:09:41 +0000 (18:09 +0100)]
Update SDK to 6.0 RC2 (#60256)

Co-authored-by: Rainer Sigwald <raines@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
3 years agoRemove _validator field from ObjectCollection (#59589)
Adeel Mujahid [Wed, 3 Nov 2021 16:37:16 +0000 (18:37 +0200)]
Remove _validator field from ObjectCollection (#59589)

* Remove _validator field from ObjectCollection

* Use more specific types for fields and args

3 years agoDeduplicate tests with class name 'BringUpTest' (#61128)
Tomáš Rylek [Wed, 3 Nov 2021 15:35:36 +0000 (16:35 +0100)]
Deduplicate tests with class name 'BringUpTest' (#61128)

3 years agoDeduplicate runtime tests using the class name 'Test' (#61125)
Tomáš Rylek [Wed, 3 Nov 2021 15:35:18 +0000 (16:35 +0100)]
Deduplicate runtime tests using the class name 'Test' (#61125)

3 years agoFix invalid optimization of (-1 * -A) + A (#61091)
Jakob Botsch Nielsen [Wed, 3 Nov 2021 15:15:57 +0000 (16:15 +0100)]
Fix invalid optimization of (-1 * -A) + A (#61091)

We were hitting both transforms in this block, but the first transform
changes the node from GT_ADD to GT_SUB, while the second transform is
valid only for GT_ADD. It is difficult to have natural code that hits
both of these transforms, so I have just made them mutually exclusive
instead of rechecking the oper in the second one.

No SPMI diffs.

Fix #61077

3 years agoCredential fixes (#61114)
Jan Jahoda [Wed, 3 Nov 2021 14:05:01 +0000 (15:05 +0100)]
Credential fixes (#61114)

* fix HttpClientHandlerTest.RemoteServer.cs

* fix HttpClientHandlerTest.Authentication.cs

* fix HttpClientHandlerTest.cs

3 years ago[wasm][debugger]Add hidden attribute support (#61143)
Ilona Tomkowicz [Wed, 3 Nov 2021 13:17:36 +0000 (14:17 +0100)]
[wasm][debugger]Add hidden attribute support (#61143)

* Draft of hidden attribute decorator use.

* Removed checking custom attributes in the runtime each time the breakpoint is set and moved it to the constructor which is more efficient.

* Added test for DebuggerHidden decorator.

* By adding a line: using System.Diagnostics; IntAdd method moved down one line what resulted in CreateGoodBreakpoint tests failures. All row numbers in these tests had to be incremented.

* Reverted edition of tests not connected with HiddenAttribute.

* Added visible method to the HiddenAttribute test.

* Applying thaystg review suggestion.

3 years agoAllow nfloat to be in the ObjCRuntime namespace, and make it work for Xamarin.MacCata...
Rolf Bjarne Kvinge [Wed, 3 Nov 2021 11:45:27 +0000 (12:45 +0100)]
Allow nfloat to be in the ObjCRuntime namespace, and make it work for Xamarin.MacCatalyst.dll as well. (#60854)

Ref: https://github.com/xamarin/xamarin-macios/pull/13092
Ref: https://github.com/mono/mono/pull/21261

3 years agoSkip sys/sysctl.h on linux in mono (#61110)
Adeel Mujahid [Wed, 3 Nov 2021 10:15:41 +0000 (12:15 +0200)]
Skip sys/sysctl.h on linux in mono (#61110)

Fixes three warnings:
```sh
  [ 56%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-mmap.c.o
  In file included from /runtime/src/mono/mono/utils/mono-mmap.c:23:
  /usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
     21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
        |  ^~~~~~~
# snip
  [ 59%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-time.c.o
  In file included from /runtime/src/mono/mono/utils/mono-proclib.c:42:
  /usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
     21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
        |  ^~~~~~~
  [ 59%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-uri.c.o
  [ 59%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-poll.c.o
  In file included from /runtime/src/mono/mono/utils/mono-time.c:107:
  /usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
     21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
        |  ^~~~~~~
```

With this PR: 0 warnings - http://sprunge.us/96kyq9

Like in src/libraries/Native, skip linux from sys/sysctl.h check. For other systems, `check_include_files` (instead of `check_include_file` (singular)) when a header depends on another one.

Also, simplified few conditions: "is linux" check supersedes "is android".

3 years ago[wasm] simplify startup configuration (#61072)
Pavel Savara [Wed, 3 Nov 2021 08:46:57 +0000 (09:46 +0100)]
[wasm] simplify startup configuration (#61072)

* added configSrc - path to MonoConfig json file
* added Module.onConfigLoaded callback
* added Module.onDotNetReady replacing MonoConfig.loaded_cb
* removed loaded_cb, assembly_list, runtime_assets, runtime_asset_sources from MonoConfig
* simplified all sample and test projects
* renamed no_global_exports to disableDotNet6Compatibility
* implement default Module.preInit and Module.onRuntimeInitialized which could be overriden by user code (like Blazor)

* re-enable the interp lane

3 years agoAdd TFM and version support query to marshaller interface. (#61064)
Aaron Robinson [Wed, 3 Nov 2021 04:27:34 +0000 (21:27 -0700)]
Add TFM and version support query to marshaller interface. (#61064)

* Add TFM and version support query to marshaller interface.

* If any marshaller fails to support the current tfm version, fallback
to using the built-in DllImport attribute.

* Add tests for fallback generation on downlevel or generation if marshallers
  are supported on the target framework.

* Convert CreateCompilationWithReferenceAssemblies to CreateCompilation overload.

Co-authored-by: Elinor Fung <elfung@microsoft.com>
3 years agoRemove setting CallingConvention field on GeneratedDllImport (#61130)
Elinor Fung [Wed, 3 Nov 2021 04:07:16 +0000 (21:07 -0700)]
Remove setting CallingConvention field on GeneratedDllImport (#61130)

3 years agoRemove dead code in src/coreclr/jit (#61129)
Egor Chesakov [Wed, 3 Nov 2021 03:47:26 +0000 (20:47 -0700)]
Remove dead code in src/coreclr/jit (#61129)

3 years agoFix refcount when a composite r2r image is loaded from a bundle (#61066)
Vladimir Sadov [Wed, 3 Nov 2021 01:29:05 +0000 (18:29 -0700)]
Fix refcount when a composite r2r image is loaded from a bundle (#61066)

* Fix refcount when a composite r2r image is loaded from a bundle

* PR feedback - better comments.

3 years agoMake QCalls respect the EntryPoint property (#60992)
Jeremy Koritzinsky [Tue, 2 Nov 2021 23:37:18 +0000 (16:37 -0700)]
Make QCalls respect the EntryPoint property (#60992)

Co-authored-by: Elinor Fung <elfung@microsoft.com>
3 years agoAdd back SoD Blazor Pizza Aot test (#61118)
Drew Scoggins [Tue, 2 Nov 2021 22:51:49 +0000 (15:51 -0700)]
Add back SoD Blazor Pizza Aot test (#61118)

3 years agoSwitch to run only smoke tests per PR for apple mobile configurations (#61108)
Steve Pfister [Tue, 2 Nov 2021 21:48:17 +0000 (14:48 -0700)]
Switch to run only smoke tests per PR for apple mobile configurations (#61108)

Contributes to #61017

3 years agoFix: Incorrect order of checks for TypeBuilder `GetConstructor` and `GetField` method...
Bartosz Klonowski [Tue, 2 Nov 2021 21:38:36 +0000 (22:38 +0100)]
Fix: Incorrect order of checks for TypeBuilder `GetConstructor` and `GetField` method (#53645)

* Reorder checks for TypeBuilder.GetConstructor()

* Reorder checks for TypeBuilder.GetField()

* Adjust unit test to reordered TypeBuilder checks

* Use 'not' keyword for pattern matching

* Apply the same Type checks for Mono

GetConstructor and GetField had the same incorrect checks order
comparing to GetMethod as in the CoreCLR.
To keep the consistent solution, Mono has also been adjusted.

* Check whether a declaring type isn't type's generic definition

* Make generic type if contains generic parameters

* Suppres UnrecognizedReflectionPattern for GetField and GetConstructor

* Move GetMethodType validation method at original order

* Test GetConstructor against throwing an exception

* Fix: copy-paste error  'type' -> 'constructor'

* Align Mono and CoreCLR with nameof for GetConstructor

* Use type for argument exception and test against type parameter

* Get tests passing on both coreclr and mono.

Ensure checks are consistent across GetConstructor, GetField, and GetMethod for both coreclr and mono.

* Fix mono exception messages to use SR resources.

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
3 years ago[wasm] Disable failing System.Security.Cryptography tests due to http… (#61102)
Ankit Jain [Tue, 2 Nov 2021 21:02:08 +0000 (21:02 +0000)]
[wasm] Disable failing System.Security.Cryptography tests due to http… (#61102)

#61099

3 years agoDisable couple of randomly failing PerformanceCounter tests (#61101)
Krzysztof Wicher [Tue, 2 Nov 2021 20:30:22 +0000 (21:30 +0100)]
Disable couple of randomly failing PerformanceCounter tests (#61101)

* Disable couple of randomly failing PerformanceCounter tests

* fix: disabled the wrong test

3 years ago[wasm] Re-enable source generator tests failing due to OOM (#60701)
Ankit Jain [Tue, 2 Nov 2021 20:16:25 +0000 (20:16 +0000)]
[wasm] Re-enable source generator tests failing due to OOM (#60701)

This adds support for setting per-project optimization flags, and sets them for these projects so they don't OOM.

Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests
Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests
System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests
System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests
System.Text.RegularExpressions.Generators.Tests
Some individual ones are disabled due to
#58226, and #60899 .

Additionally, if a AOT build fails, then on linux it dumps the last few lines from dmesg, to help identify it was an oom-kill.

Fixes #51961 .

Co-authored-by: Larry Ewing <lewing@microsoft.com>
3 years ago[arm64] JIT: Fold "A * B + C" to MADD/MSUB (#61037)
Egor Bogatov [Tue, 2 Nov 2021 18:10:23 +0000 (21:10 +0300)]
[arm64] JIT: Fold "A * B + C" to MADD/MSUB (#61037)

3 years agoRemoved two unused packages from .vsconfig (#60798)
Steve Dunn [Tue, 2 Nov 2021 16:40:45 +0000 (16:40 +0000)]
Removed two unused packages from .vsconfig (#60798)

These packages are unused as described in #60794

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
3 years agoThrowing `FormatException` when a required property from `Microsoft.Extensions.Depend...
Filip [Tue, 2 Nov 2021 16:10:39 +0000 (17:10 +0100)]
Throwing `FormatException` when a required property from `Microsoft.Extensions.DependencyModel` is empy (#60842)

* Setting framework name as nullable.

* Setting path to nullable.

* Setting runtime to nullable.

* Setting path to nullable.

* Setting Target Name, RuntimeTargetEntrySub Path and TargetLibrary Name as nullable (string) properties.

* Adding missing line of code.

* Adding new string resource and throwing argument exception on null/empty values.
Adding unit tests to check for specific null/empty value cases

* Removing Argument from string resource.
Updating PR according to comments

* Updating unit tests to use FormatException

* Rollback of ArgumentExceptions in DependencyModels

* Added missing usings

* Updating all exceptions to FormatException

* Moving FormatException while reading target name

* Updating PR with new comments.

* Update src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs

3 years agoHTTP2 loopback server WaitForCancellationAsync should validate error code sent (...
Badre BSAILA [Tue, 2 Nov 2021 15:55:17 +0000 (16:55 +0100)]
HTTP2 loopback server WaitForCancellationAsync should validate error code sent (#59313)

HTTP2 loopback server WaitForCancellationAsync should validate error code sent

3 years agoFix gcc warnings during mono linux-x64 build (#60675)
Adeel Mujahid [Tue, 2 Nov 2021 15:47:37 +0000 (17:47 +0200)]
Fix gcc warnings during mono linux-x64 build (#60675)

* Fix gcc warnings during mono linux-x64 build

main with Debug configuration: 822 warnings - http://sprunge.us/2GzrDE
PR with Debug configuration: 3 warnings related to deprecated sys/sysctl.h includes - http://sprunge.us/JuyA3K

after fixing Debug warnings, there were 13 additional warnings in Release configuration:
http://sprunge.us/PJCivP

PR with Release configuration: (same) 3 warnings - http://sprunge.us/NwKHNE

* Address CR feedback

3 years agoAvoid bogus cred scanning hits (#61070)
Dan Moseley [Tue, 2 Nov 2021 14:39:28 +0000 (08:39 -0600)]
Avoid bogus cred scanning hits (#61070)

* Remove quasi passwords

* oops

3 years agorevert 58594 CacheCredential change (#61069)
Tomas Weinfurt [Tue, 2 Nov 2021 14:36:53 +0000 (07:36 -0700)]
revert 58594 CacheCredential change (#61069)

3 years agoTemporarily disable scaled index on arm64 (#61090)
Egor Bogatov [Tue, 2 Nov 2021 12:17:47 +0000 (15:17 +0300)]
Temporarily disable scaled index on arm64 (#61090)

3 years agoBring up full library test CI runs on iOS / tvOS devices (#59503)
Steve Pfister [Tue, 2 Nov 2021 11:43:15 +0000 (04:43 -0700)]
Bring up full library test CI runs on iOS / tvOS devices (#59503)

This change enables device runs on CI by building each test app on the helix instance it was deployed to. In past attempts, we looked at enhancing what takes place on the build machine via build tricks, compressing / cleaning up files early, etc and we could not overcome the need for excessively long timeouts and far more disk space.

The change also adopts the patterns established in the wasm test build, giving us the opportunity to support different scenario runs as well as workloads testing in the future.

3 years agoSome VN refactoring (#61034)
SingleAccretion [Tue, 2 Nov 2021 11:16:58 +0000 (14:16 +0300)]
Some VN refactoring (#61034)

* Remove "block" from VNApplySelectorsAssign

It was unused and all the callers passed the current block anyway.

Also some renaming to make Assign and AssignTypeCoerce methods consistent.

* Improve the readability of VNForMapStore

By naming parameters properly.

* Improve the readability of VNForMapSelect

By naming parameters properly.

* Pull ASG numbering out of fgValueNumberTree

In my upcoming substantive changes to this code the unreasonable level
of nesting started to significantly degrade the readability of code.

So, move it out of the main numbering function. The result is still
pretty huge and could be split up further, but this will do for now.

* Refactor VNApplySelectors

Make it use a loop instead of recursion.

Rename parameters to match the "Assign" variants.

Add standard header comments.

3 years agoFix typo in profiler method (#60999)
David Mason [Tue, 2 Nov 2021 10:18:11 +0000 (03:18 -0700)]
Fix typo in profiler method (#60999)

3 years ago[arm64] JIT: Fix IsContainableImmed for arm64 v8.1 or higher (#61035)
Egor Bogatov [Tue, 2 Nov 2021 09:33:15 +0000 (12:33 +0300)]
[arm64] JIT: Fix IsContainableImmed for arm64 v8.1 or higher (#61035)

3 years ago[main] Update dependencies from 6 repositories (#61033)
dotnet-maestro[bot] [Tue, 2 Nov 2021 08:26:59 +0000 (09:26 +0100)]
[main] Update dependencies from 6 repositories (#61033)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoSeed the unified System.Security.Cryptography.dll
Jeremy Barton [Tue, 2 Nov 2021 05:30:26 +0000 (22:30 -0700)]
Seed the unified System.Security.Cryptography.dll

* All of System.Security.Cryptography.Primitives has been moved
* AsymmericKeyExchangeFormatter moved from S.S.C.Algorithms
* This just starts the process to keep the infrastructure pieces separate from code layout pieces.

3 years agodisable sending NT Authority in TLS handshake if specific trust was specified (#60988)
Tomas Weinfurt [Tue, 2 Nov 2021 05:20:53 +0000 (22:20 -0700)]
disable sending NT Authority in TLS handshake if specific trust was specified (#60988)

* diable sending NT Authority if specific trust was specified

* feedback from review

* add missing file

* Apply suggestions from code review

Co-authored-by: Cory Nelson <phrosty@gmail.com>
* one more style update

Co-authored-by: Cory Nelson <phrosty@gmail.com>
3 years agoAdd Maui iOS and MacCatalyst build steps (#61068)
Parker Bibus [Tue, 2 Nov 2021 04:48:05 +0000 (23:48 -0500)]
Add Maui iOS and MacCatalyst build steps (#61068)

* Fix artifact match string.

* Completed first attempt for a complete Maui SOD run. Added ios_scenarios tests, setup file copies, uploads, and downloads; and setup perf branch to use as partner testing branch.

* Reset performance-setup.ps1 file to use main perf branch.

* Reenable yml jobs disabled for testing.

3 years agoAdd linux x86 build CI for pull request (#60817)
Dong-Heon Jung [Tue, 2 Nov 2021 04:25:56 +0000 (13:25 +0900)]
Add linux x86 build CI for pull request (#60817)

* Add linux x86 build CI for pull request

* Fix linux x86 build error

* Fix linux x86 linking error

3 years agoMake sure smoke tests aren't run on the rolling build (#61055)
Steve Pfister [Tue, 2 Nov 2021 01:57:37 +0000 (18:57 -0700)]
Make sure smoke tests aren't run on the rolling build (#61055)

The way we were trying to use isFullMatrix was not visible to the xplat-setup template. This PR makes sure we grab the value at run time as opposed to compile time.

3 years agoValidate CompressionLevel value is defined in BrotliStream ctor (#57561)
Bar Arnon [Mon, 1 Nov 2021 23:15:18 +0000 (01:15 +0200)]
Validate CompressionLevel value is defined in BrotliStream ctor (#57561)

Co-authored-by: carlossanlop <1175054+carlossanlop@users.noreply.github.com>
3 years agoFix 60597 by using genActualType (#61057)
Benjamin Hodgson [Mon, 1 Nov 2021 22:24:21 +0000 (18:24 -0400)]
Fix 60597 by using genActualType (#61057)

3 years agoDelete duplicate test projects (#61024)
Tomáš Rylek [Mon, 1 Nov 2021 22:04:39 +0000 (23:04 +0100)]
Delete duplicate test projects (#61024)

* _odbgsin / _orelsin are duplicates of the tests _dbgsin / _relsin
  in the same folder

* _speed_dbgthisnull / _speed_relthisnull are duplicates of _dbgthisnull
  and _relthisnull, respectively

* The b14368 project is a duplicate of JIT\Regression\VS-ia64-JIT\V1.2-M02\b17751\b17751.ilproj

* The jmp_opt and ldftn_opt test projects are duplicates of jmp_ret and
  ldftn_ret in the same folder

* The test and test2 projects under 575343 are duplicates of same named
  tests under JIT\Regression\CLR-x86-JIT\V2.0-RTM\b598031

* The CctorThrowStaticFieldBFI test is a duplicate of the test
  Loader\classloader\TypeInitialization\CctorsWithSideEffects\CctorThrowStaticFieldBFI.ilproj

* The tests under Variance\CoreCLR are duplicates of same-named tests
  under Loader\classloader\generics\Variance\Methods

* The nesting4 test is a duplicate of
  Loader\classloader\nesting\Tests\nesting4.ilproj

Thanks

Tomas

3 years agosupport loading versioned libmsquic (#61021)
Tomas Weinfurt [Mon, 1 Nov 2021 21:09:25 +0000 (14:09 -0700)]
support loading versioned libmsquic (#61021)

3 years agoUpdating named mutex design docs so they point to the correct location on the file...
Marcin Krystianc [Mon, 1 Nov 2021 20:18:16 +0000 (21:18 +0100)]
Updating named mutex design docs so they point to the correct location on the file system. (#60246)

These docs were moved from coreclr repository (https://github.com/dotnet/runtime/pull/43161), but they weren't updated to match the actual mutex files location (https://github.com/dotnet/runtime/blob/main/src/coreclr/pal/src/include/pal/sharedmemory.h#L17-L28).

3 years agoConsume PosixSignal in Hosting.Systemd's SystemdLifetime (#59880)
Eric Erhardt [Mon, 1 Nov 2021 17:28:23 +0000 (12:28 -0500)]
Consume PosixSignal in Hosting.Systemd's SystemdLifetime (#59880)

* Consume PosixSignal in Hosting.Systemd's SystemdLifetime

Fix #56058

* Fix TFMs to correctly include NetCoreApp

Also fixing duplicate entries in the .sln file, since it doesn't load correctly.

3 years agoFix various dump generation issues for VS4Mac (#60995)
Mike McLaughlin [Mon, 1 Nov 2021 16:11:40 +0000 (09:11 -0700)]
Fix various dump generation issues for VS4Mac (#60995)

Fix dump generation issues for VS4Mac

Fixes issue: https://github.com/dotnet/runtime/issues/60932

Fix how the load bias is calculate for shared modules

Add new generate core dump IPC command that allows the generate
crash report flag to be passed through to createdump for VS4Mac.

Issue: https://github.com/dotnet/runtime/issues/60775

VS4Mac needs to distinguish between WriteDump/no signal and unknown signal ExceptionType

Change unknown signal exception type to 0

3 years agoFix for #60340 (#60863)
Ilona Tomkowicz [Mon, 1 Nov 2021 15:03:58 +0000 (16:03 +0100)]
Fix for #60340 (#60863)

* Fix for #60340

* Fixes element access for a constant index.

* Undo changes made based on https://github.com/dotnet/runtime/pull/60873, that were not intended to be commited.

* Removed whitespaces.

* Fixed element access by local variables, added tests for element access by object member variables.

* Element access by indexing with simple object members is fixed.

* Nested element access is fixed, e.g. a[a[a[0]]].

* Added tests for nested element access. Reverted an unintentional change in EvaluateSimpleMethodCallsCheckChangedValue test.

* Change test name to enable running test batch on calling ".EvaluateExpressionsWithElementAccess" prefix.

* Fix ElementAccessByMemberVariables that was failing after previous changes.

* Removed unused namespace import. Regexes are not needed in the new approach.

* Added implementatio of evaluation for multidimentional indexing.

3 years ago[wasm][debugger] Fix debugging blazor app after ts changes. (#60873)
Thays Grazia [Mon, 1 Nov 2021 13:52:02 +0000 (10:52 -0300)]
[wasm][debugger] Fix debugging blazor app after ts changes. (#60873)

* remove runtimeHelpers.loaded_files and repace it with MONO.loaded_files
* disable too aggressive Terser minification
* keep some function names un-mangled for stack walk in debugger implementation

Co-authored-by: Thays <thaystg@gmail.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
3 years agoJIT: Disable implicit tailcalls for throwhelpers (#61006)
Egor Bogatov [Mon, 1 Nov 2021 08:34:55 +0000 (11:34 +0300)]
JIT: Disable implicit tailcalls for throwhelpers (#61006)

3 years agoAdd a fallback RuntimeProductVersion in runtime_version.h (#60994)
Jeremy Koritzinsky [Sat, 30 Oct 2021 18:22:30 +0000 (11:22 -0700)]
Add a fallback RuntimeProductVersion in runtime_version.h (#60994)

This fixes failures encountered when building CoreCLR using the fallback files.

3 years agoUse LastIndexOf in MSBuild for a single char (#60450)
Kirill Osenkov [Sat, 30 Oct 2021 14:50:35 +0000 (07:50 -0700)]
Use LastIndexOf in MSBuild for a single char (#60450)

3 years agoFix to run all the tests for the scheduled builds, as intended (#61029)
Ankit Jain [Sat, 30 Oct 2021 08:09:57 +0000 (08:09 +0000)]
Fix to run all the tests for the scheduled builds, as intended (#61029)

3 years agoDeduplicate class names in the type generator tests (#60990)
Tomáš Rylek [Fri, 29 Oct 2021 22:34:07 +0000 (00:34 +0200)]
Deduplicate class names in the type generator tests (#60990)

As a prerequisite to switching these tests over to the new model,
we need to get rid of class name duplications. All these tests were
originally generated with the same class name "Framework", I propose
modifying them to use the test name as the class name instead.

Thanks

Tomas

3 years agoLog more info when perf counter category is missing (#60955)
Dan Moseley [Fri, 29 Oct 2021 20:25:05 +0000 (14:25 -0600)]
Log more info when perf counter category is missing (#60955)

* Better perf ctr detail

* ypot

* Update src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs

3 years ago[mono][s390x] Fix OP_MOVE_F_TO_I4 codegen bug (#61009)
Ulrich Weigand [Fri, 29 Oct 2021 18:37:30 +0000 (20:37 +0200)]
[mono][s390x] Fix OP_MOVE_F_TO_I4 codegen bug (#61009)

* Remove incorrect conversion in the cfg->r4fp case

* Fixes System.Threading.Tests.InterlockedTests.InterlockedExchange_Float

3 years agoAlter amount of tests that run per PR for mono mobile configurations (#60727)
Steve Pfister [Fri, 29 Oct 2021 18:33:42 +0000 (11:33 -0700)]
Alter amount of tests that run per PR for mono mobile configurations (#60727)

In an effort to better utilize CI resources, this change will only run the System.Runtime library test per PR for Android and Wasm configurations. The full libraries and runtime tests will move to only run on the post-PR validation pipeline.

The summary of changes are:

- System.Runtime tests will only trigger per PR for Android x86/x64 and Wasm AOT / EAT
- All mono runtime builds will only run on the post PR validation build (rolling build)
- WasmBuildTests will only run on the post PR validation build (rolling build)
- Wasm on Windows will only build

Note: iOS/tvOS/MacCatalyst are excluded until #59503 lands

3 years ago[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade...
dotnet-maestro[bot] [Fri, 29 Oct 2021 17:10:02 +0000 (19:10 +0200)]
[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade dotnet/roslyn-analyzers (#61004)

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

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

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 7.0.0-beta.21527.5 -> To Version 7.0.0-beta.21528.3

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

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.21527.1 -> To Version 7.0.0-preview1.21528.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoUse Ubuntu 18.04 1ES pools and dotnet-buildtools-prereq docker images for enterprise...
Alexander Köplinger [Fri, 29 Oct 2021 17:09:32 +0000 (19:09 +0200)]
Use Ubuntu 18.04 1ES pools and dotnet-buildtools-prereq docker images for enterprise linux pipeline (#61001)

Ubuntu 16.04 is no longer available on Azure Pipelines, move to 18.04 on 1ES pool and the Docker images from dotnet-buildtools-prereq.

Also add a workaround for https://github.com/dotnet/runtime/issues/34649 which we hit during the build.

3 years agoUpdate dependencies from https://github.com/dotnet/linker build 20211028.2 (#61005)
dotnet-maestro[bot] [Fri, 29 Oct 2021 14:48:22 +0000 (16:48 +0200)]
Update dependencies from https://github.com/dotnet/linker build 20211028.2 (#61005)

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21525.2 -> To Version 7.0.100-1.21528.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years ago[wasm] preparation for module encapsulation (#60928)
Pavel Savara [Fri, 29 Oct 2021 13:10:53 +0000 (15:10 +0200)]
[wasm] preparation for module encapsulation (#60928)

- simplified fetch and script loading logic/polyfil
- clarified runtime-test.js based on Daniel's draft.
- extracted mono_wasm_invoke_js and mono_wasm_compile_function out of C macro into proper .ts function
- wrapped access to API via globalThis with warning on first use
- added cwraps.mono_wasm_add_assembly and cwraps.mono_wasm_load_runtime which Blazor uses
- fixed closures for generated functions, so that they don't use global Module reference
- mono_wasm_invoke_js now uses new Function instead of eval()
- removed deprecated Blazor functions
- fixed lint issues
Co-authored-by: Daniel Genkin <genkind@gmail.com>
3 years agoJIT: "Scaled" addressing mode on ARM (#60808)
Egor Bogatov [Fri, 29 Oct 2021 11:47:52 +0000 (14:47 +0300)]
JIT: "Scaled" addressing mode on ARM (#60808)

3 years agoDisable DllImportGenerator tests on s390x (#60833)
Ulrich Weigand [Fri, 29 Oct 2021 10:41:48 +0000 (12:41 +0200)]
Disable DllImportGenerator tests on s390x (#60833)

* Runtime tests fail since App.Host package is not available

* Unit tests fail since NuGet.Packaging 5.6.0 signature verification
  does not work on big-endian systems (needs >= 5.11.0)

3 years ago[main] Update dependencies from dotnet/linker (#60619)
dotnet-maestro[bot] [Fri, 29 Oct 2021 09:23:44 +0000 (11:23 +0200)]
[main] Update dependencies from dotnet/linker (#60619)

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21518.3

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21519.3

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21520.2

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21525.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoSupport ARM64/ARM environment variables for #53122. (#60916)
Mikhail Pilin [Fri, 29 Oct 2021 03:18:14 +0000 (05:18 +0200)]
Support ARM64/ARM environment variables for #53122. (#60916)

3 years agoJIT: Improve VN for (EQ/NE (RELOP ...), 0/1) (#60943)
Andy Ayers [Fri, 29 Oct 2021 02:25:27 +0000 (19:25 -0700)]
JIT: Improve VN for (EQ/NE (RELOP ...), 0/1) (#60943)

Try and re-express these VNs in terms of the RELOP or its complement.

3 years agoMark containing type for generated stub functions as unsafe (#60979)
Elinor Fung [Fri, 29 Oct 2021 01:22:32 +0000 (18:22 -0700)]
Mark containing type for generated stub functions as unsafe (#60979)

3 years ago[mono][workload] Work around a msbuild bug in MatchOnMetadata (#60989)
Larry Ewing [Fri, 29 Oct 2021 00:30:29 +0000 (19:30 -0500)]
[mono][workload] Work around a msbuild bug in MatchOnMetadata (#60989)

* Work around a msbuild bug in MatchOnMetadata

* Reenable workload build tests and bump to a 7.0.100 sdk version

3 years agoBuild the native prereqs in the build-jit-job.yml (#60981)
Jeremy Koritzinsky [Thu, 28 Oct 2021 23:13:39 +0000 (16:13 -0700)]
Build the native prereqs in the build-jit-job.yml (#60981)

3 years agoFix Equals overload logic for some methods of an array created using MLC (#60894)
Buyaa Namnan [Thu, 28 Oct 2021 22:36:06 +0000 (15:36 -0700)]
Fix Equals overload logic for some methods of an array created using MLC (#60894)

3 years agoAccount for versioned VS in up-to-date check (#60970)
Adeel Mujahid [Thu, 28 Oct 2021 22:23:58 +0000 (01:23 +0300)]
Account for versioned VS in up-to-date check (#60970)

Co-authored-by: Juan Hoyos <juan.s.hoyos@outlook.com>
3 years agoAdd historical note on optimizing aspects of Value Numbering (#60985)
Andy Ayers [Thu, 28 Oct 2021 21:59:37 +0000 (14:59 -0700)]
Add historical note on optimizing aspects of Value Numbering (#60985)

3 years agoFix more alloc-dealloc mismatches (#60691)
Jeremy Koritzinsky [Thu, 28 Oct 2021 20:55:06 +0000 (13:55 -0700)]
Fix more alloc-dealloc mismatches (#60691)

3 years agoScript to collect asp.net benchmark method contexts for SPMI (#60953)
Andy Ayers [Thu, 28 Oct 2021 20:02:36 +0000 (13:02 -0700)]
Script to collect asp.net benchmark method contexts for SPMI (#60953)

3 years agoMake noise if trying to use the cache after it's been disposed. (#57557)
Steve Molloy [Thu, 28 Oct 2021 19:41:26 +0000 (12:41 -0700)]
Make noise if trying to use the cache after it's been disposed. (#57557)

3 years agoFix a thread local test (#60892)
Koundinya Veluri [Thu, 28 Oct 2021 18:35:58 +0000 (11:35 -0700)]
Fix a thread local test (#60892)

- Updated conditional fact to require precise GC for the test
- Fixes https://github.com/dotnet/runtime/issues/57102

3 years agoRemove some redundant threading tests, move some cases to libraries tests (#59073)
Koundinya Veluri [Thu, 28 Oct 2021 18:33:56 +0000 (11:33 -0700)]
Remove some redundant threading tests, move some cases to libraries tests (#59073)

* Remove some redundant threading tests, move some cases to libraries tests

- Went through some of the tests. Most of them appeared to be redundant. Added a few missing tests and ported a few tests from CoreRT.
- Closes https://github.com/dotnet/runtime/issues/6372, the test is being removed

3 years agoMitigate NU1103 Error showing up during Maui Builds (#60946)
Parker Bibus [Thu, 28 Oct 2021 18:09:15 +0000 (13:09 -0500)]
Mitigate NU1103 Error showing up during Maui Builds (#60946)

* Test allowing 'unstable' packages since maui is not finding stable packages for some of the extension packages.

3 years agoExplicitly emit a diagnostic for ref returns in GeneratedDllImport stubs. (#60720)
Jeremy Koritzinsky [Thu, 28 Oct 2021 17:51:55 +0000 (10:51 -0700)]
Explicitly emit a diagnostic for ref returns in GeneratedDllImport stubs. (#60720)

3 years ago[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/xharness...
dotnet-maestro[bot] [Thu, 28 Oct 2021 17:34:55 +0000 (12:34 -0500)]
[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/xharness dotnet/arcade dotnet/emsdk dotnet/roslyn-analyzers dotnet/msquic (#60954)

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

Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.0-alpha.1.21520.2 -> To Version 7.0.0-alpha.1.21527.1

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

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

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

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21527.1 -> To Version 1.0.0-prerelease.21527.2

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

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 7.0.0-beta.21527.1 -> To Version 7.0.0-beta.21527.5

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

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.21526.1 -> To Version 7.0.0-preview1.21527.1

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

System.Net.MsQuic.Transport
 From Version 6.0.0-preview.7.21526.1 -> To Version 6.0.0-preview.7.21527.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
3 years agoFix MD array helper intrinsics for complex `this` pointers (#60958)
Bruce Forstall [Thu, 28 Oct 2021 17:14:51 +0000 (10:14 -0700)]
Fix MD array helper intrinsics for complex `this` pointers (#60958)

The implementation of the MD array helpers didn't consider the possibility
of the array object being something complex, like a function call return value.

Also, add a test case covering many cases of invoking the MD array helpers.

Fixes #60957

3 years agoMake CryptQueryObject call compliant to interop guidelines
Badre BSAILA [Thu, 28 Oct 2021 16:25:04 +0000 (18:25 +0200)]
Make CryptQueryObject call compliant to interop guidelines

3 years agoUpdate JsonNode doc (#60925)
Steve Harter [Thu, 28 Oct 2021 16:23:59 +0000 (11:23 -0500)]
Update JsonNode doc (#60925)

3 years agoExtract various changes from the invoke and custom marshaler PRs (#60877)
Katelyn Gadd [Thu, 28 Oct 2021 10:32:31 +0000 (03:32 -0700)]
Extract various changes from the invoke and custom marshaler PRs (#60877)

Various code cleanup and refactorings for the wasm bindings

3 years agoMake memory mapped stress log work for child processes. (#60828)
Peter Sollich [Thu, 28 Oct 2021 08:04:49 +0000 (10:04 +0200)]
Make memory mapped stress log work for child processes. (#60828)

Make memory mapped stress log work for child processes.

There are two kinds of changes:
- in case the stresslog file cannot be created, fall back to the in-memory implementation
- support "{pid}" embedded in the file name - this will be replaced by the PID of the current process.

This enables two modes of operation regarding child processes:

- if the stresslog filename given does not contain "{pid}", the parent process will create the file, but the child process will use the in-memory stresslog. useful when we are not interested in the child process.
- if the stresslog filename given does contain "{pid}", both parent and child will get their own stresslog file. useful when we are in fact interested in both.

3 years agoFix build-native.cmd for direct use (#60926)
SingleAccretion [Thu, 28 Oct 2021 03:46:21 +0000 (06:46 +0300)]
Fix build-native.cmd for direct use (#60926)

The parsing loop shifts away the parameters, making use of %~dp0 after
it incorrect. Fix that by caching the relevant information.

3 years agoFix some typos in corhdr.h (#60895)
Anthony Shaw [Thu, 28 Oct 2021 02:29:43 +0000 (13:29 +1100)]
Fix some typos in corhdr.h (#60895)

* Fix some typos in corhdr.h

* Remove "well known" namespace/attributes that aren't used in the CoreCLR libraries

3 years ago[mono][workloads] Workload 7.0.100 (#60893)
Larry Ewing [Thu, 28 Oct 2021 01:38:44 +0000 (20:38 -0500)]
[mono][workloads] Workload 7.0.100 (#60893)

* Update some version bits

* Substitute NetCoreAppCurrent value don't expand it

* Update the emsdk version to 7.0.x

* Disable Wasm.Build.Tests temporarily

3 years agoIFormatProvider getter refactor (#60815)
Sergei Papikian [Thu, 28 Oct 2021 01:03:50 +0000 (04:03 +0300)]
IFormatProvider getter refactor (#60815)

* refactor: IFormatProvider getter

* refactor: inline

3 years agoalways populate TargetHostName on SslStream (#60589)
Tomas Weinfurt [Thu, 28 Oct 2021 00:55:49 +0000 (17:55 -0700)]
always populate TargetHostName on SslStream (#60589)

* always populte TargetHostName on SslStream

* update check for server