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

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

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

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

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

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

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

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

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

* LTTng filtering

* Fix Windows build, make IsInitialized check faster

* Cleanup/change default to no keywords/level set

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

* more cleanup

* No need to check for initialization

* Fix Windows build

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

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

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

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

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

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

* emit rundown event for generic methods in R2R images

* fix mac build

* Code Review Feedback

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

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

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

Thanks

Tomas

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

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

Contributes to dotnet/corefxdotnet/coreclr#36723

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

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

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

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

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

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

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

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

PowerShell is useless without this argument in default Windows configurations.

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

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

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

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

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

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

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

Fixes dotnet/corefxdotnet/coreclr#37955

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

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

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

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

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

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

* Fix StackFrameIterator::IsValid check race

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Address nullable feedback for System.Resources.ResourceManager

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

* Address nullable feedback for System.Reflection.Emit

* PR Feedback and clean-up redundant casts

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

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

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

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

* Throw unsupported platform for native vcarargs on Arm32 Windows

* Re-enable baseservices vararg test

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

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

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

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

* Re-enabling the RealFormatterTestsBase CoreFX tests

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

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

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

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

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

* Make comparison ordinal

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

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

* Remove IFormattable
* Hardcode characters
* Add tests

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Force secondary await continuations to run asynchronously

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

* Fix nits

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

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

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

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

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

* Fix ArgumentException for relativeTo

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

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

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

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

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

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

Addresses part of dotnet/coreclr#24263.

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

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

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

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

Fixes dotnet/coreclr#19769.

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

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

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

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

* Disable failing tests

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

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

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

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

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

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

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

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

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

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

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

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

* PR feedback + attempting to fix broken tests

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

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

* WorkAround for dotnet/coreclr#25050.

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

* Response review.

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

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

Fix dotnet/coreclr#25245

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

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

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

* Disable corefx tests that need to be updated

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

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

cc @jashook and @sandreenko

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

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

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

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

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

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

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

Fixes dotnet/coreclr#25301.

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

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

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

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

* Disable unloading incompatible test for runincontext

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This reverts commit dotnet/coreclr@70febbad4bbe23326c26480b2848cdfe9fc8450c.

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

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

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

This is enabled only with -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION.

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

This is enabled only with -DFEATURE_ENABLE_NO_ADDRESS_SPACE_RANDOMIZATION.

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

5 years agoFix eventpipe filtering (dotnet/coreclr#25221)
Sung Yoon Whang [Thu, 20 Jun 2019 23:33:51 +0000 (16:33 -0700)]
Fix eventpipe filtering (dotnet/coreclr#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

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

5 years agoUpdate linux-performace-tracing doc to add eventpipe/dotnet-trace (dotnet/coreclr...
Sung Yoon Whang [Thu, 20 Jun 2019 23:32:20 +0000 (16:32 -0700)]
Update linux-performace-tracing doc to add eventpipe/dotnet-trace (dotnet/coreclr#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

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

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

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

* PR Feedback.

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

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

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

5 years agoMove resources/containers out of azure-pipelines.yml to platform-matrix.yml (dotnet...
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 (dotnet/coreclr#25155)

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

5 years agoInitial check-in of R2R format documentation (dotnet/coreclr#25267)
Tomáš Rylek [Thu, 20 Jun 2019 21:49:27 +0000 (14:49 -0700)]
Initial check-in of R2R format documentation (dotnet/coreclr#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

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

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

Update ARM32 Helix Images to include Python 3

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

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

* Remove SOS and lldb plugin

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

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

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

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

5 years agoJIT: use register indirect for indirect jumps (dotnet/coreclr#25251)
Andy Ayers [Thu, 20 Jun 2019 19:04:54 +0000 (12:04 -0700)]
JIT: use register indirect for indirect jumps (dotnet/coreclr#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 dotnet/coreclr#22342.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* Restrict copyprop if address-taken

Fix dotnet/coreclr#25231

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

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

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

5 years agoAddress nullable feedback for S.T.Overlapped, S.Memory, S.R.InteropServices (dotnet...
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 (dotnet/coreclr#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

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

5 years agoFix Issue dotnet/coreclr#25134 - AssertionProp incorrectly removes cast from uint
Brian Sullivan [Wed, 19 Jun 2019 18:18:02 +0000 (11:18 -0700)]
Fix Issue dotnet/coreclr#25134 - AssertionProp incorrectly removes cast from uint
Add additional check for the GT_UNSIGNED flag
+ Ran clang-format
+ Code review feedback, use IsUnsigned()

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

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

resolves 24859

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

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

* Change ArgumentException message to one line

* Disable 2 tests

* Remove duplication in AggregateException.ToString()

* Inner exceptions on new lines

* Caps letter

* Typo

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

5 years agoILMarshaler Refactor (dotnet/coreclr#21227)
Jeremy Koritzinsky [Wed, 19 Jun 2019 00:26:10 +0000 (17:26 -0700)]
ILMarshaler Refactor (dotnet/coreclr#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 dotnet/coreclr@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.

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

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

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

Fixes dotnet/corefxdotnet/coreclr#38535

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

5 years agoDon't free the loader handle if the LoaderAllocator is already dead. (dotnet/coreclr...
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. (dotnet/coreclr#25208)

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

5 years agoReduce corefx testing load (dotnet/coreclr#25235)
Bruce Forstall [Tue, 18 Jun 2019 20:59:48 +0000 (13:59 -0700)]
Reduce corefx testing load (dotnet/coreclr#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.

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

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

* Fix ibcmerge.csproj to use IbcMergePackageVersion

This fixes a copy/paste bug.

* Fix more copy/paste in comment

* Use ! in place of %

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

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

* Fix contained LEA handling

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

Fix dotnet/coreclr#25039

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

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

* Add comments for _idCodeSize and a few asserts.

* Delete emitSizeOfJump.

* Delete emitInstCodeSz.

* Response review.

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

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

First approximation of a fix for dotnet/coreclr#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 dotnet/coreclr#25057.

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

5 years agoAllow PEImageLayout to be loadable for R2R images loaded from streams. (dotnet/corecl...
Fadi Hanna [Tue, 18 Jun 2019 02:36:24 +0000 (19:36 -0700)]
Allow PEImageLayout to be loadable for R2R images loaded from streams. (dotnet/coreclr#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

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

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

* Delete dead uapaot code

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

5 years agoRemove unused TRACE_LEVEL_NONE (dotnet/coreclr#23711)
mvandeberg [Mon, 17 Jun 2019 13:16:24 +0000 (23:16 +1000)]
Remove unused TRACE_LEVEL_NONE (dotnet/coreclr#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 dotnet/coreclr#23711

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

5 years agoAdd IJW native varargs tests. (dotnet/coreclr#24983)
Jeremy Koritzinsky [Tue, 18 Jun 2019 00:17:47 +0000 (17:17 -0700)]
Add IJW native varargs tests. (dotnet/coreclr#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.

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

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

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

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

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 (dotnet/coreclr#25173)

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

5 years agoEnable running SIGSEGV handler on non-alternate stack (dotnet/coreclr#25196)
Jan Vorlicek [Mon, 17 Jun 2019 21:13:33 +0000 (23:13 +0200)]
Enable running SIGSEGV handler on non-alternate stack (dotnet/coreclr#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.

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