Pieter-Jan Briers [Mon, 11 Nov 2019 12:30:18 +0000 (13:30 +0100)]
Implement SetThreadName in PAL for Linux. (dotnet/coreclr#27182)
* Implement SetThreadName in PAL for Linux.
This means thread names will now show up in gdb, htop, etc... on Linux.
I did not implement this for any other platforms:
I did not have anything to test them with,
and pthread_setname_np's API varies wildly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f5f9606a6eef78256536f667c2df7b2495a8c3d
Sinan Kaya [Mon, 11 Nov 2019 08:20:03 +0000 (03:20 -0500)]
Suppress ms_struct warnings for non-Intel arches (dotnet/coreclr#27801)
* Suppress ms_struct warnings
* Enable for x86 only
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5e90c90d5255a795285ba05163bf0d7878a985e
Stephen Toub [Mon, 11 Nov 2019 08:17:26 +0000 (03:17 -0500)]
Remove unused argument from GetRegionDisplayName (dotnet/coreclr#27806)
* Remove unused argument from GetRegionDisplayName
* Address race conditions in CultureData
While most of the race conditions in this file are benign, in these cases, a thread could end up returning an intermediate value due to multiple potential writes to the same field.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b7d8fed40324e45e41ef6a09c98c3dda9490e4fb
Nelson Chen [Sun, 10 Nov 2019 17:25:19 +0000 (10:25 -0700)]
Update SOS_README.md (dotnet/coreclr#27799)
Correct to "out of band"
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b261216c6be2fd9ae0d7a8250604349f404e760
Jeremy Koritzinsky [Sun, 10 Nov 2019 02:50:56 +0000 (18:50 -0800)]
Create a simple minimal MSBuild front-end (dotnet/coreclr#27778)
* Implement simple coreclr.proj msbuild entrypoint for building the coreclr product in the common configuration.
* Add dummy targets and automatically emit the enforcePGO argument when applicable.
* Add officialbuildId and stripSymbols arguments.
* Always pass the -stripsymbols argument.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1c282bdabc38048c3f9aacb4199cf821f7f541b
Jan Kotas [Sun, 10 Nov 2019 00:18:00 +0000 (01:18 +0100)]
Rewrite Enum.CompareTo in C# (dotnet/coreclr#27792)
* Rewrite Enum.CompareTo in C#
* Handle floating point too for match the existing native implementation
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6488e511db32bb36614becb1a938d4a162f951d
Jan Kotas [Sat, 9 Nov 2019 14:48:46 +0000 (06:48 -0800)]
Relax visibility
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
e9ac7dc62becb08463a3d5a71f02eb247b1727c7
Jan Kotas [Sat, 9 Nov 2019 21:24:03 +0000 (22:24 +0100)]
Rewrite the rest of the array non-generic fast paths in C# (dotnet/coreclr#27703)
* Rewrite the rest of the array non-generic fast paths in C#
* Add missing resource string
* Use CorElementType and handle native ints to match the unmanaged implementation
* Avoid try pattern for Sort and Reverse
* Match the native implementation more closely
Commit migrated from https://github.com/dotnet/coreclr/commit/
89f5caabf0939f89a5081373ae21b0669616db6b
Jan Kotas [Sat, 9 Nov 2019 20:49:45 +0000 (21:49 +0100)]
Change BulkMoveWithWriteBarrier to be GC suspension friendly (dotnet/coreclr#27776)
* Revert "Revert "Change BulkMoveWithWriteBarrier to be GC suspension friendly (dotnet/coreclr#27642)" (dotnet/coreclr#27758)"
This reverts commit dotnet/coreclr@
b06f8a7354861feb3e0134421bdb57d06b46ce78.
* Fix wrong argument order for Unsafe.ByteOffset
* Add comment
Commit migrated from https://github.com/dotnet/coreclr/commit/
fc1e6ce79279b0bd6e55fe5d0004a5efad0f0303
Stephen Toub [Sat, 9 Nov 2019 15:38:59 +0000 (10:38 -0500)]
Revert "Fix unquoted path parameters in Microsoft.NET.Sdk.IL.targets (dotnet/coreclr#27704)" (dotnet/coreclr#27793)
This reverts commit dotnet/coreclr@
d15312228b941a03a752ba61e8d1b555bc4b15f2.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac0f6f30ae088cff0ad6954a1fc17411856dead9
Ryan Lucia [Sat, 9 Nov 2019 13:04:17 +0000 (08:04 -0500)]
Move AssemblyLoadContext.GetResolvedUnmanagedDll to shared (dotnet/coreclr#27775)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a87fc81b54da6c8738c6b1ca1247f637c85f9dd5
rob313663 [Sat, 9 Nov 2019 13:01:54 +0000 (14:01 +0100)]
Fixed typos in comments. (dotnet/coreclr#27789)
Commit migrated from https://github.com/dotnet/coreclr/commit/
38e28317952f7557881ebc20af69d06858354705
Tomáš Rylek [Sat, 9 Nov 2019 07:30:49 +0000 (23:30 -0800)]
Pre-consolidation mop-up fixes part 2 (mostly path shuffles) (dotnet/coreclr#27777)
(*) Clean up CoreCLR / root repo considerations in gen-buildsys.sh
(*) Move tryrun.cmake to the root; adjust gen-buildsys.sh accordingly
Commit migrated from https://github.com/dotnet/coreclr/commit/
889a1a1abd7dfa4c95c7c5b7455b48c464f03139
Egor Chesakov [Sat, 9 Nov 2019 06:09:47 +0000 (22:09 -0800)]
Fix computation of n-th item in an array in PC_REL_OFFSET(_field) macro in src/vm/arm64/virtualcallstubcpu.hpp (dotnet/coreclr#27783)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b02f3fb91c62e71377c4c31d8dd147d49220e8d
Joseph Musser [Sat, 9 Nov 2019 04:41:33 +0000 (23:41 -0500)]
StackTrace.GetFrames should return an array of non-nullable frames (dotnet/coreclr#27787)
Commit migrated from https://github.com/dotnet/coreclr/commit/
37ab3a1a02da60f1c683af4c9f04ca713cdff869
Stephen Toub [Sat, 9 Nov 2019 02:32:56 +0000 (21:32 -0500)]
Revert "Feature: dynamic expansion for generic dictionaries (dotnet/coreclr#26262)"
This reverts commit dotnet/coreclr@
d840c759948d910da85cf8688a45c84d09f0ad5e.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ab8467a1e02d3e033928fb820db0f5c91030bfa6
Andrew Au [Sat, 9 Nov 2019 03:33:07 +0000 (19:33 -0800)]
Avoid promoting over-sized intrinsic (dotnet/coreclr#27774)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8e709deda3e1a248c19cef8a6f7786153e6ab6f7
Levi Broderick [Sat, 9 Nov 2019 01:28:33 +0000 (17:28 -0800)]
Improve Encoding.UTF8.GetString / GetChars performance for small inputs (dotnet/coreclr#27268)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e785950569382aa188677e8fa13c5120ae244b3
mikedn [Fri, 8 Nov 2019 23:21:49 +0000 (01:21 +0200)]
Fix mismatched type IND(LCL_VAR_ADDR) folding in RewriteSIMDOperand (dotnet/coreclr#27748)
* Fix mismatched type IND(LCL_VAR_ADDR) folding in RewriteSIMDOperand
If the indirection and the variable have different SIMD types then a LCL_FLD node of the appropiate type is needed instead of a LCL_VAR node.
* Delete unused loadForm function
Commit migrated from https://github.com/dotnet/coreclr/commit/
a0bbdf98efd5b96c041d8b49d2a61d0ce5bf3212
Carol Eidt [Fri, 8 Nov 2019 22:00:42 +0000 (14:00 -0800)]
Fix struct assignment where types differ (dotnet/coreclr#27577)
Fix struct assignment where types differ
Ensure that we don't allow assignment between different struct types, and also ensure that we always use the normalized type if it exists.
Fix dotnet/coreclr#27551
Commit migrated from https://github.com/dotnet/coreclr/commit/
9455aa5425958a45a50256c851b737fbec36017d
Fadi Hanna [Fri, 8 Nov 2019 16:19:01 +0000 (08:19 -0800)]
Use cross-module R2R generics from main module with version bubble (dotnet/coreclr#27720)
* Ability to lookup the root module for precompiled R2R generics code
Commit migrated from https://github.com/dotnet/coreclr/commit/
69a57026b4bcacd8520fffb84842b31ac337e59f
Jan Vorlicek [Fri, 8 Nov 2019 14:50:44 +0000 (15:50 +0100)]
Fix sequential layout for classes (dotnet/coreclr#27766)
This fixes 15 pri 1 coreclr tests in
JIT\Methodical\explicit\coverage\seq_gc_*
These tests are using the StructLayout(LayoutKind.Sequential) attribute on a class and
crossgen2 was willing to generate sequential layout on value types only.
This change fixes it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6f9cdc4529b93a812000513fcdde27f107d35c1e
Tomáš Rylek [Fri, 8 Nov 2019 14:45:18 +0000 (06:45 -0800)]
Fix exclusion of the Common folder in runtest.proj (dotnet/coreclr#27767)
As XunitTestBinBase is not required to be canonical - in fact,
it is based on BaseOutputPath which is defined in
tests/Directory.Build.props as $(ProjectDir)..\bin\tests -
we must canonicalize the constructed paths to exclusion folders
(_SkipTestDir) before excluding them from the list of all test
dirs canonicalized in the same manner, otherwise the two lists
get out of sync and we end up not exluding Common from the test
folders. This in turn causes repeated build of Coreclr.TestWrapper
under Common, causing various race conditions in parallel wrapper
build.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
969a31f4fcd44d0b33995c02e6cfa3a9a967688d
Carlos Sanchez Lopez [Fri, 8 Nov 2019 03:37:03 +0000 (19:37 -0800)]
Add EventWaitHandle creation extension method that takes an ACL (dotnet/coreclr#42213)
* Add EventWaitHandle creation extension method that takes an ACL
* Call OpenExisting, add basic unit tests, move MAX_PATH in csproj for all Windows platforms, ensure same exceptions are thrown in both netcore and netfx.
* Address suggestions: using for the created handle, simplify try finally, merge methods, remove an unnecessary Debug.Assert
* simplify using, reorganize PInvokes a bit, let VS format resx as it expects it, remove BOM from csproj
* Add more unit tests
* Save basic access rights in a constant, generate name randomly
* Use FullControl (EVENT_ALL_ACCESS); update unit tests to use EventWaitHandleRights
* Apply suggestion of creating an EWH, then replacing its SWH.
* Remove using causing chaos, add more unit tests, remove null string unit test.
* spacing
* Address comments
* Remove unnecessary checks/exceptions, update unit tests
* Fix netfx x86 ut failure - different exception for mode validation.
* Small documentation fix
* Remove documentation for exception thrown with null security
* more documentation fixes
* New file for unit tests
* Dispose and remove windows only attributes in tests
* suggestion to not use var
* Remove duplicate resx after merge
* Readd cs files lost during merge
* Remove resx modification since it was untouched for this PR
* Address test comments
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
954ff9d89a4787b463a132095bbfcba39f348486
Tomáš Rylek [Fri, 8 Nov 2019 14:15:01 +0000 (06:15 -0800)]
Crossgen2 CI Pipeline (dotnet/coreclr#27520)
This change introduces the necessary script changes for running
CoreCLR CI pipelines in Crossgen2 mode. I have also created an
initial Crossgen2 pipeline called "coreclr-crossgen2".
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
f16a527e20c07043f22b37741a51127c890cd2e9
Tomáš Rylek [Fri, 8 Nov 2019 06:58:19 +0000 (22:58 -0800)]
Fix r2r-extra job definition (incorrect placement of testGroup) (dotnet/coreclr#27738)
Commit migrated from https://github.com/dotnet/coreclr/commit/
68043c6306a0449bb5ed10fbdea9f14dafc99df4
Carlos Sanchez Lopez [Fri, 8 Nov 2019 00:27:37 +0000 (16:27 -0800)]
Add Semaphore creation extension methods that take an ACL (dotnet/coreclr#42377)
Approved API Proposal: dotnet/coreclr#41662
Description
We don't currently have a way to create a Semaphore with a given ACL in .NET Core. We can modify the ACL, but it would be more secure to have the proper ACL on the object from the start.
Customer impact
Before this change, customers had to create a Semaphore, then set its ACLs. This presents a few problems:
- Potential security hole as semaphores can be accessed between creation and modification.
- Porting difficulties as there isn't a 1-1 API replacement
This change addresses those problems by adding a new extension method that allows creating a Semaphore and ensuring the provided ACLs are set during creation.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
74c369c25ea866ff71350346d6c33d1d383e2593
Jan Kotas [Fri, 8 Nov 2019 06:53:39 +0000 (22:53 -0800)]
Revert "Change BulkMoveWithWriteBarrier to be GC suspension friendly (dotnet/coreclr#27642)" (dotnet/coreclr#27758)
This reverts commit dotnet/coreclr@
5e1ef698774c433f70795e194e2554ad6f5b7d6f.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b06f8a7354861feb3e0134421bdb57d06b46ce78
Tomáš Rylek [Fri, 8 Nov 2019 06:47:54 +0000 (22:47 -0800)]
Leftover changes after rebasing my runtime changes against CoreCLR (dotnet/coreclr#27751)
1) Viktor moved the empty.csproj script to the repo root, reflect
the change;
2) In xplat-pipeline-job, pick coreClrRepoRoot dynamically based on
pipeline name (thanks Viktor for the suggestion!);
3) Some fixes to call dotnet through the scripts we recently fixed.
4) Remove superfluous echo in dotnet.cmd per Viktor's feedback.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
94b2a0dcd3d00d5d6a7600455c93e467d208b96c
Tamar Christina [Fri, 8 Nov 2019 05:27:43 +0000 (05:27 +0000)]
Arm64: Add S.P.CoreLib instrinsics UnzipEven and UnzipOdd (dotnet/coreclr#27731)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4176bcabdde2aa2e878e2c72d99bc53971923d8e
Ryan Lucia [Fri, 8 Nov 2019 04:09:18 +0000 (23:09 -0500)]
Miscellaneous formatting cleanup to the NativeLibrary tests (dotnet/coreclr#27753)
Commit migrated from https://github.com/dotnet/coreclr/commit/
236266280a5a79dea8b73287689f4cfaff220ef1
Ryan Lucia [Fri, 8 Nov 2019 03:57:43 +0000 (22:57 -0500)]
Move NativeLibrary.Free null check to managed (dotnet/coreclr#27744)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4ef94ad5370a2c882e6a494ba64a4552572f8694
Tamar Christina [Fri, 8 Nov 2019 03:10:49 +0000 (03:10 +0000)]
Arm64: Update S.P.CoreLib for ZipLow and ZipHigh (dotnet/coreclr#27730)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6912d5ffcbbf3cc4b2b7002a1eeb02579f8f8136
Carol Eidt [Fri, 8 Nov 2019 01:16:14 +0000 (17:16 -0800)]
PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
d0591cc7137a6583522369ec933abeae98e9485d
Jan Vorlicek [Thu, 7 Nov 2019 22:46:38 +0000 (23:46 +0100)]
Port IsBlittable fix and related changes from single-exe (dotnet/coreclr#27746)
* Port set of changes from single-exe branch
* Enable precompilation of marshalling IL stubs in crossgen2 dotnet/coreclr#26767
* P/invoke pregeneration fixes dotnet/coreclr#27389
* Fixes to array marshalling pregeneration dotnet/coreclr#27425
* Fix IsBlittableType dotnet/coreclr#27436
* Fix stack overflow issue and m_alignpad==0 assert
I've found that the changes from single-exe had issues - it was causing
stack overflow during compilation of a couple of runtime assemblies.
After I've fixed that, there was about 15 tests failing at runtime failing
with assert failure: m_alignpad == 0. This is a well known indication of a
problem where JIT and crossgen get different field offsets, resulting in
writing beyond the end of an object.
The problem was caused by incorrect usage of sequential layout for class
without LayoutSequential attribute.
I've added a commit with fix for those to this PR.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0e97c7389d70551ff4179b922b700d9ff41eded3
Michal Strehovský [Thu, 7 Nov 2019 21:54:49 +0000 (22:54 +0100)]
Check we don't marshal out parameters in SizeParamIndex test (dotnet/coreclr#27439)
* Check we don't marshal out parameters in SizeParamIndex test
The test passes both uninitialized (null) and initialized values to native.
We can add a check to ensure the initialized value doesn't get marshalled to native.
Commit migrated from https://github.com/dotnet/coreclr/commit/
3ef9c7b2503a84d12edbb7e8c58b8e395632e98d
Carol Eidt [Thu, 7 Nov 2019 21:49:10 +0000 (13:49 -0800)]
Make sure that we use a normalized struct type if applicable.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7d01c5480645aa85c90163beaf625d9425aada1
Tanner Gooding [Thu, 7 Nov 2019 21:06:32 +0000 (13:06 -0800)]
Updating NumberToFloatingPointBitsSlow to handle the remaining parsed fractional digits being zero. (dotnet/coreclr#27688)
Commit migrated from https://github.com/dotnet/coreclr/commit/
460b97aa406f10cf9ab19e6398e1e1a72fc58b48
Tomáš Rylek [Thu, 7 Nov 2019 19:52:14 +0000 (11:52 -0800)]
Fix dotnet-coreclr-perf pipeline (dotnet/coreclr#27685)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b2de2cbaaa6edf4a985a00088a3d655a688844d
Tamar Christina [Thu, 7 Nov 2019 17:58:35 +0000 (17:58 +0000)]
Arm64: Add S.P.CoreLib for AddV. (dotnet/coreclr#27663)
Commit migrated from https://github.com/dotnet/coreclr/commit/
12b9ed40c7664cf7e338fb9070aab2a83771b4dd
Viktor Hofer [Thu, 7 Nov 2019 11:41:46 +0000 (12:41 +0100)]
Remove root cross folder in favor of eng/common/cross (dotnet/coreclr#27727)
* Remove root cross folder in favor of common
* Manual darc upate from build '
20191106.10'
* Update arm32_ci_script.sh
* Update Documentation/building/cross-building.md
Co-Authored-By: Jan Vorlicek <janvorli@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6089121cda64da8827a871a2407ff5e687196a8
Tomáš Rylek [Thu, 7 Nov 2019 10:00:44 +0000 (02:00 -0800)]
Minor cleanup in download-artifact-step / upload-artifact-step (dotnet/coreclr#27726)
I have noticed this some time ago. We don't actually need to
explicitly specify the "upload / download folder" as we can easily
synthesize them in the step templates.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
dc537046d37e7fd9fd6c31d8224c2bd456a93b69
Tomáš Rylek [Thu, 7 Nov 2019 09:10:46 +0000 (01:10 -0800)]
Use preinstalled system dotnet if its version matches (dotnet/coreclr#27705)
* Use preinstalled system dotnet if its version matches
According to standard Arcade logic, CoreCLR build should be using
preinstalled system dotnet if it's the same version as requested
by the CoreCLR build.
We were suppressing this logic in configure-toolset.ps1 by setting
$script:useInstalledDotNetCli = $false with reference to some
obsolete build tools logic that no longer exists.
I have replaced this with a simple function that calls
InitializeBuildTool from the tools.ps1 Arcade script and produces
the result in form of a one-line batch file setting the dotnet
path to an environment variable we can then use in dotnet.cmd.
I have modified the Linux script dotnet.sh to again consume the
dotnet path from InitializeBuildTool.
Thanks
Tomas
* Address Viktor's and Jan's PR feedback
Based on offline discussion with Viktor I have cleaned this up
as follows:
1) I have deleted both init-dotnet scripts;
2) The dotnet script directly calls powershell on the tools.ps1
script to call the function InitializeDotNetCli and use JanV's
trick to capture its return value in an auxiliary environment
variable that is subsequently used to launch dotnet.
3) In tests/build.proj, I applied Viktor's feedback by deleting
the custom code and switching it over to the standard Arcade
property DotNetTool.
Thanks
Tomas
* Remove explicit inclusion of configure-toolset.ps1
* Fix Linux version of the dotnet script; missing quotes in build.proj
* Fix variable name typo in the Linux dotnet.sh script
Commit migrated from https://github.com/dotnet/coreclr/commit/
3f6ed5b833071b4ba71fac46ea4a06fd9ef3eb4d
Simon Nattress [Thu, 7 Nov 2019 08:16:56 +0000 (00:16 -0800)]
Crossgen2 node size relocation (dotnet/coreclr#27718)
* Crossgen2 node size relocation
* Add a new relocation (`IMAGE_REL_SYMBOL_SIZE`) to Crossgen2 which is fixed up with the size of the object node being relocated to.
* Crossgen2 needs to encode the size of another ObjectNode in several places
* The COR header emits offset and size of the ready-to-run header
* The ready-to-run header itself emits the sizes of the various data tables it points at
* `ImportSectionsTable` points to the RVA / size of `ImportTable`
* Currently we call `Getdata().Data.Length` on the node we want to know the size of which is wasteful, causing us to regenerate data for all the header nodes multiple times.
* Fix some implicit node emission ordering dependencies we were unaware of. `MethodEntryPoint` table needs to be generated after the import section nodes since it encodes index and offsets of imports within their tables which are only finalized when the import tables are emitted.
* Fix comment typo
Commit migrated from https://github.com/dotnet/coreclr/commit/
1e8650ab8c314e1c020a307ed26b5df98bd05cc8
Alexey Golub [Thu, 7 Nov 2019 05:43:49 +0000 (07:43 +0200)]
Fix unquoted path parameters in Microsoft.NET.Sdk.IL.targets (dotnet/coreclr#27704)
This fixes issues when running build.cmd in dotnet/corefx when there are spaces on the path.
Fixes dotnet/coreclr#27699
Commit migrated from https://github.com/dotnet/coreclr/commit/
d15312228b941a03a752ba61e8d1b555bc4b15f2
Andrew Au [Thu, 7 Nov 2019 05:07:33 +0000 (21:07 -0800)]
Support custom modifier for method signature (dotnet/coreclr#27676)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d56c7a1b64070b7f302c6083d6cf189692f7240
Carlos Sanchez Lopez [Thu, 7 Nov 2019 01:05:31 +0000 (17:05 -0800)]
Add Mutex creation extension methods that take an ACL (dotnet/coreclr#42281)
Approved API Proposal: dotnet/coreclr#41662
Description
We don't currently have a way to create a Mutex with a given ACL in .NET Core. We can modify the ACL, but it would be more secure to have the proper ACL on the object from the start.
Customer impact
Before this change, customers had to create a Mutex, then set its ACLs. This presents a few problems:
Potential security hole as mutexes can be accessed between creation and modification.
Porting difficulties as there isn't a 1-1 API replacement
This change addresses those problems by adding a new extension method that allows creating a Mutex and ensuring the provided ACLs are set during creation.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
6a2de7eaa6fba965a90754beafb6a8f4ca81d460
Jan Kotas [Thu, 7 Nov 2019 01:40:03 +0000 (17:40 -0800)]
Delete some dead code from vm/threds.cpp/.h (dotnet/coreclr#27701)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4822669f2b10fdecbfd876fbf4399a8d9339b4e8
Viktor Hofer [Thu, 7 Nov 2019 01:19:34 +0000 (02:19 +0100)]
Move tryrun to importing project (dotnet/coreclr#27717)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c373d864c05fa4c4b68e764cf47d2a623c4b2baa
mikedn [Thu, 7 Nov 2019 01:10:47 +0000 (03:10 +0200)]
Change the SSA def node to ASG (dotnet/coreclr#27445)
SSA defs used to point at LHS of GT_ASG. Many clients immediately needed to walk up the tree to the parent to find the GT_ASG. So revise the SSA def to just be the GT_ASG.
Also, reject non-LCL_VAR definitions in RangeCheck. This matches the previous behavior that rejected LHS nodes that weren't the direct descendant of the ASG node - basically cases like ASG(IND(ADDR(LCL_VAR)), x). RangeCheck doesn't have the ability to follow such definitions.
This also happens to reject LCL_FLD nodes as LHS. The machinery required to follow definition chains involving struct copies and field access is quite a bit more complicated and RangeCheck certainly doesn't have it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b12053ffffc36ad73ad83f7ce111c891c4cf457
Fadi Hanna [Wed, 6 Nov 2019 23:06:09 +0000 (15:06 -0800)]
Feature: dynamic expansion for generic dictionaries (dotnet/coreclr#26262)
* Feature: Dynamic Expansion for Generic Dictionaries
These changes introduce dynamic size expansion for generic dictionary layouts when we run out of slots.
The original implementation allowed for an expansion, but using a linked list structure, which made it impossible to use fast lookup slots once we were out of slots in the first bucket.
This new implementation allows for the usage of fast lookup slots always, for all generic lookups.
This also removes the constraint we had on R2R, where we disabled the usage of fast slots all-together.
* Add diagnostics slot with pointer to old dictionary
* Adding a chapter in the BOTR describing generic dictionaries
Commit migrated from https://github.com/dotnet/coreclr/commit/
d840c759948d910da85cf8688a45c84d09f0ad5e
John Salem [Wed, 6 Nov 2019 22:37:06 +0000 (14:37 -0800)]
[test] Improve diagnostics for failures in IPC/EventPipe tests (dotnet/coreclr#27567)
* Add ProxyStream for diagnosing issues with EventPipeEventSource StreamReading
* Harden IpcTraceTest.cs against errors where the reader throws an exception before we await the task
Commit migrated from https://github.com/dotnet/coreclr/commit/
89ad9a78cb76df1e7d22f40145588cf62e7c362f
Filip Navara [Wed, 6 Nov 2019 21:48:40 +0000 (22:48 +0100)]
Remove silent catch (dotnet/coreclr#26732)
Remove silent catch for `SafeHandle`
Commit migrated from https://github.com/dotnet/coreclr/commit/
f40219af9da8635d35158a947cc208acff316b8d
Sergey Andreenko [Wed, 6 Nov 2019 21:31:31 +0000 (21:31 +0000)]
Fix VN for byrefx on x86. (dotnet/coreclr#27702)
* Add a repro test.
* Fix the bug.
* Extract code duplication into `VnForConst`.
* make the new method private.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d1b188773c40661612eea98fce5287aa2455377
Egor Bogatov [Wed, 6 Nov 2019 20:27:35 +0000 (23:27 +0300)]
Improve Math(F).FusedMultiplyAdd codegen (dotnet/coreclr#27060)
* improve Math(F).FusedMultiplyAdd
* fix wrong order and clang formatting
* fix ordering again
* code formatting
* fix typos
* Move to Lower
* clean up
* Fix assert
* code formatting
* code formatting
* Address feedback
* Clean up
* Add an assert to make sure we only have 3 args
* Address feedback and add tests
* Address feedback
* update tests
* Fix CI failure
* Address feedback
* formatting
* Fix failures
Commit migrated from https://github.com/dotnet/coreclr/commit/
d9272784d10f38991e3004c9b074d6aa444a39cb
Elinor Fung [Wed, 6 Nov 2019 20:17:49 +0000 (12:17 -0800)]
Populate properties of AssemblyLoadStart/Stop events (dotnet/coreclr#27558)
* Populate properties of AssemblyLoadStart/Stop events
* Add tests for basic start/stop binder tracing events
* Add property for ALC of requesting assembly
Commit migrated from https://github.com/dotnet/coreclr/commit/
05cbf03037737c631534642f699cf7533a9ee250
Anubhav Srivastava [Wed, 6 Nov 2019 17:57:40 +0000 (09:57 -0800)]
Implement comparisons for all ObjectNodes (dotnet/coreclr#27355)
* Preparation to introduce parallelism into crossgen2
- Add comparison functions for all object nodes and sort object nodes before they are emitted to the PE.
- Sort ImportSection signatures based on their imports to keep them in sync.
- Add determinism test.
- Change dictionaries in ReadyToRunCodegenNodeFactory and ReadyToRunSymbolNodeFactory to NodeCaches (i.e. ConcurrentDictionary, at the moment)
- Add structs to act as keys for the above NodeCaches (MethodFixupKey, DynamicHelperKey, ReadyToRunHelperKey)
- Synchronize logger
- Update some Dictionaries to ConcurrentDictionary
- Sort GCRefMapNode methods and lock the add since AddImport might be called my multiple threads at once.
- Create RandomInsertStack to speed up randomization when using CoreRT_DeterminismSeed.
Commit migrated from https://github.com/dotnet/coreclr/commit/
230117910d7c033eb1025ba350731163e80da9d6
Santiago Fernandez Madero [Wed, 6 Nov 2019 09:12:16 +0000 (01:12 -0800)]
Revert changes to tryrun.cmake (dotnet/coreclr#27697)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e303cb61058c82e5fa42225fb7f668b765da8ba8
Stephen Toub [Wed, 6 Nov 2019 06:39:01 +0000 (01:39 -0500)]
Add Span.Sort, and make Array.Sort span-based (dotnet/coreclr#27700)
* Add Span<T>.Sort
Shares existing Array-based implementation by changing that implementation to be span based.
* Additional work to enable span-based sorts
- Cleans up changes from the previous commit, e.g. corrects nullable annotations, removes TODOs, using GetRawSzArrayData instead of GetRawArrayData, etc.
- Passes spans around rather than spans+lo+hi.
- Deletes the native TrySZSort, preferring to use the managed implementation in all cases.
Commit migrated from https://github.com/dotnet/coreclr/commit/
50d73a21afcc8eaa3e7f459253314db8a5553333
Jan Vorlicek [Wed, 6 Nov 2019 04:58:12 +0000 (05:58 +0100)]
Fix intermittent arm/arm64 Linux build failures (dotnet/coreclr#27698)
The arm/arm64 Linux builds were recently failing intermittently
with a weird error in macro expansion in one of the generated
eventing headers. It seems that the issue is caused by the fact
that we were not creating a custom_target to enable handling
dependencies on the generated header files and we were also
not marking the files as generated.
I've noticed that the message indicating that the headers are
being generated was printed twice in the build log. with this
fix, it occurs only once there.
So I believe that the issue was caused by the headers being
generated twice by two different threads and when that happened,
the files got corrupted.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7cf41c0fb1b916057aa5beeac57d6195878740cc
Adeel Mujahid [Wed, 6 Nov 2019 01:40:32 +0000 (03:40 +0200)]
Avoid memset in case of HENUMInternal (dotnet/coreclr#27690)
gcc9 complains:
```sh
/datadrive/projects/coreclr/src/md/runtime/mdinternalro.cpp: In member function virtual HRESULT MDInternalRO::EnumTypeDefInit(HENUMInternal*):
/datadrive/projects/coreclr/src/md/runtime/mdinternalro.cpp:202:44: error: void* memset(void*, int, size_t) clearing an object of non-trivial type struct HENUMInternal; use assignment or value-initialization instead [-Werror=class-memaccess]
202 | memset(phEnum, 0, sizeof(HENUMInternal));
| ^
In file included from /datadrive/projects/coreclr/src/inc/corpriv.h:21,
from /datadrive/projects/coreclr/src/md/runtime/stdafx.h:20,
from /datadrive/projects/coreclr/src/md/runtime/mdinternalro.cpp:12:
/datadrive/projects/coreclr/src/inc/metadata.h:87:8: note: struct HENUMInternal declared here
87 | struct HENUMInternal
| ^~~~~~~~~~~~~
```
As it turned out, there already is a static helper defined on this type
with a comment to prefer it over memset, this patch just replaces the
usage.
Commit migrated from https://github.com/dotnet/coreclr/commit/
91ee41b6701e1f7f8d3d1fba461a67e240c83c82
Sergey Andreenko [Tue, 5 Nov 2019 23:01:41 +0000 (23:01 +0000)]
Contain block store addresses (dotnet/coreclr#21711)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d5729752866606686c7158d62bb033adf0f707dc
Fadi Hanna [Tue, 5 Nov 2019 22:51:35 +0000 (14:51 -0800)]
Move p/invoke pregeneration out of single-exe branch (dotnet/coreclr#27673)
* Move p/invoke pregeneration out of single-exe branch
This is just xcopy of the src/tools/crossgen2 directory in the single-exe branch with David's profile data changes omitted. I had to fix a `using` directive in one of the files because a `using` keyword the branch was using got deleted in master.
I don't know if there's a way to do this kind of selective merge in git, but I don't particularly care. Most of the interesting history for these files is on the CoreRT side anyway.
Also including the change to prestub.cpp that unlocks using the generated p/invokes.
* Disable ILStub emission for pinvokes until they are fixed to be non-shared
Commit migrated from https://github.com/dotnet/coreclr/commit/
bee443dc0e8fc6a74a87bd207df63db3dfbd6f14
David Mason [Tue, 5 Nov 2019 21:36:22 +0000 (13:36 -0800)]
Enable rejit feature on all cpu architectures (dotnet/coreclr#27576)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d06f54a6b2bf0ddcc69d12cfc11e09ddb6d4ec0
Adeel Mujahid [Tue, 5 Nov 2019 19:11:31 +0000 (21:11 +0200)]
Add gcc9 config and remove ZeroInit macro (dotnet/coreclr#27605)
* Add gcc9 config
* Remove ZeroInit definition and usage
Initialize dacprivate structs to 0 explicitly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2a8b55d4c944438df1599c9a78262bc48f07266
Tomáš Rylek [Tue, 5 Nov 2019 18:46:29 +0000 (10:46 -0800)]
Fix gc-longrunning pipeline definition (dotnet/coreclr#27684)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d37ca4290cb1cc82f347475ab72d39252185d9f0
eli-fin [Tue, 5 Nov 2019 18:33:38 +0000 (20:33 +0200)]
Update Profiler Loading.md (dotnet/coreclr#23890)
Minor fixes
Commit migrated from https://github.com/dotnet/coreclr/commit/
c8a5570ed9b91e7c45f04496fa9c9122a7a65156
JesperTreetop [Tue, 5 Nov 2019 18:33:18 +0000 (19:33 +0100)]
Prevent DivideByZeroException in EventCounter.ToString() (dotnet/coreclr#27581)
* Prevent DivideByZeroException in EventCounter.ToString()
Maybe it should print something other than 0. Maybe "Mean" should be excluded. But at least with this it doesn't divide by zero. Ternary operator in interpolated string is not super readable; didn't know if making the code more descriptive would have performance implications.
* Update src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventCounter.cs
Co-Authored-By: Stephen Toub <stoub@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
a187c727956c8ed30635f75450e7dfc38f2ccf38
Vladimir Sadov [Tue, 5 Nov 2019 17:51:21 +0000 (09:51 -0800)]
Some follow up changes after the cast caching change (dotnet/coreclr#27571)
* Make array MT and element type always match.
* Remove TypeDesc duplication of ArrayIsInstanceOf and ArraySupportsBizarreInterface
* Removed `CanCastToNonVariantInterface`. It was used only in three places, one of which was an assert.
* Use `CanCastTo` in `MergeTypeHandlesToCommonParent` - it does a cache lookup and can be called in preemptive mode.
* Updated the comment on TypeHandle::GetMethodTable(). We can still get non-exact method tables for TypeDescs.
* Removed "Approx" in `GetApproxArrayElementTypeHandle`, `SetApproxArrayElementTypeHandle` and `GetApproxArrayElementTypeHandlePtr`
Commit migrated from https://github.com/dotnet/coreclr/commit/
5aaa25b61aec244c39c2c9b5ce0800a9183df24e
Tanner Gooding [Tue, 5 Nov 2019 17:30:07 +0000 (09:30 -0800)]
Fixing the return type of the ArmBase.ReverseElementBits methods in the PlatformNotSupported file (dotnet/coreclr#27672)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2f98b9a29ce10178ab61fc14e11f17200e2d111
Andrew Au [Tue, 5 Nov 2019 16:25:32 +0000 (08:25 -0800)]
Handling generic attribute in AttributePresenceFilterNode (dotnet/coreclr#27667)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a11f07461ec65dd7d4bc133196d26ad786cb2ce1
Jan Kotas [Tue, 5 Nov 2019 16:13:22 +0000 (08:13 -0800)]
Fix Array.Copy regressions for large multidimensional arrays (dotnet/coreclr#27668)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b3ac725320c1328d8843abb477940a00af54bd8
Jan Kotas [Tue, 5 Nov 2019 16:10:37 +0000 (08:10 -0800)]
Change BulkMoveWithWriteBarrier to be GC suspension friendly (dotnet/coreclr#27642)
* Change BulkMoveWithWriteBarrier to be GC suspension friendly
* Rename RuntimeHelpers.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
5e1ef698774c433f70795e194e2554ad6f5b7d6f
Andy Ayers [Tue, 5 Nov 2019 16:02:52 +0000 (08:02 -0800)]
JIT: cleanup redundant exact type tests (dotnet/coreclr#27397)
Generate exact type assertions from exact type tests in the IR. Look for these
assertions and set the value number for RELOPs with known outcomes. Process
JTRUE nodes in the main assertion prop optimization loop.
This combination of changes removes residual exact type tests from cast
expansions when they are anticipated by user inserted exact type tests, as in:
```C#
if (b.GetType() == typeof(D))
{
return (D)b;
}
```
Closes dotnet/coreclr#14471.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5216c8c843d2f34efccb070a840dfd42d6e7e230
Tomáš Rylek [Tue, 5 Nov 2019 15:18:42 +0000 (07:18 -0800)]
Move helper pipeline scripts under eng/pipeline/scripts (dotnet/coreclr#27660)
To clean up contents of the eng folder, I'm moving all YAML scripts
used by Azure pipelines under eng/pipeline/scripts. Most of the rest
of the eng folder will get merged into a common eng folder in the
composite repo.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
3474c72042b0e3a55e3bc59bb3a29cecfaa0a67c
Tomáš Rylek [Tue, 5 Nov 2019 12:59:30 +0000 (04:59 -0800)]
Fix for two subtle bugs I made yesterday in init-dotnet (dotnet/coreclr#27679)
1) In the "old repo conditional block", I used __ProjectDir even
though it was not defined in the script. This is normally benign
when the script is run from build.cmd which defines the variable
but it means that the script cannot be run directly from shell.
2) In a similar vein, I used !__ProjectDir! in the script even though
it doesn't have the delayed variable expansion flag enabled. Again,
the flag is set in the main build.cmd script but the init-dotnet
script couldn't be run directly. Thankfully in this particular case
we don't need the delayed expansion so I just changed ! to %.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
37ce1747f692c0ff8c69cd095485c6a0a6837061
Santiago Fernandez Madero [Tue, 5 Nov 2019 07:44:42 +0000 (01:44 -0600)]
Update tryrun.cmake in order to be able to build corefx in consolidated repo (dotnet/coreclr#27674)
Commit migrated from https://github.com/dotnet/coreclr/commit/
10bcb6f8e705a5f6e53476a7fcf36f80261ee13d
Jeremy Koritzinsky [Tue, 5 Nov 2019 00:07:33 +0000 (16:07 -0800)]
Reword comments for policheck (dotnet/coreclr#27669)
* Comment rewordings required by policheck.
* Use AppContainer instead of Windows Store.
* Additional wording cleanup.
Commit migrated from https://github.com/dotnet/coreclr/commit/
340d69c20d57a2b161aa74c516886bf45df8ee22
Andrew Au [Mon, 4 Nov 2019 23:43:56 +0000 (15:43 -0800)]
Avoid instantiating abstract class (dotnet/coreclr#27589)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0b441193b7b701c4b68d758c4798f28241cfb9e3
David Wrighton [Mon, 4 Nov 2019 23:26:00 +0000 (15:26 -0800)]
Tweaks to existing BulkType event (dotnet/coreclr#27516)
- Enable specification of exact multi-dimensional array rank
- Tolerate scenarios where the name of the type is so large that it prevents generation of the BulkType event
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd418f6c39dde248a157ba30ae9b9685e306b0a3
David Wrighton [Mon, 4 Nov 2019 20:12:16 +0000 (12:12 -0800)]
MethodDetails event (dotnet/coreclr#27515)
* MethodDetails event
- Captures enough information to allow a method to be identified to its exact token/instantiation
- Leans on BulkType events to send type information
- Send the event around all interesting events in ETW
Commit migrated from https://github.com/dotnet/coreclr/commit/
5a381e7c8507777f71746ec564a6b75e38ebe089
dotnet-maestro[bot] [Mon, 4 Nov 2019 19:30:09 +0000 (19:30 +0000)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#27661)
* Update dependencies from https://github.com/dotnet/corefx build
20191103.8
- Microsoft.NETCore.Platforms - 5.0.0-alpha.1.19553.8
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha.1.19553.8
* Disable Quic tests
Commit migrated from https://github.com/dotnet/coreclr/commit/
2ad78933ed828e4ada57f57bd60c0aa2985641a2
pi1024e [Mon, 4 Nov 2019 17:01:03 +0000 (12:01 -0500)]
Change m_fPreemptiveGCDisabled to bool (dotnet/coreclr#27648)
Commit migrated from https://github.com/dotnet/coreclr/commit/
96e08af2e7f246ad2efe9ebe68c4d4ca51f1b638
Tamar Christina [Mon, 4 Nov 2019 16:40:52 +0000 (16:40 +0000)]
Update only S.P.CoreLib for ReverseElementBits (dotnet/coreclr#27582)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c2ae7de1e1eaaff1a0a21c6e7e0014fad8a78bfa
Sinan Kaya [Mon, 4 Nov 2019 16:37:08 +0000 (11:37 -0500)]
Several GCC fixes (dotnet/coreclr#27654)
* Fix compilation warning
coreclr/src/vm/arm64/virtualcallstubcpu.hpp:350:111: error: the value of ‘n’ is not usable in a constant expression
#define PC_REL_OFFSET(_field) (DWORD)((offsetof(ResolveStub, _field) - (offsetof(ResolveStub, _failEntryPoint[n]))) & 0xffffffff)
^
coreclr/src/pal/inc/rt/palrt.h:173:56: note: in definition of macro ‘offsetof’
#define offsetof(type, field) __builtin_offsetof(type, field)
^~~~~
coreclr/src/vm/arm64/virtualcallstubcpu.hpp:380:19: note: in expansion of macro ‘PC_REL_OFFSET’
offset = PC_REL_OFFSET(_resolveEntryPoint);
^
I
Undefined behavior
* Remove duplicate definition
* Undefined behavior
coreclr/src/vm/arm64/virtualcallstubcpu.hpp:327:33: warning: operation on ‘n’ may be undefined [-Wsequence-point]
_stub._slowEntryPoint[n++] = 0x1000000A | ARM64EncodeHelpers::ADR_PATCH(PC_REL_OFFSET(Dataregionbase, n));
~^~
coreclr/src/vm/arm64/virtualcallstubcpu.hpp:356:33: warning: operation on ‘n’ may be undefined [-Wsequence-point]
_stub._failEntryPoint[n++] = 0x1000000A | ARM64EncodeHelpers::ADR_PATCH(PC_REL_OFFSET(Dataregionbase, n));
* Unneeded qualifiers
* Cast fix
* Unsigned compare
Commit migrated from https://github.com/dotnet/coreclr/commit/
4989fbd5a992a2682ce579d392d60e3f9e7537a7
Tomáš Rylek [Mon, 4 Nov 2019 14:35:26 +0000 (06:35 -0800)]
Consolidation resiliency fixes in CoreCLR build scripts (dotnet/coreclr#27635)
Backport of my consolidation changes aimed at making principal
CoreCLR build scripts orthogonal to repo consolidation.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
3eea5cd23597276c70030338652a85ead44b763a
Tomáš Rylek [Mon, 4 Nov 2019 10:57:31 +0000 (02:57 -0800)]
YAML consolidation changes part 2 (dotnet/coreclr#27649)
After finally getting a more or less green run in the runtime repo
I have prepared another batch of changes aimed at simplifying
the oncoming repo integration:
1) Use relative paths for script references;
2) Add new variable coreClrRepoRootDir with the appended path
separator so that we don't need to fork that everywhere;
3) Actually unify the first pair of build-test executions that
has become identical after the change;
4) Fixed several previously unseen repo root-relative paths;
5) Fixed missing propagation of testGroup in build-job;
6) Fixed run logs to include R2R in the name (Matt Mitchell pointed
out the other day this prevents us from analyzing both sets of logs);
7) Move job.yml to eng to enable using relative template paths;
8) Delete unused jobs.yml.
9) Move performance.yml to eng as run-performance-test.yml to
derive it from xplat-pipeline-job and avoid duplicating variables.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
818b35978a1681690988b2c9c3f0b6a034d91e82
Ilia [Mon, 4 Nov 2019 10:42:54 +0000 (13:42 +0300)]
Fix invalid-noreturn warning for __CorHlprThrowOOM in corhlpr.h (dotnet/coreclr#23524)
* Fix invalid-noreturn warning for __CorHlprThrowOOM in corhlpr.h
Commit migrated from https://github.com/dotnet/coreclr/commit/
c30381fbe8779e13bbc08591b86cb3d158953212
Peter Sollich [Mon, 4 Nov 2019 09:07:00 +0000 (10:07 +0100)]
Suspension fixes (dotnet/coreclr#27578)
* Two simple fixes to suspension issues seen in GCPerfSim:
- Insert allow_fgc() call in background_mark_simple - this fixes the cases where there are a ton of GC handles referencing simple objects not containing pointers.
- Change PING_JIT_TIMEOUT constant from 10 milliseconds to 1 millisecond. This fixes the case where return address hijacking doesn't work quickly, because the hijacked thread doesn't return (e.g. because it's in a loop doing further calls). In this case we have to retry the hijack, and changing the timeout constant makes this happen more quickly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
fab7aa20dc4c5856bb4759bbbde0bb88ffd439a2
Egor Chesakov [Sun, 3 Nov 2019 20:42:55 +0000 (12:42 -0800)]
Implement LeadingSignCount,LeadingZeroCount,PopCount (dotnet/coreclr#27568)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a76dda01562ec04be3ef1847f786e0a6a969c2b6
Tarek Mahmoud Sayed [Sun, 3 Nov 2019 18:42:33 +0000 (10:42 -0800)]
Fix Buggy code in TimeZoneInfo (dotnet/coreclr#27591)
Although couldn’t reach the corner case cause executing the buggy code, the fix here is done according to the similar code in TimeZoneInfo which show the intention of the change
https://github.com/dotnet/coreclr/blob/dotnet/coreclr@
97c582975eed3260ef21e0bcc55c8c86d1e3bec8/src/System.Private.CoreLib/shared/System/TimeZoneInfo.cs#L1638
https://github.com/dotnet/coreclr/blob/dotnet/coreclr@
97c582975eed3260ef21e0bcc55c8c86d1e3bec8/src/System.Private.CoreLib/shared/System/TimeZoneInfo.cs#L1568
Commit migrated from https://github.com/dotnet/coreclr/commit/
cdb2f6a4a356db55861c35e5dcb2cde8c76a2ea9
Jan Kotas [Sun, 3 Nov 2019 14:25:28 +0000 (06:25 -0800)]
Delete two more FCalls (dotnet/coreclr#27640)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7a3f0d8da0112e7b3f9b11695494fd0bba1b4a52
Jan Kotas [Sun, 3 Nov 2019 14:24:45 +0000 (06:24 -0800)]
Refactor away jithelpers.cs (dotnet/coreclr#27643)
Unnecessary wrapper that lost its purpose as its original methods got refactored to other places.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c43cdbbf5f119b76f2b7121abee3340c46043289
Jan Kotas [Sun, 3 Nov 2019 12:07:39 +0000 (04:07 -0800)]
Use simple Array.Copy overload where possible (dotnet/coreclr#27641)
The simple Array.Copy overload does not come with a performance penalty anymore.
Commit migrated from https://github.com/dotnet/coreclr/commit/
27b334b57e5e146742005ca72851a083d9371b98
Jan Kotas [Sun, 3 Nov 2019 11:55:42 +0000 (03:55 -0800)]
Consolidate *.Fast.cs (dotnet/coreclr#27644)
System.Memory OOB package that this split was originally done for does not exist anymore.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8352294d22832a59136201d7eec455724891f593
Jan Kotas [Sun, 3 Nov 2019 05:12:46 +0000 (22:12 -0700)]
Rewrite of Array.Copy fast path in C# (dotnet/coreclr#27634)
Contributes to dotnet/coreclr#27106
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b9ee9974bb68d3eab329154203ab1b6c55b198a
Levi Broderick [Sun, 3 Nov 2019 00:24:28 +0000 (17:24 -0700)]
Fix typo in Tuple.cs (dotnet/coreclr#27637)
Reported by https://github.com/dotnet/corefx/issues/42321
Commit migrated from https://github.com/dotnet/coreclr/commit/
1bf3a15ae81c90c2f08f123faa996ac7eb34a432
Carol Eidt [Sun, 3 Nov 2019 00:09:58 +0000 (17:09 -0700)]
Formatting
Commit migrated from https://github.com/dotnet/coreclr/commit/
b1193133862c9db0b1683ecfcacf49a722a22728
Carol Eidt [Sun, 3 Nov 2019 00:08:58 +0000 (17:08 -0700)]
Allow direct assignment between SIMD nodes with different class handles if they are the same SIMD type.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e5113c6c0087a6d82adb6fe4c1d516dda512cb8c
Sinan Kaya [Sat, 2 Nov 2019 19:29:22 +0000 (15:29 -0400)]
Compile with gcc 4.8 (dotnet/coreclr#27625)
* Remove VOID on parameters
* Detect compiler support
* Clarify version
In file included from coreclr/src/vm/dumpdiagnosticprotocolhelper.h:11:0,
from coreclr/src/vm/dumpdiagnosticprotocolhelper.cpp:7:
coreclr/src/vm/diagnosticsprotocol.h: In member function ‘bool DiagnosticsIpc::IpcMessage::Initialize(HRESULT)’:
coreclr/src/vm/diagnosticsprotocol.h:239:56: error: call of overloaded ‘Initialize(const DiagnosticsIpc::IpcHeader&, HRESULT&)’ is ambiguous
return Initialize(GenericErrorHeader, error);
^
coreclr/src/vm/diagnosticsprotocol.h:239:56: note: candidates are:
coreclr/src/vm/diagnosticsprotocol.h:196:14: note: bool DiagnosticsIpc::IpcMessage::Initialize(DiagnosticsIpc::IpcHeader, T&) [with T = int]
bool Initialize(IpcHeader header, T& payload)
^
coreclr/src/vm/diagnosticsprotocol.h:213:14: note: bool DiagnosticsIpc::IpcMessage::Initialize(DiagnosticsIpc::IpcHeader, T&&) [with T = int&]
bool Initialize(IpcHeader header, T&& payload)
^
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b53ff1e38f774bb50666ffc5a2595996f90e8dd