platform/upstream/dotnet/runtime.git
4 years agoFix comment: "ThreadLocal" -> "ThreadStatic" as used in code (#32887)
Alexander Speshilov [Thu, 27 Feb 2020 00:59:07 +0000 (03:59 +0300)]
Fix comment: "ThreadLocal" -> "ThreadStatic" as used in code (#32887)

Comment aligned with actual attribute name in code

4 years agoEnable crossgen tests (#32330)
Bill Wert [Wed, 26 Feb 2020 23:58:18 +0000 (15:58 -0800)]
Enable crossgen tests (#32330)

This turns on benchmarking for a few binaries to track crossgen.

4 years agoAdd ValueNumbering support for GT_SIMD and GT_HWINTRINSIC tree nodes (#31834)
Brian Sullivan [Wed, 26 Feb 2020 23:28:29 +0000 (15:28 -0800)]
Add ValueNumbering support for GT_SIMD and GT_HWINTRINSIC tree nodes (#31834)

* Added ValueNumbering support for GT_SIMD and GT_HWINTRINSIC tree nodes

* Allow SIMD and HW Intrinsics to be CSE candidates

* Correctness fix for optAssertionPropMain
  - Zero out the bbAssertionIn values, as these can be referenced in RangeCheck::MergeAssertion
    and this is shared state with the CSE phase: bbCseIn

* Improve the VNFOA_ArityMask

* Update to use the new TARGET macros

* Include node type when value numbering SIMDIntrinsicInit
Mutate the gloabl heap when performing a HW_INTRINSIC memory store operation
Printing of SIMD constants only support 0

* Disable CSE's for some special HW_INTRINSIC categories

* Code review feedback

* Record csdStructHnd; // The class handle, currently needed to create a SIMD LclVar in PerformCSE

* Instead of asserting on a struct handle mismatch, we record it in csdStructHndMismatch and avoid making the candidate into a CSE

* Fix the JITDUMP messages to print the CseIndex

* add check for (newElemStructHnd != NO_CLASS_HANDLE)

* Additional checks for SIMD struct types when setting csdStructHnd
Added Mismatched Struct Handle assert in ConsiderCandidates

* fix GenTreeSIMD::OperIsMemoryLoad for ARM64
Removed ismatched Struct Handle assert

* Fix the printing of BitSets on Linux, change the printf format specifier

* Added check for simdNode->OperIsMemoryLoad()) to fgValueNumberSimd
Added bool OperIsMemoryLoad() to GenTreeSIMD, returns true for SIMDIntrinsicInitArray
Added valuenumfuncs.h to src/coreclr/src/jit/CMakeLists.txt

* Avoid calling gtGetStructHandleIfPresent to set csdStructHnd when we have a GT_IND node

* Fix check for (newElemStructHnd != hashDsc->csdStructHnd)

* added extra value number argument VNF_SimdType for Most SIMD operations
added VNF_SimdType // A value number function to compose a SIMD type
added vnDumpSimdType

* Added bool methods vnEncodesResultTypeForSIMDIntrinsic and vnEncodesResultTypeForHWIntrinsic
these return true when a SIMD or HW Instrinsic will use an extra arg to record the result type during value numbering
Changes the ValueNumFuncDef to set the arity to zero when a -1 value is passed in
Updated InitValueNumStoreStatics to fixup the arity of SIMD or HW Instrinsic that have an extra arg to record the result type
Allow a type mismatchj when we have a GT_BLK as the lhs of an assignment, as it is used to zero out Simd structs

* Fix for SIMD_WidenLo arg count

* fix typo

* Fix x86 build breaks
Fix SIMD_WidenHi

* Added method header comment for vnEncodesResultTypeForHWIntrinsic
Added & VNFOA_ArityMask when assigning to vnfOpAttribs[]

* Codereview feedback and some more comments

* fix typo

* Moved the code that sets the arg count for the three SIMD intrinsics

* clang-format

* Adjust CSE for SIMD types that are live across a call

* Proposed fix for #32085

* Revert "Proposed fix for #32085"

This reverts commit 169c24eeafb072a79ffbdb2d1d36960ebc0c17b4.

* Added better comments for optcse SIMD caller saved register heuristics

* Added CONFIG_INTEGER: JitDisableSimdVN,
   Default 0, ValueNumbering of SIMD nodes and HW Intrinsic nodes enabled
   If 1, then disable ValueNumbering of SIMD nodes
   If 2, then disable ValueNumbering of HW Intrinsic nodes
   If 3, disable both SIMD and HW Intrinsic nodes

* Moved JitDisableSimdVN from DEBUG to RETAIL

4 years agoFix reference to VS 2015 (#32886)
Ross Nelson [Wed, 26 Feb 2020 23:25:27 +0000 (17:25 -0600)]
Fix reference to VS 2015 (#32886)

The FakeSign instructions reference Visual Studio 2016 Update 2
instead of Visual Studio 2015 U2.

Fix #32885

4 years agoUpdate Utf8String APIs (#32892)
Levi Broderick [Wed, 26 Feb 2020 23:11:08 +0000 (15:11 -0800)]
Update Utf8String APIs (#32892)

4 years agoFor large allocation tests, check for available memory on Windows too (#32545)
Andrew Au [Wed, 26 Feb 2020 22:20:23 +0000 (14:20 -0800)]
For large allocation tests, check for available memory on Windows too (#32545)

* For large allocation tests, check for available memory on Windows too

Previously, we had logic to get the physical memory on non-Windows,
but nothing on Windows.
This means that on windows machines with low memory, we would allocate
too much and the test would fail.
This PR logic to get physical memory on Windows too.

On Windows, it invokes the `systeminfo` command.
It shares parsing logic with the non-windows case, since they both need
to look for a line with a particular start and end.

Tested this change by manually increasing the allocation size in
`largeexceptiontest.cmd` and seeing that it allocated 300MB instead.
Also did the same test on Ubuntu since non-Windows code was affected too.

Fix #27098

Remove duplicate MemCheck and LargeObject code

Accept more uint formats

Use GlobalMemoryStatusEx on Windows instead of systeminfo

* simplify meminfo parsing

Co-authored-by: Andy Hanson <andy.ms.2019@gmail.com>
4 years ago[wasm][debugger] Fixes to get async method locals (#32807)
monojenkins [Wed, 26 Feb 2020 18:34:59 +0000 (13:34 -0500)]
[wasm][debugger] Fixes to get async method locals (#32807)

.. and cleans up tests.

Co-authored-by: Ankit Jain <radical@gmail.com>
4 years agoMerge pull request #2107 from BrianBohe/master
Brian Bohe [Wed, 26 Feb 2020 18:29:37 +0000 (10:29 -0800)]
Merge pull request #2107 from BrianBohe/master

Change debug info default variable tracking system

4 years agoJIT: use new phase objects more extensively (#32688)
Andy Ayers [Wed, 26 Feb 2020 17:48:26 +0000 (09:48 -0800)]
JIT: use new phase objects more extensively (#32688)

Convert the mainline compiler phases over so they are run via compiler or
action phases.

To keep jit dump size and checked jit throughput the same as it is now,
add phase whitelists to opt into pre phase dumps and checks triggered by the
phase objects on a per-phase basis. This allow us to gradually remove explicit
dumps and check invocations phase by phase, over time.

4 years ago[runtime] Remove MONO_LLVM_INTERNAL. (#32796)
monojenkins [Wed, 26 Feb 2020 16:48:35 +0000 (11:48 -0500)]
[runtime] Remove MONO_LLVM_INTERNAL. (#32796)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoRe-disable CA2010 (#32872)
Stephen Toub [Wed, 26 Feb 2020 16:33:53 +0000 (11:33 -0500)]
Re-disable CA2010 (#32872)

Apparently there were missed warnings that are now being treated as errors due to a PR that raced with mine yesterday to update the CodeAnalysis.ruleset file.

4 years agoPlural TargetFrameworks replaced with singluar TargetFramework (#32860)
Alexander Nikolaev [Wed, 26 Feb 2020 15:23:33 +0000 (16:23 +0100)]
Plural TargetFrameworks replaced with singluar TargetFramework (#32860)

Stress test build fails because we have a plural tag <TargetFrameworks>, but only one nested element. PR converts it to a singular <TargetFramework>.

Fixes #32813

4 years agoSend QUIT on SmtpClient.Dispose() (#683)
Marco Rossignoli [Wed, 26 Feb 2020 14:23:22 +0000 (15:23 +0100)]
Send QUIT on SmtpClient.Dispose() (#683)

* send QUIT on Dispose()

* add try/finally

* simplify null check

* address PR feedback

* send quit in non-blocking mode

* resolve conflicts

4 years agoFix Mono netcore TPA preload hook to work with Windows CoreRun.exe. (#32789)
Johan Lorensson [Wed, 26 Feb 2020 11:07:04 +0000 (12:07 +0100)]
Fix Mono netcore TPA preload hook to work with Windows CoreRun.exe. (#32789)

Current hook compares TPA list file names using case sensitive compare.
On Windows, the TPA list, when passed from CoreRun.exe makes all file
paths lower case, meaning that our checks fails to find assemblies in
TPA list.

Since CoreRun.exe is used for both CoreCLR and Mono, removing the tolower
on file paths added to the TPA list in CoreRun.exe could be an option,
but that might introduce regressions in CoreCLR, so this fix isolate the
change to Mono's netcore preload hook.

4 years agoNullable annotate System.Drawing.Common (#31716)
Eirik Tsarpalis [Wed, 26 Feb 2020 10:44:25 +0000 (10:44 +0000)]
Nullable annotate System.Drawing.Common (#31716)

* Nullable annotate System.Drawing.Common

* Annotate unix files

* add removed attributes

* fix rebase issue

* address feedback

* add missing annotation

* address feedback

* address feedback

* address more feedback

4 years agoAdd support in crossgen2 for 32-byte alignment (#32602)
Michal Strehovský [Wed, 26 Feb 2020 09:17:09 +0000 (10:17 +0100)]
Add support in crossgen2 for 32-byte alignment (#32602)

4 years agoUse VS2019 Preview for libraries build which contains a newer CMake (#32626)
Santiago Fernandez Madero [Wed, 26 Feb 2020 08:26:03 +0000 (08:26 +0000)]
Use VS2019 Preview for libraries build which contains a newer CMake (#32626)

* Try Windows Server pools with VS2019 Preview

* Pass parameter to use vs preview pool.

* Use VS2019 Preview Pool when parameter is true

* Update xplat-setup.yml

* Update global-build-job.yml

* PR Feedback

* Update perf.yml to use right pools.

* Fix casing of live runtime configuration.

* Libraries build configuration upper case

4 years agoFix Windows CoreRun.exe to work with CoreCLR/Mono xplat hosting API. (#32788)
Johan Lorensson [Wed, 26 Feb 2020 07:24:00 +0000 (08:24 +0100)]
Fix Windows CoreRun.exe to work with CoreCLR/Mono xplat hosting API. (#32788)

CoreRun.exe is shared between both CoreCLR and Mono. On Windows,
CoreRun.exe is still using ICLRRuntimeHost4 hosting API but Mono
doesn't implement that API, just the xplat hosting API. Fix change
CoreRun.exe on Windows to use xplat hosting API, so it works with
both CoreCLR and Mono on Windows. CoreRun on Unix already used
xplat hosting API.

Behaviour on CoreRun.exe Windows CoreCLR should be identical, since
implementation of xplat hosting API on CoreCLR uses ICLRRuntimeHost4
internally and calls to CreateAppDomainWithManager, ExecuteAssembly,
UnloadAppDomain2 and Stop look identical to what done in CoreRun.exe
before this fix.

4 years agoReg struct copy. (#32362)
Sergey Andreenko [Wed, 26 Feb 2020 07:19:37 +0000 (23:19 -0800)]
Reg struct copy. (#32362)

* Fix `gsMarkPtrsAndAssignGroups` for struct assignment.

The old code was expecting `ASG` in a form that doesn't exist anymore.

* Fix SPMI replay with `repCompareTypesForEquality` misses.

* Reg struct copies.

Keep `ASG(LCL_VAR struct, LCL_VAR or INIT_VALUE)` representation in morph
and rationalize and change it to STORE_LCL_VAR later.

* Don't do retyping for `ASG(LCL_VAR struct, init val)` .

* Add a comment about morph tranformation.

and fix format error after merge.

4 years agoRename a parameter (#32841)
Next Turn [Wed, 26 Feb 2020 06:50:23 +0000 (14:50 +0800)]
Rename a parameter (#32841)

4 years agoFix issue #32466 (#32804)
Brian Sullivan [Wed, 26 Feb 2020 03:02:29 +0000 (19:02 -0800)]
Fix issue #32466 (#32804)

* Fix issue #32466

Fixes outerloop leg: R2R Windows_NT x86 Checked no_tiered_compilation @ Windows.10.Amd64.Open

* Updated the comment associated with this assert

4 years agofix NRE in XNodeNavigator.MoveToNext(XPathNodeType) (#32288)
mayorovp [Wed, 26 Feb 2020 02:19:57 +0000 (07:19 +0500)]
fix NRE in XNodeNavigator.MoveToNext(XPathNodeType) (#32288)

* fix NRE in XNodeNavigator.MoveToNext(XPathNodeType)

fixes #31710

* Adding test case

Co-authored-by: buyaa-n <buyankhishig.namnan@microsoft.com>
4 years agoTrivial cleanup in ILGenerator.WriteLine (#32794)
Vitek Karas [Wed, 26 Feb 2020 00:51:09 +0000 (16:51 -0800)]
Trivial cleanup in ILGenerator.WriteLine (#32794)

Avoids unnecessary cast.

4 years ago[master] Update dependencies from 3 repositories (#32787)
dotnet-maestro[bot] [Wed, 26 Feb 2020 00:46:06 +0000 (00:46 +0000)]
[master] Update dependencies from 3 repositories (#32787)

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

- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20124.1
- runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20124.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20124.1
- runtime.osx.10.12-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20124.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools - 6.0.1-alpha.1.20124.1
- runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk - 6.0.1-alpha.1.20124.1

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20124.3
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20124.3
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20124.3
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20124.3
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20124.3
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20124.3
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20124.3
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20124.3
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20124.3
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20124.3
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20124.3
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20124.3
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20124.3
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20124.3

* Update dependencies from https://github.com/microsoft/vstest build 20200225-01

- Microsoft.NET.Test.Sdk - 16.6.0-preview-20200225-01

4 years agoBraces around subobject of initialization warning fix (#32328)
pi1024e [Wed, 26 Feb 2020 00:42:40 +0000 (19:42 -0500)]
Braces around subobject of initialization warning fix (#32328)

* Braces around subobject of initialization warning fix

* Fix warning

* Update lifo-semaphore.h

* Update lifo-semaphore.h

* Update lifo-semaphore.h

* Remove unnecessary braces

* Update lifo-semaphore.c

* Update lifo-semaphore.c

Co-authored-by: Ryan Lucia <ryan@luciaonline.net>
4 years agoConvert walk while-loop to for loop, which makes most sense for a walk (#32399)
pi1024e [Wed, 26 Feb 2020 00:25:19 +0000 (19:25 -0500)]
Convert walk while-loop to for loop, which makes most sense for a walk (#32399)

4 years agoBump DependencyModel reference to Text.Json to 4.7.1 (#32810)
Eric Erhardt [Tue, 25 Feb 2020 22:02:30 +0000 (16:02 -0600)]
Bump DependencyModel reference to Text.Json to 4.7.1 (#32810)

We shipped DependencyModel v3.1.2 that references Text.Json 4.7.1. We shouldn't ship a new version that downgrades that reference.

Also do some clean up in the Tests.

4 years agoUpdate CodeAnalysis.ruleset to list every roslyn analyzers rule (#32814)
Stephen Toub [Tue, 25 Feb 2020 21:58:19 +0000 (16:58 -0500)]
Update CodeAnalysis.ruleset to list every roslyn analyzers rule (#32814)

4 years agoAdd WCF packages to area-owners (#32832)
Matt Connew [Tue, 25 Feb 2020 21:57:32 +0000 (13:57 -0800)]
Add WCF packages to area-owners (#32832)

4 years agoUpdate readme to point to correct SDK repo (#32831)
Daniel Roth [Tue, 25 Feb 2020 21:56:56 +0000 (13:56 -0800)]
Update readme to point to correct SDK repo (#32831)

4 years agoImprove Expression.Lambda<TDelegate> performance (#32768)
Vladimir Chirikov [Tue, 25 Feb 2020 21:22:28 +0000 (00:22 +0300)]
Improve Expression.Lambda<TDelegate> performance (#32768)

Unnecessary cache call in Expression.Lambda<TDelegate>
(with reflection in worst scenario) has been removed.

Fix #32767

4 years agoSingle file: Guard against partial cleanup of extracted files (#32649)
Swaroop Sridhar [Tue, 25 Feb 2020 21:21:20 +0000 (13:21 -0800)]
Single file: Guard against partial cleanup of extracted files (#32649)

This change fixes https://github.com/dotnet/runtime/issues/3778
This change is mainly targeted to be servicing fix for .net core 3.1.

When executing single-file apps, if a pre-existing extraction exists, the contents of the extraction directory are now verified.
If files are missing, they are recovered.

**Extraction Algorithm**

`ExtractionDir` = `$DOTNET_BUNDLE_EXTRACT_BASE_DIR/<app>/<bundle-id>`
`WorkingDir` = `$DOTNET_BUNDLE_EXTRACT_BASE_DIR/<app>/<process-id>`

If `ExtractionDir` does not exist, then

Create `WorkingDir`, and extract bundle contents within it
Attempt to rename `WorkingDir` as `ExtractionDir`
If the rename succeeds, continue execution of the app
If not, another process completed extraction; Verify and reuse this extraction (as in step 2).
If `ExtractionDir` exists, then verify that it contains all files listed in the manifest.

If all contents are available,
Remove `WorkingDir`
Continue execution of the app, reusing the contents.

If certain files are missing within `ExtractionDir`, then
For each missing file, do the following individually
  Extract the files within `WorkingDir`
  Create sub-paths within `ExtractionDir` if necessary
  Rename the file from `WorkingDir/path/<file>` to `ExtractionDir/path/<file>` unless `ExtractionDir/path/<file>` exists (extracted there by another process in the meantime)
Remove `WorkingDir`
Continue execution of the app.

All of the renames above are done with appropriate retries to circumvent interference from anti-virus apps.

**Startup time impact**
* Console HelloWorld execution time:
    * Framework dependent app: Windows/Linux No measurable difference
    * Self-contained app: Windows: ~10ms additional
    * Self-contained app: Linux: No measurable difference
* Greenshot Startup:
    * Self-contained Windows: No noticiable/measurable difference
* NugetPackageExplorer Startup:
    * Self-contained Windows: No noticiable/measurable difference

4 years agoUpdate required SDK to 3.1.101 (#32809)
Viktor Hofer [Tue, 25 Feb 2020 21:16:27 +0000 (22:16 +0100)]
Update required SDK to 3.1.101 (#32809)

The toolset package requires at least a 3.1.101 SDK, therefore updating the minimum required version.

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

4 years agoFix build without FEATURE_EVENT_TRACE (#32746)
Adeel Mujahid [Tue, 25 Feb 2020 20:26:49 +0000 (22:26 +0200)]
Fix build without FEATURE_EVENT_TRACE (#32746)

4 years agoRemoving configuration group from installer (#32770)
Anirudh Agnihotry [Tue, 25 Feb 2020 20:26:04 +0000 (12:26 -0800)]
Removing configuration group from installer (#32770)

* removing config group from installer

* Revert "Add ConfigurationGroup back to entrypoints (#32762)"

This reverts commit 059d0385ff7f6a7b12557e533fccddd5b484a3ce.

* fixing the build failure and removing the default value

4 years agoChange macro CLOSE_PIPE to function mono_close_pipe. (#32793)
monojenkins [Tue, 25 Feb 2020 18:54:45 +0000 (13:54 -0500)]
Change macro CLOSE_PIPE to function mono_close_pipe. (#32793)

Extracted from https://github.com/mono/mono/pull/19025.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoFix warnings: GPid vs. pid_t function signature mixup in glib test code. (#32791)
monojenkins [Tue, 25 Feb 2020 18:46:29 +0000 (13:46 -0500)]
Fix warnings: GPid vs. pid_t function signature mixup in glib test code. (#32791)

Extracted from https://github.com/mono/mono/pull/19025.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoUse StringBuilder.Append(Char) instead of coverting char to string (#32758)
Alaa Masoud [Tue, 25 Feb 2020 16:21:32 +0000 (19:21 +0300)]
Use StringBuilder.Append(Char) instead of coverting char to string (#32758)

4 years agoAllow same-size same-register-file lclVar stores (#32750)
Carol Eidt [Tue, 25 Feb 2020 15:49:52 +0000 (07:49 -0800)]
Allow same-size same-register-file lclVar stores (#32750)

Fix #32379

4 years agoAdd TaskCompletionSource.SetCanceled(CancellationToken) (#32696)
Fraser Waters [Tue, 25 Feb 2020 14:48:29 +0000 (14:48 +0000)]
Add TaskCompletionSource.SetCanceled(CancellationToken) (#32696)

* Add TaskCompletionSource.SetCanceled(CancellationToken)

api-approved by #30862

* Add to ref

* SetCanceled(default)

* Change some tests to use SetCaneled not TrySetCanceled

These tests used SetResult/SetException and TrySetCancelled so it could
pass a token. Changed to use SetCancelled to match the Result/Exception
useage.

* Add SetCanceled(CT) test

* Check exception on re-cancel

* Equal not Equals

* Catch aggregate not TaskCancelled directly

*  Inner not exc

* Markup

* s/m/n

4 years agoUpdate dependencies ILLink.Tasks (#32778)
Tlakaelel Axayakatl Ceja [Tue, 25 Feb 2020 10:02:12 +0000 (02:02 -0800)]
Update dependencies ILLink.Tasks (#32778)

Use darc commands to include the latest commit from the linker in the runtime and see how it behaves in CI. This is a follow up from https://github.com/dotnet/runtime/pull/1804 after some linker fixes.

4 years agoR2RDump improvements in composite format support (#32499)
Tomáš Rylek [Tue, 25 Feb 2020 08:55:31 +0000 (09:55 +0100)]
R2RDump improvements in composite format support (#32499)

1) Added back-translation table from component assembly names
to their indices;

2) Added clean split of available types and method entrypoints per
component module and modified the various dumps as appropriate;

3) Added dump of component header sections for composite files.

Thanks

Tomas

4 years agoAdd ConfigurationGroup back to entrypoints (#32762)
Viktor Hofer [Tue, 25 Feb 2020 07:58:14 +0000 (08:58 +0100)]
Add ConfigurationGroup back to entrypoints (#32762)

ConfigurationGroup was removed but installer still uses and depends on
it. Bringing it back in the entrypoint build scripts and in the managed
msbuild Configurations.props file.

4 years agoRevert "Build cross OS DACs in default Windows builds (#32322)" (#32781)
Juan Hoyos [Tue, 25 Feb 2020 05:38:06 +0000 (21:38 -0800)]
Revert "Build cross OS DACs in default Windows builds (#32322)" (#32781)

This reverts commit 7d4e1bb6de479ded8ed22f836ed37f98b02039a2.

4 years agoDynamic generic dictionary expansion feature (#32270)
Fadi Hanna [Tue, 25 Feb 2020 01:57:39 +0000 (17:57 -0800)]
Dynamic generic dictionary expansion feature (#32270)

* Dynamic dictionary expansion feature

1) Separate dictionary layout expansion from dictionary expansions on types and methods
2) Dictionary expansions on types and methods done on-demand (if needed), after size checks by codegen (uses new JIT feature)
3) Update the R2R dictionary access stubs to perform size checks (and major cleanup there)
4) Add unit test
5) Update documentation
6) Update JIT interface guid

4 years ago[llvm] Remove loaded llvm support, the startup perf penalty doesn't seem to exist...
monojenkins [Tue, 25 Feb 2020 01:34:47 +0000 (20:34 -0500)]
[llvm] Remove loaded llvm support, the startup perf penalty doesn't seem to exist any more. (#32361)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years ago[interp] Reorder InterpMethod to reduce padding (#32657)
monojenkins [Tue, 25 Feb 2020 00:30:14 +0000 (19:30 -0500)]
[interp] Reorder InterpMethod to reduce padding (#32657)

for alignment. Size goes from 192 to 184.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoRemove --buildXUnitWrappers from runtest.cmd/runtest.sh (#31798)
Egor Bogatov [Tue, 25 Feb 2020 00:01:36 +0000 (03:01 +0300)]
Remove --buildXUnitWrappers from runtest.cmd/runtest.sh (#31798)

4 years agoWhittle away at warnings: (#32397)
monojenkins [Mon, 24 Feb 2020 23:41:12 +0000 (18:41 -0500)]
Whittle away at warnings: (#32397)

Whittle away at warnings:
 Return address of local (deliberate).
 Pointer cast to different size.
 Function parameter and declaration badly mismatch (pid_t vs. void*).
 Unused locals.
 Top level volatile is ignored.
 Negative shift undefined.
 Call to undeclared function (getpid).

Some are fixed, some are disabled temporarily.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoAllow ConfigurationManager to load when GetEntryAssembly returns null. (#32195)
Eric Erhardt [Mon, 24 Feb 2020 22:52:08 +0000 (16:52 -0600)]
Allow ConfigurationManager to load when GetEntryAssembly returns null. (#32195)

* Clean up unused variable in ClientConfigPaths.

* Allow ConfigurationManager to load when GetEntryAssembly returns null.

Attempt to find the native host to maintain behavior from netfx.

Fix #25027

4 years ago[merp] Produce hashes for unmanaged thread stacks also (#32565)
monojenkins [Mon, 24 Feb 2020 22:47:36 +0000 (17:47 -0500)]
[merp] Produce hashes for unmanaged thread stacks also (#32565)

Before, this was only done for managed stacks.

Addresses https://github.com/mono/mono/issues/18941

<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->

Co-authored-by: Alexis Christoforides <alexis@thenull.net>
4 years agoremoving $(OS) using from the libraries (#32673)
Anirudh Agnihotry [Mon, 24 Feb 2020 22:17:05 +0000 (14:17 -0800)]
removing $(OS) using from the libraries (#32673)

4 years agoRegenerate the S.S.C.Algorithms ref.cs
Jeremy Barton [Mon, 24 Feb 2020 21:53:38 +0000 (13:53 -0800)]
Regenerate the S.S.C.Algorithms ref.cs

* msbuild /t:GenerateReferenceSource
* Manually revert the changes in attributes
* msbuild the updated ref assembly
* build downstream crypto projects and make fixes as necessary

4 years agoAdd StatusCode to HttpRequestException (#32455)
Yaakov [Mon, 24 Feb 2020 21:41:18 +0000 (08:41 +1100)]
Add StatusCode to HttpRequestException (#32455)

Adds HttpRequestException.StatusCode property, to be set by EnsureSuccessStatusCode and convenience methods when an exception is generated by a status code.

4 years agoBuild cross OS DACs in default Windows builds (#32322)
Steve MacLean [Mon, 24 Feb 2020 21:30:29 +0000 (16:30 -0500)]
Build cross OS DACs in default Windows builds (#32322)

* Build the -linuxdac Cross OS DAC by default in Windows builds

* Fix warnings treated as errors

* Fix Cross OS Dac build break introduced by #32579

4 years ago[wasm][debugger] Improve accessing locals (#32701)
monojenkins [Mon, 24 Feb 2020 21:17:30 +0000 (16:17 -0500)]
[wasm][debugger] Improve accessing locals (#32701)

This fixes various issues in accessing locals on the stack.

Co-authored-by: Ankit Jain <radical@gmail.com>
4 years ago[merp] Increase buffer size for state dump (#32134)
monojenkins [Mon, 24 Feb 2020 19:56:07 +0000 (14:56 -0500)]
[merp] Increase buffer size for state dump (#32134)

Addresses https://github.com/mono/mono/issues/18796

Co-authored-by: Alexis Christoforides <alexis@thenull.net>
4 years agoReplace SkipOnMono attributes with ActiveIssue (#32745)
Alexander Köplinger [Mon, 24 Feb 2020 19:45:18 +0000 (20:45 +0100)]
Replace SkipOnMono attributes with ActiveIssue (#32745)

SkipOnMono should only be used for features which won't be implemented by Mono, not general bugs.

4 years agoJIT: make sure to set compLongUsed during struct promotion (#32702)
Andy Ayers [Mon, 24 Feb 2020 19:31:15 +0000 (11:31 -0800)]
JIT: make sure to set compLongUsed during struct promotion (#32702)

If we're promoting a long field, make sure `compLongUsed` gets set.
Otherwise we may fail to properly decompose a long later on.

Fixes #32059.

4 years agoFix compilation warning (#32740)
pi1024e [Mon, 24 Feb 2020 18:50:57 +0000 (13:50 -0500)]
Fix compilation warning (#32740)

When compiling, Visual Studio gives two compiler warnings in the sysmath.c file about FPILOGB0/-2147483648 being converted into an unsigned integer.

The standard library math.h states that FPILOGB0 be INT_MIN, so I replaced -2147483648 with the INT_MIN macro so the behavior is much more clear as well as stifling the compiler warnings.

Changes tested manually and automatically.

4 years agoFixes #32230 (#32302)
Brian Walker [Mon, 24 Feb 2020 18:28:05 +0000 (12:28 -0600)]
Fixes #32230 (#32302)

Use insecure proxy (http_proxy) for schemes http and ws
Use secure proxy (https_proxy) to schemes https and wss

4 years agoFix Version.Details.xml merge failure (#32748)
Viktor Hofer [Mon, 24 Feb 2020 18:18:32 +0000 (19:18 +0100)]
Fix Version.Details.xml merge failure (#32748)

* Fix Version.Details.xml merge failure

Broken by https://github.com/dotnet/runtime/commit/9a085069d0b36f7b6711f5b9fb41bf5c2d882d19.
Missing <Dependency> tag.

* Update Version.Details.xml

4 years agoRenaming functions and updating comments 
Brian Bohe [Mon, 24 Feb 2020 18:15:17 +0000 (10:15 -0800)]
Renaming functions and updating comments 

4 years ago[master] Update dependencies from dotnet/arcade mono/linker dotnet/runtime-assets...
dotnet-maestro[bot] [Mon, 24 Feb 2020 14:33:02 +0000 (15:33 +0100)]
[master] Update dependencies from dotnet/arcade mono/linker dotnet/runtime-assets (#32484)

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

- System.Windows.Extensions.TestData - 5.0.0-beta.20118.1
- System.Security.Cryptography.X509Certificates.TestData - 5.0.0-beta.20118.1
- System.Private.Runtime.UnicodeData - 5.0.0-beta.20118.1
- System.Net.TestData - 5.0.0-beta.20118.1
- System.IO.Packaging.TestData - 5.0.0-beta.20118.1
- System.IO.Compression.TestData - 5.0.0-beta.20118.1
- System.Drawing.Common.TestData - 5.0.0-beta.20118.1
- System.ComponentModel.TypeConverter.TestData - 5.0.0-beta.20118.1

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20118.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20118.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20118.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20118.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20118.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20118.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20118.1
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20118.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20118.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20118.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20118.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20118.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20118.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20118.1

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20119.14
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20119.14
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20119.14
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20119.14
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20119.14
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20119.14
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20119.14
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20119.14
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20119.14
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20119.14
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20119.14
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20119.14
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20119.14
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20119.14

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

- ILLink.Tasks - 0.1.6-prerelease.20120.1

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20120.2
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20120.2
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20120.2
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20120.2
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20120.2
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20120.2
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20120.2
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20120.2
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20120.2
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20120.2
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20120.2
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20120.2
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20120.2
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20120.2

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

- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20121.6
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20121.6
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20121.6
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20121.6
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20121.6
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20121.6
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20121.6
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20121.6
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20121.6
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20121.6
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20121.6
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20121.6
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20121.6
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20121.6

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

- ILLink.Tasks - 0.1.6-prerelease.20121.2

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

- ILLink.Tasks - 0.1.6-prerelease.20122.1

Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
4 years agoMark class ctors as preserved for dependencies of System.SR (#31718)
Vitek Karas [Mon, 24 Feb 2020 12:55:42 +0000 (04:55 -0800)]
Mark class ctors as preserved for dependencies of System.SR (#31718)

The System.SR.InternalGetResourceString calls RuntimeHelpers.RunClassConstructor on several classes. This is a dependency the ILLinker won't be able to figure out, so explicit PreserveDependency is needed.

4 years agoMerge pull request #32540 from vitek-karas/PreserveDepWinRT
Vitek Karas [Mon, 24 Feb 2020 11:42:10 +0000 (03:42 -0800)]
Merge pull request #32540 from vitek-karas/PreserveDepWinRT

Preserve dep win rt

4 years ago[interp] Use alloca for InterpFrame (#32720)
monojenkins [Mon, 24 Feb 2020 09:31:31 +0000 (04:31 -0500)]
[interp] Use alloca for InterpFrame (#32720)

This is like https://github.com/mono/mono/pull/19002 but next_free is initialized upon allocation instead of `pop_frame` which is a slight optimization, if it works.

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[interp] Decruft PowerPC. (#32654)
monojenkins [Mon, 24 Feb 2020 08:13:07 +0000 (03:13 -0500)]
[interp] Decruft PowerPC. (#32654)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoUpdate library name variations for uses with LoadLibrary (#32707)
Next Turn [Mon, 24 Feb 2020 04:49:28 +0000 (12:49 +0800)]
Update library name variations for uses with LoadLibrary (#32707)

4 years agoMove fat call policy out of RyuJIT (#32718)
Michal Strehovský [Sun, 23 Feb 2020 23:30:08 +0000 (00:30 +0100)]
Move fat call policy out of RyuJIT (#32718)

The EE side would like to be able to decide whether to do fat call or not.

4 years agoMerge pull request #32279 from nattress/coreroot_determinism
Simon Nattress [Sun, 23 Feb 2020 19:24:12 +0000 (11:24 -0800)]
Merge pull request #32279 from nattress/coreroot_determinism

Fix silent failure of coreroot_determinism test

4 years ago[interp] Remove some unused paths in newobj and cleanup a little. (#32685)
monojenkins [Sun, 23 Feb 2020 13:16:05 +0000 (08:16 -0500)]
[interp] Remove some unused paths in newobj and cleanup a little. (#32685)

This is an alternative to https://github.com/mono/mono/pull/18974.
Mainly that it does not introduce new opcode to remove branch from newobj/newobj_string.
Both eliminate a bit of dead code in newobj (if turns out to be alive, can also be new opcodes).

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years ago[interp] Pop leave and calli_nat frames. (#32691)
monojenkins [Sun, 23 Feb 2020 13:11:53 +0000 (08:11 -0500)]
[interp] Pop leave and calli_nat frames. (#32691)

Co-authored-by: Jay Krell <jay.krell@cornell.edu>
4 years agoAnnotate System.Net.WebProxy for nullable reference types (#32612)
Stephen Toub [Sun, 23 Feb 2020 02:11:01 +0000 (21:11 -0500)]
Annotate System.Net.WebProxy for nullable reference types (#32612)

4 years agoRemove unused param from EventPipe (#32698)
Mukul Sabharwal [Sat, 22 Feb 2020 23:59:07 +0000 (15:59 -0800)]
Remove unused param from EventPipe (#32698)

4 years ago[corlib] Link out more SR/SRE types (#32101)
monojenkins [Sat, 22 Feb 2020 22:34:59 +0000 (17:34 -0500)]
[corlib] Link out more SR/SRE types (#32101)

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
4 years agoMake ReadyToRunReader constructor completely lazy (#32682)
Andrew Au [Sat, 22 Feb 2020 20:25:01 +0000 (12:25 -0800)]
Make ReadyToRunReader constructor completely lazy (#32682)

4 years agoUse StringBuilder.Append(Char) instead of converting char to string (#32686)
Alaa Masoud [Sat, 22 Feb 2020 20:04:16 +0000 (23:04 +0300)]
Use StringBuilder.Append(Char) instead of converting char to string (#32686)

* Use StringBuilder.Append(Char) instead of converting char to string

* revert unused local removal

4 years agoJIT: Fix arm gcstress/jistress issues (#32674)
Andy Ayers [Sat, 22 Feb 2020 16:30:51 +0000 (08:30 -0800)]
JIT: Fix arm gcstress/jistress issues (#32674)

Three fixes for gc liveness and the profile exit hook on arm.

* If we're returning results via the hidden return buffer pointer,
make sure we treat R0 as gc live, as it holds a BYREF and may well be
a gc reference, when the method is invoked via reflection.
* If R0 is otherwise live make sure to check the "native" return type so
we handle struct-wrapped GC ref returns properly.
* If we have a tail call or tail jump, R0 is not the return value, so deducing
GC liveness for it based on method properties is unsound. It turns out in both
cases that R0 is not in use; for tail calls this is ensured by insertion of the
helper call before register allocation; for tail jumps, by spilling the argument
registers in `genJmpMethod`.

Expect this will fix most or all of the failures in #31770.

4 years agoAdditional SuperIlc fixes for running composite R2R images (#32665)
Tomáš Rylek [Sat, 22 Feb 2020 08:56:47 +0000 (09:56 +0100)]
Additional SuperIlc fixes for running composite R2R images (#32665)

As an expedite way to run "non-shared" composite R2R images
(including the frameworK) I have added support to SuperIlc to
copy corerun, coreclr, clrjit and mscorrc next to the compiled
composite executable and supplying that as the CORE_ROOT
folder; otherwise corerun in the normal Tests/Core_Root
automatically grabs the framework next to it, not the composite
rewritten versions.

Thanks

Tomas

4 years agoFix CrstTypeTool to target the right header file on non-Windows platform (#32689)
Sung Yoon Whang [Sat, 22 Feb 2020 03:52:49 +0000 (19:52 -0800)]
Fix CrstTypeTool to target the right header file on non-Windows platform (#32689)

4 years agoUse GT_NULLCHECK for unconsumed indirections. (#32641)
Eugene Rozenfeld [Sat, 22 Feb 2020 01:53:37 +0000 (17:53 -0800)]
Use GT_NULLCHECK for unconsumed indirections. (#32641)

All unconsumed indirections are now GT_NULLCHECKs, which
allows optFoldNullChecks to remove more redundant null checks.

4 years agoMulticastOption.Group no longer accepts null. (#32518)
Eric Erhardt [Sat, 22 Feb 2020 00:55:24 +0000 (18:55 -0600)]
MulticastOption.Group no longer accepts null. (#32518)

* MulticastOption.Group no longer accepts null.

MulticastOption.Group is not supposed to accept null. If someone sets it to null, we will NRE inside of the Sockets implementation.

I also fixed two small double-cast problems while I was in here.

Fix #32490

4 years agoFix several HTTP/3 uses of ValueTask (#32671)
Stephen Toub [Sat, 22 Feb 2020 00:44:09 +0000 (19:44 -0500)]
Fix several HTTP/3 uses of ValueTask (#32671)

4 years agoAdding comments
Brian Bohe [Fri, 21 Feb 2020 22:56:32 +0000 (14:56 -0800)]
Adding comments

4 years agoFixing format problems
Brian Bohe [Fri, 21 Feb 2020 22:51:13 +0000 (14:51 -0800)]
Fixing format problems

4 years agoBail out on CORINFO_STATIC_FIELD_ADDRESS like Crossgen1 does (#32664)
Tomáš Rylek [Fri, 21 Feb 2020 22:47:15 +0000 (23:47 +0100)]
Bail out on CORINFO_STATIC_FIELD_ADDRESS like Crossgen1 does (#32664)

This was the main problem after I overcame initial issues with
composite R2R debugging and runtime initialization: for some reason,
console output was weirdly distorted. By selectively compiling
just a subset of the framework I bisected this into
System.Console.get_Out which uses the ldsflda instruction that
Crossgen1 doesn't support. We pretended to support it but did it
incorrectly and so our result didn't match JIT. I have created
the tracking issue

https://github.com/dotnet/runtime/issues/32663

on implementing the static address as a minor perf optimization
(likely only important in some corner scenarios heavily using
statics).

Thanks

Tomas

4 years ago[metadata] Mark mono_signature_get_return_type external only (#32661)
monojenkins [Fri, 21 Feb 2020 22:35:41 +0000 (17:35 -0500)]
[metadata] Mark mono_signature_get_return_type external only (#32661)

Also `mark mono_signature_get_params` external only.

Runtime should use `mono_signature_get_return_type_internal`
and `mono_signature_get_params_internal`

Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
4 years agoFix nullability annotations in Pkcs (#32616)
buyaa-n [Fri, 21 Feb 2020 22:32:30 +0000 (14:32 -0800)]
Fix nullability annotations in Pkcs (#32616)

Fixing nullability annotations

4 years agoJIT/EE interface cleanup (#32521)
Jan Kotas [Fri, 21 Feb 2020 22:15:02 +0000 (14:15 -0800)]
JIT/EE interface cleanup (#32521)

* Delete methods on JIT/EE interface that are no longer used in CoreCLR

* Remove workaround for getLocationOfThisType method

* Hardcode verificationNeeded to false

* Added links to issues

* Delete .gitmirror files

4 years agoUpdating VariableLiveRange
Brian Bohe [Fri, 21 Feb 2020 19:43:36 +0000 (11:43 -0800)]
Updating VariableLiveRange

When a variable is being born at the same location it
died at the previous assembly instruction (in the same
group of instructions), we reported as it was alive
the whole time.

4 years agoChange debug info default variable tracking system.
Brian Bohe [Thu, 23 Jan 2020 02:18:11 +0000 (18:18 -0800)]
Change debug info default variable tracking system.

Varible Scope info is being disabled. Variable
Live Range is being enabled. Debug info generated
for debug code is the same, changes only impact on
optimized code.

Variable Live Range updates variable's location
each time something happens to variable's
liveness. For more information see
https://github.com/dotnet/runtime/blob/master/docs/design/features/variabletracking.md

4 years agoRemoved misleading doc and added -vs testing (#32618)
Marie Píchová [Fri, 21 Feb 2020 21:18:37 +0000 (22:18 +0100)]
Removed misleading doc and added -vs testing (#32618)

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
4 years ago[Arm64] AddAcross MaxAcross MinAcross MaxNumber MaxNumberPairwise MaxPairwise (#32620)
Egor Chesakov [Fri, 21 Feb 2020 20:22:10 +0000 (12:22 -0800)]
[Arm64] AddAcross MaxAcross MinAcross MaxNumber MaxNumberPairwise MaxPairwise (#32620)

Implements the following intrinsics:

* AddPairwise, AddPairwiseScalar

* MaxAcross

* MaxNumber, MaxNumberScalar

* MaxNumberAcross

* MaxPairwise, MaxPairwiseScalar

* MinAcross

* MinNumberAcross

* MinPairwise, MinPairwiseScalar

---

Updates AddAcross to return Vector64<T> as we discussed in API review meeting

---

Updates emitter such that emitIns functions for faddp (scalar), fmaxp (scalar), fmaxv, smaxv and similar instructions require opt argument to have non-INS_OPTS_NONE value (i.e. specified according to the Arm technical documentation even in a case when an instruction has only one valid vector arrangement). For example, 2-operand form of faddp requires INS_OPTS_2S or INS_OPTS_2D options to be specified and fmaxv requires INS_OPTS_4S.

---

Changes the precedence of criteria for computing instruction SIMD size for GT_HWINTRINSIC node. This is needed for AddAcross, MaxAcross, AddPairwiseScalar etc.

For example, AddPairwiseScalar returns Vector64<T> value and before that change the SIMD size computed here was based only on the return value size (even when BaseTypeFromFirstArg or BaseTypeFromSecondArg flags were set), i.e. it was 8 bytes in all of these cases:

* Vector64<float> AddAcross(Vector128<float> value) - SIMD size should be 16 bytes FADDV Sd, Vn.4S

* Vector64<float> AddPairwiseScalar (Vector64<float> value) - SIMD size is 8 bytes FADDP Sd, Vn.2S

* Vector64<double> AddPairwiseScalar (Vector128<double> value) - SIMD size should be 16 bytes FADDP Dd, Vn.2D

---

Moves smaxv, sminv, addv and similar instructions to a separate instruction form DV_2T.

4 years agoAdded some parenthesis and a cast to control order of operations. (#32640)
Nathan Ricci [Fri, 21 Feb 2020 18:50:55 +0000 (13:50 -0500)]
Added some parenthesis and a cast to control order of operations. (#32640)

Fix intermittent negative values from GetTotalBytesAllocated.

4 years agoAllowNatTraversal is properly set for stopped socket (#32603)
Alexander Nikolaev [Fri, 21 Feb 2020 18:44:22 +0000 (19:44 +0100)]
AllowNatTraversal is properly set for stopped socket (#32603)

If AllowNatTraversal is called on a stopped TcpListener when ```_serverSocket``` is null, ```allow``` value gets stored in a field. Subsequently, if a new socket is created on Start call, the saved value is read and the corresponding argument is passed to SetIPProtectionLevel call after which the value is reset to preserve the current IPProtectionLevel propagation logic. The follow-up issue is #32653
Fixes #32551

4 years agoRemove CreditManager from Http2Stream (#32624)
Stephen Toub [Fri, 21 Feb 2020 18:08:13 +0000 (13:08 -0500)]
Remove CreditManager from Http2Stream (#32624)

The CreditManager implementation supports multiple awaiters, but Http2Stream's CreditManager never has more than one waiter at a time.  We can instead just encode similar logic into Http2Stream, and make its waiter a reusable singleton, such that if we have to allocate it, we can just keep reusing it for all subsequent waits.  This means we avoid the CreditManager allocation per Http2Stream as well as the Waiter allocation per wait (other than the first).

4 years agoFix NetworkInformation / execution context usage for HTTP/3 and Alt-Svc (#32621)
Cory Nelson [Fri, 21 Feb 2020 18:00:30 +0000 (10:00 -0800)]
Fix NetworkInformation / execution context usage for HTTP/3 and Alt-Svc (#32621)

Fix: leaking NetworkAddressChangedEventHandler and related WeakReference if user does not Dispose HttpClient. Resolves #32526.
Fix: using HttpClient from within a suppressed execution context. Add test for this. Resolves #32524.
Fix: capturing excessive execution context in Alt-Svc expiration timer.
Optimization: do not monitor for network changes until a non-persistent Alt-Svc is used.

4 years agoAdding new MSRC portal details (#32652)
Barry Dorrans [Fri, 21 Feb 2020 17:59:34 +0000 (09:59 -0800)]
Adding new MSRC portal details (#32652)

* Adding new MSRC portal details

* Update SECURITY.md

Co-authored-by: Stephen Toub <stoub@microsoft.com>
4 years agoAnnotate System.Net.Primitives for nullable (#31794)
Ilya [Fri, 21 Feb 2020 17:59:19 +0000 (22:59 +0500)]
Annotate System.Net.Primitives for nullable (#31794)

* Annotate System.Net.Primitives for nullable

* Fix build breaks in other libraries due to new annotations

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