Mike McLaughlin [Fri, 9 Aug 2019 17:24:06 +0000 (10:24 -0700)]
ARM32 out of proc unwind support (dotnet/coreclr#26082)
ARM32 out of proc unwind support
Removed the old dwarf unwind info decoding and use libunwind
for both dwarf and arm exidx.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e8f08ff064b406d0ab0f36217abe6328ea61c081
Stephen Toub [Fri, 9 Aug 2019 00:46:24 +0000 (20:46 -0400)]
Fix xunit warning xUnit1013 (public method should be marked as a theory)
Commit migrated from https://github.com/dotnet/coreclr/commit/
52651008a5fb72eb678467cd2eb42aac4e5334e8
Stephen Toub [Thu, 8 Aug 2019 19:25:14 +0000 (15:25 -0400)]
Fix FxCop warning CA1823 (unused fields)
Commit migrated from https://github.com/dotnet/coreclr/commit/
65a807986867488ef8f9b4316eefbee7f034548d
Stephen Toub [Thu, 8 Aug 2019 19:12:50 +0000 (15:12 -0400)]
Fix FxCop warning CA2229 (private deserialization ctor)
Commit migrated from https://github.com/dotnet/coreclr/commit/
17655f12b5ba2230a544dbe10eaceaf444a77965
Stephen Toub [Thu, 8 Aug 2019 19:10:25 +0000 (15:10 -0400)]
Fix FxCop warning CA1810 (explicit static cctor)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dc39170009646990e141324ab901ec81b69a2f92
Stephen Toub [Thu, 8 Aug 2019 19:08:33 +0000 (15:08 -0400)]
Fix FxCop warning CA1825 (Array.Empty)
Commit migrated from https://github.com/dotnet/coreclr/commit/
941a1435b38baaec2207a062178194b179c5f3b1
Stephen Toub [Thu, 8 Aug 2019 19:03:12 +0000 (15:03 -0400)]
Fix StyleCop warning SA2200 (throwing caught exception)
Commit migrated from https://github.com/dotnet/coreclr/commit/
53b2b7eedb9c297cdd1f7ebaeea12a168cc3d8b5
Stephen Toub [Thu, 8 Aug 2019 18:49:39 +0000 (14:49 -0400)]
Fix FxCop warning CA2007 (ConfigureAwait)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b50411daee41c2a8666ba6c3c7a60bfa77093286
Stephen Toub [Thu, 8 Aug 2019 18:48:14 +0000 (14:48 -0400)]
Fix StyleCop warning SA1620 (generic XML comment ordering)
Commit migrated from https://github.com/dotnet/coreclr/commit/
66e2b81dc9bffeef4926f813b253e456e8bcabdf
Stephen Toub [Thu, 8 Aug 2019 18:38:14 +0000 (14:38 -0400)]
Fix StyleCop warning SA1617 (void return XML comment)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d79a7ed5efa61811f98961d2734b0246872f3609
Stephen Toub [Thu, 8 Aug 2019 18:37:31 +0000 (14:37 -0400)]
Fix StyleCop warning SA1113 (comma position for parameters)
Commit migrated from https://github.com/dotnet/coreclr/commit/
51e524ed4f1600a5a0707401b1fdc5acac2d4bc0
Stephen Toub [Thu, 8 Aug 2019 18:36:06 +0000 (14:36 -0400)]
Fix StyleCop warning SA1212 (accessor order)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9ed3c08f62b58bfd27b182f2afcd583485d13296
Stephen Toub [Thu, 8 Aug 2019 18:35:33 +0000 (14:35 -0400)]
Fix StyleCop warning SA1206 (modifer ordering)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d5cd7526f9d1e5d7a3c98d3a745f8566f789af17
Stephen Toub [Thu, 8 Aug 2019 18:32:22 +0000 (14:32 -0400)]
Fix StyleCop warning SA1121 (use built-in types)
Commit migrated from https://github.com/dotnet/coreclr/commit/
db65876ca97128d9297282228b1f90b55f960989
Stephen Toub [Thu, 8 Aug 2019 18:26:51 +0000 (14:26 -0400)]
Fix StyleCop warning SA1200 (cref prefixes)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1ad94fc5c7c66bb151dab4ea6a16b5a4482064e8
Stephen Toub [Thu, 8 Aug 2019 18:15:21 +0000 (14:15 -0400)]
Fix StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f4ce6c7b8b1e4181f4c5567111414528d21f7629
Stephen Toub [Thu, 8 Aug 2019 18:11:25 +0000 (14:11 -0400)]
Fix FxCop warning CA1018 (attributes should have AttributeUsage)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f395f657fc40abb8eb2a1895a476c60b6652e64b
Stephen Toub [Thu, 8 Aug 2019 22:09:17 +0000 (18:09 -0400)]
Move CodeAnalysis.ruleset to shared (dotnet/corefxdotnet/coreclr#40153)
So that the same settings can be applied to corelib.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
16697076c0a6af47fbcce75e11c45d35a12b7d4e
Jeremy Koritzinsky [Thu, 8 Aug 2019 23:31:55 +0000 (16:31 -0700)]
Make ILAsm and ILDasm packages standalone. Clean up Microsoft.NET.Sdk.IL (dotnet/coreclr#25930)
* Remove reference to CoreCLR package from ILAsm and ILDasm packages.
* Directly reference ILAsm and ILDasm in their packages instead of copying. Don't pull down CoreCLR or ClrJit since ILAsm and ILDasm don't need them. Don't copy ILAsm or ILDasm to the output directory of the project when using the tools from packages.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e960d72ad19086a9615229b24b50dbd9ccb143c
Sung Yoon Whang [Thu, 8 Aug 2019 22:14:56 +0000 (15:14 -0700)]
Fix a potential division by 0 in post GC counter computation (dotnet/coreclr#26085)
* Fix a potential division by 0 in post GC counter computation
* Remove useless code
Commit migrated from https://github.com/dotnet/coreclr/commit/
740752c9d206a465e96a4d01e7dafb6adb6ded63
Stephen Toub [Thu, 8 Aug 2019 01:07:58 +0000 (21:07 -0400)]
Re-enable StyleCop warnings SA1028 and SA1518 (trailing whitespace and blank lines) (dotnet/coreclr#40113)
Mechanical/automated change. The only manual changes were a) removing the two rules from the CodeAnalysis.ruleset file, b) removing spaces from one line of a .targets file that is used to generate a .cs file, and c) reverting the changes in a few test files where the naive replacement happened in the middle of a verbatim string where the whitespace actually mattered.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
df75e5abd02cecaad95222dd0ef5f594138d7f04
Jeffrey Zhao [Thu, 8 Aug 2019 20:28:02 +0000 (15:28 -0500)]
Catch InvalidCastException properly in Collection (dotnet/coreclr#25953)
The explicit implementations of IList.Add/Insert/Set methods catch
InvalidCastException for casting input argument to type T to throw
an ArgumentException. The issue here is they put the core collection
modification operation in the try block, which could be overridden
by sub-classes and produce an InvalidCastException from user logic,
even the argument passed to IList.Add/Insert/Set is valid.
To fix the issue, we just need to move the collection modification
outside the try block, and leave the casting in try block only. In
this way, we'll get an ArgumentException when the argument type is
invalid, but propagate the InvalidCastException thrown from user
code as it should be.
dotnet/corefxdotnet/coreclr#39919
Commit migrated from https://github.com/dotnet/coreclr/commit/
322529912639e9ba0ea2306181b9f6034fdee5ae
Stephen Toub [Thu, 8 Aug 2019 16:20:01 +0000 (12:20 -0400)]
Improve building Corelib in VS (dotnet/coreclr#26076)
Commit migrated from https://github.com/dotnet/coreclr/commit/
19824b5f9cf8a1c6e39f6ce134be9f753a013c69
Adam Sitnik [Thu, 8 Aug 2019 15:50:03 +0000 (17:50 +0200)]
make DateTime.UtcNow 5% faster to minimize the leap second performance impact (dotnet/coreclr#26046)
* make few methods used by DateTime.UtcNow inlinable to minimize the leap second performance regression impact, related to dotnet/coreclr#25728
* apply suggested micro-optimizations
Commit migrated from https://github.com/dotnet/coreclr/commit/
4450e5ca663b9e66c20e6f9751c941efa3716fde
Jeremy Koritzinsky [Thu, 8 Aug 2019 15:12:26 +0000 (08:12 -0700)]
String test refresh (dotnet/coreclr#25948)
* Rewrite all LP*STR/BSTR/AnsiBSTR parameter/return type tests.
* Add string-field-in-struct tests.
* Add tests for UnmanagedType.ByValTStr.
* Fix casing in name.
* PR Feedback.
* Fix AnsiBStr test.
* Remove redundant cast.
* 2-phase lookup compliance. SysFreeString -> CoreClrBStrFree.
* Remove extra using
* Remove extra space
* Calling conventions....
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef1b0f7440b534fc9bfdbbd6469533987e6d2fdf
Michal Strehovský [Thu, 8 Aug 2019 14:41:35 +0000 (16:41 +0200)]
Mark CoreLib as .NET Framework assembly (dotnet/coreclr#26067)
Noticed this is missing while enabling some new code paths in the CPAOT compiler. We need some way to mark assemblies that are part of the platform. This attribute is used to determine if assembly is part of the platform in full AOT mode. It would be convenient for CoreCLR's CoreLib to also have this.
Not critical to have this, but it would help me avoid special casing CoreLib.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e348bf9a3930f67d89d937d1c441165131ba3cbb
Mukul Sabharwal [Thu, 8 Aug 2019 05:18:22 +0000 (22:18 -0700)]
Delete dead code (dotnet/coreclr#26060)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b9664e79fbe424d98b446e068b65128487e682d2
Sergey Andreenko [Thu, 8 Aug 2019 03:50:34 +0000 (20:50 -0700)]
Separate statements from GenTree, part 1 (dotnet/coreclr#25898)
* Fix some leftovers where we used GenTree instead of GenTreeStmt.
* Separate GT_IL_OFFSET and GT_STMT.
* Add unreached to gtHashValue for GT_STMT.
it has an assert that tree is not GT_STMT: https://github.com/dotnet/coreclr/blob/dotnet/coreclr@
65a50887b9a460d7833f0ab476fab9027f1e8166/src/jit/gentree.cpp#L1837 the assert was added before 2010.
* Do not use gtCloneExpr for stms.
* Fix optUnrollLoops.
The was a wrong change in
cbf3704a8421ef0b093d68a93d867c9a768dc9d.
Commit migrated from https://github.com/dotnet/coreclr/commit/
86fd1ea08c3d05855992df64fbb09929cb47e068
Stephen Toub [Thu, 8 Aug 2019 02:00:43 +0000 (22:00 -0400)]
Delete PROJECTN ifdefs from Corelib (dotnet/coreclr#26058)
Commit migrated from https://github.com/dotnet/coreclr/commit/
dfbd83657e46e43adead674585f6957409a7d47f
Jarret Shook [Wed, 7 Aug 2019 22:51:01 +0000 (15:51 -0700)]
Publish built tests (dotnet/coreclr#25925)
* Publish built tests
* Fix indentation
* remove if
* Fix indent
* Fix indent part 2
* Add back if
* Remove if.
* zip tests before upload
* Disable running tests to test change
* Zip without full paths on unix and fix windows zip
* Switch to tar for unix and fix windows quotes
* Correct pushd location
* Fix upload path unix
* Remove artifactName from block
* Try more syntax
* more syntax
* More syntax....
* Remove temporary changes
* Use archive task
* Change artifact name
* Change to upload
* Use explicit location
* uncomment test submission
* change artifact name
* Do not publish for corefx
* Conditionally publish tests
* Fix syntax error
* Re-enable helix submission
Commit migrated from https://github.com/dotnet/coreclr/commit/
578bc4deedd03cb53cc54054a0161d38e12f9032
Sung Yoon Whang [Wed, 7 Aug 2019 22:21:07 +0000 (15:21 -0700)]
Clean up diagnosticserver socket on unexpected shutdown (dotnet/coreclr#25976)
* Clean up diagnosticserver socket/pipe on shutdown
* Refactor dbg transport pipe cleanup to be registered as signal handler from the vm side
* cleanup dead code
* Remove more dead code and fix windows builds
* Moving some ifdefs around
Commit migrated from https://github.com/dotnet/coreclr/commit/
07d6aa440441b611883b348af47ef91ecd71936f
Russ Keldorph [Tue, 30 Jul 2019 22:30:18 +0000 (15:30 -0700)]
Consistent telm. type for crossgen-comparison job
For some reason our telemetry prefers a slash appended to the HelixType parameter.
Commit migrated from https://github.com/dotnet/coreclr/commit/
9b130d3664976054b70e846908dae6efe7b6221e
Sung Yoon Whang [Wed, 7 Aug 2019 21:49:25 +0000 (14:49 -0700)]
Improve ArgumentNullExceptions on DiagnosticCounter.DisplayName/Unit (dotnet/coreclr#26035)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee426b2bb050109936f758e6174a7c8e40997fb9
Gleb Balykov [Wed, 7 Aug 2019 20:22:37 +0000 (23:22 +0300)]
Fix undefined references to methods from MetaData::HotTable during ilasm build with FEATURE_PREJIT=true (dotnet/coreclr#26052)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2e4d93170543983446260e9d88265de4e6223498
Jeremy Koritzinsky [Wed, 7 Aug 2019 20:19:51 +0000 (13:19 -0700)]
Delegate marshaling test refresh. (dotnet/coreclr#25981)
* Delegate marshaling test refresh.
Clean up and coalese delegate tests. Separate the native side of the "delegate as IDispatch" tests to a separate C++ file that is conditionally compiled in on Windows.
* PR Feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
919906fa38edc65186ee8905881204e06c620df8
Omair Majid [Wed, 7 Aug 2019 19:38:36 +0000 (15:38 -0400)]
Support managed build on linux/aarch64 (dotnet/coreclr#26047)
We have everything we need to build the native and managed components on
linux/aarch64 (hosted, not cross compiled). So lets enable building the
managed components on linux/aarch64.
Also remove out-of-date list of unsupported RIDs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c77906469107c5cbe5829595aa4f28851f85b5de
Elinor Fung [Wed, 7 Aug 2019 19:31:06 +0000 (12:31 -0700)]
Fix passing unprocessed build args when building managed tests (dotnet/coreclr#26048)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f7197948e0c6924bf147c19d91be0990d99639a9
Jakob Botsch Nielsen [Wed, 7 Aug 2019 17:09:44 +0000 (10:09 -0700)]
Generate relative jump/branch for tailcalls on x64/ARM (dotnet/coreclr#25848)
* Generate RIP-relative jmp for fast direct tailcalls on x64
* Also use relative branch on ARM
* Fix compiler errors
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5a13ba179f88018a89578646ffae69d4c39698d
Sergey Andreenko [Wed, 7 Aug 2019 05:37:37 +0000 (22:37 -0700)]
Delete TRANSLATE_PDB. (dotnet/coreclr#26036)
Does anybody know what it was for and if it is still used?
I have not found any references in desktop sources.
When you enable it there are many compile errors.
Commit migrated from https://github.com/dotnet/coreclr/commit/
45851dffd1f6dd1550a9be691247326090dca8c9
Jarret Shook [Wed, 7 Aug 2019 00:47:17 +0000 (17:47 -0700)]
Superpmi mch merge (dotnet/coreclr#26018)
* Initial changes to allow merging mch files
* Finish merging mch files
* Address nit
Commit migrated from https://github.com/dotnet/coreclr/commit/
35d5e1225ca2969020f61fd1b8d9d44d82b6f71d
Elinor Fung [Tue, 6 Aug 2019 18:32:18 +0000 (11:32 -0700)]
Use Arcade's internal tool restore project for restoring IBCMerge (dotnet/coreclr#26023)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c36fd8c702e26d5bb3cf582cfcab51d8c94af440
Vitek Karas [Tue, 6 Aug 2019 13:16:22 +0000 (06:16 -0700)]
Remove inspection only from binder (dotnet/coreclr#26030)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f6bc3ad63ccc268dbad8247f722e40d8f75c6ba
Jan Kotas [Tue, 6 Aug 2019 11:48:15 +0000 (13:48 +0200)]
Revert "Fix issue with out-of-scope GCFrame in Frame list (dotnet/coreclr#25795)" (dotnet/coreclr#26029)
This reverts commit dotnet/coreclr@
09cb367557c580466b6de7582f1e53c9af526c9b.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f3dd26cb712030151c68c0c391ea0e4fbe9e2155
Vitek Karas [Tue, 6 Aug 2019 10:45:16 +0000 (03:45 -0700)]
Binder minor cleanup (dotnet/coreclr#26015)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b4c5709a5de55622d839d75f89dabf9d2e47085f
Aleksey Kliger (λgeek) [Tue, 6 Aug 2019 09:11:45 +0000 (05:11 -0400)]
Move AssemblyLoadContext VM-invoked resolve methods to shared (dotnet/coreclr#25989)
Share between CoreCLR and Mono
Mono began using a copy of these methods with
https://github.com/mono/mono/pull/15946
Commit migrated from https://github.com/dotnet/coreclr/commit/
799bda9a3af28bc3095c705018566fc550173dc6
Stephen Toub [Mon, 5 Aug 2019 15:05:14 +0000 (11:05 -0400)]
Remove some unused locals (dotnet/corefxdotnet/coreclr#39956)
* Remove some unused locals
Trying out various analyzers, including one to flag unused locals. There are more than this, but this is a first batch. Some of these are just clean-up. Others are saving unnecessary cost. At least one appears to be a real functional bug.
* Address PR feedback
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
2b7c285a4f6b177513bfc814d1e59756d479a26b
Jesús Corrius [Tue, 6 Aug 2019 09:10:39 +0000 (11:10 +0200)]
Fix List Format (dotnet/coreclr#26027)
Although the source text is correct, "1)" gets interpreted as another element of the list and it is automatically changed to "3)"
I added the word "Option" in front of it just to make sure "1)" is interpreted as intended.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d82486fba5b2666819bb3e8913c61154acf6126
Elinor Fung [Tue, 6 Aug 2019 05:36:20 +0000 (22:36 -0700)]
Prefix error messages in init-tools to make them Azure DevOps logging commands (dotnet/coreclr#26021)
Commit migrated from https://github.com/dotnet/coreclr/commit/
fe31eb52cca002ab3046d49c9f7fde1a422eb505
Jan Kotas [Tue, 6 Aug 2019 01:54:27 +0000 (03:54 +0200)]
Delete some dead code (dotnet/coreclr#26006)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0a762eb2f3a299489c459da1ddeb69e042008f07
Maoni Stephens [Tue, 6 Aug 2019 01:00:07 +0000 (18:00 -0700)]
pinned heap design doc (dotnet/coreclr#26024)
design doc for the Pinned Heap
Commit migrated from https://github.com/dotnet/coreclr/commit/
040da13c52d3389fece3695ccd2c364f749ead15
Elinor Fung [Mon, 5 Aug 2019 23:20:45 +0000 (16:20 -0700)]
Propagate errors during build to the Azure DevOps timeline (dotnet/coreclr#25977)
* Use Arcade MSBuild scripts
* Remove bin clash logger from build-test scripts
* Remove setting RestoreSources in optdata.csproj and rely on repo's NuGet.config
Commit migrated from https://github.com/dotnet/coreclr/commit/
929da85bce4fd3f2794b957497daca4a522be2d8
Jarret Shook [Mon, 5 Aug 2019 22:40:22 +0000 (15:40 -0700)]
Add --pmi flag to superpmi collect (dotnet/coreclr#25994)
* Add --pmi flag to superpmi collect
In addition to passing -pmi_assemblies run through all of the passed assemblies or directories and pmi all managed assemblies as part of the collection.
* Address feedback
* Fix typo
* Small changes to get collection working:
Commit migrated from https://github.com/dotnet/coreclr/commit/
ded7452cbc7d5afc000ada234c9b84c515582a0f
Tanner Gooding [Mon, 5 Aug 2019 21:54:22 +0000 (14:54 -0700)]
Updating Math.Round and MathF.Round to be IEEE compliant so that the intrinsic and managed form are deterministic. (dotnet/coreclr#25901)
* Updating Math.Round and MathF.Round to be IEEE compliant so that the intrinsic and managed form are deterministic.
* Fixing the Math.Round and MathF.Round handling for values greater than 0.5 and less than 1.0
* Applying formatting patch.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c384e36c84c22393efeeb1981538b0aef02cf97a
Ashley Mannix [Mon, 5 Aug 2019 07:08:30 +0000 (17:08 +1000)]
use a platform-agnostic name for coredistools lib (dotnet/coreclr#25999)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e72ac908bd84ad22ea4fec74e30219380075325c
Sergey Andreenko [Fri, 2 Aug 2019 23:27:12 +0000 (16:27 -0700)]
Do not set source for CoreDisTools. (dotnet/coreclr#25991)
We do not set it when we restore other packages so unify that.
dotnet -restore will search for nuget.config and find https://github.com/dotnet/coreclr/blob/master/NuGet.config that contains https://dotnet.myget.org/F/dotnet-core/api/v3/index.json that is needed here.
Commit migrated from https://github.com/dotnet/coreclr/commit/
69649624d71a4d7ebcae2ce5420508e5fe5ba7f2
Mike McLaughlin [Fri, 2 Aug 2019 22:56:36 +0000 (15:56 -0700)]
Fix build break (dotnet/coreclr#25992)
Issue: https://github.com/dotnet/coreclr/issues/25990
Commit migrated from https://github.com/dotnet/coreclr/commit/
fd6dc9d9f9f39b3b812589522e02c0f8403e3f1d
Sergey Andreenko [Fri, 2 Aug 2019 20:56:50 +0000 (13:56 -0700)]
Report AzDO telemetry for the formatting errors. (dotnet/coreclr#25975)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bb809f78678ba7fd5783f94919f99860b8b5e080
Mike McLaughlin [Fri, 2 Aug 2019 20:16:21 +0000 (13:16 -0700)]
arm64 out of proc unwind for DAC (dotnet/coreclr#25909)
arm64 out of proc unwind for DAC
Removed FEATURE_DATATARGET4 for arm64
Added SP check to createdump's native unwind
loop to make it more robust.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0d5a6395fce4a3bdfb249645bad9724cd120b50f
Tanner Gooding [Fri, 2 Aug 2019 15:48:52 +0000 (08:48 -0700)]
Ensure that we check for implicit ivals for single argument intrinsics before the SIMDScalar handling. (dotnet/coreclr#25905)
* Ensure that we check for implicit ivals for single argument intrinsics before the SIMDScalar handling.
* Adding test template entries for the unary overloads of the Sse41.Round functions
* Regenerating the hardware intrinsic test templates.
Commit migrated from https://github.com/dotnet/coreclr/commit/
bcc73ca212da78acc1745b7958ba32ae530c2c80
Stephen Toub [Fri, 2 Aug 2019 00:42:56 +0000 (20:42 -0400)]
Fix CounterGroup to use built-in types
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
c96da4ac6e8e5191064980234fc3a497f753c7e7
Stephen Toub [Thu, 1 Aug 2019 22:00:12 +0000 (18:00 -0400)]
Enable stylecop warnings 1205, 1212, and 1617 (dotnet/corefxdotnet/coreclr#39941)
* Enable stylecop warning 1617 (void return value should not be documented)
* Enable stylecop warning 1212 (get/set accessor ordering)
* Enable stylecop warning 1205 (modifier ordering)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
1fede649ca386fa7ba7a5a2b26b4c95a9f675a2c
Stephen Toub [Wed, 31 Jul 2019 23:10:59 +0000 (19:10 -0400)]
Enable several StyleCopAnalyzers (dotnet/corefxdotnet/coreclr#39921)
* Fix ordering of keywords in member signatures
* Add StyeCop.Analyzers
Most rules are disabled. Many of them we'll want to leave disabled, however there are a handful it'll be good to enable over time.
* Use built-in type alias
* Fix straggling stylecop warnings in all configurations
* Replace tabs with spaces
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
752d682682faa1a869ed95a9e3c1681a64504574
Stephen Toub [Wed, 31 Jul 2019 12:04:33 +0000 (08:04 -0400)]
Re-enable CA1823 (unused private fields) (dotnet/corefxdotnet/coreclr#39899)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
43056d429628fb58be399f0dd0d53adfb505098c
Jan Vorlicek [Thu, 1 Aug 2019 23:20:22 +0000 (01:20 +0200)]
Fix check for no affinitization in GC on Unix (dotnet/coreclr#25963)
* Fix check for no affinitization in GC on Unix
While the affinitization mask setting is not used for affinity setting
on Unix, it was still being checked for non-zero as one of the
indicators that GC heap affinitization was enabled. This change removes
that check for Unix builds.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd42ee8fe410f71026467ad2e90116115b85f68d
Jan Vorlicek [Thu, 1 Aug 2019 23:14:12 +0000 (01:14 +0200)]
Fix WSL alternate stack check (dotnet/coreclr#25972)
* Fix WSL alternate stack check
On WSL, the alternate stack check in sigsegv_handler doesn't work. The
uc_stack members are always zero no matter whether the handler is
executed on an alternate or default stack. So the check to detect
whether we are running on an alternate stack or not is always returning
false on WSL and it prevents NULL reference exceptions from being
handled.
The fix is to introduce an env variable COMPlus_EnableAlternateStackCheck
that can be used to enable the alternate stack check. By default, the
sigsegv_handler is considered to always run on an alternate stack.
Commit migrated from https://github.com/dotnet/coreclr/commit/
d7d8f91a8bad9effe9b5605edec6d26d540e0f85
Jeremy Koritzinsky [Thu, 1 Aug 2019 22:34:05 +0000 (15:34 -0700)]
Decimal test refresh (dotnet/coreclr#25955)
* Rewrite decimal PInvoke tests
* Rewrite Decimal tests to make managed the single source of truth. Remove most reverse-P/Invoke tests that didn't add coverage.
* Add include of <new>
* Enable enregistering structs containing a decimal on SystemV abi. Fixes dotnet/coreclr#25974.
Commit migrated from https://github.com/dotnet/coreclr/commit/
8bd6e5468b6ab83ac39cca43c322e44d9039b166
John Salem [Thu, 1 Aug 2019 22:27:48 +0000 (15:27 -0700)]
Allow for interface implementations in EventSource.WriteEventVarArgs (dotnet/coreclr#25844)
* Allow for interface implementations in EventSource.WriteEventVarArgs
* Also account null ref types and nullable types
* fix error in comment and simplify first part of boolean logic
* Update src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
Co-Authored-By: Noah Falk <noahfalk@users.noreply.github.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
c284bbfa83db019c34afe8835e198409f4168c02
Ivan Diaz Sanchez [Thu, 1 Aug 2019 21:32:40 +0000 (14:32 -0700)]
Merge pull request dotnet/coreclr#25951 from ivdiazsa/GetPathOfFileAbove_branch
Changed GetDirectoryNameOfFileAbove to GetPathOfFileAbove.
Commit migrated from https://github.com/dotnet/coreclr/commit/
12a76d368ea60518e6db389fb4ec3f593a678362
Jeremy Koritzinsky [Thu, 1 Aug 2019 21:01:38 +0000 (14:01 -0700)]
DllImportAttribute Test Cleanup. (dotnet/coreclr#25970)
Reduce DllImportPath tests to minimal native code to help limit additional factors when we add perf-tests.
Combine our two separate tests of Dll path probing into one test library. Move DllImportPath and ExactSpelling tests to the DllImportAttribute folder since they're testing specific parts of the attribute.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e53cad98ee39f5b707632ea91026afbbc5ee088f
José Rivero [Thu, 1 Aug 2019 08:26:20 +0000 (01:26 -0700)]
Marking some EventPipe test as incompatible with runincontext. (dotnet/coreclr#25954)
https://github.com/dotnet/coreclr/issues/25815#issuecomment-
516794116
Fixes https://github.com/dotnet/coreclr/issues/25815
Commit migrated from https://github.com/dotnet/coreclr/commit/
11c3fe5bdaea9cb76c775b5317fcef71cc67f1ef
Jarret Shook [Thu, 1 Aug 2019 00:35:24 +0000 (17:35 -0700)]
Force runtest to run with tests build on same host (dotnet/coreclr#25927)
* Delete unused code
* Delete build_xunit_test_wrappers
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b0d96b363eed8a104c8069e9eaf9ff87b52024e
Steve MacLean [Thu, 1 Aug 2019 00:31:55 +0000 (20:31 -0400)]
Whitespace (dotnet/coreclr#25957)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e8edd40648bf19658da273df9f7d3c147b9c8ad8
Sung Yoon Whang [Wed, 31 Jul 2019 22:47:13 +0000 (15:47 -0700)]
Make counters use dedicated thread instead of timer (dotnet/coreclr#25864)
* Make a dedicated polling thread for EventCounters
* Cleanup
* remove debug prints
* nit
* Fix comment
* addressing issues from code review
* Fix an assertion from getting fired when we have multiple listeners
* Fix a test issue
* code review feedback
* Fix a potential deadlock
* Fix another deadlock
* Allow s_sleepDurationInMilliseconds to be reset to a larger value
* More issues fix
* Let thread wake up from sleep if needed
* Some suggestions for the counters fix.
The resulting behavior should be the same as what is there now (assuming I didn't mess anything up), these are all just code simplifications that hopefully make it easier to review and maintain going forward. In total I think this reduces the change size in CounterGroup.cs by ~30%.
- With the addition of the AutoResetEvent the ManualResetEvent is no longer needed, removed it.
- Removed the various if foo != null checks for the shared state, it is all initialized once when then thread is created and then assumed to be non-null elsewhere.
- Removed a 2nd lock acquisition inside OnTimer
- Replaced an if with Math.Min in PollForValues
* fix test
Commit migrated from https://github.com/dotnet/coreclr/commit/
b3de897450a789e3be011a384e13c61c98a5e62b
Ivan Diaz Sanchez [Wed, 31 Jul 2019 19:04:26 +0000 (12:04 -0700)]
Changed GetDirectoryNameOfFileAbove to GetPathOfFileAbove
Commit migrated from https://github.com/dotnet/coreclr/commit/
dc3e9bbad82e1ca3f606d00af0ec6269910a7558
Brian Sullivan [Wed, 31 Jul 2019 16:53:28 +0000 (09:53 -0700)]
Fixes Issue dotnet/coreclr#20262 for CoreCLR 5.0 (dotnet/coreclr#25926)
Disassembler: ildasm/dasm.cpp
In the CoreCLR with reference assemblies and redirection it is more difficult to determine if
a particular Assembly is the System assembly, like mscorlib.dll is for the Desktop CLR.
In the CoreCLR runtimes, the System assembly can be System.Private.CoreLib.dll, System.Runtime.dll
or netstandard.dll and in the future a different Assembly name could be used.
We now determine the identity of the System assembly by querying if the Assembly defines the
well known type System.Object as that type must be defined by the System assembly
If this type is defined then we will output the ".mscorlib" directive to indicate that this
assembly is the System assembly.
Assembler: ilasm/assembler.cpp
In Assembler:GetBaseAsmRef() add a check for System.Private.CoreLib as the System or Base assembly.
Commit migrated from https://github.com/dotnet/coreclr/commit/
cb86146124105553961e1d3e795bd9e1de7182ce
Jan Vorlicek [Wed, 31 Jul 2019 07:45:22 +0000 (09:45 +0200)]
Fix issue with out-of-scope GCFrame in Frame list (dotnet/coreclr#25795)
* Fix issue with out-of-scope GCFrame in Frame list
More aggressive C/C++ optimizations done by VS2019 are breaking fragile
assumptions of the CoreCLR "manually managed code".
Unwinding of Frame chains accesses stack local variables after the stack
frame has been unwound, but it depends on their content to be left
intact. The new compiler is breaking this assumption by stack-packing a
different variable over it.
This change fixes the problem by adding a destructor to GCFrame that
pops the frame from the per-thread Frame list.
ExceptionFilterFrame can be on top of the explicit frames stack when we
are trying to destroy the GC frame, so it needs the same treatment as
the GCFrame.
Commit migrated from https://github.com/dotnet/coreclr/commit/
09cb367557c580466b6de7582f1e53c9af526c9b
jiangzeng01 [Wed, 31 Jul 2019 00:32:34 +0000 (08:32 +0800)]
Add 2 EventPipe tests (dotnet/coreclr#25893)
* Add EventPipe tests - ExceptionThrown_V1
* Add EventPipe test - GCStartStop
* EventPipe tests - update method name
* Fix eventpipe tests according to PR comments
* GCStartEnd test - Reduce the number of forced GCs
* GCStartEnd - add callback logging
* Fix GCStartEnd test issue
Commit migrated from https://github.com/dotnet/coreclr/commit/
f438de131ea4f9058a8a1377993a8088a15a2e4b
Russ Keldorph [Mon, 22 Jul 2019 17:59:52 +0000 (17:59 +0000)]
crossgen-comparison pipeline job
Add PR- and CI-triggered jobs for crossgen-comparison, which runs
"cross"-crossgen on a selection of assemblies on the build host and
then compares the results to the corresponding native crossgen.
Note that this change enables Linux ARM jobs only. It attempts to
support other configurations, notably Windows, but those YAML paths
have not been tested because they are not needed at this point.
Part of dotnet/coreclr#24358
Commit migrated from https://github.com/dotnet/coreclr/commit/
429bd1a1efd528602659b699736aa567f3e2c408
Michal Strehovský [Tue, 30 Jul 2019 15:11:17 +0000 (17:11 +0200)]
Allow default interface methods for crossgen /createpdb (dotnet/coreclr#25839)
The existing code was assuming we're doing fragile crossgen and blocked loading the type.
Commit migrated from https://github.com/dotnet/coreclr/commit/
39f207ad8babe677029ddc2c72714a9959da2475
Jan Kotas [Tue, 30 Jul 2019 15:07:52 +0000 (17:07 +0200)]
Cleanup thread local state management in PAL (dotnet/coreclr#25828)
* Cleanup thread local state management in PAL
- Delete PAL Enter/Leave callbacks
- Delete TlsAlloc/TlsGetValue/TlsSetValue/TlsFree, convert these to use regular thread statics
* Delete SEH Info
* Delete some more dead code
Commit migrated from https://github.com/dotnet/coreclr/commit/
a1d0a97d81a340808d9e7da90d0ea276d51bc3b0
Ryan Lucia [Mon, 29 Jul 2019 19:45:31 +0000 (15:45 -0400)]
Fix test error reporting (dotnet/coreclr#25866)
Commit migrated from https://github.com/dotnet/coreclr/commit/
98474560029752f1f6a36a77c6ef0ea77a83a76c
Jeremy Koritzinsky [Mon, 29 Jul 2019 17:18:40 +0000 (10:18 -0700)]
ILMarshaler Refactor v2 (dotnet/coreclr#25736)
* Don't keep managed values from parameters alive via the cleanup work list. Keep them alive via a plain GC.KeepAlive.
Match original behavior for SafeHandle byref fields
* Revert "Revert "ILMarshaler Refactor (dotnet/coreclr#21227)" (dotnet/coreclr#25292)"
This reverts commit dotnet/coreclr@
41893484b3fecdb5ffe69f0c94a5832690feeb5a.
* Remove duplicate argument consumption.
* PR Feedback
* Initialize dwAddRefd local in SafeHandle byval marshaler.
* PR Feedback.
Commit migrated from https://github.com/dotnet/coreclr/commit/
80106e964b929a728c0568d913208eb14f86f167
Jarret Shook [Mon, 29 Jul 2019 16:06:49 +0000 (09:06 -0700)]
Update fgCanFastTailCall to use new fgArgInfo (dotnet/coreclr#20643)
* Use fgInitArgInfo in fgCanFastTailCall
This leverages the work done in dotnet/coreclr#19658 to use fgInitArgInfo in fgCanFastTailCall. This removes much of the duplicate ABI code that was required before dotnet/coreclr#19658. In addition, the change more clearly explains the issues with LowerFastTailCall and more clearly bails on when it can and cannot fastTailCall.
Note:
Part of the old logic would report no to a fastTailCall on Windows AMD64, if the struct was a power of two (engregisterable). This has been removed; however, it is unclear currently whether LowerFastTailCall/Codgen will support the change.
* Address pr feedback for FastTailCallCandidates
* Update variable name based on rebase
* Fix comment headers based on feedback
* More feedback addressed
* Fix rebase error
* Address feedback and correctly bail on byref args
* Restrict to only bail on byref struct args
* Correctly used computations from fgArgInfo
* Correctly re-init arg infor for explicit tailcalls
This is required because morphTailCall modifies the argument list.
It would be nice in the future to go through each argument on subsequent calls to fgInitArgInfo to verify there have been no changes.
* Fix x86 assert
* Address PR feedback related to recomputing initArgs
* Fix comment
* Update fgCanFastTailCall header
* Address PR feedback
* Apply format patch
* Correctly reset arginfo after morphtailcall
* Commit does several small things, and fixes a bug
Addresses PR feedback
Removes dead code
Changes to bail a fast tail call when the caller has a multi slot struct
* Fix windows build
* Address pr feedback
* Fix arm and x86 builds
* apply format patch and remove dotnet/coreclr#25885
* Rebase on master
* Apply format patch
Commit migrated from https://github.com/dotnet/coreclr/commit/
f8f0c55b862ee4512c62b7eeb0fdae8a21af463a
David Wrighton [Mon, 29 Jul 2019 01:49:33 +0000 (18:49 -0700)]
Improve metadata perf and refactor ilasm/ildasm metadata usage (dotnet/coreclr#25144)
* Optimize enumeration in IMDInternal
- Move enumerator functions to be directly implemented instead of relying on COM/vtable dispatch
- Delete unused functions
- Replace TypeDef enumeration logic to be the same as the general case
- Update guid of IMDInternalImport as the api has changed
Build metadata into ildasm and ilasm instead of referencing coreclr
- SHA1Hash class moved to utilcode
- careful detachment of bindings between metadata and runtime
- Able to reuse wks build of metadata logic for ilasm/ildasm
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef7767a3ba1c0a34b55cbd5496b799b17218ca14
ts2do [Sun, 28 Jul 2019 22:52:17 +0000 (17:52 -0500)]
Eliminate extra time zone conversions in DateTimeOffset (dotnet/coreclr#25658)
* Eliminate extra time zone conversions in DateTimeOffset
Revised members dealing specifically with local time by removing delegation to DateTime methods to avoid an extra call to TimeZoneInfo to determine offset:
Now
FromFileTime(long)
ToLocalTime()
* Fix DateTimeOffset.ToLocalTime(bool)
* Consolidate conversion from UTC DateTime to Local DateTimeOffset
Commit migrated from https://github.com/dotnet/coreclr/commit/
3a123a290ed755c8ee4959d1a49d7bac8bc36e29
Stephen Toub [Sun, 28 Jul 2019 02:05:08 +0000 (22:05 -0400)]
Fix use of AddTo/RemoveFromActiveTasks in async methods (dotnet/coreclr#25911)
When we rewrote the async methods implementation with AsyncStateMachineBox, we neglected to call AddToActiveTasks if the debugger is paying attention to tasks. This hasn't mattered as the debugger's support for Tasks hasn't worked for other reasons in .NET Core, but there is now a renewed focus on it, and this is preventing some of that support from working.
This change is a minimal fix to ensure that we're adding the state machine box task when it's created and removing it when it completes. Post-3.0, we should look at overhauling this, e.g. to clean up a lot of this logging and tracking that's done, to use a weak table in order to avoid keeping task objects alive artificially if they're dropped without completing by the developer code, etc.
This only affects when the debugger is attached, as the s_asyncDebuggingEnabled field is only ever set by the debugger.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac84ed3ce0bfecb74def2d3f86100c4ee5e323aa
Stephen Toub [Sun, 28 Jul 2019 00:15:55 +0000 (20:15 -0400)]
Fix nullability annotations for static (dotnet/coreclr#25913)
The compiler is now analyzing statics. Get compliant.
Commit migrated from https://github.com/dotnet/coreclr/commit/
35d7103bf1340a1a8a951f491d48e740ccb1a5f8
Andrew Au [Sat, 27 Jul 2019 05:30:02 +0000 (22:30 -0700)]
Fix a typo (dotnet/coreclr#25908)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6b130c22db1c309a75dd3b679f04035e2c8fec9d
Sergey Andreenko [Fri, 26 Jul 2019 23:34:23 +0000 (16:34 -0700)]
Disable windows formatting job in CI. (dotnet/coreclr#25902)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e1d1b34eec55e1bcd8fdcaeb7711623f3811f3cf
Jarret Shook [Fri, 26 Jul 2019 23:29:56 +0000 (16:29 -0700)]
Do not fast tail call if caller has multislot structs (dotnet/coreclr#25885)
* Do not fast tail call if caller has multislot structs
* apply patch
* Address offline feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
059604df0702acf74be5bf979728083395543e61
Stephen Toub [Fri, 26 Jul 2019 02:02:21 +0000 (22:02 -0400)]
Re-enable CA1802 (use consts instead of readonly statics) (dotnet/coreclr#39782)
* Re-enable CA1802 (use consts instead of readonly statics)
I enabled it only for privates and internals, as we've previously violated this in public surface area, and as everything goes through API review moving forward, didn't seem worthwhile fighting it and adding suppressions in various places.
* Address PR feedback
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
c5b60182397bbdd0033d6627cc075dfea59a5a34
Michal Strehovský [Fri, 26 Jul 2019 09:03:14 +0000 (11:03 +0200)]
Fix R2RDump constants for double/float (dotnet/coreclr#25888)
This is to make them match readytorun.h.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f89d46fabc85993c8ad46a01b8ce9ef5ba89c81d
Sergey Andreenko [Fri, 26 Jul 2019 02:22:19 +0000 (19:22 -0700)]
Delete a few unused functions around stmt. (dotnet/coreclr#25886)
* Delete incorrect comment.
It was added in 2010 and even when it was added it was wrong as far as I can see.
* Delete unused CopyTestDataToCloneTree.
The only use was deleted in dotnet/coreclr#6102 (3 years ago).
* Delete unused flag GTF_STMT_HAS_CSE.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e7939e7573e432daa54822d0c995ae19d43002f7
Koundinya Veluri [Fri, 26 Jul 2019 01:03:14 +0000 (18:03 -0700)]
Remove some mutex abandon tests (dotnet/coreclr#25892)
* Remove some mutex abandon tests
- These tests are covered by a test in corefx
- Failures seen are most likely test issues and fixed by https://github.com/dotnet/corefx/pull/39786
Fixes https://github.com/dotnet/coreclr/issues/19406
Fixes https://github.com/dotnet/coreclr/issues/14249
Fixes https://github.com/dotnet/coreclr/issues/14249
Commit migrated from https://github.com/dotnet/coreclr/commit/
bb9449f29978f21ae67260ab1003fbe3d4acdd6f
José Rivero [Thu, 25 Jul 2019 22:48:33 +0000 (15:48 -0700)]
[Diagnostics Server][Windows] Close hPipe when a connection error occurred. (dotnet/coreclr#25863)
Commit migrated from https://github.com/dotnet/coreclr/commit/
65a50887b9a460d7833f0ab476fab9027f1e8166
Andrew Au [Thu, 25 Jul 2019 21:58:23 +0000 (14:58 -0700)]
Sort debug info to allow diffing (dotnet/coreclr#25867)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f1dd21eea7f285f269703ce304ee57c1aff61e8c
Sergey Andreenko [Thu, 25 Jul 2019 21:37:20 +0000 (14:37 -0700)]
Fix packages folder name for CoreDisTools package. (dotnet/coreclr#25887)
That was correct on Linux, but wrong on Windows.
Commit migrated from https://github.com/dotnet/coreclr/commit/
14c47d009d0e1e7d1301b3d3702a3d0100bdf318
Bruce Forstall [Thu, 25 Jul 2019 20:31:04 +0000 (13:31 -0700)]
Remove code and documentation related to the old corefx testing system (dotnet/coreclr#25869)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed82b483934ec2990e57c561a08eaf533d087da5
Sung Yoon Whang [Thu, 25 Jul 2019 01:23:22 +0000 (18:23 -0700)]
Fix EventCounter regression test (dotnet/coreclr#25862)
Commit migrated from https://github.com/dotnet/coreclr/commit/
310c1903838f048afc66121212342e0d55b50d11
Stephen Toub [Wed, 24 Jul 2019 14:42:39 +0000 (10:42 -0400)]
Re-enable CA1825 (zero-length array allocations) (dotnet/corefxdotnet/coreclr#39708)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
1d43c479388da490d6a1eebe73f3b6b618caa55b