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

6 years agodisable DevDiv_255294 in stress modes. (#17618)
Sergey Andreenko [Wed, 18 Apr 2018 07:23:59 +0000 (00:23 -0700)]
disable DevDiv_255294 in stress modes. (#17618)

6 years agofix build.cmd generateLayout (#17614)
Sergey Andreenko [Wed, 18 Apr 2018 06:25:57 +0000 (23:25 -0700)]
fix build.cmd generateLayout (#17614)

6 years agoDisallow Ubuntu arm32 non-PR jobs in non-master branches
Bruce Forstall [Wed, 18 Apr 2018 05:38:12 +0000 (22:38 -0700)]
Disallow Ubuntu arm32 non-PR jobs in non-master branches

6 years agoEnsure thumb bit is set when searching for debugger jit info on ARM (#17617)
Chris Sienkiewicz [Wed, 18 Apr 2018 03:19:29 +0000 (20:19 -0700)]
Ensure thumb bit is set when searching for debugger jit info on ARM (#17617)

* Ensure thumb bit is set when searching for debugger jit info on ARM

* Make GetCodeStartAddress return correct PCODE, rather than fixing it at the callee site

* Fix type in daccess.h

* Use PINSTRToPCODE rather than manually adding the thumb bit

6 years agoMerge pull request #17633 from BruceForstall/AdjustArmJobScheduling
Bruce Forstall [Wed, 18 Apr 2018 01:55:27 +0000 (18:55 -0700)]
Merge pull request #17633 from BruceForstall/AdjustArmJobScheduling

Adjust non-PR triggers

6 years agoClean up FlushInstructionCache for precodes and interlocked target change operations...
Koundinya Veluri [Wed, 18 Apr 2018 01:39:25 +0000 (18:39 -0700)]
Clean up FlushInstructionCache for precodes and interlocked target change operations (#17602)

6 years agoMerge pull request #17623 from weshaggard/wesh/addlinuxmusl
Wes Haggard [Wed, 18 Apr 2018 00:09:55 +0000 (17:09 -0700)]
Merge pull request #17623 from weshaggard/wesh/addlinuxmusl

Add linux-musl build leg

6 years agoHandle getTailCallCopyArgsThunk returning NULL in the JIT (#17592)
Jan Kotas [Wed, 18 Apr 2018 00:06:32 +0000 (17:06 -0700)]
Handle getTailCallCopyArgsThunk returning NULL in the JIT (#17592)

This saves the JIT from hardcoding the logic on where getTailCallCopyArgsThunk is implemented

6 years agoAdjust non-PR triggers
Bruce Forstall [Wed, 18 Apr 2018 00:05:02 +0000 (17:05 -0700)]
Adjust non-PR triggers

1. Enable weekly Ubuntu arm32 GCStress jobs.
2. Fix bugs where both flow and non-flow jobs were being triggered for some configurations.
3. Convert Windows ARM push jobs to daily jobs to conserve limited hardware.
4. Convert Windows ARM64 every-four-hour jobs to daily jobs to conserve limited hardware.
5. Convert Windows ARM64 R2R baseline job from daily to weekly to conserve limited hardware.
6. For altjit jobs, only do push jobs for Checked builds; there's no need for more than that.
7. Add Windows and Ubuntu ARM R2R weekly jobs.
8. Add Windows ARM and ARM64, and Ubuntu ARM, weekly R2R JIT stress jobs.

Fixes #17572, #17241.

6 years agoUnix/x64 ABI cleanup
Carol Eidt [Thu, 15 Mar 2018 15:21:25 +0000 (08:21 -0700)]
Unix/x64 ABI cleanup

Eliminate `FEATURE_UNIX_AMD64_STRUCT_PASSING` and replace it with `UNIX_AMD64_ABI` when used alone. Both are currently defined; it is highly unlikely the latter will work alone; and it significantly clutters up the code, especially the JIT.

Also, fix the altjit support (now `UNIX_AMD64_ABI_ITF`) to *not* call `ClassifyEightBytes` if the struct is too large. Otherwise it asserts.

6 years agoMerge pull request #17620 from BruceForstall/FixCorefxUnzipQuoting
Bruce Forstall [Tue, 17 Apr 2018 23:04:32 +0000 (16:04 -0700)]
Merge pull request #17620 from BruceForstall/FixCorefxUnzipQuoting

Fix minor issue with missing end quotes on command line

6 years agoDisable Microsoft.Win32.SystemEvents.Tests
Bruce Forstall [Tue, 17 Apr 2018 22:59:09 +0000 (15:59 -0700)]
Disable Microsoft.Win32.SystemEvents.Tests

Tracking bug: https://github.com/dotnet/corefx/issues/29166

6 years agoImprove SSA dominator tree memory usage (#15006)
mikedn [Tue, 17 Apr 2018 21:52:37 +0000 (00:52 +0300)]
Improve SSA dominator tree memory usage (#15006)

There is no need to store the dominator tree children in a hashtable, a vector is sufficient. Given the way the tree is constructed duplicates cannot be added.

6 years agoFix minor issue with missing end quotes on command line
Bruce Forstall [Tue, 17 Apr 2018 21:34:08 +0000 (14:34 -0700)]
Fix minor issue with missing end quotes on command line

6 years agoUpdate CoreClr, CoreFx to preview1-26417-05, preview3-26417-03, respectively (#17607)
dotnet-maestro-bot [Tue, 17 Apr 2018 20:41:48 +0000 (15:41 -0500)]
Update CoreClr, CoreFx to preview1-26417-05, preview3-26417-03, respectively (#17607)

6 years agoAdd linux-musl build leg
Wes Haggard [Tue, 17 Apr 2018 20:06:33 +0000 (13:06 -0700)]
Add linux-musl build leg

6 years agoConvert native StringBuilder methods to managed (#17472)
mikedn [Tue, 17 Apr 2018 17:58:51 +0000 (20:58 +0300)]
Convert native StringBuilder methods to managed (#17472)

6 years agoFix GC tests. (#17594)
Sergey Andreenko [Tue, 17 Apr 2018 16:43:59 +0000 (09:43 -0700)]
Fix GC tests. (#17594)

* Fix dlbigleak

* cleanup dlstack

* Fix doublinknoleak

* Fix doublinkstay

* Fix dlcollect

* Fix doublinkgen

* Fix dlbigleakthd

6 years agoAdding failing string to Boolean and TimeSpan parse failure exceptions (#15661)
Szabolcs Dézsi [Tue, 17 Apr 2018 16:08:53 +0000 (12:08 -0400)]
Adding failing string to Boolean and TimeSpan parse failure exceptions (#15661)

* Adding failing string to Boolean and TimeSpan parse failure exceptions

* Avoid boxing char when using TryParse

* Removing unnecessary nameof expression

* Applying review feedback to remove ParseFailureKind from TimeSpanParse

* Added helper methods for TimeSpan parsing

6 years agoFix line endings (#17606)
Steve MacLean [Tue, 17 Apr 2018 15:42:13 +0000 (11:42 -0400)]
Fix line endings (#17606)

6 years agoMerge pull request #17560 from fiigii/fixcvt
Carol Eidt [Tue, 17 Apr 2018 14:32:58 +0000 (07:32 -0700)]
Merge pull request #17560 from fiigii/fixcvt

Fix extra register-dependency on mem-form of vcvtsd/s2ss

6 years agoEnable generic attributes (#9189)
Avi Avni [Tue, 17 Apr 2018 14:14:34 +0000 (17:14 +0300)]
Enable generic attributes (#9189)

6 years agoUpdate CoreClr, CoreFx, PgoData to preview3-26417-01, preview3-26417-01, master-20180...
dotnet-maestro-bot [Tue, 17 Apr 2018 13:46:14 +0000 (08:46 -0500)]
Update CoreClr, CoreFx, PgoData to preview3-26417-01, preview3-26417-01, master-20180417-0048, respectively (#17601)

6 years agoMerge pull request #17575 from debayang/simd_crossgen
Russ Keldorph [Tue, 17 Apr 2018 13:45:17 +0000 (06:45 -0700)]
Merge pull request #17575 from debayang/simd_crossgen

[Arm64] Disable SIMD in crossgen (added as part of #14633)

6 years agoEnable support DllImport a native assembly whose name contains '.' (#17505)
Luqun Lou [Tue, 17 Apr 2018 05:10:29 +0000 (22:10 -0700)]
Enable support DllImport a native assembly whose name contains '.' (#17505)

6 years ago[X86] Fix cross toolchain library paths (#17513)
Petr Bred [Tue, 17 Apr 2018 01:14:21 +0000 (04:14 +0300)]
[X86] Fix cross toolchain library paths (#17513)

- fix internal tests building

Signed-off-by: Petr Bred <bredpetr@gmail.com>
6 years ago[Arm64] Add memory barrier after interlocked operations (#17595)
Koundinya Veluri [Tue, 17 Apr 2018 01:13:50 +0000 (18:13 -0700)]
[Arm64] Add memory barrier after interlocked operations (#17595)

Fixes https://github.com/dotnet/coreclr/issues/17591

6 years agoMove master to 2.2-preview1 (#17589)
Russ Keldorph [Tue, 17 Apr 2018 01:12:47 +0000 (18:12 -0700)]
Move master to 2.2-preview1 (#17589)

6 years agoUpdate memory histogram buckets (#15206)
mikedn [Tue, 17 Apr 2018 01:09:32 +0000 (04:09 +0300)]
Update memory histogram buckets (#15206)

Use values that are more likely to match CPU cache sizes (e.g. L1 = 32K and L2 = 256K)

6 years agoDict: Use Ref Local Reassignment (C# 7.3) (#17483)
Ben Adams [Tue, 17 Apr 2018 01:02:38 +0000 (02:02 +0100)]
Dict: Use Ref Local Reassignment (C# 7.3) (#17483)

* Dict: Use Ref Local Reassignment (C# 7.3)

* Use lang version latest rather than 7.3

6 years agoMerge pull request #17402 from sdmaclea/PR-ARM64-COREFX-EXCLUSIONS
Bruce Forstall [Tue, 17 Apr 2018 00:45:56 +0000 (17:45 -0700)]
Merge pull request #17402 from sdmaclea/PR-ARM64-COREFX-EXCLUSIONS

[Arm64] Add corefx_test_exclusions.txt

6 years agoUpdate xml comment for {ReadOnly}Memory.Pin method (dotnet/corefx#29137) (#17593)
dotnet bot [Mon, 16 Apr 2018 21:47:39 +0000 (14:47 -0700)]
Update xml comment for {ReadOnly}Memory.Pin method (dotnet/corefx#29137) (#17593)

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoMerge pull request #17590 from BruceForstall/CleanupUbunuArmBuildMachine
Bruce Forstall [Mon, 16 Apr 2018 20:20:35 +0000 (13:20 -0700)]
Merge pull request #17590 from BruceForstall/CleanupUbunuArmBuildMachine

Clean up Ubuntu arm build machines

6 years agoChanged SpinLock::CompareExchange method declaration to static (#17579)
Phil Garcia [Mon, 16 Apr 2018 20:11:53 +0000 (13:11 -0700)]
Changed SpinLock::CompareExchange method declaration to static (#17579)

6 years agoUpdate CoreClr, CoreFx, PgoData to preview3-26416-06, preview3-26416-06, master-20180...
dotnet-maestro-bot [Mon, 16 Apr 2018 19:32:52 +0000 (14:32 -0500)]
Update CoreClr, CoreFx, PgoData to preview3-26416-06, preview3-26416-06, master-20180416-0039, respectively (#17580)

6 years ago[x86/Linux] Fix ICorDebug frames API (#17436)
Igor Kulaychuk [Mon, 16 Apr 2018 18:14:38 +0000 (21:14 +0300)]
[x86/Linux] Fix ICorDebug frames API (#17436)

6 years ago[x86/Linux] Fix marshalling struct with 64-bit types (#17455)
Konstantin Baladurin [Mon, 16 Apr 2018 18:11:41 +0000 (21:11 +0300)]
[x86/Linux] Fix marshalling struct with 64-bit types (#17455)

* [x86/Linux] Fix marshalling struct with 64-bit types

The System V ABI for i386 defines 4-byte alignment for 64-bit types.

* [Linux/x86] Fix marshalling tests in the case of System V i386 ABI

6 years agoClean up Ubuntu arm build machines
Bruce Forstall [Mon, 16 Apr 2018 18:09:06 +0000 (11:09 -0700)]
Clean up Ubuntu arm build machines

6 years agoUpdate KoreanLunisolarCalendar.cs (#17542)
elyoh [Mon, 16 Apr 2018 18:05:11 +0000 (19:05 +0100)]
Update KoreanLunisolarCalendar.cs (#17542)

* Update KoreanLunisolarCalendar.cs

Corrects two issues with the conversion table for Gregorian to Korean lunisolar dates.

Issue 1: tables use Julian month/day instead of Gregorian month/day for entries prior to 1583.
Lmon and Lday have been converted from Julian month and day to Gregorian month and day for years prior to 1583.
This also required a new value for MIN_GREGORIAN_DAY (now 19) so the minimum date now supported by this class is 19 Feb 0918 Gregorian.

Issue 2: data discrepancy in years 1586, 1587, 1648, 1659, 1692, 1753 and 1754.
Table entries for 1586, 1587, 1648, 1659, 1692, 1753 and 1754 have been corrected to match Korea Astronomy and Space Science In-
stitute (KASI) data.  Specifically:
•for years 1587, 1648, and 1754, the first day of year has been corrected
•for years 1586, 1587, 1659, 1692, 1753, and 1754, the lengths of each month have been corrected

Notes
A minor formatting change to the table has been made.  The DaysPerMonth flag has been converted to use the binary literal to ensure that changes can be made and verified easily.
See: https://github.com/dotnet/coreclr/issues/17510 for full discussion of changes.

* Update KoreanLunisolarCalendar.cs

Added comment on sources of table data.

6 years agoUpdate CoreClr, CoreFx, PgoData to preview3-26416-01, preview3-26416-01, master-20180...
dotnet-maestro-bot [Mon, 16 Apr 2018 06:43:04 +0000 (01:43 -0500)]
Update CoreClr, CoreFx, PgoData to preview3-26416-01, preview3-26416-01, master-20180415-0051, respectively (#17540)

6 years ago[Arm64] Add full barrier after locking operations (#17567)
Steve MacLean [Sun, 15 Apr 2018 21:36:04 +0000 (17:36 -0400)]
[Arm64] Add full barrier after locking operations (#17567)

6 years ago[Arm64] Disable SIMD in crossgen (added as part of #14633)
Debayan Ghosh [Sun, 15 Apr 2018 04:34:44 +0000 (10:04 +0530)]
[Arm64] Disable SIMD in crossgen (added as part of #14633)

6 years agoUpdate corefx_test_exclusions.txt
Steve MacLean [Sun, 15 Apr 2018 01:31:22 +0000 (21:31 -0400)]
Update corefx_test_exclusions.txt

6 years agoMerge pull request #17569 from dotnet/dev/unix_test_workflow
Bruce Forstall [Sat, 14 Apr 2018 20:30:21 +0000 (13:30 -0700)]
Merge pull request #17569 from dotnet/dev/unix_test_workflow

Don't use runtesttilstable script for Ubuntu arm jobs

6 years agoAvoid creating illegal byref pointers (#17524)
Bruce Forstall [Sat, 14 Apr 2018 18:11:28 +0000 (11:11 -0700)]
Avoid creating illegal byref pointers (#17524)

Byref pointers need to point within their "host" object -- thus
the alternate name "interior pointers". If the JIT creates and
reports a pointer as a "byref", but it points outside the host
object, and a GC occurs that moves the host object, the byref
pointer will not be updated. If a subsequent calculation puts
the byref "back" into the host object, it will actually be pointing
to garbage, since the host object has moved.

This occurred on ARM with array index calculations, in particular
because ARM doesn't have a single-instruction "base + scale*index + offset"
addressing mode. Thus, we were generating, for the jaggedarr_cs_do
test case, `ProcessJagged3DArray()` function:
```
// r0 = array object, r6 = computed index offset. We mark r4 as a byref.
add r4, r0, r6

// r4 - 32 is the offset of the object we care about. Then we load the array element.
// In this case, the loaded element is a gcref, so r4 becomes a gcref.
ldr r4, [r4-32]
```
We get this math because the user code uses `a[i - 10]`, which is
essentially `a + (i - 10) * 4 + 8` for element size 4. This is optimized
to `a + i * 4 - 32`. In the above code, `r6` is `i * 4`. In this case,
after the first instruction, `r4` can point beyond the array.
If a GC happens, `r4` isn't updated, and the second instruction loads garbage.

There are several fixes:
1. Change array morphing in `fgMorphArrayIndex()` to rearrange the array index
IR node creation to only create a byref pointer that is precise; don't create
"intermediate" byref pointers that don't represent the actual array element
address being computed. The tree matching code that annotates the generated tree
with field sequences needs to be updated to match the new form.
2. Change `fgMoveOpsLeft()` to prevent the left-weighted reassociation optimization
`[byref]+ (ref, [int]+ (int, int)) => [byref]+ ([byref]+ (ref, int), int)`. This
optimization creates "incorrect" byrefs that don't necessarily point within
the host object.
3. Add an additional condition to the `Fold "((x+icon1)+icon2) to (x+(icon1+icon2))"`
morph optimization to prevent merging of constant TYP_REF nodes, which now were
being recognized due to different tree shapes. This was probably always a problem,
but the particular tree shape wasn't seen before.

These fixes are all-platform. However, to reduce risk at this point, the are
enabled for ARM only, under the `FEATURE_PREVENT_BAD_BYREFS` `#ifdef`.

Fixes #17517.

There are many, many diffs.

For ARM32 ngen-based desktop asm diffs, it is a 0.30% improvement across all
framework assemblies. A lot of the diffs seem to be because we CSE the entire
array address offset expression, not just the index expression.

6 years agoDon't use tests/runtesttilstable.sh for Ubuntu arm jobs
Egor Chesakov [Sat, 14 Apr 2018 16:06:04 +0000 (09:06 -0700)]
Don't use tests/runtesttilstable.sh for Ubuntu arm jobs

6 years agoEnable building Linux/arm crossarch components in netci
Egor Chesakov [Tue, 27 Mar 2018 17:47:27 +0000 (10:47 -0700)]
Enable building Linux/arm crossarch components in netci

6 years agoDisable failing Ubuntu/arm tests (#17559)
Egor Chesakov [Sat, 14 Apr 2018 15:59:33 +0000 (08:59 -0700)]
Disable failing Ubuntu/arm tests (#17559)

Disable LeakWheel and SlowTailCallArgs Ubuntu/arm tests

6 years agoMake Windows builds always portable
Russ Keldorph [Thu, 12 Apr 2018 23:12:43 +0000 (16:12 -0700)]
Make Windows builds always portable

Apparently there is little or no need for a non-portable Windows build, so
rather than trying to figure out which version of Windows we are building
on, just ignore -PortableBuild=false.  We can add a warning or refuse to
accept the switch later if necessary, but for now we need to continue
accepting it to avoid build breaks.

Fixes #14291

6 years ago[Arm64/Linux] #17521 for linux (#17546)
Steve MacLean [Sat, 14 Apr 2018 12:52:27 +0000 (08:52 -0400)]
[Arm64/Linux] #17521 for linux (#17546)

6 years agoFix random Segfaults on Ubuntu arm (#17523)
Egor Chesakov [Sat, 14 Apr 2018 07:24:58 +0000 (00:24 -0700)]
Fix random Segfaults on Ubuntu arm (#17523)

Fix random Segfaults on Ubuntu arm

6 years agoFix OpenVirtualProcess on Linux issue. (#17551)
Mike McLaughlin [Sat, 14 Apr 2018 00:37:06 +0000 (17:37 -0700)]
Fix OpenVirtualProcess on Linux issue. (#17551)

6 years agoInsert int3 after non-returning calls at the end of basic blocks. (#17535)
Eugene Rozenfeld [Fri, 13 Apr 2018 23:29:12 +0000 (16:29 -0700)]
Insert int3 after non-returning calls at the end of basic blocks. (#17535)

This is a follow-up to #17501 that fixed #17398.

gc pointer reporting in fully-interruptible mode: the latter assumed that
register gc pointer liveness doesn't change across calls while #6103 introduced
codegen where it wasn't true.

doesn't change across calls.

This change inserts int3 after non-returning calls at the end of basic blocks
so that gc pointer liveness doesn't change across calls. This is additional
insurance in case any other place in the runtime is dependent on that contract.

6 years agoFix default style argument to Double/Single/Decimal.Parse (#17556)
Stephen Toub [Fri, 13 Apr 2018 23:07:34 +0000 (19:07 -0400)]
Fix default style argument to Double/Single/Decimal.Parse (#17556)

6 years agoFix extra register-dependency on mem-form cvtsd/s2ss
Fei Peng [Fri, 13 Apr 2018 23:05:58 +0000 (16:05 -0700)]
Fix extra register-dependency on mem-form cvtsd/s2ss

6 years agoMerge pull request #17531 from BruceForstall/SpmiProtectJitStartup
Bruce Forstall [Fri, 13 Apr 2018 21:02:10 +0000 (14:02 -0700)]
Merge pull request #17531 from BruceForstall/SpmiProtectJitStartup

Protect SuperPMI from crashes calling jitStartup

6 years ago[Arm64/Linux] Use platform memset/memcpy (#17536)
Steve MacLean [Fri, 13 Apr 2018 16:46:52 +0000 (12:46 -0400)]
[Arm64/Linux] Use platform memset/memcpy (#17536)

Fixes buggy memset implementation
Use heavily optimized platform implementation
Follows amd64 & arm precedent

6 years ago[Arm64/Windows] Simplify JIT_MemSet & JIT_MemCpy (#17537)
Steve MacLean [Fri, 13 Apr 2018 16:46:19 +0000 (12:46 -0400)]
[Arm64/Windows] Simplify JIT_MemSet & JIT_MemCpy (#17537)

JIT_Memset alignment code was definitly broken for some
unaligned cases

JIT_MemCpy likely had the same issue

Simplify implementation to reduce maintenance burden

6 years agoPreserve VASigCookieReg across PInvokeStubWorker call (#17521)
Aditya Mandaleeka [Fri, 13 Apr 2018 12:25:39 +0000 (05:25 -0700)]
Preserve VASigCookieReg across PInvokeStubWorker call (#17521)

The call to PInvokeStubWorker can do all kinds of stuff to the
VASigCookieReg in the GenericPInvokeCalli case, since x15 is just a
temporary register. Let's save it in a callee-saved register so that
when we come back after stub generation, we still have the correct value
for the VASigCookie.

6 years agoCollapse leftover AsSpan().Slice(...) into AsSpan(...) (#29078)
Ahson Khan [Fri, 13 Apr 2018 05:40:43 +0000 (22:40 -0700)]
Collapse leftover AsSpan().Slice(...) into AsSpan(...) (#29078)

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
6 years agoUpdate CoreClr, CoreFx to preview3-26413-01, preview3-26413-02, respectively (#17538)
dotnet-maestro-bot [Fri, 13 Apr 2018 07:20:16 +0000 (02:20 -0500)]
Update CoreClr, CoreFx to preview3-26413-01, preview3-26413-02, respectively (#17538)

6 years agoRemove CreateFromPinnedArray from Memory (moved to MemoryMarshal) (#17532)
Ahson Khan [Fri, 13 Apr 2018 04:52:24 +0000 (21:52 -0700)]
Remove CreateFromPinnedArray from Memory (moved to MemoryMarshal) (#17532)

6 years agoFix for 17398. (#17501)
Eugene Rozenfeld [Thu, 12 Apr 2018 23:05:44 +0000 (16:05 -0700)]
Fix for 17398. (#17501)

When enumerating live gc registers, if we are not on the active stack frame,
we need to report callee-save gc registers that are live before the call.
The reason is that the liveness of gc registers may change across a call
to a method that does not return. In this case the instruction after the call
may be a jump target and a register that didn't have a live gc pointer before
the call may have a live gc pointer after the jump. To make sure we report the
registers that have live gc pointers before the call we subtract 1 from curOffs.

6 years agoUse string.IsNullOrEmpty to eliminate bounds check to first char (#17512)
Ben Adams [Thu, 12 Apr 2018 21:08:04 +0000 (22:08 +0100)]
Use string.IsNullOrEmpty to eliminate bounds check to first char (#17512)

6 years agoProtect SuperPMI from crashes calling jitStartup
Bruce Forstall [Thu, 12 Apr 2018 20:55:15 +0000 (13:55 -0700)]
Protect SuperPMI from crashes calling jitStartup

When we call jitStartup, we pass a JitHost interface that the JIT
calls to query for data. These queries look up in the recorded
MCH data, and could fail (and throw an exception) if data is
missing, which it can be for running non-matching altjit against
a collection. Protect these calls with exception handling.

6 years agoUpdate CoreClr, CoreFx, PgoData to preview3-26412-06, preview3-26412-07, master-20180...
dotnet-maestro-bot [Thu, 12 Apr 2018 20:37:49 +0000 (15:37 -0500)]
Update CoreClr, CoreFx, PgoData to preview3-26412-06, preview3-26412-07, master-20180412-0051, respectively (#17526)

6 years agoFixed #16503 [x64 arm32] the test smalloom terminated with signal SIGKILL
Sergey Ignatov [Mon, 9 Apr 2018 07:36:16 +0000 (10:36 +0300)]
Fixed #16503 [x64 arm32] the test smalloom terminated with signal SIGKILL

6 years agoUpdate BuildTools, CoreClr, CoreFx, PgoData to preview3-02711-02, preview3-26412...
dotnet-maestro-bot [Thu, 12 Apr 2018 07:05:58 +0000 (02:05 -0500)]
Update BuildTools, CoreClr, CoreFx, PgoData to preview3-02711-02, preview3-26412-01, preview3-26412-02, master-20180411-0039, respectively (#17509)

6 years agoReenable Perf Correctness smoketest (#17520)
Michelle McDaniel [Thu, 12 Apr 2018 00:46:30 +0000 (17:46 -0700)]
Reenable Perf Correctness smoketest (#17520)

6 years agoMerge pull request #17464 from briansull/wip-17435
Brian Sullivan [Thu, 12 Apr 2018 00:38:21 +0000 (17:38 -0700)]
Merge pull request #17464 from briansull/wip-17435

Fix for issue #17435 - Incorrect CSE with SSE Hardware intrinsics

6 years agoFixed checks for Avx/Avx2.InsertVector128 to check the type of the second arg
Brian Sullivan [Wed, 11 Apr 2018 23:15:57 +0000 (16:15 -0700)]
Fixed checks for Avx/Avx2.InsertVector128 to check the type of the second arg
Added test case JIT\HardwareIntrinsics\X86\Regression\GitHub_17435

6 years agoMutate the global heap valuenumber for any HW intrinsic that performs a memory store...
Brian Sullivan [Fri, 6 Apr 2018 22:30:37 +0000 (15:30 -0700)]
Mutate the global heap valuenumber for any HW intrinsic that performs a memory store operation
Use fgMutateGcHeap to record memory write operations by HW Intrinsics
Set flags for the HW Intrinsic nodes that access Memory
Added support for HWIntrinsic nodes to OperMayThrow
Added support for GT_HWIntrinsic to GenTree::OperRequiresAsgFlag() and GenTree::OperIsImplicitIndir()
Refactored GenTreeHWIntrinsic::OperIsMemoryLoad() and GenTreeHWIntrinsic::OperIsMemoryStore()
Added GenTreeHWIntrinsic::OperIsMemoryLoadOrStore()
Deleted the static version of OperIsImplicitIndir(gtOper)

6 years agoSome cleanup for ArrayPool trimming (#17518)
Jeremy Kuhne [Wed, 11 Apr 2018 22:55:38 +0000 (15:55 -0700)]
Some cleanup for ArrayPool trimming (#17518)

* Some cleanup for ArrayPool trimming

- fix static names
- make config switch more specific
- tweak tls free logic for logging

* Tweak the name of the config switch