platform/upstream/coreclr.git
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

5 years agoFix OSX floating point state extraction (#25295)
Jan Vorlicek [Fri, 21 Jun 2019 08:48:08 +0000 (10:48 +0200)]
Fix OSX floating point state extraction (#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.

5 years agoReduce string allocation in DiagnosticCounter.GetMetadataString (#25219)
Stephen Toub [Fri, 21 Jun 2019 04:36:42 +0000 (00:36 -0400)]
Reduce string allocation in DiagnosticCounter.GetMetadataString (#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.

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

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

5 years ago[master] Update dependencies from dotnet/arcade (#25253)
dotnet-maestro[bot] [Fri, 21 Jun 2019 01:47:15 +0000 (18:47 -0700)]
[master] Update dependencies from dotnet/arcade (#25253)

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19319.25
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19319.25
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19319.25
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19319.25

5 years ago[master] Update dependencies from dnceng/internal/dotnet-optimization (#25255)
dotnet-maestro[bot] [Fri, 21 Jun 2019 01:44:26 +0000 (18:44 -0700)]
[master] Update dependencies from dnceng/internal/dotnet-optimization (#25255)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190620.1

- optimization.IBC.CoreCLR - 99.99.99-master-20190620.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190620.1

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

This reverts commit 70febbad4bbe23326c26480b2848cdfe9fc8450c.

5 years agoAdd custom default base address option to crossgen (#25227)
Gleb Balykov [Fri, 21 Jun 2019 00:55:10 +0000 (03:55 +0300)]
Add custom default base address option to crossgen (#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.

5 years agoFix eventpipe filtering (#25221)
Sung Yoon Whang [Thu, 20 Jun 2019 23:33:51 +0000 (16:33 -0700)]
Fix eventpipe filtering (#25221)

* Add DOTNET_TRACE_CONTEXT and change macros to use DOTNET_TRACE_CONTEXT instead of MCGEN_TRACE_CONTEXT

* Fixing macro definitions

* eventing codegen scripts now generates EventPipe trace contexts

* Fix macros to use the EVENTPIPE_TRACE_Context

* Fix linux build

* Fix windows build

* Update Eventpipe provider context at EtwCallbackComon

* break in switch

* Update rundown provider context manually

* PR feedback

* Eventpipe->EventPipe

* cleanup in codegen script

5 years agoUpdate linux-performace-tracing doc to add eventpipe/dotnet-trace (#25212)
Sung Yoon Whang [Thu, 20 Jun 2019 23:32:20 +0000 (16:32 -0700)]
Update linux-performace-tracing doc to add eventpipe/dotnet-trace (#25212)

* Update linux-performace-tracing doc to add eventpipe/dotnet-trace

* typo

* Add more detailed doc instead of just a link :)

* remove redundant part

* Update based on noah's feedback

5 years agoRemove dead code related to copy-constructors and intercept stubs (#25264)
Jeremy Koritzinsky [Thu, 20 Jun 2019 23:12:02 +0000 (16:12 -0700)]
Remove dead code related to copy-constructors and intercept stubs (#25264)

* Remove dead code related to copy-constructors and intercept stubs

* PR Feedback.

5 years agoDisable NativeVarargsTest on Windows Nano Server. (#25284)
Jeremy Koritzinsky [Thu, 20 Jun 2019 23:11:17 +0000 (16:11 -0700)]
Disable NativeVarargsTest on Windows Nano Server. (#25284)

5 years agoMove resources/containers out of azure-pipelines.yml to platform-matrix.yml (#25155)
Egor Chesakov [Thu, 20 Jun 2019 22:36:25 +0000 (15:36 -0700)]
Move resources/containers out of azure-pipelines.yml to platform-matrix.yml (#25155)

5 years agoInitial check-in of R2R format documentation (#25267)
Tomáš Rylek [Thu, 20 Jun 2019 21:49:27 +0000 (14:49 -0700)]
Initial check-in of R2R format documentation (#25267)

In this initial check-in I have converted Jan Kotas' R2R format doc
from an internal Word document to the md format and I removed some
references to other internal docs. I plan to follow up by updating
the description to the current format version (e.g. apparently the
description doesn't yet include the instance entrypoint table) and
by adding specific extensions for the composite R2R format.

Thanks

Tomas

5 years agoMerge pull request #25285 from MattGal/update-arm32-dockerimages
Matt Galbraith [Thu, 20 Jun 2019 21:44:45 +0000 (14:44 -0700)]
Merge pull request #25285 from MattGal/update-arm32-dockerimages

Update ARM32 Helix Images to include Python 3

5 years agoRemove SOS and lldb plugin (#25220)
Mike McLaughlin [Thu, 20 Jun 2019 21:08:55 +0000 (14:08 -0700)]
Remove SOS and lldb plugin (#25220)

* Remove SOS and lldb plugin

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

5 years agoTriage issues in #25098 (#25240)
Egor Chesakov [Thu, 20 Jun 2019 20:00:53 +0000 (13:00 -0700)]
Triage issues in #25098 (#25240)

5 years agoJIT: use register indirect for indirect jumps (#25251)
Andy Ayers [Thu, 20 Jun 2019 19:04:54 +0000 (12:04 -0700)]
JIT: use register indirect for indirect jumps (#25251)

If we are jumping to another method via an indirection cell, the cell address
may be too far from the jump to address via a RIP-relative indirection. So
instead, load the target address into RAX and jump register indirect.

Fixes #22342.

5 years agomissed a spot
Matt Galbraith [Thu, 20 Jun 2019 19:00:16 +0000 (12:00 -0700)]
missed a spot

5 years agoUpdate ARM32 Helix Images to include Python 3
Matt Galbraith [Thu, 20 Jun 2019 18:57:09 +0000 (11:57 -0700)]
Update ARM32 Helix Images to include Python 3

5 years agoRemove test 366085 (#25277)
Jan Vorlicek [Thu, 20 Jun 2019 16:30:15 +0000 (18:30 +0200)]
Remove test 366085 (#25277)

This test was checking for "Parameter name:" substring in the
ArgumentNullException message. But a recent change #25185 modified
that string to just "Parameter".

We also have a coverage for this in corefx tests, so I am removing
this test.

5 years agoFix visibility on Exception.InnerExceptionPrefix (#25278)
Stephen Toub [Thu, 20 Jun 2019 16:27:21 +0000 (12:27 -0400)]
Fix visibility on Exception.InnerExceptionPrefix (#25278)

5 years agoMerge pull request #25265 from BruceForstall/FixCorefxTestingScript
Bruce Forstall [Wed, 19 Jun 2019 23:39:16 +0000 (16:39 -0700)]
Merge pull request #25265 from BruceForstall/FixCorefxTestingScript

Update run-corefx-tests.py for new 3.0.0 directory name

5 years agoRestrict copyprop if address-taken (#25247)
Carol Eidt [Wed, 19 Jun 2019 23:21:03 +0000 (16:21 -0700)]
Restrict copyprop if address-taken (#25247)

* Restrict copyprop if address-taken

Fix #25231

5 years agoUpdate run-corefx-tests.py for new 3.0.0 directory name
Bruce Forstall [Wed, 19 Jun 2019 22:57:02 +0000 (15:57 -0700)]
Update run-corefx-tests.py for new 3.0.0 directory name

5 years agoAddress nullable feedback for S.T.Overlapped, S.Memory, S.R.InteropServices (#25214)
Santiago Fernandez Madero [Wed, 19 Jun 2019 21:33:29 +0000 (14:33 -0700)]
Address nullable feedback for S.T.Overlapped, S.Memory, S.R.InteropServices (#25214)

* Address nullable feedback for System.Threading.Overlapped

* Address nullable feedback for System.Memory

* Address nullable for System.Runtime.InteropServices

* Update xml comments and make CultureInfo nullable to match String.ToLower/Upper feedback

* PR feedback: revert accepting null comparer in BinarySearch

* Disable test that needs to be updated in corefx

5 years agoChange Diagnostic Server transport name to align with spec (#25031)
John Salem [Wed, 19 Jun 2019 17:29:49 +0000 (10:29 -0700)]
Change Diagnostic Server transport name to align with spec (#25031)

resolves 24859

5 years agoException format cleanup subset (#25185)
Dan Moseley [Wed, 19 Jun 2019 08:28:30 +0000 (01:28 -0700)]
Exception format cleanup subset (#25185)

* Change ArgumentException message to one line

* Disable 2 tests

* Remove duplication in AggregateException.ToString()

* Inner exceptions on new lines

* Caps letter

* Typo

5 years agoILMarshaler Refactor (#21227)
Jeremy Koritzinsky [Wed, 19 Jun 2019 00:26:10 +0000 (17:26 -0700)]
ILMarshaler Refactor (#21227)

* Add support for fields to ILStubMarshalHome objects.

* Make the specific code streams in the ILMarshaler private members.

* Make home members private.

* Move the IL code stream members back to being protected for the marshalers that override EmitMarshalArgumentCLRToNative instead of EmitMarshalArgumentContents/Space.

* Convert virtual specifiers in overrides to override specifiers.

* Remove unused and undefined member.

* Cleanup a few missed virtual/override specifiers.

* Refactor setup methods. Refactor some of the overrides to duplicate less code.

* Refactor the setup stream and add some comments around how the ArgumentOverride/ReturnOverride marshalling system works.

* Use the cleanup work list in SafeHandle marshalling since the work list is now implemented entirely in managed code.

* Generalize DelegateCleanupWorkListElement -> KeepAliveCleanupWorkListElement and rename the managed entry point to match.

* Refactor direct usage of the cleanup code stream in non-overridden marshalers to use the cleanup work list instead.

* Refactor AsAny marshalling to fit into the regular ILMarshaler code-paths.

* Move ILArgIteratorMarshaler over to the full ILMarshaler infrastructure.

* Port ILBlittablePtrMarshaler over to not directly reference m_pcsMarshal.

* Make the specific code streams private and have ILNativeArrayMarshaler fetch the one it needs from the NDirectStubLinker.

* Devirtualize a method on ILMarshaler.

* Fix broken metasig

* Revert "Use the cleanup work list in SafeHandle marshalling since the work list is now implemented entirely in managed code."

This reverts commit aedcdfb4830475ff8f4d582147cdc0eb497dd681.

* Fix ILArgIteratorMarshaler.

* Take 2 on using the cleanup work list for SafeHandles

* Remove unused field

* SafeHandleMarshaler doesn't need to have extra cleanup code when using the CleanupWorkList.

* Move the rest of the SafeHandle marshalling into ArgumentOverride.

* Moved Pinned Native Array special case into an ArgumentOverride.

* Devirtualize

* Remove invalid field hometype.

* Make ILMarshaler::m_pslNDirect private.

* Native Array marshalling fixes.

* Fix STLOC->LDLOC mistakes.

* Add override hook to allow a marshaler to request that byval contents are always converted to native even when not marked as In (i.e. explicitly marked only as Out). Used in AsAny for byval arrays.

* PR Feedback.

* Add explicit pinning path to ilmarshalers.

* Move implementation of ILNativeArrayMarshaler::CanMarshalViaPinning to ilmarshalers.cpp.

* Add missing override specifier.

* Don't create a managed marshaler if we are able to marshal via pinning. Remove extraneous checks against pinning.

* Convert ILWSTRMarshaler to use the MarshalViaPinning functions for its pinning fast-path.

* Enable LPWSTR marshalling to fall back to allocating on the heap for large strings when stack-allocating for native space (byref in-only semantics).

* PR Feedback.

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190618.02 ...
dotnet-maestro[bot] [Tue, 18 Jun 2019 21:17:41 +0000 (14:17 -0700)]
Update dependencies from https://github.com/dotnet/core-setup build 20190618.02 (#25223)

- Microsoft.NETCore.App - 3.0.0-preview7-27818-02

5 years agoRelax signed/unsigned checks in Array.Copy to match other places (#25209)
Jan Kotas [Tue, 18 Jun 2019 21:17:18 +0000 (14:17 -0700)]
Relax signed/unsigned checks in Array.Copy to match other places (#25209)

Disable failing tests. Also enable tests for changes that propagated through the system.

Fixes dotnet/corefx#38535

5 years agoDon't free the loader handle if the LoaderAllocator is already dead. (#25208)
Jeremy Koritzinsky [Tue, 18 Jun 2019 21:05:15 +0000 (14:05 -0700)]
Don't free the loader handle if the LoaderAllocator is already dead. (#25208)

5 years agoReduce corefx testing load (#25235)
Bruce Forstall [Tue, 18 Jun 2019 20:59:48 +0000 (13:59 -0700)]
Reduce corefx testing load (#25235)

* Add new helixQueueGroup to allow restricting platforms tested

This is used to force corefx testing to only run on one Helix queue
for each platform, instead of multiple.

5 years agoFix 25233 (#25234)
Jarret Shook [Tue, 18 Jun 2019 20:44:00 +0000 (13:44 -0700)]
Fix 25233 (#25234)

* Fix ibcmerge.csproj to use IbcMergePackageVersion

This fixes a copy/paste bug.

* Fix more copy/paste in comment

* Use ! in place of %

5 years agoSign the DAC with MicrosoftSHA2 cert (#25205)
Mike McLaughlin [Tue, 18 Jun 2019 20:41:17 +0000 (13:41 -0700)]
Sign the DAC with MicrosoftSHA2 cert (#25205)

The current Microsoft certificate breaks minidumps/WER. The dbghelp
MiniDumpWriteDump code rejected the default cert. This started
failing when the obsolete SHA1 cert was removed from all of our
binaries.

Issue: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/919061

5 years agoFix contained LEA handling (#25135)
Carol Eidt [Tue, 18 Jun 2019 20:12:31 +0000 (13:12 -0700)]
Fix contained LEA handling (#25135)

* Fix contained LEA handling

This adds an LEA case to both `LinearScan::BuildOperandUses` and `CodeGen::genConsumeRegs`.

Fix #25039

5 years agoStart cleaning emitxarch::GetSize estimates. (#25160)
Sergey Andreenko [Tue, 18 Jun 2019 16:30:59 +0000 (09:30 -0700)]
Start cleaning emitxarch::GetSize estimates. (#25160)

* Add comments for _idCodeSize and a few asserts.

* Delete emitSizeOfJump.

* Delete emitInstCodeSz.

* Response review.

5 years agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Tue, 18 Jun 2019 14:46:59 +0000 (14:46 +0000)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190618.1 (#25224)

- optimization.IBC.CoreCLR - 99.99.99-master-20190618.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190618.1

5 years agoPrevent loading byref-like types with invalid layout (#25200)
Michal Strehovský [Tue, 18 Jun 2019 07:07:15 +0000 (09:07 +0200)]
Prevent loading byref-like types with invalid layout (#25200)

First approximation of a fix for #25057.

This has two problems:
* We're checking for any byref-like typed fields. Types that don't actually contain interior pointers but were marked as `ref struct` will fail to load when not aligned properly.
* We're not doing the deep validation that we do for reference types to make sure the `ByReference<T>` field doesn't overlap with another non-byreference field.

Question is whether we're okay with those limitations, or whether we need a better fix. Better fix would likely entail inefficiently walking over the fields à la `FindByRefPointerOffsetsInByRefLikeObject` (doing the more efficient thing that we do for object references below would require a GCDesc representation of byrefness).

Contributes to #25057.

5 years agoAllow PEImageLayout to be loadable for R2R images loaded from streams. (#25159)
Fadi Hanna [Tue, 18 Jun 2019 02:36:24 +0000 (19:36 -0700)]
Allow PEImageLayout to be loadable for R2R images loaded from streams. (#25159)

* Allow PEImageLayout to be loadable for R2R images loaded from streams.

* Add regression test coverage

* Change CheckILOnly to return true for R2R images (similar to the ILOnly API)

* Early out for R2R images

* Remove R2R check

5 years agoDelete dead uapaot code (dotnet/corefx#38330)
Viktor Hofer [Fri, 14 Jun 2019 13:12:42 +0000 (15:12 +0200)]
Delete dead uapaot code (dotnet/corefx#38330)

* Delete dead uapaot code

Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
5 years agoRemove unused TRACE_LEVEL_NONE (#23711)
mvandeberg [Mon, 17 Jun 2019 13:16:24 +0000 (23:16 +1000)]
Remove unused TRACE_LEVEL_NONE (#23711)

Removed define TRACE_LEVEL_NONE from eventtracebase.h.
Removed static_assert(GCEventLevel_None == TRACE_LEVEL_NONE, "GCEventLevel_None value mismatch"); from eventtrace.cpp

Enhancement #23711

5 years agoAdd IJW native varargs tests. (#24983)
Jeremy Koritzinsky [Tue, 18 Jun 2019 00:17:47 +0000 (17:17 -0700)]
Add IJW native varargs tests. (#24983)

* Refactor IJW test infra. Add some tests for some  interesting simple native varargs.

* Add missing include of IjwHelper.cs

* Fix Cmake test project name.

* PR Feedback.

* Fix compilation error.

* Deploy msvcp*d.dll as part of the copy-local'd CRT.

5 years agoStop ignoring crashes around IUnknown::Release calls (#25210)
Jan Kotas [Tue, 18 Jun 2019 00:15:56 +0000 (17:15 -0700)]
Stop ignoring crashes around IUnknown::Release calls (#25210)

We do not want to be masking any memory corruption and bugs in the runtime.

5 years ago[master] Update dependencies from dnceng/internal/dotnet-optimization (#25181)
dotnet-maestro[bot] [Mon, 17 Jun 2019 22:58:30 +0000 (15:58 -0700)]
[master] Update dependencies from dnceng/internal/dotnet-optimization (#25181)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190615.1

- optimization.IBC.CoreCLR - 99.99.99-master-20190615.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190615.1

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190616.1

- optimization.IBC.CoreCLR - 99.99.99-master-20190616.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190616.1

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190616.3

- optimization.IBC.CoreCLR - 99.99.99-master-20190616.3
- optimization.PGO.CoreCLR - 99.99.99-master-20190616.3

5 years ago[master] Update dependencies from dotnet/arcade (#25179)
dotnet-maestro[bot] [Mon, 17 Jun 2019 21:52:34 +0000 (14:52 -0700)]
[master] Update dependencies from dotnet/arcade (#25179)

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19314.27
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19314.27
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19314.27
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19314.27

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

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19315.2
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19315.2
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19315.2
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19315.2

5 years agomake DiagnosticCounter and its children lock 'this' instead of an arbitrary String...
Sung Yoon Whang [Mon, 17 Jun 2019 21:31:55 +0000 (14:31 -0700)]
make DiagnosticCounter and its children lock 'this' instead of an arbitrary String (#25173)

5 years agoEnable running SIGSEGV handler on non-alternate stack (#25196)
Jan Vorlicek [Mon, 17 Jun 2019 21:13:33 +0000 (23:13 +0200)]
Enable running SIGSEGV handler on non-alternate stack (#25196)

When a third party library that someone loads into a coreclr process registers
its own SIGSEGV handler and then chain-calls coreclr SIGSEGV handler on a
non-alternate stack, coreclr would currently crash.
This fix enables it to execute the SIGSEGV handler on the non-alternate stack
(original stack of the interrupted thread) in such case.
The disadvantage is that stack overflow would lead to silent crash in such a
case, but we cannot do anything about it.

5 years agoFix missing MethodEvents for R2R images (#25199)
Jan Kotas [Mon, 17 Jun 2019 18:01:52 +0000 (11:01 -0700)]
Fix missing MethodEvents for R2R images (#25199)

Fixes #25014

5 years agoEnable createdump on arm and arm64 (#24832)
Juan Hoyos [Mon, 17 Jun 2019 17:22:13 +0000 (10:22 -0700)]
Enable createdump on arm and arm64  (#24832)

* Enable build of ARM64 createdump build

- Adds definitions of necessary constructs and aligments for Elf formats in aarch64
- Work around changes in ptrace for aarch64

* Package createdump in runtime transport for arm and arm64

* Use special name register definitions from the PAL

* Add createdump_lib to arm64 sos and package plugin

5 years agoFix official build - specify platformGroup for internal/Release/build-job.yml (#25204)
Egor Chesakov [Mon, 17 Jun 2019 17:13:14 +0000 (10:13 -0700)]
Fix official build - specify platformGroup for internal/Release/build-job.yml (#25204)

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190617.01 ...
dotnet-maestro[bot] [Mon, 17 Jun 2019 15:18:10 +0000 (11:18 -0400)]
Update dependencies from https://github.com/dotnet/core-setup build 20190617.01 (#25197)

- Microsoft.NETCore.App - 3.0.0-preview7-27817-01

5 years agoIndexOfAny(values.Length == 0) == -1 (#25075)
Ben Adams [Mon, 17 Jun 2019 15:14:53 +0000 (16:14 +0100)]
IndexOfAny(values.Length == 0) == -1 (#25075)

* IndexOfAny(values.Length == 0) == -1

* Skip tests

5 years agoFix GetFunctionEnter3Info on linux (#25147)
David Mason [Mon, 17 Jun 2019 14:04:19 +0000 (07:04 -0700)]
Fix GetFunctionEnter3Info on linux (#25147)

5 years agoReplace 'assert' with '_ASSERTE' (#25177)
Andy Hanson [Mon, 17 Jun 2019 09:21:50 +0000 (02:21 -0700)]
Replace 'assert' with '_ASSERTE' (#25177)

5 years agoUpdate linux-instructions.md (#25187)
Fadi Hanna [Mon, 17 Jun 2019 05:16:11 +0000 (22:16 -0700)]
Update linux-instructions.md (#25187)

Update ubuntu arm container version

5 years ago[master] Update dependencies from dotnet/core-setup (#25180)
dotnet-maestro[bot] [Mon, 17 Jun 2019 00:18:30 +0000 (20:18 -0400)]
[master] Update dependencies from dotnet/core-setup (#25180)

* Update dependencies from https://github.com/dotnet/core-setup build 20190614.05

- Microsoft.NETCore.App - 3.0.0-preview7-27814-05

* Update dependencies from https://github.com/dotnet/core-setup build 20190615.05

- Microsoft.NETCore.App - 3.0.0-preview7-27815-05

5 years agoavoid expensive ref counting for CompareInfo on Linux (#25117)
Adam Sitnik [Sun, 16 Jun 2019 04:22:12 +0000 (06:22 +0200)]
avoid expensive ref counting for CompareInfo on Linux (#25117)

* change SafeSortHandle to be CriticalSortHandle to avoid expensive ref counting

* seal the CriticalSortHandle class

* use IntPtr instead of CriticalHandle to avoid resurrection issues. It's ok to never free the handle

* introduce cache for sort handles to prevent from memory leak in certain scenarios

* move the  sort key logic to a dedicated helper type to avoid static field initialization order issues

* lock the dictionary

* simplify the code

* set the charset to Ansi

* Apply suggestions from code review

Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
* don't use var

5 years agoDo not export GC entrypoints outside standalone build (#25184)
Michal Strehovský [Sun, 16 Jun 2019 04:20:45 +0000 (06:20 +0200)]
Do not export GC entrypoints outside standalone build (#25184)

It doesn't seem like something we would want to export outside standalone build.

5 years agoAdd active timer counter (#25186)
Sung Yoon Whang [Sat, 15 Jun 2019 23:46:02 +0000 (16:46 -0700)]
Add active timer counter (#25186)

* Add active timer counter

* fix typo

5 years agodon't use var
Adam Sitnik [Sat, 15 Jun 2019 13:10:04 +0000 (13:10 +0000)]
don't use var

5 years agoApply suggestions from code review
Adam Sitnik [Sat, 15 Jun 2019 12:42:52 +0000 (14:42 +0200)]
Apply suggestions from code review

Co-Authored-By: Jan Kotas <jkotas@microsoft.com>
5 years agoset the charset to Ansi
Adam Sitnik [Sat, 15 Jun 2019 09:23:27 +0000 (09:23 +0000)]
set the charset to Ansi

5 years agosimplify the code
Adam Sitnik [Sat, 15 Jun 2019 06:48:50 +0000 (06:48 +0000)]
simplify the code

5 years agoFix duplicate imports in managed product build (#25174)
Elinor Fung [Sat, 15 Jun 2019 05:32:22 +0000 (22:32 -0700)]
Fix duplicate imports in managed product build (#25174)

5 years agoDon't change LCL_FLD node type when replacing param with its shadow copy (#20900)
Egor Chesakov [Sat, 15 Jun 2019 03:30:51 +0000 (20:30 -0700)]
Don't change LCL_FLD node type when replacing param with its shadow copy (#20900)

Fix an issue that is reproduced when:

1) a method requires GSSecurityCookie (e.g. when allocating unsafe buffer using localloc) and

2) one of the method parameters is "vulnerable" and requires a shadow variable to be created and used instead of the original parameter variable and

3) the method parameter has small signed integer type (i.e. int8 or int16) and

4) the value of the parameter is converted to unsigned type (e.g. uint8 or uint16).

5 years agoabort build-tests if failed to restore stress dependencies (#25140)
Sergey Andreenko [Sat, 15 Jun 2019 01:19:13 +0000 (18:19 -0700)]
abort build-tests if failed to restore stress dependencies (#25140)

* abort build-tests if failed to restore stress dependencies

* Fix arm condition.

* Add arm64 condition.

* Skip runtime dependencies for arm32/arm64.

5 years agoMerge pull request #25162 from sandreenko/FixGCStressSettingForTheTest
Sergey Andreenko [Sat, 15 Jun 2019 01:18:49 +0000 (18:18 -0700)]
Merge pull request #25162 from sandreenko/FixGCStressSettingForTheTest

Do not force GcStress=0xc for GitHub_23199 on OSX.

5 years agoMove parts of RuntimeType to shared partition (#25176)
Marek Safar [Sat, 15 Jun 2019 01:12:52 +0000 (03:12 +0200)]
Move parts of RuntimeType to shared partition (#25176)

5 years agoMoving non-EventPipe types out of eventpipe.* (#25161)
José Rivero [Fri, 14 Jun 2019 20:47:04 +0000 (13:47 -0700)]
Moving non-EventPipe types out of eventpipe.* (#25161)

* Replace runtime check with compile time assert.
* Move EventPipeEventPayload to its own file.
* Move `StackContents` to its own file.
* Move other classes declaration/definition out of eventpipe.*

5 years agoDelete OSX condition.
Sergey Andreenko [Fri, 14 Jun 2019 20:38:41 +0000 (13:38 -0700)]
Delete OSX condition.

5 years agoDo not force GCStress at all.
Sergey Andreenko [Fri, 14 Jun 2019 19:49:29 +0000 (12:49 -0700)]
Do not force GCStress at all.

It doesn't work on OSX and Alpine.
It shows random failures on Windows as well, that we do not want to see in our PR/CI outerloop testing.

5 years agoFix crash/corruption in VSD hash tables when backpatching entry point slots is enable...
Koundinya Veluri [Fri, 14 Jun 2019 19:48:45 +0000 (12:48 -0700)]
Fix crash/corruption in VSD hash tables when backpatching entry point slots is enabled (#25158)

Fixes https://github.com/dotnet/coreclr/issues/25080
- The prober used to look for an item (`DispatchStub` or `ResolveCacheElem`) stores information specific to the table
- Cooperative GC mode guarantees that the information stored in the prober remains valid when the prober is reused to add a new item when one is not found
- The lock taken to record/backpatch an item's slot exits and reenters cooperative GC mode, which can cause the table to be reclaimed and replaced with a new table, and the prober still refers to the old table
- Upon adding the new item it may crash or corrupt some other memory
- Fixed by resetting the prober if a path is taken that may reenter cooperative GC mode

5 years agoAdd a build option to skip building managed tools (#25171)
Jarret Shook [Fri, 14 Jun 2019 18:45:46 +0000 (11:45 -0700)]
Add a build option to skip building managed tools (#25171)

This specifically will set __BuildManagedTools=0 and skip building R2RDump and runincontext.

5 years agoUpdate dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimizati...
dotnet-maestro[bot] [Fri, 14 Jun 2019 18:12:09 +0000 (11:12 -0700)]
Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190614.1 (#25170)

- optimization.IBC.CoreCLR - 99.99.99-master-20190614.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190614.1

5 years agoUpdate the SDK version (#25141)
Tarek Mahmoud Sayed [Fri, 14 Jun 2019 18:04:34 +0000 (19:04 +0100)]
Update the SDK version (#25141)

* Update the SDK version

The updated SDK version has a fix for the issue causing msbuild to crash during the build on Linux environment.

* Use the version recommended by Eric

5 years agolock the dictionary
Adam Sitnik [Fri, 14 Jun 2019 17:38:07 +0000 (17:38 +0000)]
lock the dictionary

5 years agomove the sort key logic to a dedicated helper type to avoid static field initializat...
Adam Sitnik [Fri, 14 Jun 2019 17:34:24 +0000 (17:34 +0000)]
move the  sort key logic to a dedicated helper type to avoid static field initialization order issues

5 years agoMake DisplayUnits string.Empty by default instead of null (#25104)
Sung Yoon Whang [Fri, 14 Jun 2019 17:30:31 +0000 (10:30 -0700)]
Make DisplayUnits string.Empty by default instead of null (#25104)

* Make DisplayUnits string.Empty by default instead of null

* PR feedback on DisplayName and setter validation

5 years agoFix French Decimal number parsing (#25154)
Tarek Mahmoud Sayed [Fri, 14 Jun 2019 16:56:53 +0000 (17:56 +0100)]
Fix French Decimal number parsing (#25154)

5 years agoUpdate dependencies from https://github.com/dotnet/core-setup build 20190613.08 ...
dotnet-maestro[bot] [Fri, 14 Jun 2019 16:31:56 +0000 (12:31 -0400)]
Update dependencies from https://github.com/dotnet/core-setup build 20190613.08 (#25169)

- Microsoft.NETCore.App - 3.0.0-preview7-27813-08

5 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20190613.18 (#25168)
dotnet-maestro[bot] [Fri, 14 Jun 2019 16:29:34 +0000 (12:29 -0400)]
Update dependencies from https://github.com/dotnet/arcade build 20190613.18 (#25168)

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19313.18
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19313.18
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19313.18
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19313.18

5 years agoMerge pull request #25138 from jashook/write_pgo_opt_version_to_intermediates_dir
Jarret Shook [Fri, 14 Jun 2019 15:31:47 +0000 (08:31 -0700)]
Merge pull request #25138 from jashook/write_pgo_opt_version_to_intermediates_dir

Change how build.sh/build.cmd parse the PGO and IBC versions

5 years agoAddress all feedback
jashook [Fri, 14 Jun 2019 14:53:24 +0000 (07:53 -0700)]
Address all feedback

5 years agointroduce cache for sort handles to prevent from memory leak in certain scenarios
Adam Sitnik [Fri, 14 Jun 2019 14:34:38 +0000 (14:34 +0000)]
introduce cache for sort handles to prevent from memory leak in certain scenarios

5 years agoOptimize Activator.CreateInstance (#25145)
Jan Kotas [Fri, 14 Jun 2019 11:29:25 +0000 (04:29 -0700)]
Optimize Activator.CreateInstance (#25145)

* Optimize Activator.CreateInstance
- Short-circuit Activator.CreateInstance<T>() for value types without default constructor
- Cache default constructor delegate on RuntimeType instead of fixed-size singleton cache

5 years agouse IntPtr instead of CriticalHandle to avoid resurrection issues. It's ok to never...
Adam Sitnik [Fri, 14 Jun 2019 07:01:52 +0000 (07:01 +0000)]
use IntPtr instead of CriticalHandle to avoid resurrection issues. It's ok to never free the handle

5 years agoPartially address comments
jashook [Fri, 14 Jun 2019 05:33:08 +0000 (22:33 -0700)]
Partially address comments

5 years agoUpdate Corelib to adapt to compiler nullability updates
Stephen Toub [Thu, 13 Jun 2019 14:03:40 +0000 (10:03 -0400)]
Update Corelib to adapt to compiler nullability updates

5 years agoUpdate dependencies from https://github.com/dotnet/arcade build 20190612.21
dotnet-maestro [Thu, 13 Jun 2019 12:26:02 +0000 (12:26 +0000)]
Update dependencies from https://github.com/dotnet/arcade build 20190612.21

- Microsoft.DotNet.Arcade.Sdk - 1.0.0-beta.19312.21
- Microsoft.DotNet.Build.Tasks.Feed - 2.2.0-beta.19312.21
- Microsoft.DotNet.Build.Tasks.Packaging - 1.0.0-beta.19312.21
- Microsoft.DotNet.Helix.Sdk - 2.0.0-beta.19312.21

5 years agoFix code version table lock / coop GC mode switch ordering (#25129)
Koundinya Veluri [Fri, 14 Jun 2019 01:50:11 +0000 (18:50 -0700)]
Fix code version table lock / coop GC mode switch ordering (#25129)

Fixes https://github.com/dotnet/coreclr/issues/25086
- The lock is taken inside other unsafe locks in coop mode, in some paths it may not be legal to switch to preemptive mode before taking the lock
- Iterating over the cross loader allocator hash table to backpatch entry point slots needs coop GC mode, and was being done inside the lock
- Moved the switch to coop GC mode to before acquiring the lock to maintain consistent ordering between the two

5 years agoDo not force GcStress=0xc for GitHub_23199.
Sergey Andreenko [Fri, 14 Jun 2019 00:50:15 +0000 (17:50 -0700)]
Do not force GcStress=0xc for GitHub_23199.

There was a typo for Unix (it is COMPlus_GCStress, not COMPlus_GcStress, but COMPlus_GcStressOnDirectCalls was correct). That was why the test passed on OSX.

5 years agoAdd platformGroup parameter to platform-matrix.yml (#25111)
Egor Chesakov [Thu, 13 Jun 2019 23:33:42 +0000 (16:33 -0700)]
Add platformGroup parameter to platform-matrix.yml (#25111)

5 years agoAllow pregenerating most HW intrinsics in CoreLib (#24917)
Michal Strehovský [Thu, 13 Jun 2019 22:24:59 +0000 (00:24 +0200)]
Allow pregenerating most HW intrinsics in CoreLib (#24917)

* Allow pregenerating all HW intrinsics in CoreLib

This is a follow up to #24689 that lets us pregenerate all hardware intrinsics in CoreLib.

We ensures the potentially unsupported code will never be reachable at runtime on CPUs that don't support it by not reporting the `IsSupported` property as intrinsic in crossgen. This ensures the support checks are always JITted. JITting the support checks is very cheap.

There is cost in the form of an extra call and failure to do constant propagation of the return value, but the cost is negligible in practice and gets eliminated once the tiered JIT tiers the method up.

We only do this in CoreLib because user code could technically not guard intrinsic use in `IsSupported` checks and pregenerating the code could lead to illegal instruction traps at runtime (instead of `PlatformNotSupportedException` throws) - it's a bad user experience.

5 years ago[master] Update dependencies from dotnet/core-setup (#25121)
dotnet-maestro[bot] [Thu, 13 Jun 2019 22:11:10 +0000 (18:11 -0400)]
[master] Update dependencies from dotnet/core-setup (#25121)

* Update dependencies from https://github.com/dotnet/core-setup build 20190612.01

- Microsoft.NETCore.App - 3.0.0-preview7-27812-01

* Update dependencies from https://github.com/dotnet/core-setup build 20190612.11

- Microsoft.NETCore.App - 3.0.0-preview7-27812-11

5 years ago[master] Update dependencies from dnceng/internal/dotnet-optimization (#25122)
dotnet-maestro[bot] [Thu, 13 Jun 2019 22:10:37 +0000 (18:10 -0400)]
[master] Update dependencies from dnceng/internal/dotnet-optimization (#25122)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190612.1

- optimization.IBC.CoreCLR - 99.99.99-master-20190612.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190612.1

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20190613.1

- optimization.IBC.CoreCLR - 99.99.99-master-20190613.1
- optimization.PGO.CoreCLR - 99.99.99-master-20190613.1

5 years agoUpdate crossgen.md
Fadi Hanna [Thu, 13 Jun 2019 21:59:12 +0000 (14:59 -0700)]
Update crossgen.md

Add instructions on how to use the /r switch. Update instructions to use /p instead of /Platform_Assemblies_Paths (shorter version)

5 years agoMerge pull request #25137 from fadimounir/SuppressWarnings
Fadi Hanna [Thu, 13 Jun 2019 21:26:12 +0000 (14:26 -0700)]
Merge pull request #25137 from fadimounir/SuppressWarnings

Add a switch to suppress crossgen warnings

5 years agoIntrinsicify SpanHelpers.IndexOf(char) (#22505)
Ben Adams [Thu, 13 Jun 2019 21:21:40 +0000 (22:21 +0100)]
Intrinsicify SpanHelpers.IndexOf(char) (#22505)

* Helpers to support Intrinsics in SpanHelpers.Char

* Intrinsicify SpanHelpers.IndexOf(char)

* Feedback

* fix

* Fix assert

* Improve comment warning

* fix

* fix

* Fix

* Fix

5 years agoRemove duplicate not
jashook [Thu, 13 Jun 2019 21:02:53 +0000 (14:02 -0700)]
Remove duplicate not