platform/upstream/dotnet/runtime.git
5 years agoUpdate documentation for corefx testing in coreclr repo (dotnet/coreclr#25493)
Bruce Forstall [Sat, 29 Jun 2019 16:50:02 +0000 (09:50 -0700)]
Update documentation for corefx testing in coreclr repo (dotnet/coreclr#25493)

* Update documentation for corefx testing in coreclr repo

* Apply suggestions from code review

Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
* Update a command line; improve clarity

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

5 years agoRe-enable corefx tests (dotnet/coreclr#25490)
Bruce Forstall [Sat, 29 Jun 2019 15:57:05 +0000 (08:57 -0700)]
Re-enable corefx tests (dotnet/coreclr#25490)

Re-enable corefx tests

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

5 years agoFix GCStress issue on x86 and Arm (dotnet/coreclr#25445)
Brian Sullivan [Sat, 29 Jun 2019 08:26:37 +0000 (01:26 -0700)]
Fix GCStress issue on x86 and Arm (dotnet/coreclr#25445)

* Fix GCStress issue on x86 and Arm32
  When we write one of the new gc stress instruction, such as INTERRUPT_INSTR_PROTECT_FIRST_RET
  we might be writing it in the epilog region on x86 or ARM as a direct call can be the last
  instruction before an epilog.  (This isn't allowed on x64)
  This fix expands the set of instructions we are allowed by IsMarkerInstr() toinclude these
  newly added gc stress instructions.
  added comment to GetGcMarkerExceptionCode
  Fix DAC build

* Code review feedback

* Additional code review chnages

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

5 years agoFix a mutex abandon case with WaitHandle.WaitAll in the PAL (dotnet/coreclr#25452)
Koundinya Veluri [Sat, 29 Jun 2019 07:27:20 +0000 (00:27 -0700)]
Fix a mutex abandon case with WaitHandle.WaitAll in the PAL (dotnet/coreclr#25452)

Fixes https://github.com/dotnet/coreclr/issues/25108
- Upon a `WaitAll` when all waits are already satisfied, the abandoned flag is overwritten with the abandoned state of the last wait object in the array
- So if the first wait object is an abandoned mutex and the second wait object is a signaled event, the `WaitAll` succeeds and does not report that anything was abandoned
- Fixed to accumulate into the flag instead of overwriting it

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

5 years agoStop using reflection on pollingcounter tests (dotnet/coreclr#25489)
Sung Yoon Whang [Sat, 29 Jun 2019 00:06:19 +0000 (17:06 -0700)]
Stop using reflection on pollingcounter tests (dotnet/coreclr#25489)

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

5 years agoDon't return TRUE on tracepoint_enabled if LTTng library does not exist on build...
Sung Yoon Whang [Fri, 28 Jun 2019 20:57:19 +0000 (13:57 -0700)]
Don't return TRUE on tracepoint_enabled if LTTng library does not exist on build (dotnet/coreclr#25459)

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

5 years agoUse regular static variable for EEConfig storage (dotnet/coreclr#25479)
Jan Kotas [Fri, 28 Jun 2019 20:31:19 +0000 (13:31 -0700)]
Use regular static variable for EEConfig storage (dotnet/coreclr#25479)

Fixes dotnet/coreclr#25475

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

5 years agoFix an assertion failure in the thread pool's QueueUserWorkItemCallbackBase (dotnet...
Koundinya Veluri [Fri, 28 Jun 2019 20:08:22 +0000 (13:08 -0700)]
Fix an assertion failure in the thread pool's QueueUserWorkItemCallbackBase (dotnet/coreclr#25482)

Fixes https://github.com/dotnet/coreclr/issues/25242
- The issue could be that there is no memory barrier (or in the wrong place) on the thread reading the value, and an old value could be cached and read

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

5 years agoAvoid the multiplication generated by mc.exe (dotnet/coreclr#25454)
Andrew Au [Fri, 28 Jun 2019 17:41:31 +0000 (10:41 -0700)]
Avoid the multiplication generated by mc.exe (dotnet/coreclr#25454)

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

5 years agoAdd windows arm32 native vararg excludes (dotnet/coreclr#25429)
Jarret Shook [Fri, 28 Jun 2019 15:41:05 +0000 (08:41 -0700)]
Add windows arm32 native vararg excludes (dotnet/coreclr#25429)

* Add windows arm32 native vararg excludes

* Fix typo

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

5 years agoarm32_ci_script.sh: Fix tizen armel build (dotnet/coreclr#25087)
Konstantin Baladurin [Fri, 28 Jun 2019 14:04:00 +0000 (17:04 +0300)]
arm32_ci_script.sh: Fix tizen armel build (dotnet/coreclr#25087)

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

5 years agoEnable parsing multiple providers for LTTngConfig variable (dotnet/coreclr#25451)
Sung Yoon Whang [Fri, 28 Jun 2019 06:04:58 +0000 (23:04 -0700)]
Enable parsing multiple providers for LTTngConfig variable (dotnet/coreclr#25451)

* Enable parsing multiple providers for LTTngConfig variable

* Handle case where LTTngConfig==NULL

* renaming some methods

* Add comment about the format of environment variable being parsed

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

5 years agoAdd test for IncrementingEventCounter (dotnet/coreclr#25462)
Sung Yoon Whang [Fri, 28 Jun 2019 05:47:25 +0000 (22:47 -0700)]
Add test for IncrementingEventCounter (dotnet/coreclr#25462)

* Add test for IncrementingEventCounter

* Some cleanup

* Remove unused using

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

5 years agoMove coreclr-corefx pipelines into their own files (dotnet/coreclr#25465)
Bruce Forstall [Fri, 28 Jun 2019 04:29:47 +0000 (21:29 -0700)]
Move coreclr-corefx pipelines into their own files (dotnet/coreclr#25465)

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

5 years agoremoved unnecessary WriteLine form a test (dotnet/coreclr#25460)
Vladimir Sadov [Thu, 27 Jun 2019 23:16:07 +0000 (16:16 -0700)]
removed unnecessary WriteLine form a test (dotnet/coreclr#25460)

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

5 years agoMerge pull request dotnet/coreclr#25424 from dotnet/darc-master-e048b5ab-4671-4e74...
William Godbe [Thu, 27 Jun 2019 20:23:32 +0000 (13:23 -0700)]
Merge pull request dotnet/coreclr#25424 from dotnet/darc-master-e048b5ab-4671-4e74-8671-932e8299b22b

[master] Update dependencies from dotnet/arcade

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

5 years agoFix VersionBubbles test (dotnet/coreclr#25392)
Jan Vorlicek [Thu, 27 Jun 2019 19:46:26 +0000 (21:46 +0200)]
Fix VersionBubbles test (dotnet/coreclr#25392)

The test was not crossgening with large version bubble enabled since
the part of the .csproj that generates part of the .sh/.bat test
running scripts was commented out. There were also bugs in the
commented out code. Also, to ensure that it works, tiered compilation
and jit minopts need to be disables to ensure that the test method
won't be re-jitted.

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

5 years agoDon't reload or spill for keepAliveThis (dotnet/coreclr#25441)
Carol Eidt [Thu, 27 Jun 2019 18:35:14 +0000 (11:35 -0700)]
Don't reload or spill for keepAliveThis (dotnet/coreclr#25441)

Fix dotnet/coreclr#25433

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

5 years agoReact to new compiler nullability warnings
Santiago Fernandez Madero [Thu, 27 Jun 2019 17:39:13 +0000 (10:39 -0700)]
React to new compiler nullability warnings

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

5 years agoFix SIGSEGV in GC when dealing with large double[] on ARM32 (dotnet/coreclr#25403)
Vladimir Sadov [Thu, 27 Jun 2019 17:48:47 +0000 (10:48 -0700)]
Fix SIGSEGV in GC when dealing with large double[] on ARM32 (dotnet/coreclr#25403)

* Fix for dotnet/coreclr#25252
* revert to special casing 8-alignement for double[] in GC helpers for x86

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

5 years agoUpdate linux-instructions.md
Fadi Hanna [Thu, 27 Jun 2019 16:05:58 +0000 (09:05 -0700)]
Update linux-instructions.md

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

5 years agoHardcode LKG version of ucrtbased.dll (dotnet/coreclr#25444)
William Godbe [Thu, 27 Jun 2019 03:41:42 +0000 (20:41 -0700)]
Hardcode LKG version of ucrtbased.dll (dotnet/coreclr#25444)

* Hardcode LKG version of ucrtbased.dll

* Only use hardcoded UCRT version when search path fails

* Add missing single-quotes

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

5 years agoFix typo & make the code leaner (dotnet/coreclr#25442)
Jan Kotas [Thu, 27 Jun 2019 01:25:21 +0000 (18:25 -0700)]
Fix typo & make the code leaner (dotnet/coreclr#25442)

Enum.HasFlag generates bigger IL and depends on complex JIT optimization for a good code.
The classic bit check is strongly preferred accross CoreCLR and CoreFX.

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

5 years agoFix ActivityTracker ES_BUILD_STANDALONE build
Stephen Toub [Tue, 25 Jun 2019 02:10:45 +0000 (22:10 -0400)]
Fix ActivityTracker ES_BUILD_STANDALONE build

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

5 years agoTweak nullable attribute per API review (dotnet/coreclr#25443)
Stephen Toub [Thu, 27 Jun 2019 01:02:19 +0000 (21:02 -0400)]
Tweak nullable attribute per API review (dotnet/coreclr#25443)

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

5 years agoUpdate docs (dotnet/coreclr#25446)
Jan Kotas [Wed, 26 Jun 2019 23:47:04 +0000 (16:47 -0700)]
Update docs (dotnet/coreclr#25446)

- Delete references to Jenkins CI
- Add note on Squash&Merge

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

5 years agoEventPipe events should only be sent to sessions that are listening to the event...
Andrew Au [Wed, 26 Jun 2019 22:21:39 +0000 (15:21 -0700)]
EventPipe events should only be sent to sessions that are listening to the event (dotnet/coreclr#25401)

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

5 years agoFix EncoderNLS / DecoderNLS regression in reporting error index (dotnet/coreclr#25397)
Levi Broderick [Wed, 26 Jun 2019 22:05:53 +0000 (15:05 -0700)]
Fix EncoderNLS / DecoderNLS regression in reporting error index (dotnet/coreclr#25397)

Also fixes incorrect asserts in the Encoding type

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

5 years ago[createdump] Write page offset in NT_FILE note (dotnet/coreclr#25384)
Mikhail Aksenov [Wed, 26 Jun 2019 19:16:40 +0000 (22:16 +0300)]
[createdump] Write page offset in NT_FILE note (dotnet/coreclr#25384)

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

5 years agoUpdate branding to preview8 in master (dotnet/coreclr#25438)
William Godbe [Wed, 26 Jun 2019 19:14:21 +0000 (12:14 -0700)]
Update branding to preview8 in master (dotnet/coreclr#25438)

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

5 years ago[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25425)
dotnet-maestro[bot] [Wed, 26 Jun 2019 18:53:11 +0000 (11:53 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25425)

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

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview7.19326.2
- Microsoft.NETCore.Platforms - 3.0.0-preview7.19326.2
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview7.19326.2

* Reenable globalization tests

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

5 years agoTweak some annotations on EventRegistrationTokenTable<T> (dotnet/coreclr#25386)
Santiago Fernandez Madero [Wed, 26 Jun 2019 17:54:35 +0000 (10:54 -0700)]
Tweak some annotations on EventRegistrationTokenTable<T> (dotnet/coreclr#25386)

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

5 years agoDelegate inspection API in the DBI (dotnet/coreclr#25362)
Juan Hoyos [Wed, 26 Jun 2019 17:11:56 +0000 (10:11 -0700)]
Delegate inspection API in the DBI (dotnet/coreclr#25362)

* Add ICorDebugDelegateObjectValue interfaces
* Expose appropriate HR (CORDBG_E_UNSUPPORTED_DELEGATE)
* Partially DACize DelegateObject
* Add DacDbi method for delegate inspection

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

5 years agoMerge pull request dotnet/coreclr#25326 from BruceForstall/CrossPlatTestHost
Bruce Forstall [Wed, 26 Jun 2019 16:49:21 +0000 (09:49 -0700)]
Merge pull request dotnet/coreclr#25326 from BruceForstall/CrossPlatTestHost

Expand corefx testing in coreclr repo

Currently, corefx testing is done on Windows/x64.
Expand testing to include:
1. Linux/x64, Linux/arm, Linux/arm64, Windows/x86 platforms.
   Windows/arm should be added after corefx official builds
   publish tests and test manifest. Windows/arm64 should be
   added after corefx tests are published, and we have
   sufficient hardware.
2. All JIT stress modes that are used in normal coreclr testing.

Testing is split into 4 Azure DevOps Pipelines: coreclr-corefx,
coreclr-corefx-jitstress, coreclr-corefx-jitstressregs, and
coreclr-corefx-jitstress2-jitstressregs.

In addition, we now use the corefx meta-package Microsoft.Private.CoreFx.OOB
instead of a list of individual assemblies when constructing
the testhost.

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

5 years agoFix disabling wrong session on EventPipe::Shutdown (dotnet/coreclr#25409)
José Rivero [Wed, 26 Jun 2019 16:45:47 +0000 (09:45 -0700)]
Fix disabling wrong session on EventPipe::Shutdown (dotnet/coreclr#25409)

- It's safe to call EventPipe::Disable during shutdown (eventpipe being disabled)

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

5 years agoFixes link to install SOS on linux (dotnet/coreclr#25420)
Rafael Lillo [Wed, 26 Jun 2019 15:31:16 +0000 (16:31 +0100)]
Fixes link to install SOS on linux (dotnet/coreclr#25420)

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

5 years agoDon't show AggressiveInlining items in exception stacks (dotnet/coreclr#25408)
Ben Adams [Wed, 26 Jun 2019 12:55:14 +0000 (14:55 +0200)]
Don't show AggressiveInlining items in exception stacks (dotnet/coreclr#25408)

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

5 years agoReverting the ShouldRoundUp logic to not change for custom numeric format strings...
Tanner Gooding [Wed, 26 Jun 2019 05:36:36 +0000 (22:36 -0700)]
Reverting the ShouldRoundUp logic to not change for custom numeric format strings. (dotnet/coreclr#25400)

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

5 years agoFix incorrect signature of QCall (dotnet/coreclr#25419)
Mukul Sabharwal [Wed, 26 Jun 2019 05:00:28 +0000 (22:00 -0700)]
Fix incorrect signature of QCall (dotnet/coreclr#25419)

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

5 years agoFix LTTng filtering for runtime providers (dotnet/coreclr#25374)
Sung Yoon Whang [Wed, 26 Jun 2019 04:03:04 +0000 (21:03 -0700)]
Fix LTTng filtering for runtime providers (dotnet/coreclr#25374)

* LTTng filtering

* Fix Windows build, make IsInitialized check faster

* Cleanup/change default to no keywords/level set

* Keep the default to be the current policy - enable everything

* more cleanup

* No need to check for initialization

* Fix Windows build

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

5 years agoTell the compiler to emit nullable attributes for public API only (dotnet/coreclr...
Santiago Fernandez Madero [Wed, 26 Jun 2019 03:19:28 +0000 (20:19 -0700)]
Tell the compiler to emit nullable attributes for public API only (dotnet/coreclr#25398)

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

5 years agoFix ReJIT failures (dotnet/coreclr#25377)
David Mason [Wed, 26 Jun 2019 03:15:02 +0000 (20:15 -0700)]
Fix ReJIT failures (dotnet/coreclr#25377)

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

5 years agoemit rundown event for generic methods in R2R images (dotnet/coreclr#25371)
David Mason [Wed, 26 Jun 2019 03:13:31 +0000 (20:13 -0700)]
emit rundown event for generic methods in R2R images (dotnet/coreclr#25371)

* emit rundown event for generic methods in R2R images

* fix mac build

* Code Review Feedback

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

5 years agoExpand corefx testing in coreclr repo
Bruce Forstall [Thu, 20 Jun 2019 20:05:53 +0000 (13:05 -0700)]
Expand corefx testing in coreclr repo

Currently, corefx testing is done on Windows/x64.
Expand testing to include:
1. Linux/x64, Linux/arm, Linux/arm64, Windows/x86 platforms.
   Windows/arm should be added after corefx official builds
   publish tests and test manifest. Windows/arm64 should be
   added after corefx tests are published, and we have
   sufficient hardware.
2. All JIT stress modes that are used in normal coreclr testing.

Testing is split into 4 Azure DevOps Pipelines: coreclr-corefx,
coreclr-corefx-jitstress, coreclr-corefx-jitstressregs, and
coreclr-corefx-jitstress2-jitstressregs.

In addition, we now use the corefx meta-package Microsoft.Private.CoreFx.OOB
instead of a list of individual assemblies when constructing
the testhost.

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

5 years agoRemove the Crossgen-specific VSD flag from R2RDump (dotnet/coreclr#25391)
Tomáš Rylek [Wed, 26 Jun 2019 00:27:50 +0000 (17:27 -0700)]
Remove the Crossgen-specific VSD flag from R2RDump (dotnet/coreclr#25391)

Based on JanK's advice I have removed the VSD flag from R2RDump.
The flag should get never observed by the dump tool as it's just
an intermediate contract internal to the Crossgen ZAP logic.

Thanks

Tomas

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

5 years agoDelete DeserializationBlockedException (dotnet/coreclr#25393)
Jan Kotas [Wed, 26 Jun 2019 00:24:40 +0000 (17:24 -0700)]
Delete DeserializationBlockedException (dotnet/coreclr#25393)

Contributes to dotnet/corefxdotnet/coreclr#36723

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

5 years agoPolicheck comment adjustment
Noah Falk [Tue, 25 Jun 2019 23:33:08 +0000 (16:33 -0700)]
Policheck comment adjustment

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

5 years agoReact to compiler respecting nullable attributes on properties
Stephen Toub [Tue, 25 Jun 2019 19:12:08 +0000 (15:12 -0400)]
React to compiler respecting nullable attributes on properties

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

5 years agoMake sure EventPipeProvider::m_keywords is accurate after EventPipeConfiguration...
Andrew Au [Tue, 25 Jun 2019 20:36:18 +0000 (13:36 -0700)]
Make sure EventPipeProvider::m_keywords is accurate after EventPipeConfiguration::Disable (dotnet/coreclr#25358)

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

5 years agoJitBench: Run PowerShell with an execution policy (dotnet/coreclr#25259)
Michal Strehovský [Tue, 25 Jun 2019 20:25:02 +0000 (22:25 +0200)]
JitBench: Run PowerShell with an execution policy (dotnet/coreclr#25259)

PowerShell is useless without this argument in default Windows configurations.

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

5 years agoMap C Locale to Invariant (dotnet/coreclr#25373)
Tarek Mahmoud Sayed [Tue, 25 Jun 2019 20:23:56 +0000 (13:23 -0700)]
Map C Locale to Invariant (dotnet/coreclr#25373)

ICU map the C locale to en-US_POSIX which has a non desired collation behavior as it doesn't support case insensitive comparison.
This change is to force mapping C locale to Invariant instead.

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

5 years agoUpdating the zapper to filter out some named intrinsics which are dependent on the...
Tanner Gooding [Tue, 25 Jun 2019 20:23:33 +0000 (13:23 -0700)]
Updating the zapper to filter out some named intrinsics which are dependent on the ISAs supported by the target CPU. (dotnet/coreclr#25365)

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

5 years agoFix StackChange value for OpCodes.Stelem (dotnet/coreclr#25382)
Jan Kotas [Tue, 25 Jun 2019 20:22:23 +0000 (13:22 -0700)]
Fix StackChange value for OpCodes.Stelem (dotnet/coreclr#25382)

Fixes dotnet/corefxdotnet/coreclr#37955

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

5 years agoAdd pr.yml ci.yml internal.yml pipelines to /eng/pipelines (dotnet/coreclr#25385)
Egor Chesakov [Tue, 25 Jun 2019 19:59:49 +0000 (12:59 -0700)]
Add pr.yml ci.yml internal.yml pipelines to /eng/pipelines (dotnet/coreclr#25385)

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

5 years agoRemove outputPath parameter for EventPipe IPC protocol (dotnet/coreclr#25363)
John Salem [Tue, 25 Jun 2019 19:39:16 +0000 (12:39 -0700)]
Remove outputPath parameter for EventPipe IPC protocol (dotnet/coreclr#25363)

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

5 years agoFix StackFrameIterator::IsValid check race (dotnet/coreclr#25359)
Jan Vorlicek [Tue, 25 Jun 2019 19:32:47 +0000 (21:32 +0200)]
Fix StackFrameIterator::IsValid check race (dotnet/coreclr#25359)

* Fix StackFrameIterator::IsValid check race

During GC stress >= 4, there could be a race when we would compute
bRedirectedPinvoke as false, but before the condition of the following
_ASSERTE is evaluated, the thread that is being walked pushes a
ResumableFrame to the explicit frames stack of that thread in the GC
marker handler.

The fix to prevent this race is to evaluate all the conditions that
formed the bRedirectedPinvoke after the conditions in the _ASSERTE.

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

5 years agoAdd a note about ReadyToRun to ManagedNativeHeader
Omair Majid [Tue, 25 Jun 2019 00:41:13 +0000 (20:41 -0400)]
Add a note about ReadyToRun to ManagedNativeHeader

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

5 years agoStop deallocating provider/events on shutdown (dotnet/coreclr#25369)
José Rivero [Tue, 25 Jun 2019 14:24:43 +0000 (07:24 -0700)]
Stop deallocating provider/events on shutdown (dotnet/coreclr#25369)

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

5 years agoBrick table (dotnet/coreclr#25349)
Peter Sollich [Tue, 25 Jun 2019 13:55:05 +0000 (15:55 +0200)]
Brick table (dotnet/coreclr#25349)

Fix brick table logic to fix perf issue in several ASP.NET tests, remove #ifdef FFIND_OBJECT.

What I observed was that some GCs spent a lot of time in find_first_object called from find_object, which is called during stack scanning to find the containing object for interior pointers. A substantial fraction of generation 0 was being scanned, indicating that the brick table logic didn't work properly in these cases.

The root cause was the fact that the brick table entries were not being set in adjust_limit_clr if the allocation was satisfied from the free list in gen0 instead of newly allocated space. This is the case if there are pinned objects in gen0 as well.

The main fix is in adjust_limit_clr - if the allocation is satisfied from the freelist, seg is nullptr, the change is to set the bricks in this case as well if we are allocating in gen0 and the allocated piece is above a reasonable size threshold.

The bricks are not set always set during allocation - instead, when we detect an interior pointer during GC, we make the allocator set the bricks during the next GC cycles by setting gen0_must_clear_bricks. I changed the way this is handled for server GC (multiple heaps). We used to multiply the decay time by the number of heaps (gc_heap::n_heaps), but only applied it to the single heap where an interior pointer was found. Instead, I think it's better to instead set gen0_must_clear_bricks for all heaps, but leave the decay time unchanged compared to workstation GC.

Maoni suggested to remove the #ifdef FFIND_OBJECT - interior pointers are not going away, so the #ifdefs are unnecessary clutter.

Addressed code review feedback:
 - add parentheses as per GC coding conventions
 - use max instead of if-statement
 - merge body of for-loop over all into existing for-loop

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

5 years agoFix broken ETW events (dotnet/coreclr#25364)
Sung Yoon Whang [Tue, 25 Jun 2019 09:47:48 +0000 (02:47 -0700)]
Fix broken ETW events (dotnet/coreclr#25364)

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

5 years agoMake s_numberOfSessions Volatile as advertisement to other devs that the data is...
José Rivero [Tue, 25 Jun 2019 03:31:14 +0000 (20:31 -0700)]
Make s_numberOfSessions Volatile as advertisement to other devs that the data is being used across multiple threads and a portion of that usage is lock-free (dotnet/coreclr#25366)

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

5 years agoEvents with keyword 0 needs to be fired (dotnet/coreclr#25361)
Sung Yoon Whang [Tue, 25 Jun 2019 00:36:54 +0000 (17:36 -0700)]
Events with keyword 0 needs to be fired (dotnet/coreclr#25361)

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

5 years agoAddress last round of nullable feedback - S.Resources.ResourceManager, System.Reflect...
Santiago Fernandez Madero [Tue, 25 Jun 2019 00:11:32 +0000 (19:11 -0500)]
Address last round of nullable feedback - S.Resources.ResourceManager, System.Reflection.Emit and ILGeneration (dotnet/coreclr#25318)

* Address nullable feedback for System.Resources.ResourceManager

* Address nullable feedback for System.Reflection.Emit.ILGeneration

* Address nullable feedback for System.Reflection.Emit

* PR Feedback and clean-up redundant casts

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

5 years agoAdd /eng/pipelines/*.yml (dotnet/coreclr#25325)
Egor Chesakov [Tue, 25 Jun 2019 00:09:14 +0000 (17:09 -0700)]
Add /eng/pipelines/*.yml (dotnet/coreclr#25325)

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

5 years agoThrow platform unsupported error for windows arm32 varargs (dotnet/coreclr#25320)
Jarret Shook [Mon, 24 Jun 2019 23:18:14 +0000 (16:18 -0700)]
Throw platform unsupported error for windows arm32 varargs (dotnet/coreclr#25320)

* Throw unsupported platform for native vcarargs on Arm32 Windows

* Re-enable baseservices vararg test

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

5 years agoUpdating Dragon4 to ensure the number buffer always provides a significant digit...
Tanner Gooding [Mon, 24 Jun 2019 22:39:50 +0000 (15:39 -0700)]
Updating Dragon4 to ensure the number buffer always provides a significant digit if one exists. (dotnet/coreclr#25096)

* Updating Dragon4 to ensure the number buffer always provides a significant digit if one exists.

* Changing System.Number.RoundNumber to not round up floating-point numbers.

* Re-enabling the RealFormatterTestsBase CoreFX tests

* Updating Number.RoundNumber to take a isCorrectlyRounded parameter and to use IEEE compliant rounding for floating-point numbers.

* Change SinglePrecisionCustomFormat to 7, ensuring it matches the value used in netcoreapp2.1

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

5 years agoSwitch from IndexOf(string) to Contains(string) for better readability and performanc...
Andrii Siriak [Fri, 21 Jun 2019 22:25:09 +0000 (01:25 +0300)]
Switch from IndexOf(string) to Contains(string) for better readability and performance (dotnet/coreclr#38757)

* Fix performance IndexOf(string) -> Contains(string)

* Make comparison ordinal

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

5 years agoMake Vector*.ToString() Culture invariant (dotnet/coreclr#25343)
Ganbarukamo41 [Mon, 24 Jun 2019 19:44:50 +0000 (04:44 +0900)]
Make Vector*.ToString() Culture invariant (dotnet/coreclr#25343)

* Remove IFormattable
* Hardcode characters
* Add tests

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

5 years agoMultiple bug fixes (dotnet/coreclr#25308)
José Rivero [Mon, 24 Jun 2019 19:18:54 +0000 (12:18 -0700)]
Multiple bug fixes (dotnet/coreclr#25308)

- Fixes EventPipe does not properly dispose of itself on an active session error dotnet/coreclr#25228
  - On EventPipeSession::ThreadProc, if an error occurs on the IPC streaming, then EventPipe::Disable will be invoked.
- Fixes Prevent EventPipe Sessions IDs from being reused on disconnect dotnet/coreclr#25229

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

5 years agoRemove AggressiveOptimization flag from System.Text (dotnet/coreclr#25356)
Michal Strehovský [Mon, 24 Jun 2019 19:17:01 +0000 (21:17 +0200)]
Remove AggressiveOptimization flag from System.Text (dotnet/coreclr#25356)

Based on conversation with Levi, I don't think this flag is needed.

The flag currently controls two things:
* Disqualifies the method from precompilation
* Disables Tier-0 JIT for the method

Removing the attribute allows us to precompile some of the methods (not all, because of `Vector<T>`). It measurably helps improve startup time because many of the attributed methods are complex and take a while to compile.

Once tier-1 JIT kicks in, the generated code should be identical to what we were getting before.

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

5 years agoJIT: see if jmp offset will fit in 32 bit displacement (dotnet/coreclr#25348)
Andy Ayers [Mon, 24 Jun 2019 18:19:58 +0000 (11:19 -0700)]
JIT: see if jmp offset will fit in 32 bit displacement (dotnet/coreclr#25348)

On x86 we can always reach any IAT_PVALUE entry via a 32 bit indirect
jump, and proper handling of jmp epilogs depends on this. So check if the
target address is reachable in 32 bits, and if so, use the jmp [addr] form
on x86, and the jmp [rip + disp] form for x64.

Fixes dotnet/coreclr#25345
Fixes dotnet/coreclr#25346
Undoes the assertion change from dotnet/coreclr#25302
Fixes dotnet/coreclr#25286

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

5 years agoUpdate R2R format doc to 3.0 (dotnet/coreclr#25297)
Tomáš Rylek [Mon, 24 Jun 2019 18:06:42 +0000 (11:06 -0700)]
Update R2R format doc to 3.0 (dotnet/coreclr#25297)

I have updated the various enumerations and tables. I didn't try
to go overboard w.r.t. understanding tables I'm not yet familiar
with, most notably the diagnostic, inlining and profiling tables.

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

5 years agoExtend the assert for zero-offset fields (dotnet/coreclr#25341)
Michal Strehovský [Mon, 24 Jun 2019 14:00:29 +0000 (16:00 +0200)]
Extend the assert for zero-offset fields (dotnet/coreclr#25341)

CoreRT has an [actual field](https://github.com/dotnet/corert/blob/dotnet/coreclr@ba3ba929c88bd80ec5d4dd9cf6917471ad8fa180/src/System.Private.CoreLib/src/System/Object.CoreRT.cs#L30) for the method table table pointer in `System.Object`. CoreCLR does shenanigans when laying out `System.Object` to leave a pointer-sized hole instead.

I think the zero-offset field is triggering these asserts.

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

5 years agoForce secondary await continuations to run asynchronously (dotnet/coreclr#25280)
Stephen Toub [Mon, 24 Jun 2019 13:27:47 +0000 (09:27 -0400)]
Force secondary await continuations to run asynchronously (dotnet/coreclr#25280)

* Force secondary await continuations to run asynchronously

For performance reasons, await continuations have been invoked synchronously, meaning they're invoked as part of the antecedent task's completion (as long as that task allows it, as long as there's sufficient stack space, etc.)  This generally works out well in the case where there's a single await continuation, which is far and away the common case.  However, it can cause problems in situations where there are multiple await continuations, as those continuations will end up being serialized, which can lead to slowdowns and deadlocks in niche situations.  To address that, this commit backs off a bit.  The first await continuation is still invoked synchronously, but subsequent await continuations are invoked asynchronously, such that they are not blocked by a previously registered await continuation.

* Fix nits

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

5 years agoMemoryExtensions ToUpper / ToLower throws for overlapping buffer (dotnet/coreclr...
Marco Rossignoli [Sun, 23 Jun 2019 15:30:58 +0000 (17:30 +0200)]
MemoryExtensions ToUpper / ToLower throws for overlapping buffer (dotnet/coreclr#25327)

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

5 years agoChange exception throwing in Path.GetRelativePath (dotnet/coreclr#25047)
Roman Marusyk [Sun, 23 Jun 2019 02:55:17 +0000 (05:55 +0300)]
Change exception throwing in Path.GetRelativePath (dotnet/coreclr#25047)

* Fix Path.GetRelativePath throws ArgumentNullException when relativeTo is empty string

* Fix ArgumentException for relativeTo

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

5 years agoArgumentException: use system-supplied message if message is null (dotnet/coreclr...
Herman Eldering [Sun, 23 Jun 2019 02:52:42 +0000 (04:52 +0200)]
ArgumentException: use system-supplied message if message is null (dotnet/coreclr#25115)

Enable using a system-supplied message while also providing an argument/parameter name by passing in a null message. Made to match the behavior of FileNotFoundException.

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

5 years agoFix ReturnKind classification for byref like types returned in registers (dotnet...
Andy Ayers [Sun, 23 Jun 2019 02:06:27 +0000 (19:06 -0700)]
Fix ReturnKind classification for byref like types returned in registers (dotnet/coreclr#25333)

These types contain byrefs, and so when returned in registers we may need
to avoid GC stress at the return site.

Addresses part of dotnet/coreclr#24263.

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

5 years agoFix generation of RID on distros that do not set VERSION_ID (dotnet/coreclr#25034)
Leandro A. F. Pereira [Sat, 22 Jun 2019 08:52:48 +0000 (01:52 -0700)]
Fix generation of RID on distros that do not set VERSION_ID (dotnet/coreclr#25034)

Rolling-release distros do not set this variable, leading to invalid
RIDs such as "gentoo.-x64", which causes build failures.

Omit VERSION_ID (and the period preceding it) when unset, so it's
consistent with host and PlatformAbstractions.

Fixes dotnet/coreclr#19769.

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

5 years ago[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25120)
dotnet-maestro[bot] [Sat, 22 Jun 2019 08:33:30 +0000 (01:33 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#25120)

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

- Microsoft.Bcl.AsyncInterfaces - 1.0.0-preview7.19321.1
- Microsoft.NETCore.Platforms - 3.0.0-preview7.19321.1
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview7.19321.1

* Disable failing tests

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

5 years agoArm64: Correct encoding of fabd (dotnet/coreclr#25150)
Tamar Christina [Sat, 22 Jun 2019 07:47:20 +0000 (08:47 +0100)]
Arm64: Correct encoding of fabd (dotnet/coreclr#25150)

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

5 years agodon't require seg size to be power of 2 for large pages (dotnet/coreclr#25216)
Maoni Stephens [Sat, 22 Jun 2019 01:06:39 +0000 (18:06 -0700)]
don't require seg size to be power of 2 for large pages (dotnet/coreclr#25216)

large pages will have segments aligned to 16mb (the default min seg size for hardlimit)

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

5 years agoMerge pull request dotnet/coreclr#25260 from briansull/GitHub_25134
Brian Sullivan [Fri, 21 Jun 2019 22:56:36 +0000 (15:56 -0700)]
Merge pull request dotnet/coreclr#25260 from briansull/GitHub_25134

Fix Issue dotnet/coreclr#25134 - AssertionProp incorrectly removes cast from uint

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

5 years agoAdd EventPipe Processor Number support and make NetTrace the default … (dotnet/corecl...
Noah Falk [Fri, 21 Jun 2019 22:27:21 +0000 (15:27 -0700)]
Add EventPipe Processor Number support and make NetTrace the default … (dotnet/coreclr#25276)

* Add EventPipe Processor Number support and make NetTrace the default format

The EventPipe header now has a Processor Number field. On windows we query the correct value, on other OSes we currently have a -1 placeholder, but the field is written to the format regardless.
NetTrace is now the default format when using the environment variable, and the format must be explicitly configured when using the IPC channel or managed API. A parallel change in the diagnostics repo is changing dotnet-trace and dotnet-counter to specify nettrace format which means .NET devs should see nettrace almost exclusively from now on. If for whatever reason it is needed, NetPerf remains available if a scenario explicitly requests to use it.

* PR feedback + attempting to fix broken tests

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

5 years agoWorkAround for dotnet/coreclr#25050. (dotnet/coreclr#25316)
Sergey Andreenko [Fri, 21 Jun 2019 21:49:57 +0000 (14:49 -0700)]
WorkAround for dotnet/coreclr#25050. (dotnet/coreclr#25316)

* WorkAround for dotnet/coreclr#25050.

A temporary workaround to push the milestone for this issue to 3.next.

* Response review.

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

5 years agoFix test to use mutual waits (dotnet/coreclr#25317)
Carol Eidt [Fri, 21 Jun 2019 21:26:11 +0000 (14:26 -0700)]
Fix test to use mutual waits (dotnet/coreclr#25317)

Fix dotnet/coreclr#25245

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

5 years agoAddress nullable feedback for System.Diagnostics.Tracing and StackTrace (dotnet/corec...
Santiago Fernandez Madero [Fri, 21 Jun 2019 17:54:36 +0000 (10:54 -0700)]
Address nullable feedback for System.Diagnostics.Tracing and StackTrace (dotnet/coreclr#25303)

* Address nullable feedback for System.Diagnostics.Tracing and StackTrace

* Disable corefx tests that need to be updated

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

5 years agoUpdate instructions to build individual tests
Carol Eidt [Fri, 21 Jun 2019 17:40:03 +0000 (10:40 -0700)]
Update instructions to build individual tests

cc @jashook and @sandreenko

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

5 years agoifdef Linux specific readvirtual code (dotnet/coreclr#25299)
Mike McLaughlin [Fri, 21 Jun 2019 16:40:16 +0000 (09:40 -0700)]
ifdef Linux specific readvirtual code (dotnet/coreclr#25299)

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

5 years agoRemove several unnecessary string allocations (dotnet/coreclr#25305)
Stephen Toub [Fri, 21 Jun 2019 15:56:13 +0000 (11:56 -0400)]
Remove several unnecessary string allocations (dotnet/coreclr#25305)

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

5 years agoJIT: update epilog exit size assert for x86 (dotnet/coreclr#25302)
Andy Ayers [Fri, 21 Jun 2019 15:32:37 +0000 (08:32 -0700)]
JIT: update epilog exit size assert for x86 (dotnet/coreclr#25302)

With the advent of dotnet/coreclr#25251 we can now see the epilog exit sequence on x86 vary
by as much as 6 bytes. Update the assert accordingly.

Fixes dotnet/coreclr#25301.

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

5 years agoFixed mis-matching arguments in src/CMakeLists.txt (dotnet/coreclr#25307)
Ao Qi [Fri, 21 Jun 2019 12:29:01 +0000 (20:29 +0800)]
Fixed mis-matching arguments in src/CMakeLists.txt (dotnet/coreclr#25307)

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

5 years agoDisable unloading incompatible test for runincontext (dotnet/coreclr#25126)
Jan Vorlicek [Fri, 21 Jun 2019 12:21:34 +0000 (14:21 +0200)]
Disable unloading incompatible test for runincontext (dotnet/coreclr#25126)

* Disable unloading incompatible test for runincontext

These tests do various things that make them incompatible with running
in an unloadable assembly load context using the runincontext tool.
I've attached comments to the UnloadabilityIncompatible element
describing the specific problems of each test.

I've also found a problem in the parameter passing in the
runincontext.sh where it was always passing 7 parameters to each test
and tests that were checking the number of parameters were failing due
to that. This change fixes it by passing just the parameters that were
passed to the runincontext.sh.

* Added printing unhandled exception details if it happened in the test
* Added 10ms wait to the GC collection loop to also give time to async
stuff to completely exit threadpool threads

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

5 years agoMark the profiler attach thread during attach
David Mason [Fri, 21 Jun 2019 09:20:57 +0000 (02:20 -0700)]
Mark the profiler attach thread during attach

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

5 years agoFix OSX floating point state extraction (dotnet/coreclr#25295)
Jan Vorlicek [Fri, 21 Jun 2019 08:48:08 +0000 (10:48 +0200)]
Fix OSX floating point state extraction (dotnet/coreclr#25295)

There was a bug reported on a very recent Mac with Intel i9 processor. A
crash in the RtlRestoreContext was happening at the fxrstor instruction
due to the fact that the floating point state data were garbage.
The investigation has shown that sometimes, the x86_FLOAT_STATE64
cannot be obtained using the thread_get_state API. And it was also found
that at the same time, the x86_AVX_STATE64 can be obtained. The state
extracted by the AVX variant contains all the registers that the FLOAT
variant would extract.
However, in some cases, even the x86_AVX_STATE64 cannot be obtained and
there is a third flavor that we can get - x86_AVX512_STATE64.
Unfortunately, there are cases where none of those can be obtained.
It is not clear what causes these cases, it seems only kernel debugging
can give us an answer to that.

This change modifies the way we extract the floating point state. We
first try to get the AVX state, if we fail, we try the AVX512 and
finally we fall back to the FLOAT state. If we fail to get the floating
point state with any of these, we return context without the floating
point state flag set. Also, if only getting the FLOAT state succeeds,
we return context without the XSTATE flag set.

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

5 years agoReduce string allocation in DiagnosticCounter.GetMetadataString (dotnet/coreclr#25219)
Stephen Toub [Fri, 21 Jun 2019 04:36:42 +0000 (00:36 -0400)]
Reduce string allocation in DiagnosticCounter.GetMetadataString (dotnet/coreclr#25219)

When the _metadata dictionary contains a single key/value pair, the method ends up allocating an unnecessary StringBuilder, char[] beneath it, and input string.

When the _metadata dictionary contains more key/value pairs, the method ends up allocating an unnecessary string per key/value pair.

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

5 years agoensure process-wide fence when updating GC write barrier on ARM64 (dotnet/coreclr...
Vladimir Sadov [Fri, 21 Jun 2019 02:54:34 +0000 (19:54 -0700)]
ensure process-wide fence when updating GC write barrier on ARM64 (dotnet/coreclr#25130)

* ensure process-wide fences when updating GC write barrier on ARM64

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

5 years agoAdded the complementary test cases of going from a negative int to an unsigned.
Brian Sullivan [Fri, 21 Jun 2019 01:43:32 +0000 (18:43 -0700)]
Added the complementary test cases of going from a negative int to an unsigned.

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

5 years agoRevert "ILMarshaler Refactor (dotnet/coreclr#21227)" (dotnet/coreclr#25292)
Jeremy Koritzinsky [Fri, 21 Jun 2019 00:57:58 +0000 (17:57 -0700)]
Revert "ILMarshaler Refactor (dotnet/coreclr#21227)" (dotnet/coreclr#25292)

This reverts commit dotnet/coreclr@70febbad4bbe23326c26480b2848cdfe9fc8450c.

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

5 years agoAdd custom default base address option to crossgen (dotnet/coreclr#25227)
Gleb Balykov [Fri, 21 Jun 2019 00:55:10 +0000 (03:55 +0300)]
Add custom default base address option to crossgen (dotnet/coreclr#25227)

* Add crossgen option to setup default base address for native image

This is enabled only with -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION.

* Mmap native images at default base address if env variable COMPlus_UseDefaultBaseAddr=0x1 is setup.

This is enabled only with -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION.

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