platform/upstream/dotnet/runtime.git
5 years agoUpdating Math.Round and MathF.Round to be IEEE compliant so that the intrinsic and...
Tanner Gooding [Mon, 5 Aug 2019 21:54:22 +0000 (14:54 -0700)]
Updating Math.Round and MathF.Round to be IEEE compliant so that the intrinsic and managed form are deterministic. (dotnet/coreclr#25901)

* Updating Math.Round and MathF.Round to be IEEE compliant so that the intrinsic and managed form are deterministic.

* Fixing the Math.Round and MathF.Round handling for values greater than 0.5 and less than 1.0

* Applying formatting patch.

Commit migrated from https://github.com/dotnet/coreclr/commit/c384e36c84c22393efeeb1981538b0aef02cf97a

5 years agouse a platform-agnostic name for coredistools lib (dotnet/coreclr#25999)
Ashley Mannix [Mon, 5 Aug 2019 07:08:30 +0000 (17:08 +1000)]
use a platform-agnostic name for coredistools lib (dotnet/coreclr#25999)

Commit migrated from https://github.com/dotnet/coreclr/commit/e72ac908bd84ad22ea4fec74e30219380075325c

5 years agoDo not set source for CoreDisTools. (dotnet/coreclr#25991)
Sergey Andreenko [Fri, 2 Aug 2019 23:27:12 +0000 (16:27 -0700)]
Do not set source for CoreDisTools. (dotnet/coreclr#25991)

We do not set it when we restore other packages so unify that.

dotnet -restore will search for nuget.config and find https://github.com/dotnet/coreclr/blob/master/NuGet.config that contains https://dotnet.myget.org/F/dotnet-core/api/v3/index.json that is needed here.

Commit migrated from https://github.com/dotnet/coreclr/commit/69649624d71a4d7ebcae2ce5420508e5fe5ba7f2

5 years agoFix build break (dotnet/coreclr#25992)
Mike McLaughlin [Fri, 2 Aug 2019 22:56:36 +0000 (15:56 -0700)]
Fix build break (dotnet/coreclr#25992)

Issue: https://github.com/dotnet/coreclr/issues/25990

Commit migrated from https://github.com/dotnet/coreclr/commit/fd6dc9d9f9f39b3b812589522e02c0f8403e3f1d

5 years agoReport AzDO telemetry for the formatting errors. (dotnet/coreclr#25975)
Sergey Andreenko [Fri, 2 Aug 2019 20:56:50 +0000 (13:56 -0700)]
Report AzDO telemetry for the formatting errors. (dotnet/coreclr#25975)

Commit migrated from https://github.com/dotnet/coreclr/commit/bb809f78678ba7fd5783f94919f99860b8b5e080

5 years agoarm64 out of proc unwind for DAC (dotnet/coreclr#25909)
Mike McLaughlin [Fri, 2 Aug 2019 20:16:21 +0000 (13:16 -0700)]
arm64 out of proc unwind for DAC (dotnet/coreclr#25909)

arm64 out of proc unwind for DAC

Removed FEATURE_DATATARGET4 for arm64

Added SP check to createdump's native unwind
loop to make it more robust.

Commit migrated from https://github.com/dotnet/coreclr/commit/0d5a6395fce4a3bdfb249645bad9724cd120b50f

5 years agoEnsure that we check for implicit ivals for single argument intrinsics before the...
Tanner Gooding [Fri, 2 Aug 2019 15:48:52 +0000 (08:48 -0700)]
Ensure that we check for implicit ivals for single argument intrinsics before the SIMDScalar handling. (dotnet/coreclr#25905)

* Ensure that we check for implicit ivals for single argument intrinsics before the SIMDScalar handling.

* Adding test template entries for the unary overloads of the Sse41.Round functions

* Regenerating the hardware intrinsic test templates.

Commit migrated from https://github.com/dotnet/coreclr/commit/bcc73ca212da78acc1745b7958ba32ae530c2c80

5 years agoFix CounterGroup to use built-in types
Stephen Toub [Fri, 2 Aug 2019 00:42:56 +0000 (20:42 -0400)]
Fix CounterGroup to use built-in types

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/c96da4ac6e8e5191064980234fc3a497f753c7e7

5 years agoEnable stylecop warnings 1205, 1212, and 1617 (dotnet/corefxdotnet/coreclr#39941)
Stephen Toub [Thu, 1 Aug 2019 22:00:12 +0000 (18:00 -0400)]
Enable stylecop warnings 1205, 1212, and 1617 (dotnet/corefxdotnet/coreclr#39941)

* Enable stylecop warning 1617 (void return value should not be documented)

* Enable stylecop warning 1212 (get/set accessor ordering)

* Enable stylecop warning 1205 (modifier ordering)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/1fede649ca386fa7ba7a5a2b26b4c95a9f675a2c

5 years agoEnable several StyleCopAnalyzers (dotnet/corefxdotnet/coreclr#39921)
Stephen Toub [Wed, 31 Jul 2019 23:10:59 +0000 (19:10 -0400)]
Enable several StyleCopAnalyzers (dotnet/corefxdotnet/coreclr#39921)

* Fix ordering of keywords in member signatures

* Add StyeCop.Analyzers

Most rules are disabled.  Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.

* Use built-in type alias

* Fix straggling stylecop warnings in all configurations

* Replace tabs with spaces

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/752d682682faa1a869ed95a9e3c1681a64504574

5 years agoRe-enable CA1823 (unused private fields) (dotnet/corefxdotnet/coreclr#39899)
Stephen Toub [Wed, 31 Jul 2019 12:04:33 +0000 (08:04 -0400)]
Re-enable CA1823 (unused private fields) (dotnet/corefxdotnet/coreclr#39899)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/43056d429628fb58be399f0dd0d53adfb505098c

5 years agoFix check for no affinitization in GC on Unix (dotnet/coreclr#25963)
Jan Vorlicek [Thu, 1 Aug 2019 23:20:22 +0000 (01:20 +0200)]
Fix check for no affinitization in GC on Unix (dotnet/coreclr#25963)

* Fix check for no affinitization in GC on Unix

While the affinitization mask setting is not used for affinity setting
on Unix, it was still being checked for non-zero as one of the
indicators that GC heap affinitization was enabled. This change removes
that check for Unix builds.

Commit migrated from https://github.com/dotnet/coreclr/commit/cd42ee8fe410f71026467ad2e90116115b85f68d

5 years agoFix WSL alternate stack check (dotnet/coreclr#25972)
Jan Vorlicek [Thu, 1 Aug 2019 23:14:12 +0000 (01:14 +0200)]
Fix WSL alternate stack check (dotnet/coreclr#25972)

* Fix WSL alternate stack check

On WSL, the alternate stack check in sigsegv_handler doesn't work. The
uc_stack members are always zero no matter whether the handler is
executed on an alternate or default stack. So the check to detect
whether we are running on an alternate stack or not is always returning
false on WSL and it prevents NULL reference exceptions from being
handled.
The fix is to introduce an env variable COMPlus_EnableAlternateStackCheck
that can be used to enable the alternate stack check. By default, the
sigsegv_handler is considered to always run on an alternate stack.

Commit migrated from https://github.com/dotnet/coreclr/commit/d7d8f91a8bad9effe9b5605edec6d26d540e0f85

5 years agoDecimal test refresh (dotnet/coreclr#25955)
Jeremy Koritzinsky [Thu, 1 Aug 2019 22:34:05 +0000 (15:34 -0700)]
Decimal test refresh (dotnet/coreclr#25955)

* Rewrite decimal PInvoke tests

* Rewrite Decimal tests to make managed the single source of truth. Remove most reverse-P/Invoke tests that didn't add coverage.

* Add include of <new>

* Enable enregistering structs containing a decimal on SystemV abi. Fixes dotnet/coreclr#25974.

Commit migrated from https://github.com/dotnet/coreclr/commit/8bd6e5468b6ab83ac39cca43c322e44d9039b166

5 years agoAllow for interface implementations in EventSource.WriteEventVarArgs (dotnet/coreclr...
John Salem [Thu, 1 Aug 2019 22:27:48 +0000 (15:27 -0700)]
Allow for interface implementations in EventSource.WriteEventVarArgs (dotnet/coreclr#25844)

* Allow for interface implementations in EventSource.WriteEventVarArgs

* Also account null ref types and nullable types

* fix error in comment and simplify first part of boolean logic

* Update src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs

Co-Authored-By: Noah Falk <noahfalk@users.noreply.github.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/c284bbfa83db019c34afe8835e198409f4168c02

5 years agoMerge pull request dotnet/coreclr#25951 from ivdiazsa/GetPathOfFileAbove_branch
Ivan Diaz Sanchez [Thu, 1 Aug 2019 21:32:40 +0000 (14:32 -0700)]
Merge pull request dotnet/coreclr#25951 from ivdiazsa/GetPathOfFileAbove_branch

Changed GetDirectoryNameOfFileAbove to GetPathOfFileAbove.

Commit migrated from https://github.com/dotnet/coreclr/commit/12a76d368ea60518e6db389fb4ec3f593a678362

5 years agoDllImportAttribute Test Cleanup. (dotnet/coreclr#25970)
Jeremy Koritzinsky [Thu, 1 Aug 2019 21:01:38 +0000 (14:01 -0700)]
DllImportAttribute Test Cleanup. (dotnet/coreclr#25970)

Reduce DllImportPath tests to minimal native code to help limit additional factors when we add perf-tests.

Combine our two separate tests of Dll path probing into one test library. Move DllImportPath and ExactSpelling tests to the DllImportAttribute folder since they're testing specific parts of the attribute.

Commit migrated from https://github.com/dotnet/coreclr/commit/e53cad98ee39f5b707632ea91026afbbc5ee088f

5 years agoMarking some EventPipe test as incompatible with runincontext. (dotnet/coreclr#25954)
José Rivero [Thu, 1 Aug 2019 08:26:20 +0000 (01:26 -0700)]
Marking some EventPipe test as incompatible with runincontext. (dotnet/coreclr#25954)

https://github.com/dotnet/coreclr/issues/25815#issuecomment-516794116
Fixes https://github.com/dotnet/coreclr/issues/25815

Commit migrated from https://github.com/dotnet/coreclr/commit/11c3fe5bdaea9cb76c775b5317fcef71cc67f1ef

5 years agoForce runtest to run with tests build on same host (dotnet/coreclr#25927)
Jarret Shook [Thu, 1 Aug 2019 00:35:24 +0000 (17:35 -0700)]
Force runtest to run with tests build on same host (dotnet/coreclr#25927)

* Delete unused code

* Delete build_xunit_test_wrappers

Commit migrated from https://github.com/dotnet/coreclr/commit/8b0d96b363eed8a104c8069e9eaf9ff87b52024e

5 years agoWhitespace (dotnet/coreclr#25957)
Steve MacLean [Thu, 1 Aug 2019 00:31:55 +0000 (20:31 -0400)]
Whitespace (dotnet/coreclr#25957)

Commit migrated from https://github.com/dotnet/coreclr/commit/e8edd40648bf19658da273df9f7d3c147b9c8ad8

5 years agoMake counters use dedicated thread instead of timer (dotnet/coreclr#25864)
Sung Yoon Whang [Wed, 31 Jul 2019 22:47:13 +0000 (15:47 -0700)]
Make counters use dedicated thread instead of timer (dotnet/coreclr#25864)

* Make a dedicated polling thread for EventCounters

* Cleanup

* remove debug prints

* nit

* Fix comment

* addressing issues from code review

* Fix an assertion from getting fired when we have multiple listeners

* Fix a test issue

* code review feedback

* Fix a potential deadlock

* Fix another deadlock

* Allow s_sleepDurationInMilliseconds to be reset to a larger value

* More issues fix

* Let thread wake up from sleep if needed

* Some suggestions for the counters fix.

The resulting behavior should be the same as what is there now (assuming I didn't mess anything up), these are all just code simplifications that hopefully make it easier to review and maintain going forward. In total I think this reduces the change size in CounterGroup.cs by ~30%.
- With the addition of the AutoResetEvent the ManualResetEvent is no longer needed, removed it.
- Removed the various if foo != null checks for the shared state, it is all initialized once when then thread is created and then assumed to be non-null elsewhere.
- Removed a 2nd lock acquisition inside OnTimer
- Replaced an if with Math.Min in PollForValues

* fix test

Commit migrated from https://github.com/dotnet/coreclr/commit/b3de897450a789e3be011a384e13c61c98a5e62b

5 years agoChanged GetDirectoryNameOfFileAbove to GetPathOfFileAbove
Ivan Diaz Sanchez [Wed, 31 Jul 2019 19:04:26 +0000 (12:04 -0700)]
Changed GetDirectoryNameOfFileAbove to GetPathOfFileAbove

Commit migrated from https://github.com/dotnet/coreclr/commit/dc3e9bbad82e1ca3f606d00af0ec6269910a7558

5 years agoFixes Issue dotnet/coreclr#20262 for CoreCLR 5.0 (dotnet/coreclr#25926)
Brian Sullivan [Wed, 31 Jul 2019 16:53:28 +0000 (09:53 -0700)]
Fixes Issue dotnet/coreclr#20262 for CoreCLR 5.0 (dotnet/coreclr#25926)

Disassembler:  ildasm/dasm.cpp

 In the CoreCLR with reference assemblies and redirection it is more difficult to determine if
 a particular Assembly is the System assembly, like mscorlib.dll is for the Desktop CLR.
 In the CoreCLR runtimes, the System assembly can be System.Private.CoreLib.dll, System.Runtime.dll
 or netstandard.dll and in the future a different Assembly name could be used.
 We now determine the identity of the System assembly by querying if the Assembly defines the
 well known type System.Object as that type must be defined by the System assembly
 If this type is defined then we will output the ".mscorlib" directive to indicate that this
 assembly is the System assembly.

Assembler:  ilasm/assembler.cpp

 In Assembler:GetBaseAsmRef() add a check for System.Private.CoreLib as the System or Base assembly.

Commit migrated from https://github.com/dotnet/coreclr/commit/cb86146124105553961e1d3e795bd9e1de7182ce

5 years agoFix issue with out-of-scope GCFrame in Frame list (dotnet/coreclr#25795)
Jan Vorlicek [Wed, 31 Jul 2019 07:45:22 +0000 (09:45 +0200)]
Fix issue with out-of-scope GCFrame in Frame list (dotnet/coreclr#25795)

* Fix issue with out-of-scope GCFrame in Frame list

More aggressive C/C++ optimizations done by VS2019 are breaking fragile
assumptions of the CoreCLR "manually managed code".

Unwinding of Frame chains accesses stack local variables after the stack
frame has been unwound, but it depends on their content to be left
intact. The new compiler is breaking this assumption by stack-packing a
different variable over it.

This change fixes the problem by adding a destructor to GCFrame that
pops the frame from the per-thread Frame list.

ExceptionFilterFrame can be on top of the explicit frames stack when we
are trying to destroy the GC frame, so it needs the same treatment as
the GCFrame.

Commit migrated from https://github.com/dotnet/coreclr/commit/09cb367557c580466b6de7582f1e53c9af526c9b

5 years agoAdd 2 EventPipe tests (dotnet/coreclr#25893)
jiangzeng01 [Wed, 31 Jul 2019 00:32:34 +0000 (08:32 +0800)]
Add 2 EventPipe tests (dotnet/coreclr#25893)

* Add EventPipe tests - ExceptionThrown_V1

* Add EventPipe test - GCStartStop

* EventPipe tests - update method name

* Fix eventpipe tests according to PR comments

* GCStartEnd test - Reduce the number of forced GCs

* GCStartEnd - add callback logging

* Fix GCStartEnd test issue

Commit migrated from https://github.com/dotnet/coreclr/commit/f438de131ea4f9058a8a1377993a8088a15a2e4b

5 years agocrossgen-comparison pipeline job
Russ Keldorph [Mon, 22 Jul 2019 17:59:52 +0000 (17:59 +0000)]
crossgen-comparison pipeline job

Add PR- and CI-triggered jobs for crossgen-comparison, which runs
"cross"-crossgen on a selection of assemblies on the build host and
then compares the results to the corresponding native crossgen.

Note that this change enables Linux ARM jobs only. It attempts to
support other configurations, notably Windows, but those YAML paths
have not been tested because they are not needed at this point.

Part of dotnet/coreclr#24358

Commit migrated from https://github.com/dotnet/coreclr/commit/429bd1a1efd528602659b699736aa567f3e2c408

5 years agoAllow default interface methods for crossgen /createpdb (dotnet/coreclr#25839)
Michal Strehovský [Tue, 30 Jul 2019 15:11:17 +0000 (17:11 +0200)]
Allow default interface methods for crossgen /createpdb (dotnet/coreclr#25839)

The existing code was assuming we're doing fragile crossgen and blocked loading the type.

Commit migrated from https://github.com/dotnet/coreclr/commit/39f207ad8babe677029ddc2c72714a9959da2475

5 years agoCleanup thread local state management in PAL (dotnet/coreclr#25828)
Jan Kotas [Tue, 30 Jul 2019 15:07:52 +0000 (17:07 +0200)]
Cleanup thread local state management in PAL (dotnet/coreclr#25828)

* Cleanup thread local state management in PAL

- Delete PAL Enter/Leave callbacks
- Delete TlsAlloc/TlsGetValue/TlsSetValue/TlsFree, convert these to use regular thread statics

* Delete SEH Info

* Delete some more dead code

Commit migrated from https://github.com/dotnet/coreclr/commit/a1d0a97d81a340808d9e7da90d0ea276d51bc3b0

5 years agoFix test error reporting (dotnet/coreclr#25866)
Ryan Lucia [Mon, 29 Jul 2019 19:45:31 +0000 (15:45 -0400)]
Fix test error reporting (dotnet/coreclr#25866)

Commit migrated from https://github.com/dotnet/coreclr/commit/98474560029752f1f6a36a77c6ef0ea77a83a76c

5 years agoILMarshaler Refactor v2 (dotnet/coreclr#25736)
Jeremy Koritzinsky [Mon, 29 Jul 2019 17:18:40 +0000 (10:18 -0700)]
ILMarshaler Refactor v2 (dotnet/coreclr#25736)

* Don't keep managed values from parameters alive via the cleanup work list. Keep them alive via a plain GC.KeepAlive.

Match original behavior for SafeHandle byref fields

* Revert "Revert "ILMarshaler Refactor (dotnet/coreclr#21227)" (dotnet/coreclr#25292)"

This reverts commit dotnet/coreclr@41893484b3fecdb5ffe69f0c94a5832690feeb5a.

* Remove duplicate argument consumption.

* PR Feedback

* Initialize dwAddRefd local in SafeHandle byval marshaler.

* PR Feedback.

Commit migrated from https://github.com/dotnet/coreclr/commit/80106e964b929a728c0568d913208eb14f86f167

5 years agoUpdate fgCanFastTailCall to use new fgArgInfo (dotnet/coreclr#20643)
Jarret Shook [Mon, 29 Jul 2019 16:06:49 +0000 (09:06 -0700)]
Update fgCanFastTailCall to use new fgArgInfo (dotnet/coreclr#20643)

* Use fgInitArgInfo in fgCanFastTailCall

This leverages the work done in dotnet/coreclr#19658 to use fgInitArgInfo in fgCanFastTailCall. This removes much of the duplicate ABI code that was required before dotnet/coreclr#19658. In addition, the change more clearly explains the issues with LowerFastTailCall and more clearly bails on when it can and cannot fastTailCall.

Note:

Part of the old logic would report no to a fastTailCall on Windows AMD64, if the struct was a power of two (engregisterable). This has been removed; however, it is unclear currently whether LowerFastTailCall/Codgen will support the change.

* Address pr feedback for FastTailCallCandidates

* Update variable name based on rebase

* Fix comment headers based on feedback

* More feedback addressed

* Fix rebase error

* Address feedback and correctly bail on byref args

* Restrict to only bail on byref struct args

* Correctly used computations from fgArgInfo

* Correctly re-init arg infor for explicit tailcalls

This is required because morphTailCall modifies the argument list.

It would be nice in the future to go through each argument on subsequent calls to fgInitArgInfo to verify there have been no changes.

* Fix x86 assert

* Address PR feedback related to recomputing initArgs

* Fix comment

* Update fgCanFastTailCall header

* Address PR feedback

* Apply format patch

* Correctly reset arginfo after morphtailcall

* Commit does several small things, and fixes a bug

Addresses PR feedback
Removes dead code
Changes to bail a fast tail call when the caller has a multi slot struct

* Fix windows build

* Address pr feedback

* Fix arm and x86 builds

* apply format patch and remove dotnet/coreclr#25885

* Rebase on master

* Apply format patch

Commit migrated from https://github.com/dotnet/coreclr/commit/f8f0c55b862ee4512c62b7eeb0fdae8a21af463a

5 years agoImprove metadata perf and refactor ilasm/ildasm metadata usage (dotnet/coreclr#25144)
David Wrighton [Mon, 29 Jul 2019 01:49:33 +0000 (18:49 -0700)]
Improve metadata perf and refactor ilasm/ildasm metadata usage (dotnet/coreclr#25144)

* Optimize enumeration in IMDInternal
- Move enumerator functions to be directly implemented instead of relying on COM/vtable dispatch
- Delete unused functions
- Replace TypeDef enumeration logic to be the same as the general case
- Update guid of IMDInternalImport as the api has changed

Build metadata into ildasm and ilasm instead of referencing coreclr
- SHA1Hash class moved to utilcode
- careful detachment of bindings between metadata and runtime
  - Able to reuse wks build of metadata logic for ilasm/ildasm

Commit migrated from https://github.com/dotnet/coreclr/commit/ef7767a3ba1c0a34b55cbd5496b799b17218ca14

5 years agoEliminate extra time zone conversions in DateTimeOffset (dotnet/coreclr#25658)
ts2do [Sun, 28 Jul 2019 22:52:17 +0000 (17:52 -0500)]
Eliminate extra time zone conversions in DateTimeOffset (dotnet/coreclr#25658)

* Eliminate extra time zone conversions in DateTimeOffset

Revised members dealing specifically with local time by removing delegation to DateTime methods to avoid an extra call to TimeZoneInfo to determine offset:
Now
FromFileTime(long)
ToLocalTime()

* Fix DateTimeOffset.ToLocalTime(bool)

* Consolidate conversion from UTC DateTime to Local DateTimeOffset

Commit migrated from https://github.com/dotnet/coreclr/commit/3a123a290ed755c8ee4959d1a49d7bac8bc36e29

5 years agoFix use of AddTo/RemoveFromActiveTasks in async methods (dotnet/coreclr#25911)
Stephen Toub [Sun, 28 Jul 2019 02:05:08 +0000 (22:05 -0400)]
Fix use of AddTo/RemoveFromActiveTasks in async methods (dotnet/coreclr#25911)

When we rewrote the async methods implementation with AsyncStateMachineBox, we neglected to call AddToActiveTasks if the debugger is paying attention to tasks.  This hasn't mattered as the debugger's support for Tasks hasn't worked for other reasons in .NET Core, but there is now a renewed focus on it, and this is preventing some of that support from working.

This change is a minimal fix to ensure that we're adding the state machine box task when it's created and removing it when it completes.  Post-3.0, we should look at overhauling this, e.g. to clean up a lot of this logging and tracking that's done, to use a weak table in order to avoid keeping task objects alive artificially if they're dropped without completing by the developer code, etc.

This only affects when the debugger is attached, as the s_asyncDebuggingEnabled field is only ever set by the debugger.

Commit migrated from https://github.com/dotnet/coreclr/commit/ac84ed3ce0bfecb74def2d3f86100c4ee5e323aa

5 years agoFix nullability annotations for static (dotnet/coreclr#25913)
Stephen Toub [Sun, 28 Jul 2019 00:15:55 +0000 (20:15 -0400)]
Fix nullability annotations for static (dotnet/coreclr#25913)

The compiler is now analyzing statics.  Get compliant.

Commit migrated from https://github.com/dotnet/coreclr/commit/35d7103bf1340a1a8a951f491d48e740ccb1a5f8

5 years agoFix a typo (dotnet/coreclr#25908)
Andrew Au [Sat, 27 Jul 2019 05:30:02 +0000 (22:30 -0700)]
Fix a typo (dotnet/coreclr#25908)

Commit migrated from https://github.com/dotnet/coreclr/commit/6b130c22db1c309a75dd3b679f04035e2c8fec9d

5 years agoDisable windows formatting job in CI. (dotnet/coreclr#25902)
Sergey Andreenko [Fri, 26 Jul 2019 23:34:23 +0000 (16:34 -0700)]
Disable windows formatting job in CI. (dotnet/coreclr#25902)

Commit migrated from https://github.com/dotnet/coreclr/commit/e1d1b34eec55e1bcd8fdcaeb7711623f3811f3cf

5 years agoDo not fast tail call if caller has multislot structs (dotnet/coreclr#25885)
Jarret Shook [Fri, 26 Jul 2019 23:29:56 +0000 (16:29 -0700)]
Do not fast tail call if caller has multislot structs (dotnet/coreclr#25885)

* Do not fast tail call if caller has multislot structs

* apply patch

* Address offline feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/059604df0702acf74be5bf979728083395543e61

5 years agoRe-enable CA1802 (use consts instead of readonly statics) (dotnet/coreclr#39782)
Stephen Toub [Fri, 26 Jul 2019 02:02:21 +0000 (22:02 -0400)]
Re-enable CA1802 (use consts instead of readonly statics) (dotnet/coreclr#39782)

* Re-enable CA1802 (use consts instead of readonly statics)

I enabled it only for privates and internals, as we've previously violated this in public surface area, and as everything goes through API review moving forward, didn't seem worthwhile fighting it and adding suppressions in various places.

* Address PR feedback

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/c5b60182397bbdd0033d6627cc075dfea59a5a34

5 years agoFix R2RDump constants for double/float (dotnet/coreclr#25888)
Michal Strehovský [Fri, 26 Jul 2019 09:03:14 +0000 (11:03 +0200)]
Fix R2RDump constants for double/float (dotnet/coreclr#25888)

This is to make them match readytorun.h.

Commit migrated from https://github.com/dotnet/coreclr/commit/f89d46fabc85993c8ad46a01b8ce9ef5ba89c81d

5 years agoDelete a few unused functions around stmt. (dotnet/coreclr#25886)
Sergey Andreenko [Fri, 26 Jul 2019 02:22:19 +0000 (19:22 -0700)]
Delete a few unused functions around stmt. (dotnet/coreclr#25886)

* Delete incorrect comment.

It was added in 2010 and even when it was added it was wrong as far as I can see.

* Delete unused CopyTestDataToCloneTree.

The only use was deleted in dotnet/coreclr#6102 (3 years ago).

* Delete unused flag GTF_STMT_HAS_CSE.

Commit migrated from https://github.com/dotnet/coreclr/commit/e7939e7573e432daa54822d0c995ae19d43002f7

5 years agoRemove some mutex abandon tests (dotnet/coreclr#25892)
Koundinya Veluri [Fri, 26 Jul 2019 01:03:14 +0000 (18:03 -0700)]
Remove some mutex abandon tests (dotnet/coreclr#25892)

* Remove some mutex abandon tests

- These tests are covered by a test in corefx
- Failures seen are most likely test issues and fixed by https://github.com/dotnet/corefx/pull/39786

Fixes https://github.com/dotnet/coreclr/issues/19406
Fixes https://github.com/dotnet/coreclr/issues/14249
Fixes https://github.com/dotnet/coreclr/issues/14249

Commit migrated from https://github.com/dotnet/coreclr/commit/bb9449f29978f21ae67260ab1003fbe3d4acdd6f

5 years ago[Diagnostics Server][Windows] Close hPipe when a connection error occurred. (dotnet...
José Rivero [Thu, 25 Jul 2019 22:48:33 +0000 (15:48 -0700)]
[Diagnostics Server][Windows] Close hPipe when a connection error occurred. (dotnet/coreclr#25863)

Commit migrated from https://github.com/dotnet/coreclr/commit/65a50887b9a460d7833f0ab476fab9027f1e8166

5 years agoSort debug info to allow diffing (dotnet/coreclr#25867)
Andrew Au [Thu, 25 Jul 2019 21:58:23 +0000 (14:58 -0700)]
Sort debug info to allow diffing (dotnet/coreclr#25867)

Commit migrated from https://github.com/dotnet/coreclr/commit/f1dd21eea7f285f269703ce304ee57c1aff61e8c

5 years agoFix packages folder name for CoreDisTools package. (dotnet/coreclr#25887)
Sergey Andreenko [Thu, 25 Jul 2019 21:37:20 +0000 (14:37 -0700)]
Fix packages folder name for CoreDisTools package. (dotnet/coreclr#25887)

That was correct on Linux, but wrong on Windows.

Commit migrated from https://github.com/dotnet/coreclr/commit/14c47d009d0e1e7d1301b3d3702a3d0100bdf318

5 years agoRemove code and documentation related to the old corefx testing system (dotnet/corecl...
Bruce Forstall [Thu, 25 Jul 2019 20:31:04 +0000 (13:31 -0700)]
Remove code and documentation related to the old corefx testing system (dotnet/coreclr#25869)

Commit migrated from https://github.com/dotnet/coreclr/commit/ed82b483934ec2990e57c561a08eaf533d087da5

5 years agoFix EventCounter regression test (dotnet/coreclr#25862)
Sung Yoon Whang [Thu, 25 Jul 2019 01:23:22 +0000 (18:23 -0700)]
Fix EventCounter regression test (dotnet/coreclr#25862)

Commit migrated from https://github.com/dotnet/coreclr/commit/310c1903838f048afc66121212342e0d55b50d11

5 years agoRe-enable CA1825 (zero-length array allocations) (dotnet/corefxdotnet/coreclr#39708)
Stephen Toub [Wed, 24 Jul 2019 14:42:39 +0000 (10:42 -0400)]
Re-enable CA1825 (zero-length array allocations) (dotnet/corefxdotnet/coreclr#39708)

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/1d43c479388da490d6a1eebe73f3b6b618caa55b

5 years agoUpdate JIT dumps in RyuJIT overview doc (dotnet/coreclr#25040)
mikedn [Wed, 24 Jul 2019 05:14:43 +0000 (08:14 +0300)]
Update JIT dumps in RyuJIT overview doc (dotnet/coreclr#25040)

* Update JIT dumps in RyuJIT overview doc

* Remove the 2 pass mention from lowering

* RyuJIT overview update feedback

* Delete LinearScan::dumpNodeInfo

* Markdown fixes

Commit migrated from https://github.com/dotnet/coreclr/commit/b07a8c55d2c4450ef26cae65bd1ef5d86437de49

5 years agoFix GetSequencePoints when profiler provides mapping via SetILInstrumentedCodeMap...
David Mason [Wed, 24 Jul 2019 03:49:34 +0000 (20:49 -0700)]
Fix GetSequencePoints when profiler provides mapping via SetILInstrumentedCodeMap (dotnet/coreclr#25802)

* Fix GetSequencePoints when profiler provides mapping via SetILInstrumentedCodeMap

* code review feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/75c628fdd84dc8430dbbf3d0fac832aa1002e76f

5 years agoSuperpmi parallel dasm output (dotnet/coreclr#22203)
Jarret Shook [Wed, 24 Jul 2019 02:48:35 +0000 (19:48 -0700)]
Superpmi parallel dasm output (dotnet/coreclr#22203)

* Add multiprocessing for creating dasm

* Improve logging

* Update superpmi asm diffs to use async/awit

This allows for a cleaner cross platform solution which will allow
multiple subprocesses to run in parallel to generate asm.

Note that this adds a depencency on python 3.5.

* Working multi-subproc dasm

The changes move away from using multiprocessing in favor of python 3 async.

Commit migrated from https://github.com/dotnet/coreclr/commit/d61c376f2a4f8f7c04f9eccfb399f5d66f9ab15e

5 years agoWe need to reset the scope list for the USING_VARIABLE_LIVE_RANGE case (dotnet/corecl...
Andrew Au [Wed, 24 Jul 2019 01:25:31 +0000 (18:25 -0700)]
We need to reset the scope list for the USING_VARIABLE_LIVE_RANGE case (dotnet/coreclr#25822)

Commit migrated from https://github.com/dotnet/coreclr/commit/10bf24055157e962b50c6bb25865f69fb055cd98

5 years agoAvoid AV when `EventPipeSession::m_pFile` is nullptr. (dotnet/coreclr#25845)
José Rivero [Tue, 23 Jul 2019 22:38:49 +0000 (15:38 -0700)]
Avoid AV when `EventPipeSession::m_pFile` is nullptr. (dotnet/coreclr#25845)

Commit migrated from https://github.com/dotnet/coreclr/commit/5c5a8969b5dafc5b8afe195ab8f96ea0ad617e77

5 years agoDelay Diagnostics IPC response till after EventPipe::Enable has completed (dotnet...
John Salem [Tue, 23 Jul 2019 17:00:17 +0000 (10:00 -0700)]
Delay Diagnostics IPC response till after EventPipe::Enable has completed (dotnet/coreclr#25760)

* Refactor IPC response to after EventPipe::Enable is finished
* Refactor EventPipeFile initialization and EventPipeBufferManager flushing to be manually started after the IPC response has been sent
* Change EventPipeSession::Enable to EventPipeSession::StartStreaming

Commit migrated from https://github.com/dotnet/coreclr/commit/1898c0f4e99a476bb6d14f7b05f06560c349465f

5 years agoAllow creating typehandles to `TypedReference*` (dotnet/coreclr#25817)
Michal Strehovský [Tue, 23 Jul 2019 12:14:16 +0000 (14:14 +0200)]
Allow creating typehandles to `TypedReference*` (dotnet/coreclr#25817)

It's unclear why this was disallowed - we allow them in method signatures and there's a comment a couple lines below the code I'm touching saying we thought about blocking this for byref-like types, but there's no reason to do that.

`TypedReference` is the original byref-like type.

Commit migrated from https://github.com/dotnet/coreclr/commit/2354d0b92f703b79f184a07557f9221dc11224d9

5 years agocorbbtprof: set byte alignment for CORBBTPROF structures (dotnet/coreclr#25816)
Konstantin Baladurin [Tue, 23 Jul 2019 04:01:22 +0000 (07:01 +0300)]
corbbtprof: set byte alignment for CORBBTPROF structures (dotnet/coreclr#25816)

Fix patch fixes SIGBUG that occurs due to unaligned read/write

Commit migrated from https://github.com/dotnet/coreclr/commit/53b1a71d230851f32a2bf904ed030f2755bcf253

5 years ago[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25807)
Stephen Toub [Tue, 23 Jul 2019 01:26:12 +0000 (21:26 -0400)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25807)

* Update dependencies from https://github.com/dotnet/corefx build 20190719.9

- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19369.9
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19369.9

* Update dependencies from https://github.com/dotnet/corefx build 20190720.5

- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19370.5
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19370.5

* Update dependencies from https://github.com/dotnet/corefx build 20190721.2

- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19371.2
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19371.2

Commit migrated from https://github.com/dotnet/coreclr/commit/fadee1275f3722a11bd37b8c03d80fd748bd025d

5 years agoUnconditionally capture output of xUnit tests (dotnet/coreclr#25207)
Egor Chesakov [Tue, 23 Jul 2019 00:57:35 +0000 (17:57 -0700)]
Unconditionally capture output of xUnit tests (dotnet/coreclr#25207)

* Unconditionally capture output of xUnit tests

* Remove all Unicode control characters before outputting them into an xUnit test result file

Commit migrated from https://github.com/dotnet/coreclr/commit/8d7ebc3b7b965cdde0ee5d8051e9de1cec39fc64

5 years agoRemove GTF_REVERSE_OPS checks from LSRA (dotnet/coreclr#22489)
mikedn [Mon, 22 Jul 2019 21:32:45 +0000 (00:32 +0300)]
Remove GTF_REVERSE_OPS checks from LSRA (dotnet/coreclr#22489)

GTF_REVERSE_OPS is cleared during rationalization.

Commit migrated from https://github.com/dotnet/coreclr/commit/2a8529c6130f6c70488e8bace26404b319eed00f

5 years agoUpdated Build Instructions (dotnet/coreclr#25796)
Ivan [Mon, 22 Jul 2019 04:24:37 +0000 (23:24 -0500)]
Updated Build Instructions (dotnet/coreclr#25796)

Instructions were updated and validated to reflect latest releases of components that are needed to build coreclr.

Fix dotnet/coreclr#25723

Commit migrated from https://github.com/dotnet/coreclr/commit/5f93d3b1c48ba6916d5f31d79cb7c17d564eecef

5 years agoFix Linux compilation flags (dotnet/coreclr#25801)
Bruce Forstall [Sat, 20 Jul 2019 15:58:18 +0000 (08:58 -0700)]
Fix Linux compilation flags (dotnet/coreclr#25801)

`configureoptimization.cmake` was being included before `CLR_CMAKE_PLATFORM_UNIX`
was set, though it depends on that variable to set Linux optimization
flags. Move the include lower, after `CLR_CMAKE_PLATFORM_UNIX` is set.

This leads to Debug builds being built with `-O0` and Checked builds built
with `-O2`, instead of the default due to no `-O` flag being passed. Release
is still built `-O3`; somehow, it was being built that way already.

Fixes dotnet/coreclr#25273 (Although Alpine will still see a stack overflow in the failing
test case with Debug builds, it won't affect Checked build CI runs, which is
the primary flavor tested in coreclr CI.)

Commit migrated from https://github.com/dotnet/coreclr/commit/500430f40b3420615b67998f003fbf57ad8f5234

5 years agoArm64 define FEATURE_DATATARGET4 (dotnet/coreclr#25804)
Steve MacLean [Sat, 20 Jul 2019 15:49:29 +0000 (11:49 -0400)]
Arm64 define FEATURE_DATATARGET4 (dotnet/coreclr#25804)

FEATURE_DATATARGET4 enables the portable out of
process stack unwind

Commit migrated from https://github.com/dotnet/coreclr/commit/0b8c84535b267ee6a99ba5059146ba5b93dd6c0a

5 years agoRevert "Enable MHR support on OSX (dotnet/coreclr#25716)" (dotnet/coreclr#25803)
Jan Vorlicek [Sat, 20 Jul 2019 03:16:44 +0000 (05:16 +0200)]
Revert "Enable MHR support on OSX (dotnet/coreclr#25716)" (dotnet/coreclr#25803)

This reverts commit dotnet/coreclr@7a970842ebd88686851af53edee689a3149737bf.

Commit migrated from https://github.com/dotnet/coreclr/commit/1991a9ac761e8684ada594bc5a9fef0817c98602

5 years agoRemove dead ContextTransitionFrame (dotnet/coreclr#25800)
Steve MacLean [Sat, 20 Jul 2019 02:22:53 +0000 (22:22 -0400)]
Remove dead ContextTransitionFrame (dotnet/coreclr#25800)

Commit migrated from https://github.com/dotnet/coreclr/commit/b091f2e31de8aff003e1f0cbe14790b1f1632456

5 years agoDelete old test .lst files (dotnet/coreclr#25797)
Jan Kotas [Fri, 19 Jul 2019 22:23:12 +0000 (15:23 -0700)]
Delete old test .lst files (dotnet/coreclr#25797)

Commit migrated from https://github.com/dotnet/coreclr/commit/ff1d0bd18840ea189f41a5ae87e987551cb5d886

5 years agoFix first value of counter payload being skewed (dotnet/coreclr#25739)
Sung Yoon Whang [Fri, 19 Jul 2019 21:04:58 +0000 (14:04 -0700)]
Fix first value of counter payload being skewed (dotnet/coreclr#25739)

* Fix issue 25709

* rename

* Fix regression test

* cleanup

* Code review feedback

* set maxincrement to 3

Commit migrated from https://github.com/dotnet/coreclr/commit/bf5b3df91453f4fc3071ab320be64352fba110ca

5 years agoRewrite SafeHandle interop tests (dotnet/coreclr#25784)
Jeremy Koritzinsky [Fri, 19 Jul 2019 17:09:27 +0000 (10:09 -0700)]
Rewrite SafeHandle interop tests (dotnet/coreclr#25784)

* Completely rewrite the SafeHandle tests to not only be readable but easily understandable with nicer naming.

* Add useful portion of abstract-derived test back.  Enable SafeHandle test off-Windows.

Commit migrated from https://github.com/dotnet/coreclr/commit/e42331e1943c91d288d8f5ee623926306e66f590

5 years agoRemove assertion from Shutdown path (dotnet/coreclr#25786)
José Rivero [Fri, 19 Jul 2019 16:43:25 +0000 (09:43 -0700)]
Remove assertion from Shutdown path (dotnet/coreclr#25786)

The diagnostics server is doing nothing to handle potential errors in this path.

Commit migrated from https://github.com/dotnet/coreclr/commit/4aa63bfd94304547e6722d9dce2b0d5f6de5e173

5 years agoFixes towards making the standalone GC PAL to be in sync with the built-in PAL
Jan Kotas [Thu, 18 Jul 2019 21:19:17 +0000 (14:19 -0700)]
Fixes towards making the standalone GC PAL to be in sync with the built-in PAL

Commit migrated from https://github.com/dotnet/coreclr/commit/0463767cd7362a0044c4c7af0feda5bd9ad94804

5 years agoFix typo: `_TARGET_X86` -> `_TARGET_X86_` (dotnet/coreclr#25788)
Andy Hanson [Fri, 19 Jul 2019 07:36:19 +0000 (00:36 -0700)]
Fix typo: `_TARGET_X86` -> `_TARGET_X86_` (dotnet/coreclr#25788)

This typo was in dotnet/coreclr#24989 so would be a new regression in 3.0.
In an x86 build, it causes us to not get the cache size correct,
leading us to use a smaller default cache size and do more GCs.

Tested with GCPerfSim and this PR reduces TotalNumberGCs by 33% using an x86 build.

Commit migrated from https://github.com/dotnet/coreclr/commit/ba39a155d59b139b7a15f50d3b80b531d9359f84

5 years agoRemove a redundant #ifdef directive (dotnet/coreclr#25768)
Dong-Heon Jung [Fri, 19 Jul 2019 14:52:35 +0000 (23:52 +0900)]
Remove a redundant #ifdef directive (dotnet/coreclr#25768)

Commit migrated from https://github.com/dotnet/coreclr/commit/59df10dd6a70f5096e67971969e73ad13aa82efc

5 years agoRandom cleanup of binder code (dotnet/coreclr#25773)
Vitek Karas [Fri, 19 Jul 2019 14:52:16 +0000 (07:52 -0700)]
Random cleanup of binder code (dotnet/coreclr#25773)

Commit migrated from https://github.com/dotnet/coreclr/commit/007c6bc5d749c6cbd5fd106a2053ef5563d12c1d

5 years agoMove GetRawData and GetRawSzArrayData to RuntimeHelpers instead of JitHelpers (dotnet...
Mukul Sabharwal [Fri, 19 Jul 2019 08:12:33 +0000 (01:12 -0700)]
Move GetRawData and GetRawSzArrayData to RuntimeHelpers instead of JitHelpers (dotnet/coreclr#25765)

Commit migrated from https://github.com/dotnet/coreclr/commit/5d265a8b85f6118b1ddcee39f84c680bb652fc4e

5 years agoFix PInvoke primitive test to actually test the desired method (dotnet/coreclr#25608)
Vitek Karas [Fri, 19 Jul 2019 07:20:05 +0000 (00:20 -0700)]
Fix PInvoke primitive test to actually test the desired method (dotnet/coreclr#25608)

The test didn't really call the Marshal_Out native method. Fixed it (probably a copy/paste error). Also fixed some of the error messages.

Commit migrated from https://github.com/dotnet/coreclr/commit/20d8e5c7c0959406d23909318ac73b2b4e13ecf2

5 years agoArm32 support VFP registers context to/from native context (dotnet/coreclr#25775)
Steve MacLean [Fri, 19 Jul 2019 04:30:09 +0000 (00:30 -0400)]
Arm32 support VFP registers context to/from native context (dotnet/coreclr#25775)

Commit migrated from https://github.com/dotnet/coreclr/commit/a2edc1ca3a66cd4e9a9c665f3bfcfbec8a93497a

5 years agoFail to explicitly tail call on x86 unix. (dotnet/coreclr#25032)
Jarret Shook [Fri, 19 Jul 2019 04:07:08 +0000 (21:07 -0700)]
Fail to explicitly tail call on x86 unix. (dotnet/coreclr#25032)

* Fail to explicitly tail call on x86 unix.

* Correctly return 100

* Correct return value

* Add noway assert in morphTailCall to avoid morphing slow tail calls on unix.

* Address feedback

Commit migrated from https://github.com/dotnet/coreclr/commit/f84cd98148ca1ae5f31f9ff2130c705b726c1997

5 years agoA simple disassembler fix (dotnet/coreclr#25780)
Andrew Au [Fri, 19 Jul 2019 02:33:42 +0000 (19:33 -0700)]
A simple disassembler fix (dotnet/coreclr#25780)

Commit migrated from https://github.com/dotnet/coreclr/commit/3f9e70b0f476750e846dc8b37128d76eed26a9e0

5 years agoMake sure we use a 64 bit number to represent memory limit (even in 32 bit architectu...
Andrew Au [Thu, 18 Jul 2019 23:55:39 +0000 (16:55 -0700)]
Make sure we use a 64 bit number to represent memory limit (even in 32 bit architectures) (dotnet/coreclr#25724)

Commit migrated from https://github.com/dotnet/coreclr/commit/a1e1fa349e09471c88e884f80172f23780f8cf3f

5 years agoFixing Buffer::BlockCopy, JIT_MemCpy, and JIT_MemSet to just call the appropriate...
Tanner Gooding [Thu, 18 Jul 2019 22:15:00 +0000 (15:15 -0700)]
Fixing Buffer::BlockCopy, JIT_MemCpy, and JIT_MemSet to just call the appropriate CRT functions for x64 Windows, as is already done for all other platforms/targets (dotnet/coreclr#25750)

* Fixing Buffer::BlockCopy to just call the CRT memmove for x64 Windows, as is already done for all other platforms/targets

* Fixing up the x64 CrtHelpers.asm to just forward to the CRT implementations for JIT_MemSet and JIT_MemCpy

* Keep unix using memcpy and clarify that Windows uses memmove for full framework compat.

Commit migrated from https://github.com/dotnet/coreclr/commit/54d9d9b2698c9628f43494e46f855996b31838bd

5 years agoArm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25777)
Steve MacLean [Thu, 18 Jul 2019 20:12:06 +0000 (16:12 -0400)]
Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25777)

Commit migrated from https://github.com/dotnet/coreclr/commit/da2c5c544006ba068a702e026cf0a6b2ee0fe144

5 years agoFix and remove/move some threading tests (dotnet/coreclr#25496)
Koundinya Veluri [Thu, 18 Jul 2019 17:46:52 +0000 (10:46 -0700)]
Fix and remove/move some threading tests (dotnet/coreclr#25496)

Fixes https://github.com/dotnet/coreclr/issues/23442
Fixes https://github.com/dotnet/coreclr/issues/23992
- Removed many abandoned mutex tests that will be replaced with improved tests in CoreFX with fixed timing issues and reduced redundancy
- Some WaitAny tests would also be replaced but were not removed due to pending failures with issues filed, cause not yet known

Fixes https://github.com/dotnet/coreclr/issues/24179
- Fixed torn read of double on 32-bit platforms

Fixes https://github.com/dotnet/coreclr/issues/25372
- The test only allowed one second for all registered waits to be processed, fixed to allow more time and succeed faster

Commit migrated from https://github.com/dotnet/coreclr/commit/0e9364251f70f0d059c5284f0fa46cd0b65f690c

5 years agoRevert "Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr...
Steve MacLean [Thu, 18 Jul 2019 16:59:01 +0000 (12:59 -0400)]
Revert "Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25766)" (dotnet/coreclr#25776)

This reverts commit dotnet/coreclr@1d47f41f3d3d1e391818323df4378e82b95292f8.

Commit migrated from https://github.com/dotnet/coreclr/commit/88a206498a6f6a0d3e2e4fcdd40ff8fceacbfc8c

5 years agoArm64 : Fix ldr Dt/St emulation (dotnet/coreclr#25729)
Steve MacLean [Thu, 18 Jul 2019 15:39:01 +0000 (11:39 -0400)]
Arm64 : Fix ldr Dt/St emulation (dotnet/coreclr#25729)

Commit migrated from https://github.com/dotnet/coreclr/commit/7b6e658d36135ff871f24a8530855e3f94d9e447

5 years agoArm64 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25743)
Steve MacLean [Thu, 18 Jul 2019 15:37:37 +0000 (11:37 -0400)]
Arm64 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25743)

Commit migrated from https://github.com/dotnet/coreclr/commit/acb5ac69bf84f4c36a6ceb759bfafc4e24825ca4

5 years agoArm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25766)
Steve MacLean [Thu, 18 Jul 2019 08:15:53 +0000 (04:15 -0400)]
Arm32 restore d8-d15 in ThrowExceptionFromContextInternal (dotnet/coreclr#25766)

Commit migrated from https://github.com/dotnet/coreclr/commit/1d47f41f3d3d1e391818323df4378e82b95292f8

5 years agoArm64 support SIMD registers context to/from native context (dotnet/coreclr#25757)
Steve MacLean [Thu, 18 Jul 2019 08:14:40 +0000 (04:14 -0400)]
Arm64 support SIMD registers context to/from native context (dotnet/coreclr#25757)

Commit migrated from https://github.com/dotnet/coreclr/commit/813b9cb98f6f10c732e28d28c9ca892d91347d0e

5 years agoAdd a few #if... FEATURE_EMULATE_SINGLESTEP (dotnet/coreclr#25637)
Steve MacLean [Wed, 17 Jul 2019 22:26:37 +0000 (18:26 -0400)]
Add a few #if... FEATURE_EMULATE_SINGLESTEP (dotnet/coreclr#25637)

When the feature flag was added a few places were missed

Commit migrated from https://github.com/dotnet/coreclr/commit/ec253c38768bdbac40e07c1de3e43a91ff6f226c

5 years agoTemporarily make a default interface method test incompatible for GCStress (dotnet...
Koundinya Veluri [Wed, 17 Jul 2019 21:12:49 +0000 (14:12 -0700)]
Temporarily make a default interface method test incompatible for GCStress (dotnet/coreclr#25746)

Related to https://github.com/dotnet/coreclr/issues/25690

Commit migrated from https://github.com/dotnet/coreclr/commit/83587b68cb3d93119eb50c50fdf79fe6f04c3305

5 years agoMake all event types nullable (dotnet/coreclr#25752)
Stephen Toub [Wed, 17 Jul 2019 20:38:09 +0000 (16:38 -0400)]
Make all event types nullable (dotnet/coreclr#25752)

Late-breaking design change: all events should be declared with nullable delegate types.

Commit migrated from https://github.com/dotnet/coreclr/commit/8ba2e15201361402acd0ae9710bd37d50785cdfa

5 years agoArm64 Fix Rtl*Context (dotnet/coreclr#25745)
Steve MacLean [Wed, 17 Jul 2019 17:28:11 +0000 (13:28 -0400)]
Arm64 Fix Rtl*Context (dotnet/coreclr#25745)

Fix issues related to save restore of FPCR/FPSR/V0/V31

There were several bugs in the assembly causing FPCR/FPSR
to overwrite V0 on RtlCaptureContext.  Then restore from V0 on
RtlRestoreContext

Commit migrated from https://github.com/dotnet/coreclr/commit/76b7cd16c746333dffe763a037baeff9f3b73ee2

5 years agoRemove now unnecessary !s / TODO-NULLABLE comments (dotnet/coreclr#25749)
Stephen Toub [Wed, 17 Jul 2019 17:01:37 +0000 (13:01 -0400)]
Remove now unnecessary !s / TODO-NULLABLE comments (dotnet/coreclr#25749)

* Remove !s and TODO-NULLABLE comments for [DoesNotReturn]

* Remove !s and TODO-NULLABLE comments for [NotNullIfNotNull]

* Remove !s and TODO-NULLABLE comments for writes via Interlocked.CompareExchange

* Remove !s and TODO-NULLABLE comments for Debug.Assert on fields

* Update/add several TODO-NULLABLE comments

Commit migrated from https://github.com/dotnet/coreclr/commit/45e48343c7abc064c829d53028f9e581a87ee027

5 years agoFix: Diagnostics Server IPC thread causes 20-40ms shutdown delays on Windows (dotnet...
José Rivero [Wed, 17 Jul 2019 16:20:09 +0000 (09:20 -0700)]
Fix: Diagnostics Server IPC thread causes 20-40ms shutdown delays on Windows (dotnet/coreclr#25602)

Now, the diagnostics server attempts to do appropriate cleanup of its resources during shutdown.

```log
1. Closes the IPC channel
2. if Windows:
  - Cancel sync IO operations on the running server thread
3. Closes the running server thread handle
```

This change alleviates the issue because it manually cancel the blocking `ConnectNamedPipe` sync call in order to allow the server thread exit gracefully (instead of waiting for the OS to tear it down).

Fixes: https://github.com/dotnet/coreclr/issues/25463
Commit migrated from https://github.com/dotnet/coreclr/commit/dedef281de99a2c2c4777f27166c166b08024b6f

5 years agoChange [:space:] to [[:space:]] in awk scripts (dotnet/coreclr#25670)
Omair Majid [Wed, 17 Jul 2019 15:49:31 +0000 (11:49 -0400)]
Change [:space:] to [[:space:]] in awk scripts (dotnet/coreclr#25670)

During coreclr build on RHEL 7, awk prints out some warnings:

    awk: /builddir/build/BUILD/dotnet-v2.2.6/src/coreclr/generateredefinesfile.awk:10:
    warning: regexp component `[:space:]' should probably be `[[:space:]]'

The awk man page says:

    A character class is only valid in a regular expression inside the
    brackets of a character list.

So fix the '[:space:]' notation by replacing with the valid
'[[:space:]]'.

Fixing this warning doesn't actually result in a change in the generated
files (dbgshim.exports, mscordbi.exports, libredefines.inc,
palredefines.inc, clrjit.exports, mscordac.exports, coreclr.exports,
dlltest1.exports and dlltest2.exports) on my system.

Commit migrated from https://github.com/dotnet/coreclr/commit/90de19f0c55615982f8a787cf4acecf2debe6e17

5 years agoFix nullability warnings from compiler update
Santiago Fernandez Madero [Wed, 17 Jul 2019 00:22:54 +0000 (17:22 -0700)]
Fix nullability warnings from compiler update

Commit migrated from https://github.com/dotnet/coreclr/commit/dbc0e19e87e1ac6e2be33a1ddeea95f21ba2bc39

5 years agoR2RDump: Add support for partially interruptible regions (dotnet/coreclr#25626)
Michal Strehovský [Wed, 17 Jul 2019 12:51:33 +0000 (14:51 +0200)]
R2RDump: Add support for partially interruptible regions (dotnet/coreclr#25626)

We were basically missing this block:

https://github.com/dotnet/coreclr/blob/dotnet/coreclr@030a3ea9b8dbeae89c90d34441d4d9a1cf4a7de6/src/vm/gcinfodecoder.cpp#L726-L810

Commit migrated from https://github.com/dotnet/coreclr/commit/4294348f888f4cb503a7dd43a7463451654f0bd9

5 years agoEnable MHR support on OSX (dotnet/coreclr#25716)
Jan Vorlicek [Wed, 17 Jul 2019 10:14:42 +0000 (12:14 +0200)]
Enable MHR support on OSX (dotnet/coreclr#25716)

* Enable MHR support on OSX

* Move JIT_WriteBarrier that is modified at runtime to a dynamically
  allocated memory instead of making a page in libcoreclr.dylib RWX.

* Update PAL to add MEM_JIT flag for allocations and reservations of
  executable memory.

* Update native runtime in EH and stack unwinding areas so that it can
  unwind from the write barrier copy. That code has no unwind info, so
  without special handling, runtime would not be able to unwind from
  it.

Commit migrated from https://github.com/dotnet/coreclr/commit/7a970842ebd88686851af53edee689a3149737bf

5 years agoFix a build error when IBCLOGGER_ENABLED is not defined (dotnet/coreclr#25691)
Dong-Heon Jung [Wed, 17 Jul 2019 03:09:40 +0000 (12:09 +0900)]
Fix a build error when IBCLOGGER_ENABLED is not defined (dotnet/coreclr#25691)

- Even if DACCESS_COMPILE or CROSSGEN_COMPILE is defined,
  coreclr can be built without IBCLOGGER_ENABLED definition.

Commit migrated from https://github.com/dotnet/coreclr/commit/7e416e30a06feef0fc9814d86a7b6493e7f99043

5 years agoDelete PAL tests for GetDateFormat and GetCalendarInfo (dotnet/coreclr#25675)
Jan Kotas [Wed, 17 Jul 2019 02:54:54 +0000 (19:54 -0700)]
Delete PAL tests for GetDateFormat and GetCalendarInfo (dotnet/coreclr#25675)

These APIs do not exist in the CoreCLR PAL anymore.

Commit migrated from https://github.com/dotnet/coreclr/commit/208f92b807e5fa1c267d02f9070a0b589da2ac4f

5 years agoRename GC's config.h to avoid name collisions (dotnet/coreclr#25665)
Jan Kotas [Wed, 17 Jul 2019 02:54:40 +0000 (19:54 -0700)]
Rename GC's config.h to avoid name collisions (dotnet/coreclr#25665)

* Rename GC's config.h to avoid name collisions

Port https://github.com/dotnet/corert/pull/7596 to CoreCLR

* Fix build break

Commit migrated from https://github.com/dotnet/coreclr/commit/e24361b804067a2e931e5064bbaba0f31fb64946

5 years agoBuild error fix on FEATURE_PREJIT=true (dotnet/coreclr#25660)
Swift Kim [Wed, 17 Jul 2019 02:54:03 +0000 (11:54 +0900)]
Build error fix on FEATURE_PREJIT=true (dotnet/coreclr#25660)

This fix is to update usages of SetupGcCoverage() under
FEATURE_PREJIT aligned to the signature change in dotnet/coreclr#25261.

Commit migrated from https://github.com/dotnet/coreclr/commit/6116c57190dc8332b4ff30e90e4aab936a7078cb