platform/upstream/coreclr.git
6 years agoEnable long running CoreFx Ubuntu/arm tests (#17836)
Egor Chesakov [Tue, 1 May 2018 19:16:51 +0000 (12:16 -0700)]
Enable long running CoreFx Ubuntu/arm tests (#17836)

6 years agoMerge pull request #17737 from fiigii/vectortests
Carol Eidt [Tue, 1 May 2018 18:16:25 +0000 (11:16 -0700)]
Merge pull request #17737 from fiigii/vectortests

Port more Vector tests to Vector128/256<T>

6 years agoMerge pull request #17845 from briansull/fix-17841
Brian Sullivan [Tue, 1 May 2018 18:12:37 +0000 (11:12 -0700)]
Merge pull request #17845 from briansull/fix-17841

ARM64 like ARM32 also needs a much larger instruction group size

6 years agoMerge pull request #17848 from CarolEidt/Repro17756
Carol Eidt [Tue, 1 May 2018 15:50:42 +0000 (08:50 -0700)]
Merge pull request #17848 from CarolEidt/Repro17756

Reenable test for 17756

6 years agoUpdate DotnetCLIVersion.txt (#17843)
Peter Marcu [Tue, 1 May 2018 04:24:29 +0000 (21:24 -0700)]
Update DotnetCLIVersion.txt (#17843)

6 years agoReenable test for 17756
Carol Eidt [Tue, 1 May 2018 01:06:10 +0000 (18:06 -0700)]
Reenable test for 17756

6 years agoAdding back test for windows event log (#17821)
Sung Yoon Whang [Mon, 30 Apr 2018 23:16:45 +0000 (16:16 -0700)]
Adding back test for windows event log (#17821)

* update test dependencies

* add test

* Allow more leeway for time

* modify test per PR comments

6 years agoARM64 like ARM32 also needs a much larger instruction group size
Brian Sullivan [Mon, 30 Apr 2018 23:03:11 +0000 (16:03 -0700)]
ARM64 like ARM32 also needs a much larger instruction group size
because the prolog can be quite large.

6 years agoAdd runtimeconfig.json support for tiered compilation (#17840)
Noah Falk [Mon, 30 Apr 2018 22:51:04 +0000 (15:51 -0700)]
Add runtimeconfig.json support for tiered compilation (#17840)

6 years agoGC env vars (#17837)
Sung Yoon Whang [Mon, 30 Apr 2018 21:59:14 +0000 (14:59 -0700)]
GC env vars (#17837)

* update server gc export for runtest.sh

* remove CORECLR_SERVER_GC

* Change CORECLR_CONCURRENT_GC to COMPlus_gcConcurrent as well

* Remove it from coreruncommon.cpp

6 years agoUpdate CoreClr, CoreFx to preview1-26430-05, preview3-26430-04, respectively (#17832)
dotnet-maestro-bot [Mon, 30 Apr 2018 19:00:27 +0000 (14:00 -0500)]
Update CoreClr, CoreFx to preview1-26430-05, preview3-26430-04, respectively (#17832)

6 years agoDelete unnecessary caches (dotnet/corefx#29392)
Jan Kotas [Sat, 28 Apr 2018 17:59:39 +0000 (10:59 -0700)]
Delete unnecessary caches (dotnet/corefx#29392)

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoUpdate CoreClr, CoreFx to preview1-26428-04, preview3-26428-04, respectively (#17813)
dotnet-maestro-bot [Sat, 28 Apr 2018 20:05:49 +0000 (15:05 -0500)]
Update CoreClr, CoreFx to preview1-26428-04, preview3-26428-04, respectively (#17813)

6 years ago[Linux/x86] Fix 64 bit shift inconsistencies (#17826)
Konstantin Baladurin [Sat, 28 Apr 2018 12:22:38 +0000 (15:22 +0300)]
[Linux/x86] Fix 64 bit shift inconsistencies (#17826)

Apply #15443 and #15949 for Linux/x86

6 years agoMerge pull request #17811 from noahfalk/fix_jitbench
Adam Sitnik [Sat, 28 Apr 2018 00:51:09 +0000 (17:51 -0700)]
Merge pull request #17811 from noahfalk/fix_jitbench

Fix jitbench

6 years agoUpdate ARM32 Cross Build Docker Image (#17819)
Brian Robbins [Sat, 28 Apr 2018 00:13:32 +0000 (17:13 -0700)]
Update ARM32 Cross Build Docker Image (#17819)

6 years agoUpdate Windows arm32 corefx test failure exclusions (#17803)
Bruce Forstall [Fri, 27 Apr 2018 23:24:29 +0000 (16:24 -0700)]
Update Windows arm32 corefx test failure exclusions (#17803)

* Update Windows arm32 corefx test failure exclusions

All Windows arm32 corefx test jobs should pass with these exclusions.

* Add back Microsoft.Win32.Registry.Tests exclusion

6 years agoFix Number.ParseNumber to not assume '\0' at the end of a span (#17808)
Stephen Toub [Fri, 27 Apr 2018 22:37:09 +0000 (15:37 -0700)]
Fix Number.ParseNumber to not assume '\0' at the end of a span (#17808)

* Fix Number.ParseNumber to not assume '\0' at the end of a span

This routine was written for parsing strings, which are implicitly null-terminated, and it doesn't factor in string length but instead uses tricks to exit loops when the next character is null.  Now that the routine is also used for spans, this is very problematic, as spans need not be null terminated, and generally aren't when they represent slices, and expecting a null termination like this can result in walking off the end of valid memory.

I would like to see all of this code rewritten to use span.  In the interim, though, as a short-term fix I've changed all dereferences of the current position to compare against the length of the span (or, rather, a pointer to the end), and pretend that a null terminator was found if we've hit the end.

* Address PR feedback

6 years agoAdd better portable PDB caching to System.Diagnostics.StackTrace. (#17804)
Mike McLaughlin [Fri, 27 Apr 2018 22:15:43 +0000 (15:15 -0700)]
Add better portable PDB caching to System.Diagnostics.StackTrace. (#17804)

Add portable PDB caching to StackTrace.

This is the mscorlib side of the change.

6 years agoMerge pull request #17806 from adityamandaleeka/fix_unmanaged_target_reg
Aditya Mandaleeka [Fri, 27 Apr 2018 19:56:57 +0000 (12:56 -0700)]
Merge pull request #17806 from adityamandaleeka/fix_unmanaged_target_reg

Fix register being shifted in PInvoke stub

6 years agoMerge pull request #17793 from briansull/allocOutArgSpace
Brian Sullivan [Fri, 27 Apr 2018 19:34:26 +0000 (12:34 -0700)]
Merge pull request #17793 from briansull/allocOutArgSpace

Allocate the lvaOutgoingArgSpaceVar early

6 years agoUse HiddenArg instead of hardcoded x12.
Aditya Mandaleeka [Fri, 27 Apr 2018 19:20:30 +0000 (12:20 -0700)]
Use HiddenArg instead of hardcoded x12.

6 years agoFix jitbench
noahfalk [Fri, 27 Apr 2018 10:07:41 +0000 (03:07 -0700)]
Fix jitbench

Addressed 3 issues:
1) coreclr and CoreFx were out of sync -> update dependencies.props
2) Word2Vec fails on x86 sometimes with OutOfMemory -> disabled it there because it appears the behavior is by design
3) CommandLineParser 2.1.1 doesn't restore anymore? -> NuGet was already rolling forward to 2.2.0 but changing it in the source removes the warning when using dotnet.exe to run JitBench

6 years agoUpdate CoreClr, CoreFx to preview1-26427-01, preview3-26427-01, respectively (#17791)
dotnet-maestro-bot [Fri, 27 Apr 2018 04:51:56 +0000 (23:51 -0500)]
Update CoreClr, CoreFx to preview1-26427-01, preview3-26427-01, respectively (#17791)

6 years agoRemove some fgMorphArgs dead code (#17788)
Bruce Forstall [Fri, 27 Apr 2018 02:00:46 +0000 (19:00 -0700)]
Remove some fgMorphArgs dead code (#17788)

For the arm64 case of a special return buffer argument (always x8),
we don't need the code to check for it, because a few lines above all
non-standard args cause us to "continue", and skip the code.

Also, remove a duplicative #ifdef.

6 years agoFix register being shifted in pinvoke stub.
Aditya Mandaleeka [Fri, 27 Apr 2018 01:21:10 +0000 (18:21 -0700)]
Fix register being shifted in pinvoke stub.

6 years agoSimplify VectorRet test
Fei Peng [Wed, 25 Apr 2018 19:19:29 +0000 (12:19 -0700)]
Simplify VectorRet test

6 years agoPort more Vector tests to Vector128/256
Fei Peng [Wed, 25 Apr 2018 19:14:24 +0000 (12:14 -0700)]
Port more Vector tests to Vector128/256

6 years agoFix GC test failures (#17766)
Sung Yoon Whang [Thu, 26 Apr 2018 21:02:59 +0000 (14:02 -0700)]
Fix GC test failures (#17766)

* Fix finalizearraysleep and handlecopy gc tests

* revert changes to nstructtun

* forgot to add this fix in

* fix handlecopy

* fix nstructtun

* fix nstructtun

6 years agoclang tidy
Brian Sullivan [Thu, 26 Apr 2018 20:14:33 +0000 (13:14 -0700)]
clang tidy

6 years agoAllocate the lvaOutgoingArgSpaceVar very early, right after the user locals.
Brian Sullivan [Thu, 26 Apr 2018 18:13:32 +0000 (11:13 -0700)]
Allocate the lvaOutgoingArgSpaceVar very early, right after the user locals.
This ensures that it gets a low LclVar number so that we don't hit
the IMPL_LIMITATION associated with offsets > 255 for LclVar numbers above 32767

6 years agoMerge pull request #17694 from adityamandaleeka/fix_struct_passing_arm64
Aditya Mandaleeka [Thu, 26 Apr 2018 17:40:45 +0000 (10:40 -0700)]
Merge pull request #17694 from adityamandaleeka/fix_struct_passing_arm64

Account for copied bytes in struct copy loop when generating GT_PUTARG_STK code [ARM64]

6 years agoUpdate BuildTools, CoreClr, CoreFx, PgoData to preview1-02725-03, preview1-26426...
dotnet-maestro-bot [Thu, 26 Apr 2018 05:09:12 +0000 (00:09 -0500)]
Update BuildTools, CoreClr, CoreFx, PgoData to preview1-02725-03, preview1-26426-01, preview3-26425-01, master-20180424-0039, respectively (#17749)

6 years agoDon't optimize away Task code needed for debugger (#17776)
Chuck Ries [Wed, 25 Apr 2018 23:06:49 +0000 (16:06 -0700)]
Don't optimize away Task code needed for debugger (#17776)

This prevents the IL linker from optimizing away some properties/methods
related to tasks that are used by a debugger but are not referenced
anywhere else in coreclr.

This specifically fixes async callstack frames for the xplat C# debugger.

6 years agoFix AsyncLocal<class> changed event to not be raised multiple times for one change...
Koundinya Veluri [Wed, 25 Apr 2018 22:21:52 +0000 (15:21 -0700)]
Fix AsyncLocal<class> changed event to not be raised multiple times for one change in value (#17767)

Fix AsyncLocal<class> changed event to not be raised multiple times for one change in value

Functional fix for https://github.com/dotnet/coreclr/issues/17758

6 years agoFix TailCallStress mode to do more legality checks (#17763)
Eugene Rozenfeld [Wed, 25 Apr 2018 05:36:19 +0000 (22:36 -0700)]
Fix TailCallStress mode to do more legality checks (#17763)

Check with EE whether tail call is allowed before adding
tail. prefix in TailCallStress mode.

6 years agoMerge pull request #17757 from BruceForstall/MakeArmUbuntuCorefxTestRunClean
Bruce Forstall [Wed, 25 Apr 2018 04:15:15 +0000 (21:15 -0700)]
Merge pull request #17757 from BruceForstall/MakeArmUbuntuCorefxTestRunClean

Disable all failing Ubuntu arm corefx tests

6 years agoPatch LTTng ust-tracepoint.h on ARM/Trusty when building crossrootfs. (#17762)
Brian Robbins [Wed, 25 Apr 2018 02:11:48 +0000 (19:11 -0700)]
Patch LTTng ust-tracepoint.h on ARM/Trusty when building crossrootfs. (#17762)

6 years agoMerge pull request #17747 from weshaggard/RemoveAlpineBuild
Wes Haggard [Wed, 25 Apr 2018 00:05:45 +0000 (17:05 -0700)]
Merge pull request #17747 from weshaggard/RemoveAlpineBuild

Remove Alpine 3.6 builds

6 years agoDelete unused tests\arm64\fails.testlist (#17745)
Sergey Andreenko [Tue, 24 Apr 2018 22:42:27 +0000 (15:42 -0700)]
Delete unused tests\arm64\fails.testlist (#17745)

* Reenable fixed arm64 tests

* delete the unused file

6 years agoMerge pull request #17697 from mikedn/vec-hnd
Carol Eidt [Tue, 24 Apr 2018 21:22:42 +0000 (14:22 -0700)]
Merge pull request #17697 from mikedn/vec-hnd

Initialize Compiler::Vector128/256ULongHandle in compInit

6 years agoMerge pull request #17725 from dotnetrt/FixNixTestBuild
Jarret Shook [Tue, 24 Apr 2018 20:51:06 +0000 (13:51 -0700)]
Merge pull request #17725 from dotnetrt/FixNixTestBuild

Fix unix test build by removing unnecessary 'managed_test_build' semafore file

6 years agoDisable all failing Ubuntu arm corefx tests
Bruce Forstall [Tue, 24 Apr 2018 18:56:18 +0000 (11:56 -0700)]
Disable all failing Ubuntu arm corefx tests

6 years agoMove Hashtable & friends to shared parition (#17316)
Viktor Hofer [Tue, 24 Apr 2018 07:49:16 +0000 (09:49 +0200)]
Move Hashtable & friends to shared parition (#17316)

* Move Hashtable & friends to shared parition

* Move HashHelper serialization logic into its own file

* Remove unchecked keyword in Hashtable

6 years agoDelete unused variables from CMakeLists.txt (#17743)
Jan Kotas [Tue, 24 Apr 2018 04:42:24 +0000 (21:42 -0700)]
Delete unused variables from CMakeLists.txt (#17743)

6 years agoGenericPInvokeCalli shift left then or 1 (#17734)
Steve MacLean [Tue, 24 Apr 2018 01:39:24 +0000 (21:39 -0400)]
GenericPInvokeCalli shift left then or 1 (#17734)

When _WIN64 is defined vm relies on the secret arg being
shifted left and orred with #1.

Revert part of changes from #17659 to fix dotnet/corefx#29266

Fix arm64 to match amd64

Simplify dllimport.cpp

6 years agoMerge pull request #17746 from BruceForstall/FixUbuntuArmCorefxCronJobs
Bruce Forstall [Tue, 24 Apr 2018 00:53:41 +0000 (17:53 -0700)]
Merge pull request #17746 from BruceForstall/FixUbuntuArmCorefxCronJobs

Fix Ubuntu arm corefx triggers: no cron trigger on build job

6 years agoRemove Alpine 3.6 builds
Wes Haggard [Tue, 24 Apr 2018 00:50:28 +0000 (17:50 -0700)]
Remove Alpine 3.6 builds

The alpine 3.6 builds have been replaced with the more generic
linux-musl builds so removing them.

6 years agoFix Ubuntu arm corefx triggers: no cron trigger on build job
Bruce Forstall [Tue, 24 Apr 2018 00:33:06 +0000 (17:33 -0700)]
Fix Ubuntu arm corefx triggers: no cron trigger on build job

6 years agoMerge pull request #17742 from BruceForstall/FixUbuntuArmCorefxTestExclusions
Bruce Forstall [Mon, 23 Apr 2018 23:50:00 +0000 (16:50 -0700)]
Merge pull request #17742 from BruceForstall/FixUbuntuArmCorefxTestExclusions

Fix arm corefx test exclusions

6 years agoFix arm corefx test exclusions
Bruce Forstall [Mon, 23 Apr 2018 23:22:51 +0000 (16:22 -0700)]
Fix arm corefx test exclusions

1. Enable using the test exclusion file for Ubuntu arm32.
2. Update the Ubuntu and Windows arm32 exclusion files based on
current GitHub issues.

6 years agoMerge pull request #17729 from BruceForstall/EnableArm32UbuntuCorefxTesting
Bruce Forstall [Mon, 23 Apr 2018 23:09:46 +0000 (16:09 -0700)]
Merge pull request #17729 from BruceForstall/EnableArm32UbuntuCorefxTesting

Enable Ubuntu arm32 corefx testing

6 years agoSet -march=armv7-a for Alpine Linux ARM32 (#17730)
kasper3 [Mon, 23 Apr 2018 20:47:36 +0000 (23:47 +0300)]
Set -march=armv7-a for Alpine Linux ARM32 (#17730)

* Set -march=armv7-a for Alpine Linux ARM32

* Remove armv7-linux-gnueabi[hf]

* Cast RLIM_INFINITY to size_t

6 years agoEnable Invoke and GetValue for ref-returning members (#17732)
Atsushi Kanamori [Mon, 23 Apr 2018 20:42:24 +0000 (13:42 -0700)]
Enable Invoke and GetValue for ref-returning members (#17732)

* Reapply https://github.com/dotnet/coreclr/pull/17639

* tryagain-wip 4/23/2018 7:27:37 AM - Fix Invoke of enum-returning methods

* Assert for refbufargs implying valuetype

* Catch ref to void in managed layer

6 years agoUpdate BuildTools, CoreClr, CoreFx, PgoData to preview1-02723-01, preview1-26423...
dotnet-maestro-bot [Mon, 23 Apr 2018 20:18:14 +0000 (15:18 -0500)]
Update BuildTools, CoreClr, CoreFx, PgoData to preview1-02723-01, preview1-26423-05, preview3-26423-04, master-20180423-0039, respectively (#17683)

6 years agoEnable Ubuntu arm32 corefx testing
Bruce Forstall [Sat, 21 Apr 2018 03:55:17 +0000 (20:55 -0700)]
Enable Ubuntu arm32 corefx testing

6 years agoFix FakePromote assert (#17724)
Jan Vorlicek [Sun, 22 Apr 2018 01:53:08 +0000 (18:53 -0700)]
Fix FakePromote assert (#17724)

This assert was firing when there was a struct with explicit layout and
two byref fields overlapping each other. The assert was checking that
the respective location on the stack was not reported yet.
To fix that, I have changed the assert to fire only if the already
reported kind of reference was different from the current one. That
enables overlapping of two byref fields or two ref fields, but not a
byref and ref fields.

6 years agoFix unix test build by removing unnecessary 'managed_test_build' semafore file
Jacek Blaszczynski [Sat, 21 Apr 2018 22:18:44 +0000 (00:18 +0200)]
Fix unix test build by removing unnecessary 'managed_test_build' semafore file

Fixes #17503

The error is caused by both:

1. Unnecessary usage of 'managed_test_build' semaphore file which is incorrectly
   set after /t:BatchRestorePackages build target and prevents managed test build
   which is invoked after semaphore alredy exists
2. Masked by the above error is a wrong condition in dirs.proj non-windows test build
   which was introduced by PR #17161 and which prevented unix build due to missing
   #17161 group build port to unix

6 years agoUse volatile load to read brick table entries (#17717)
Jan Kotas [Sat, 21 Apr 2018 20:18:52 +0000 (13:18 -0700)]
Use volatile load to read brick table entries (#17717)

Fixes #17716

6 years agoFix getting the Absolute path while looking up the TZ files (#17711)
Tarek Mahmoud Sayed [Sat, 21 Apr 2018 06:05:27 +0000 (23:05 -0700)]
Fix getting the Absolute path while looking up the TZ files (#17711)

6 years agoDisable GC Coop mode switching during fatal error handling during GC exception (...
Sung Yoon Whang [Sat, 21 Apr 2018 06:05:00 +0000 (23:05 -0700)]
Disable GC Coop mode switching during fatal error handling during GC exception (#17710)

6 years agoMerge pull request #17673 from CarolEidt/Fix17634
Carol Eidt [Sat, 21 Apr 2018 04:10:17 +0000 (21:10 -0700)]
Merge pull request #17673 from CarolEidt/Fix17634

Treat EDI as killed by MaskMove

6 years agoAdd better coverage for Marshal.GetDelegateForFunctionPointer (#15339)
Vitek Karas [Sat, 21 Apr 2018 03:22:13 +0000 (20:22 -0700)]
Add better coverage for Marshal.GetDelegateForFunctionPointer (#15339)

Also fixes the test Main to correctly collect result codes from all 3 subtests.

6 years agoPreserve pinned flag in {ReadOnly}Memory<T>.Slice (dotnet/corefx#29246) (#17712)
dotnet bot [Sat, 21 Apr 2018 00:56:35 +0000 (17:56 -0700)]
Preserve pinned flag in {ReadOnly}Memory<T>.Slice (dotnet/corefx#29246) (#17712)

* Preserve pinned flag in {ReadOnly}Memory<T>.Slice

* Address PR feedback.

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoTreat EDI as killed by MaskMove
Carol Eidt [Thu, 19 Apr 2018 17:14:23 +0000 (10:14 -0700)]
Treat EDI as killed by MaskMove

It should really only be a fixed reference, not a kill, but if the reference is changed by `LinearScan::resolveConflictingDefAndUse()` it can fail to cause the value in EDI to be killed.

Fix #17634

6 years agoUpdate xml comment for {ReadOnly}Memory.Pin method (dotnet/corefx#29137) (#17709)
dotnet bot [Fri, 20 Apr 2018 23:13:31 +0000 (16:13 -0700)]
Update xml comment for {ReadOnly}Memory.Pin method (dotnet/corefx#29137) (#17709)

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoFix GC tests that contain GC.Collect() used in wrong scope (#17680)
Sung Yoon Whang [Fri, 20 Apr 2018 22:30:56 +0000 (15:30 -0700)]
Fix GC tests that contain GC.Collect() used in wrong scope (#17680)

* Fix GC tests that contain GC.Collect() used in wrong scope

* Fix GCLarge

* fix typos/build errors

* More test failures...

* more ci failure fix

* Fix all the build errors

* Fix test failure

6 years agoMerge pull request #17700 from BruceForstall/AddAditya
Bruce Forstall [Fri, 20 Apr 2018 19:09:58 +0000 (12:09 -0700)]
Merge pull request #17700 from BruceForstall/AddAditya

Add adityamandaleeka to arm64 users

6 years agoMerge pull request #17688 from briansull/avx_config
Brian Sullivan [Fri, 20 Apr 2018 18:37:07 +0000 (11:37 -0700)]
Merge pull request #17688 from briansull/avx_config

Fix for Retail/Checked Asm diffs

6 years agoMerge pull request #17699 from BruceForstall/NoVerboseBuild
Bruce Forstall [Fri, 20 Apr 2018 18:18:20 +0000 (11:18 -0700)]
Merge pull request #17699 from BruceForstall/NoVerboseBuild

Stop building Linux with "verbose"

6 years agoAdd adityamandaleeka to arm64 users
Bruce Forstall [Fri, 20 Apr 2018 18:17:38 +0000 (11:17 -0700)]
Add adityamandaleeka to arm64 users

6 years agoStop building Linux with "verbose"
Bruce Forstall [Fri, 20 Apr 2018 16:45:36 +0000 (09:45 -0700)]
Stop building Linux with "verbose"

Using "verbose" creates an extraordinary amount of output,
obscuring interesting output. I don't know of a compelling
reason to continue using "verbose", so stop doing so.

6 years agoInitialize Compiler::Vector128/256ULongHandle in compInit
Mike Danes [Fri, 20 Apr 2018 15:18:38 +0000 (18:18 +0300)]
Initialize Compiler::Vector128/256ULongHandle in compInit

6 years agoFix nested spin locks in thread pool etw firing (#17677)
Koundinya Veluri [Fri, 20 Apr 2018 02:47:52 +0000 (19:47 -0700)]
Fix nested spin locks in thread pool etw firing (#17677)

`UnManagedPerAppDomainTPCount::QueueUnmanagedWorkRequest` fires an ETW event inside a spin lock and a nested spin lock is taken here:

```
SpinLock::GetLock + 0x8E (0x719da71d)
EventPipeBufferManager::AllocateBufferForThread + 0x7B (0x71afa92e)
EventPipeBufferManager::WriteEvent + 0x250 (0x71afbe0a)
EventPipe::WriteEventInternal + 0x125 (0x71951c93)
EventPipe::WriteEvent + 0x91 (0x71951714)
EventPipeWriteEventThreadPoolEnqueue + 0x9E (0x71d468a6)
FireEtwThreadPoolEnqueue + 0xF (0x71b7a04b)
UnManagedPerAppDomainTPCount::QueueUnmanagedWorkRequest + 0x21D (0x71b7a597)
```

Nesting spin locks is not allowed, moved the ETW firing outside the lock.

6 years agoAccount for copied bytes in struct copy loop when generating GT_PUTARG_STK code.
Aditya Mandaleeka [Fri, 20 Apr 2018 01:50:29 +0000 (18:50 -0700)]
Account for copied bytes in struct copy loop when generating GT_PUTARG_STK code.

6 years agoCheck for retail config for EnableAVX
Brian Sullivan [Fri, 20 Apr 2018 00:03:27 +0000 (17:03 -0700)]
Check for retail config for EnableAVX
Disable AVX2 when AVX is disabled

6 years agoMerge pull request #15737 from mikedn/cast-narrow-store
Carol Eidt [Thu, 19 Apr 2018 23:11:57 +0000 (16:11 -0700)]
Merge pull request #15737 from mikedn/cast-narrow-store

Skip commas when trying to remove some narrowing casts

6 years agoRollback https://github.com/dotnet/coreclr/pull/17639 (#17671)
Atsushi Kanamori [Thu, 19 Apr 2018 19:23:43 +0000 (12:23 -0700)]
Rollback https://github.com/dotnet/coreclr/pull/17639 (#17671)

6 years agoGCStress: try to reduce races and tolerate races better (#17330)
Andy Ayers [Thu, 19 Apr 2018 17:17:11 +0000 (10:17 -0700)]
GCStress: try to reduce races and tolerate races better (#17330)

This change addresses races that cause spurious failures in when running
GC stress on multithreaded applications.

* Instruction update race

Threads that hit a gc cover interrupt where gc is not safe can race to
overrwrite the interrupt instruction and change it back to the original
instruction.

This can cause confusion when handling stress exceptions as the exception code
raised by the kernel may be determined by disassembling the instruction that
caused the fault, and this instruction may now change between the time the
fault is raised and the instruction is disassembled. When this happens the
kernel may report an ACCESS_VIOLATION where there was actually an attempt to
execute a priveledged instruction.

x86 already had a tolerance mechanism here where when gc stress was active
and the exception status was ACCESS_VIOLATION the faulting instruction would
be retried to see if it faults the same way again. In this change we extend
this to tolerance to cover x64 and also enable it regardless of the gc mode.
We use the exception information to further screen as these spurious AVs look
like reads from address 0xFF..FF.

* Instrumentation vs execution race

The second race happens when one thread is jitting a method and another is
about to call the method. The first thread finishes jitting and publishes the
method code, then starts instrumenting the method for gc coverage. While this
instrumentation is ongoing, the second thread then calls the method and hits
a gc interrupt instruction. The code that recognizes the fault as a gc coverage
interrupt gets confused as the instrumentation is not yet complete -- in
particular the m_GcCover member of the MethodDesc is not yet set. So the second
thread triggers an assert.

The fix for this is to instrument for GcCoverage before publishing the code.
Since multiple threads can be jitting a method concurrently the instrument and
public steps are done under a lock to ensure that the instrumentation and code
are consistent (come from the same thread).

With this lock in place we have removed the secondary locking done in
SetupGcCoverage as it is no longer needed; only one thread can be instrumenting
a given jitted method for GcCoverage.

However we retain a bailout` clause that first looks to see if m_GcCover is
set and if so skips instrumentation, as there are prejit and rejit cases where we
will retry instrumentation.

* Instruction cache flushes

In some cases when replacing the interrupt instruction with the original the
instruction cache was either not flushed or not flushed with sufficient length.
This possibly leads to an increased frequency of the above races.

No impact expected for non-gc stress scenarios, though some of the code changes
are in common code paths.

Addresses the spurious GC stress failures seen in #17027 and #17610.

6 years agoadd field Name to exception (#17668)
Marco Rossignoli [Thu, 19 Apr 2018 16:54:09 +0000 (18:54 +0200)]
add field Name to exception (#17668)

6 years agoUpdate CoreClr, CoreFx, PgoData to preview1-26419-06, preview3-26419-05, master-20180...
dotnet-maestro-bot [Thu, 19 Apr 2018 16:49:03 +0000 (11:49 -0500)]
Update CoreClr, CoreFx, PgoData to preview1-26419-06, preview3-26419-05, master-20180419-0038, respectively (#17667)

6 years ago[Arm64/Linux] Fix GenericPInvokeCalliHelper (#17659)
Steve MacLean [Thu, 19 Apr 2018 16:22:10 +0000 (12:22 -0400)]
[Arm64/Linux] Fix GenericPInvokeCalliHelper (#17659)

6 years agoUpdate BuildTools, CoreClr, CoreFx to preview1-02719-02, preview1-26419-02, preview3...
dotnet-maestro-bot [Thu, 19 Apr 2018 07:53:00 +0000 (02:53 -0500)]
Update BuildTools, CoreClr, CoreFx to preview1-02719-02, preview1-26419-02, preview3-26419-01, respectively (#17662)

6 years agoFix GC leakwheel scenario test (#17656)
Sung Yoon Whang [Thu, 19 Apr 2018 04:46:58 +0000 (21:46 -0700)]
Fix GC leakwheel scenario test (#17656)

* Fix GC leakwheel scenario test

* Should be passing for most cases

6 years agoTweak order of interface declarations on string (#17660)
Jan Kotas [Thu, 19 Apr 2018 03:02:04 +0000 (20:02 -0700)]
Tweak order of interface declarations on string (#17660)

Fixes https://github.com/dotnet/corefx/issues/29158

6 years agoFix reading Time zone rules using Julian days (#17635)
Tarek Mahmoud Sayed [Thu, 19 Apr 2018 00:05:44 +0000 (17:05 -0700)]
Fix reading Time zone rules using Julian days (#17635)

* Fix reading Time zone rules using Julian days

* Order the condition correctly

* Start searching from month 1 and not 0

* Exclude n Julian format

* fix typo

* Adding the suggested assert

6 years agoMerge pull request #17658 from CarolEidt/UnixDefines2
Wes Haggard [Wed, 18 Apr 2018 23:48:49 +0000 (16:48 -0700)]
Merge pull request #17658 from CarolEidt/UnixDefines2

Remove incorrect UNIX_AMD64_ABI define

6 years agoUpdate BuildTools, CoreClr, CoreFx to preview3-02718-02, preview1-26418-02, preview3...
dotnet-maestro-bot [Wed, 18 Apr 2018 22:36:33 +0000 (17:36 -0500)]
Update BuildTools, CoreClr, CoreFx to preview3-02718-02, preview1-26418-02, preview3-26418-02, respectively (#17638)

6 years agoDelete RuntimeMethodHandle.GetSecurityFlag (#17643)
Jan Kotas [Wed, 18 Apr 2018 22:35:48 +0000 (15:35 -0700)]
Delete RuntimeMethodHandle.GetSecurityFlag (#17643)

CAS leftover

6 years agoRemove incorrect UNIX_AMD64_ABI define
Carol Eidt [Wed, 18 Apr 2018 21:37:45 +0000 (14:37 -0700)]
Remove incorrect UNIX_AMD64_ABI define

6 years agoFix ephemeral limits checks in write barrier for ARM64 (#17641)
Jan Vorlicek [Wed, 18 Apr 2018 21:15:16 +0000 (14:15 -0700)]
Fix ephemeral limits checks in write barrier for ARM64 (#17641)

The code was incorrectly using signed conditions, which doesn't work for
server GC where the high ephemeral limit is 0xffffffffffffffff and so it
was checking if the address is less than -1, which is never the case. So
the card table was never updated.

6 years agoEnable Invoke and GetValue for ref-returning members (#17639)
Atsushi Kanamori [Wed, 18 Apr 2018 20:56:42 +0000 (13:56 -0700)]
Enable Invoke and GetValue for ref-returning members (#17639)

* Enable Invoke and GetValue for ref-returning members

https://github.com/dotnet/corefx/issues/15960

Returned magic object is the object pointed to by
the ref. If the ref is null, NullReferenceException.

* Fix error message

* Found way to reuse InvokeUtil::CreateObject

* Remove comment, BYREF case.

6 years agoMerge pull request #17624 from BruceForstall/DisableHangingCoreFxTest
Bruce Forstall [Wed, 18 Apr 2018 20:50:58 +0000 (13:50 -0700)]
Merge pull request #17624 from BruceForstall/DisableHangingCoreFxTest

[arm32] Disable corefx Microsoft.Win32.SystemEvents.Tests

6 years agoMerge pull request #17652 from sdmaclea/PR-ARM64-ENABLE-CI-CROSSCOMPONENT-BUILD
Bruce Forstall [Wed, 18 Apr 2018 20:16:04 +0000 (13:16 -0700)]
Merge pull request #17652 from sdmaclea/PR-ARM64-ENABLE-CI-CROSSCOMPONENT-BUILD

[Arm64/Linux] Enable crosscomponent build in CI

6 years agoMerge pull request #17648 from dotnet/dev/unix_test_workflow
Bruce Forstall [Wed, 18 Apr 2018 19:50:08 +0000 (12:50 -0700)]
Merge pull request #17648 from dotnet/dev/unix_test_workflow

Disallow Ubuntu arm32 non-PR jobs in non-master branches

6 years ago[Arm64/Linux] Enable crosscomponent build in CI
Steve MacLean [Wed, 18 Apr 2018 19:34:38 +0000 (15:34 -0400)]
[Arm64/Linux] Enable crosscomponent build in CI

6 years agoMerge pull request #17636 from BruceForstall/NoUnixTextWorkflowNonPRJobs
Bruce Forstall [Wed, 18 Apr 2018 18:40:15 +0000 (11:40 -0700)]
Merge pull request #17636 from BruceForstall/NoUnixTextWorkflowNonPRJobs

Disallow Ubuntu arm32 non-PR jobs in non-master branches

6 years agoFix OutputRID for linux-musl official build
Wes Haggard [Wed, 18 Apr 2018 17:19:36 +0000 (10:19 -0700)]
Fix OutputRID for linux-musl official build

Need to include the `-x64` in the output rid.

6 years agoMerge pull request #16962 from CarolEidt/UnixDefines
Carol Eidt [Wed, 18 Apr 2018 16:28:10 +0000 (09:28 -0700)]
Merge pull request #16962 from CarolEidt/UnixDefines

Unix/x64 ABI cleanup

6 years agoUpdate BuildTools, CoreClr, CoreFx, PgoData to preview3-02717-01, preview1-26418...
dotnet-maestro-bot [Wed, 18 Apr 2018 11:54:36 +0000 (06:54 -0500)]
Update BuildTools, CoreClr, CoreFx, PgoData to preview3-02717-01, preview1-26418-01, preview3-26418-01, master-20180418-0040, respectively (#17621)