platform/upstream/dotnet/runtime.git
5 years agoAdd coreclr-outerloop build definition jobs (dotnet/coreclr#22578)
Egor Chesakov [Thu, 14 Feb 2019 16:20:06 +0000 (08:20 -0800)]
Add coreclr-outerloop build definition jobs (dotnet/coreclr#22578)

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

5 years agoDon't use $(_HelixSource) and $(_HelixType) in test-job.yml (dotnet/coreclr#22589)
Egor Chesakov [Thu, 14 Feb 2019 16:17:52 +0000 (08:17 -0800)]
Don't use $(_HelixSource) and $(_HelixType) in test-job.yml (dotnet/coreclr#22589)

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

5 years agoAnnotate PlatformID as a moved type
Michal Strehovsky [Wed, 13 Feb 2019 12:45:42 +0000 (04:45 -0800)]
Annotate PlatformID as a moved type

This should have been annotated along with the rest in dotnet/corertdotnet/coreclr#6928 but I missed it.

[tfs-changeset: 1733685]

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

5 years agoImproving an assert in fgInsertInlineeBlocks
Andrew Au [Tue, 29 Jan 2019 21:46:30 +0000 (13:46 -0800)]
Improving an assert in fgInsertInlineeBlocks

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

5 years agoUse dependency flow for core-setup and corefx dependencies (dotnet/coreclr#22544)
Juan Hoyos [Thu, 14 Feb 2019 02:14:35 +0000 (18:14 -0800)]
Use dependency flow for core-setup and corefx dependencies (dotnet/coreclr#22544)

* Remove old use of signing package used to work around SPC signing now that arcade has bubbled up the version.
* Move dependency update for CoreFX and Core-setup dependencies to BAR/Darc/Maestro++ flow
* Update property references in tests.
* Version bump for CoreFX and Core-Setup dependencies.
* Update test Github_20958 to use revised System.Range constructor as surface area changed with dotnet/coreclr#22331.

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

5 years agoMerge pull request dotnet/coreclr#22327 from BrianBohe/refactoring_genCodeForBBList
Carol Eidt [Thu, 14 Feb 2019 00:30:44 +0000 (16:30 -0800)]
Merge pull request dotnet/coreclr#22327 from BrianBohe/refactoring_genCodeForBBList

Moving structures initialization before generating code for blocks to…

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

5 years agoRemove Marshaling MDA (dotnet/coreclr#22579)
Jeremy Koritzinsky [Wed, 13 Feb 2019 23:52:35 +0000 (15:52 -0800)]
Remove Marshaling MDA (dotnet/coreclr#22579)

Remove the "marshaling" MDA. In .NET Framework it was off by default and in .NET Core it was commented out in the boilerplate file. Additionally, from what I can tell only half of its functionality was ever implemented in .NET Core.

Contributes to dotnet/coreclr#22538.

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

5 years agoRemove some CAS cruft (dotnet/coreclr#22576)
Aaron Robinson [Wed, 13 Feb 2019 23:04:59 +0000 (15:04 -0800)]
Remove some CAS cruft (dotnet/coreclr#22576)

* Update comment on SuppressUnmanagedCodeSecurityAttribute.
* Remove unused declsec.h header.

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

5 years agoPerf: Consolidate implementation of LeadingZeroCount (dotnet/coreclr#22497)
Grant [Wed, 13 Feb 2019 22:17:01 +0000 (14:17 -0800)]
Perf: Consolidate implementation of LeadingZeroCount (dotnet/coreclr#22497)

* Perf: BitOps.LeadingZeroCount

* CR fix

* CR fixes

* Optimization

* Revert

* Confirmed fix

* Simplify

* Return int

* Fixes

* Simplify

* CR fixes

* CR fixes

* Fix unit failure on Linux-musl x64 Debug

* CR fixes

* CR fixes

* Cleanup

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

5 years agoFix comment placement. (dotnet/coreclr#22580)
Sergey Andreenko [Wed, 13 Feb 2019 20:15:10 +0000 (12:15 -0800)]
Fix comment placement. (dotnet/coreclr#22580)

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

5 years agoMoving structures initialization before generating code for blocks to other function
Brian Bohe [Wed, 13 Feb 2019 19:26:49 +0000 (11:26 -0800)]
Moving structures initialization before generating code for blocks to other function

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

5 years agoReplace Win32Native.cs with Interop files (dotnet/coreclr#22540)
Stephen Toub [Wed, 13 Feb 2019 18:43:13 +0000 (13:43 -0500)]
Replace Win32Native.cs with Interop files (dotnet/coreclr#22540)

* Replace Win32Native.cs with Interop files

- Replace Win32Native usage with existing Interop.* calls where they already existed
- Moved Win32Native.* to their own files otherwise, and changed call sites
- Left a stub Win32Native in place to handle some emitted IL from the runtime.  The current infrastructure doesn't support targeting nested types, like Interop.Kernel32, and fixing that would be more involved.

* Remove Win32Native.cs

Replace emitted calls with ones to Marshal.

* Fix incorrectly changed field

* Fix Kernel32 -> Ole32

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

5 years agoMove SafeHandle to managed code and shared (dotnet/coreclr#22564)
Stephen Toub [Wed, 13 Feb 2019 16:12:10 +0000 (11:12 -0500)]
Move SafeHandle to managed code and shared (dotnet/coreclr#22564)

* Move SafeHandle to managed code and shared

This moves the implementation of SafeHandle from native code in the runtime to managed.  I used corert's implementation as a base, and reviewed it again against the existing native implementation, making a few tweaks to better match the existing semantics.

This should be a valid move because of the reduced goals around CERs, thread aborts, etc.

However, there are places in the runtime that access SafeHandle functionality via its native counterpart, so I kept the relevant pieces of the native code intact.  Most code will continue to use the managed APIs, but the runtime can continue calling into the native versions when needed.

* Address PR feedback

* Address PR feedback

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

5 years agoMove EventRegistrationToken to shared (dotnet/coreclr#22565)
Stephen Toub [Wed, 13 Feb 2019 16:10:31 +0000 (11:10 -0500)]
Move EventRegistrationToken to shared (dotnet/coreclr#22565)

* Move EventRegistrationToken to shared

* Address PR feedback

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

5 years agoFixing the double/float formatting code to use a fallback precision for custom-format...
Tanner Gooding [Wed, 13 Feb 2019 15:36:57 +0000 (07:36 -0800)]
Fixing the double/float formatting code to use a fallback precision for custom-format strings. (dotnet/coreclr#22522)

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

5 years agoFix gen-buildsys-win for vs2019 x86 (dotnet/coreclr#22567)
Juan Hoyos [Wed, 13 Feb 2019 14:30:34 +0000 (06:30 -0800)]
Fix gen-buildsys-win for vs2019 x86 (dotnet/coreclr#22567)

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

5 years agoImprove SpanHelpers.Byte (dotnet/coreclr#22503)
Ben Adams [Wed, 13 Feb 2019 14:20:44 +0000 (14:20 +0000)]
Improve SpanHelpers.Byte (dotnet/coreclr#22503)

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

5 years agoFix min-opts spill of tree temp large vectors (dotnet/coreclr#22530)
Carol Eidt [Wed, 13 Feb 2019 04:49:56 +0000 (20:49 -0800)]
Fix min-opts spill of tree temp large vectors (dotnet/coreclr#22530)

* Fix min-opts spill of tree temp large vectors

Even if we're not enregistering local vars, we may have large vectors live across a call that need to be spilled.

Fix dotnet/coreclr#22200

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

5 years agoRefactoring siVarLoc creation (dotnet/coreclr#22543)
Brian Bohe [Wed, 13 Feb 2019 01:22:35 +0000 (17:22 -0800)]
Refactoring siVarLoc creation (dotnet/coreclr#22543)

* Moving siVarLoc and siVarLocType from compiler.h to CodeGenInterface.h

* Encapsulating siVarLoc construction with siScope and LclVarDsc

* Encapsulating siVarLoc construction from psiScope

* Adding some argument description on genSetScopInfo header

* Changing const siVarLoc& to const siVarLoc* on eeSetLVInfo

* Changing siVarLoc& to siVarLoc* in genSetScopeInfo arguments

* Rename var in genSetScopeInfo header

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

5 years agoFix CoreRT build breaks - Adjust resource name - Workaround C# compiler/analyzer bug
Jan Kotas [Tue, 12 Feb 2019 06:33:34 +0000 (22:33 -0800)]
Fix CoreRT build breaks - Adjust resource name - Workaround C# compiler/analyzer bug

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

5 years agoFix exception sets for indirections in value numbering. (dotnet/coreclr#22542)
Eugene Rozenfeld [Tue, 12 Feb 2019 22:43:14 +0000 (14:43 -0800)]
Fix exception sets for indirections in value numbering. (dotnet/coreclr#22542)

fgValueNumberAddExceptionSetForIndirection had a bug
where INDIR(ADD(x, <big_offset>)) had NullReferenceException(x)
added instead of NullReferenceException(ADD(x, <big_offset>)).

Fixes dotnet/coreclr#20358.

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

5 years agoEnable arm64 linux musl builds (dotnet/coreclr#22495)
Jarret Shook [Tue, 12 Feb 2019 22:38:27 +0000 (14:38 -0800)]
Enable arm64 linux musl builds (dotnet/coreclr#22495)

* Enable arm64 linux musl builds

Note that -clang5.0 is required to be passed.

* Fix syntax error

* Pass clang arg to build-test.sh

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

5 years agoBug Fix: Calling System.Diagnostics.Tracing.EventPipe.Enable twice asserts dotnet...
José Rivero [Tue, 12 Feb 2019 21:54:33 +0000 (13:54 -0800)]
Bug Fix: Calling System.Diagnostics.Tracing.EventPipe.Enable twice asserts dotnet/coreclr#22247 (dotnet/coreclr#22318)

After disabling EventPipe -> SampleProfiler, we were not closing the thread shutdown event, thus asserting on reentrance of the EventPipe.
* Adding regression test, and removing comment.
* Waits until the specified object is in the signaled state.

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

5 years agoRenaming RuntimeEventSource to NativeRuntimeEventSource (dotnet/coreclr#22533)
Sung Yoon Whang [Tue, 12 Feb 2019 19:53:39 +0000 (11:53 -0800)]
Renaming RuntimeEventSource to NativeRuntimeEventSource (dotnet/coreclr#22533)

* Renaming RuntimeEventSource to NativeRuntimeEventSource

* missed a couple of comments and XPlatEventLogger

* rename DotNETRuntimeEventSource.cs to NativeRuntimeEventSource.cs

* use condition= instead of ifdef

* removing ifdef from NativeRuntimeEventSource.cs

* Fix case for 'eventing' directory in csproj

* Fix unix builds

* This should fix unix build...

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

5 years agoEnable portable fast alloc helpers on ARM64 Windows. (dotnet/coreclr#22541)
Aditya Mandaleeka [Tue, 12 Feb 2019 18:20:35 +0000 (10:20 -0800)]
Enable portable fast alloc helpers on ARM64 Windows. (dotnet/coreclr#22541)

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

5 years agoAdd extensions methods for several of the VectorXXX<T> helper methods (dotnet/coreclr...
Tanner Gooding [Tue, 12 Feb 2019 17:28:02 +0000 (09:28 -0800)]
Add extensions methods for several of the VectorXXX<T> helper methods (dotnet/coreclr#22336)

* Moving several of the Vector128<T> instance methods to be extension methods.

* Moving several of the Vector256<T> instance methods to be extension methods.

* Moving several of the Vector64<T> instance methods to be extension methods.

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

5 years agoIfdef out code that triggers UTC bug (dotnet/corertdotnet/coreclr#7003)
Michal Strehovský [Tue, 12 Feb 2019 12:45:47 +0000 (13:45 +0100)]
Ifdef out code that triggers UTC bug (dotnet/corertdotnet/coreclr#7003)

This results in bad codegen on AMD64. I filed a bug internally; hopefully we can get a fix soon.

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

5 years agoUpdate COM Activator class (dotnet/coreclr#22317)
Aaron Robinson [Tue, 12 Feb 2019 16:33:58 +0000 (08:33 -0800)]
Update COM Activator class (dotnet/coreclr#22317)

* Update COM Activator to use ALCs

* Update tests to now supply an assembly name rather than an binary "path"
  since the COM activator is now using ALCs.

* Add test for non-rooted assembly path.

* Move the hostpolicy mock project to a Common area
Move hostpolicy mock API to CoreCLR test library

* Add test for COM server isolation

* Move ComActivator class and logic to Internal namespace.

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

5 years agoJIT: change how we block gc refs from callee saves for inline pinvokes (dotnet/corecl...
Andy Ayers [Tue, 12 Feb 2019 16:22:47 +0000 (08:22 -0800)]
JIT: change how we block gc refs from callee saves for inline pinvokes (dotnet/coreclr#22477)

Add a new marker instruction that we emit once we've enabled preepmtive gc in
the inline pinvoke method prolog. Use that to kill off callee saves registers
with GC references, instead of waiting until the call.

This closes a window of vulnerability we see in GC stress where if a stress
interrupt happens between the point at which we enable preeemptive GC and
the point at which we make the call, we may report callee saves as GC live
when they're actually dead.

Closes dotnet/coreclr#19211.

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

5 years agoAdd new rounding modes to System.Math, System.MathF (dotnet/coreclr#20815)
hamish-rose [Tue, 12 Feb 2019 10:56:00 +0000 (23:56 +1300)]
Add new rounding modes to System.Math, System.MathF (dotnet/coreclr#20815)

* add new rounding modes to MidpointRounding.cs

new modes added to enum
implemented ToZero for double in Math.cs

* ToZero implementation

* implement double and float rounding modes

* updating rounding implementation

now round inline with DecCalc internal round implementation

* small bug fix

also replace var to make things obvious

* update implementation - floor/ceil

code review feedback

* review feedback

add comments, update MathF with floor/ceil

* code review feedback

 - fix comments
 - replace ifelse with switch
 - remove RoundingMode enum from DecCalc

* exclude outdated corefx test

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

5 years agoSupport building with VS2019 Preview (dotnet/coreclr#22525)
Tanner Gooding [Tue, 12 Feb 2019 07:19:44 +0000 (23:19 -0800)]
Support building with VS2019 Preview (dotnet/coreclr#22525)

* Support building with VS2019 Preview

* Fixing gen-buildsys-win to only set the architecture for the VS generator

* Refactoring Dev11/147911/fpcw.cpp so that it compiles under VS2019

* Removing the remaining traces of VS2015 build support

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

5 years agoDelete mda.cs and related dead code (dotnet/coreclr#22535)
Stephen Toub [Tue, 12 Feb 2019 04:23:32 +0000 (23:23 -0500)]
Delete mda.cs and related dead code (dotnet/coreclr#22535)

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

5 years agoMove ConditionalWeakTable to shared (dotnet/coreclr#22531)
Stephen Toub [Tue, 12 Feb 2019 02:34:21 +0000 (21:34 -0500)]
Move ConditionalWeakTable to shared (dotnet/coreclr#22531)

Leaves DependentHandle as being the runtime PAL

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

5 years ago Make Module partial to allow additional changed for Mono
Marek Safar [Mon, 11 Feb 2019 23:38:55 +0000 (00:38 +0100)]
 Make Module partial to allow additional changed for Mono

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

5 years agoAnnotate EventCounter as a relocated type (dotnet/corertdotnet/coreclr#6990)
Michal Strehovský [Mon, 11 Feb 2019 14:22:08 +0000 (15:22 +0100)]
Annotate EventCounter as a relocated type (dotnet/corertdotnet/coreclr#6990)

This moved to CoreLib and needs to be annotated as such for Project N.

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

5 years agoMove Volatile to shared (dotnet/coreclr#22523)
Stephen Toub [Mon, 11 Feb 2019 23:18:25 +0000 (18:18 -0500)]
Move Volatile to shared (dotnet/coreclr#22523)

* Move Volatile to shared

This largely takes corert's implementation, which uses Unsafe.As and volatile fields.

We could investigate also removing the JIT's replacements subsequently.

* Add [Intrinsic] attributes

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

5 years agoLocally define DLLEXPORT in ee_il_dll.cpp
Russ Keldorph [Mon, 11 Feb 2019 19:42:29 +0000 (11:42 -0800)]
Locally define DLLEXPORT in ee_il_dll.cpp

This prevents a desktop build break due to DLLEXPORT being undefined.  If
you know of a better place to put this, I'm happy to try it.  Otherwise,
this should unblock the desktop build.

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

5 years agoMove runincontext to src/tools
Russ Keldorph [Sat, 9 Feb 2019 00:20:15 +0000 (16:20 -0800)]
Move runincontext to src/tools

This SDK-style project is causing problems on some machines with VS
installs that can't build it.  For now, move it to a place where it
doesn't build with the tests.

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

5 years agoMove GCHandle to shared (dotnet/coreclr#22499)
Stephen Toub [Mon, 11 Feb 2019 21:52:51 +0000 (16:52 -0500)]
Move GCHandle to shared (dotnet/coreclr#22499)

* Move GCHandle to shared

* Cache the handle in a local to make it easier for JIT to generate good code

* Rename m_handle to _handle to match the coding conventions

* Delete isPinned argument for GCHandleInternalCompareExchange

* Add fast path to GCHandle.Alloc/Free FCalls

* Disable outdated test

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

5 years agoUpdate master label to preview4
Russ Keldorph [Mon, 11 Feb 2019 16:06:30 +0000 (08:06 -0800)]
Update master label to preview4

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

5 years agoprestub: fix ExternalMethodFixupWorker (dotnet/coreclr#22519)
Konstantin Baladurin [Mon, 11 Feb 2019 16:20:50 +0000 (19:20 +0300)]
prestub: fix ExternalMethodFixupWorker (dotnet/coreclr#22519)

Use DispatchToken::CreateDispatchToken to get token to resolve
virtual method in case of non interface MT.

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

5 years agoMake Nullable partial to allow additional method for in under Mono (dotnet/coreclr...
Marek Safar [Mon, 11 Feb 2019 11:33:29 +0000 (12:33 +0100)]
Make Nullable partial to allow additional method for in under Mono (dotnet/coreclr#22518)

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

5 years agoCleanup DLL exports (dotnet/coreclr#22500)
Jan Kotas [Sun, 10 Feb 2019 21:57:11 +0000 (13:57 -0800)]
Cleanup DLL exports (dotnet/coreclr#22500)

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

5 years agoFix casing of interop directories (dotnet/corertdotnet/coreclr#6982)
Jan Kotas [Sun, 10 Feb 2019 02:45:30 +0000 (18:45 -0800)]
Fix casing of interop directories (dotnet/corertdotnet/coreclr#6982)

Match convention introduced by https://github.com/dotnet/corefx/pull/35085

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

5 years agoMove eventpipe buffer to TLS (dotnet/coreclr#21817)
Sung Yoon Whang [Sun, 10 Feb 2019 02:25:10 +0000 (18:25 -0800)]
Move eventpipe buffer to TLS (dotnet/coreclr#21817)

* start ripping out eventpipe buffer to tls

* can now emit events from gc threads

* cleanup

* more cleanup

* more cleanup

* tested on linux

* Addressing PR comments

* Move things around a bit to build in Linux

* change eventpipe buffer deallocation code

* more cleanup

* this while loop doesnt do anything now

* Fix build

* fixing build

* More cleanup

* more pr comments

* Fix unix build

* more pr comments

* trying to add a message to assertion that seems to be causing CIs to fail

* more pr feedback

* handle non-2-byte aligned string payloads inside payload buffers

* some more cleanup

* Fix off by one error in null index calculation

* Make Get/SetThreadEventBufferList a static member of ThreadEventBufferList

* make only the methods public in ThreadEventBufferList

* Addressing noah's comments

* fix comment and last off by 1 error

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

5 years agoset up CoreLib to include EventCounter in build project (dotnet/coreclr#22501)
Sung Yoon Whang [Sun, 10 Feb 2019 02:23:33 +0000 (18:23 -0800)]
set up CoreLib to include EventCounter in build project (dotnet/coreclr#22501)

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

5 years agoAdd reporting exception from ResolveEHClause (dotnet/coreclr#17947)
Jan Vorlicek [Sat, 9 Feb 2019 15:07:14 +0000 (16:07 +0100)]
Add reporting exception from ResolveEHClause (dotnet/coreclr#17947)

* Add reporting exception from ResolveEHClause

When an exception, like EEFileLoadException happens in the
ResolveEHClause, it was not caught by the runtime and so it caused exit
with `terminating with uncaught exception of type EEFileLoadException*`
message without any additional details.

This change adds catching the exception, reporting its details and call
stack and then failing fast.

* Change StackSString to SString

* Ensure the catch clause types are loaded before EH

In crossgen-ed images, ensure the types used in catch clauses are loaded
before the function containing these clauses is executed. That ensures
that a failure to load the EH clause type will occur at that time
instead of during the EH stack walking that searches for the catch
handler.

* Fix EH clause class module check

* Remove the EH clause class module check

It turns out that even if the class was from the current module, it may
depend on types from other modules, so we still need to add a fixup for
it.

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

5 years agomove EventCounter to shared CoreLib (dotnet/corefxdotnet/coreclr#35183)
Sung Yoon Whang [Sat, 9 Feb 2019 03:58:24 +0000 (19:58 -0800)]
move EventCounter to shared CoreLib (dotnet/corefxdotnet/coreclr#35183)

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

5 years agoMove Array's SZGenericArrayEnumerator to shared partition (dotnet/coreclr#22480)
Marek Safar [Sat, 9 Feb 2019 04:11:21 +0000 (05:11 +0100)]
Move Array's SZGenericArrayEnumerator to shared partition (dotnet/coreclr#22480)

* Move Array's SZGenericArrayEnumerator to shared partition

* Remove legacy comment

* Move all array enumerators to a new file

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

5 years agoDelete EnvironmentAugments (dotnet/coreclr#22485)
Jan Kotas [Sat, 9 Feb 2019 04:10:38 +0000 (20:10 -0800)]
Delete EnvironmentAugments (dotnet/coreclr#22485)

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

5 years agoSet visibility option to hidden (dotnet/coreclr#21924)
Adeel Mujahid [Sat, 9 Feb 2019 01:24:59 +0000 (03:24 +0200)]
Set visibility option to hidden (dotnet/coreclr#21924)

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

5 years agoBitOps.TrailingZeroCount has inconsistent software fallback (dotnet/coreclr#22333)
Grant [Fri, 8 Feb 2019 23:46:14 +0000 (15:46 -0800)]
BitOps.TrailingZeroCount has inconsistent software fallback (dotnet/coreclr#22333)

Fix dotnet/coreclr#22326

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

5 years ago[Official Build] Remove FreeBSD builds (dotnet/coreclr#22451)
Jarret Shook [Fri, 8 Feb 2019 20:04:51 +0000 (12:04 -0800)]
[Official Build] Remove FreeBSD builds (dotnet/coreclr#22451)

Currently all the FreeBSD machines are offline or in an unclean state
which blocks official builds from finishing.

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

5 years agoRevert "Revert "Re-point Jenkins to new Ubuntu ARM64 queue""
Russ Keldorph [Fri, 8 Feb 2019 19:03:42 +0000 (11:03 -0800)]
Revert "Revert "Re-point Jenkins to new Ubuntu ARM64 queue""

This reverts commit dotnet/coreclr@d617f96303c4b65b7b77ff5fa0d7aee38ebc19f8.

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

5 years agoMove GCSettings to shared (dotnet/coreclr#22483)
Stephen Toub [Fri, 8 Feb 2019 16:57:48 +0000 (11:57 -0500)]
Move GCSettings to shared (dotnet/coreclr#22483)

Mainly just type definitions and error handling that gets shared.

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

5 years agoPass official build id to build (dotnet/coreclr#22468)
Sven Boemer [Fri, 8 Feb 2019 16:34:54 +0000 (08:34 -0800)]
Pass official build id to build (dotnet/coreclr#22468)

This ensures that coreclr gets a version number based on the build id.

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

5 years agoUpdate CoreRT with shared array implementation
Jan Kotas [Thu, 7 Feb 2019 23:20:46 +0000 (15:20 -0800)]
Update CoreRT with shared array implementation

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

5 years agoUpdate BuildTools, CoreFx, CoreSetup to preview1-03706-01, preview.19106.8, preview...
dotnet-maestro-bot [Fri, 8 Feb 2019 16:12:20 +0000 (08:12 -0800)]
Update BuildTools, CoreFx, CoreSetup to preview1-03706-01, preview.19106.8, preview-27406-8, respectively (master) (dotnet/coreclr#22455)

* Update BuildTools, CoreFx, CoreSetup to preview1-03706-01, preview.19106.8, preview-27406-8, respectively

* Disabling some outdated System.ObjectModel CoreFX tests

* Undo BuildTools update

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

5 years agoJIT: Suppress emitting same-reg zero extending move (dotnet/coreclr#22454)
Andy Ayers [Fri, 8 Feb 2019 16:10:57 +0000 (08:10 -0800)]
JIT: Suppress emitting same-reg zero extending move (dotnet/coreclr#22454)

Add a peephole optimization to suppress emitting zero extending moves
if the previous instruction has already done a suitable zero extension.

Only implemented for x64 currently.

Closes dotnet/coreclr#21923

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

5 years agoJIT: fix ifdef guarding an assert (dotnet/coreclr#22460)
Andy Ayers [Fri, 8 Feb 2019 16:09:57 +0000 (08:09 -0800)]
JIT: fix ifdef guarding an assert (dotnet/coreclr#22460)

We use `_TARGET_AMD64_`, not `_TARGET_X64_`.

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

5 years agoForce results of rejected multi-reg-returning tail-call candidates to temp. (dotnet...
Eugene Rozenfeld [Fri, 8 Feb 2019 08:14:35 +0000 (00:14 -0800)]
Force results of rejected multi-reg-returning tail-call candidates to temp. (dotnet/coreclr#22364)

* Force results of rejected multi-reg-returning tail-call candidates to temp.

Issue dotnet/coreclr#20269 ran into an assert when trying to merge returns, one of which
is a call to a multi-reg-returning method. The repro in the bug is a pmi
of `System.Reflection.Metadata`. I added a simple repro test case.

Results of calls to multi-reg-returning methods are expected to
be saved to temps. Normally it's ensured by `impFixupCallStructReturn`;
however, it doesn't do that for tail-call candidates.

This change forces results of calls to multi-reg-returning methods
to temps if the tail call is rejected late in morph.

Fixes dotnet/coreclr#20269.

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

5 years agoFinish removing Environment from corefx
Stephen Toub [Wed, 6 Feb 2019 04:13:26 +0000 (23:13 -0500)]
Finish removing Environment from corefx

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

5 years agoFix the desktop warning (dotnet/coreclr#22481)
Sergey Andreenko [Fri, 8 Feb 2019 06:01:50 +0000 (22:01 -0800)]
Fix the desktop warning (dotnet/coreclr#22481)

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

5 years agoMove DateTime for Unix to shared partition (dotnet/coreclr#22383)
Marek Safar [Fri, 8 Feb 2019 03:45:44 +0000 (04:45 +0100)]
Move DateTime for Unix to shared partition (dotnet/coreclr#22383)

* Move DateTime for Unix to shared partition

* Keep CoreCLR specific implementation

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

5 years agoDisable more baseservices/threading/interlocked tests on Ubuntu.Arm64 (dotnet/coreclr...
Egor Chesakov [Fri, 8 Feb 2019 02:40:34 +0000 (18:40 -0800)]
Disable more baseservices/threading/interlocked tests on Ubuntu.Arm64 (dotnet/coreclr#22471)

In the last two weeks the following tests have failed:

* baseservices/threading/interlocked/exchange/ExchangeTClass - 5 times
* baseservices/threading/interlocked/exchange/ExchangeTString - 13 times
* baseservices/threading/interlocked/exchange/ExchangeTString_1 - 12 times
* baseservices/threading/interlocked/exchange/ExchangeTString_2 - 20 times

In addition to the previously disabled tests (in dotnet/coreclr#22304):

* baseservices/threading/interlocked/compareexchange/CompareExchangeTClass - 9 times
* baseservices/threading/interlocked/compareexchange/CompareExchangeTClass_1 - 32 times

All the failures happened on Ubuntu.1804.Arm64.Open Helix queue in Azure DevOps Pri1 jobs

**Related issue:** dotnet/coreclr#22303

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

5 years agoFix race condition in g_pfnGetSystemTimeAsFileTime initialization (dotnet/coreclr...
Jan Kotas [Fri, 8 Feb 2019 02:35:15 +0000 (18:35 -0800)]
Fix race condition in g_pfnGetSystemTimeAsFileTime initialization (dotnet/coreclr#22466)

Multiple threads initializing g_pfnGetSystemTimeAsFileTime at the same time can end up with different conclusions. Make the result consistent.

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

5 years agoAdd config option to disable tier 0 JIT (dotnet/coreclr#22370)
Koundinya Veluri [Fri, 8 Feb 2019 01:51:29 +0000 (17:51 -0800)]
Add config option to disable tier 0 JIT (dotnet/coreclr#22370)

Add config option to disable tier 0 JIT

Fixes https://github.com/dotnet/coreclr/issues/21856
- For methods that don't have pregenerated code, using tier 0 JIT can improve startup perf, and disabling tier 0 JIT can be useful to sacrifice some startup time to avoid issues of running tier 0 code for too long. In some cases, it may also be desirable to avoid tiering up much later.
- A fixed value for the call count indicates that tier 0 call counting is disabled. When disabled, the method starts at tier 1.
- Also modified call counting to start from a predetermined threshold and count down to zero, as it simplifies some things, allows for methods to have different thresholds, and likely is what we would want eventually anyway
- Took a small step towards eliminating knowledge of specific tier levels in code that should not care, though more is to be done there

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

5 years agoMerge pull request dotnet/coreclr#22023 from BruceForstall/FixGSWithLocalloc
Bruce Forstall [Thu, 7 Feb 2019 23:19:06 +0000 (15:19 -0800)]
Merge pull request dotnet/coreclr#22023 from BruceForstall/FixGSWithLocalloc

Fix ARM64 GS with localloc

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

5 years agoMore PAL layer cleanup for GNU and add build script support for GCC (dotnet/coreclr...
Sinan Kaya [Thu, 7 Feb 2019 21:39:13 +0000 (16:39 -0500)]
More PAL layer cleanup for GNU and add build script support for GCC (dotnet/coreclr#22369)

* Declare throw only when compiling for c++

Prevent the definition from getting defined multiple times and
map it to throw() only when compiling c++ code.

* Suppress warnings for tests

Suppress:
 -Wno-write-strings
 -Wno-sign-compare
 -Wno-narrowing
 -fpermissive
 -Wno-int-to-pointer-cast

to allow tests to compile

* Add gcc option to build.sh script

Following clangx.y model add -gccx.y command line
arguments with gcc5 and gcc7 being the currnetly supported
options.

* Allow environment variable to be used for TOOLCHAIN

Remove CLANG specific compiler options as well.

* Hide non-GNU compiler options

* Do not include local directory if cross compiling

[  0%] Building CXX object src/pal/src/eventprovider/tracepointprovider/CMakeFiles/coreclrtraceptprovider.dir/__/lttng/traceptprovdotnetruntime.cpp.o
cc1plus: error: include location "/usr/local/include" is unsafe for cross-compilation [-Werror=poison-system-directories]

* Suppress unknown pragma warnings

src/pal/src/exception/seh-unwind.cpp:37:0:
warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas]
    #pragma clang diagnostic pop

Removing these cause compilation error on clang7 and arm as follows:

In file included from /bin/obj/Linux.arm.Debug/src/pal/src/libunwind/include/libunwind.h:9:
/src/pal/src/libunwind/include/libunwind-arm.h:247:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
typedef struct unw_tdep_save_loc
        ^
/src/pal/src/libunwind/include/libunwind-arm.h:288:9: error: empty struct has size 0 in C, size 1 in C++ [-Werror,-Wextern-c-compat]
typedef struct

* plt not useful for GNU and ARM64/ARM

src/pal/src/arch/arm64/callsignalhandlerwrapper.S: Assembler messages:
src/pal/src/arch/arm64/callsignalhandlerwrapper.S:31: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt'
src/pal/src/arch/arm64/callsignalhandlerwrapper.S:32: Error: unexpected characters following instruction at operand 1 -- `bl signal_handler_worker@plt'

* Remove double const from argv in PAL_Initialize

Seeing compilation error with GNU for C source files as follows:

if (PAL_Initialize(argc, argv) != 0)
                          ^
src/pal/tests/palsuite/common/palsuite.h:21:0,
from src/pal/tests/palsuite/c_runtime/asinhf/test1/test1.c:18:
src/pal/inc/pal.h:374:1: note: expected ‘const char * const*’ but argument is of type ‘char **’

* Suppress format warnings using GNU for libunwind

warning: format ‘%li’ expects argument of type ‘long int’, but argument 3 has type ‘int’ [-Wformat=]
     Debug (4, " aligned frame, offset %li\n", f->cfa_reg_offset);

* Fix -fpermissive warnings for GNU

* Suppress unused variable warning in libunwind

src/pal/src/libunwind/include/libunwind-aarch64.h:201:5: warning: right-hand operand of comma expression has no effect [-Wunused-value]
 #define unw_tdep_getcontext(uc) (({     \
                                 ~~~~~~~~~
   unw_tdep_context_t *unw_ctx = (uc);     \
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs;  \
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   __asm__ __volatile__ (      \
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x0, x1, [%[base], dotnet/coreclr#0]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x2, x3, [%[base], dotnet/coreclr#16]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x4, x5, [%[base], dotnet/coreclr#32]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x6, x7, [%[base], dotnet/coreclr#48]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x8, x9, [%[base], dotnet/coreclr#64]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x10, x11, [%[base], dotnet/coreclr#80]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x12, x13, [%[base], dotnet/coreclr#96]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x14, x13, [%[base], dotnet/coreclr#112]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x16, x17, [%[base], dotnet/coreclr#128]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x18, x19, [%[base], dotnet/coreclr#144]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x20, x21, [%[base], dotnet/coreclr#160]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x22, x23, [%[base], dotnet/coreclr#176]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x24, x25, [%[base], dotnet/coreclr#192]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x26, x27, [%[base], dotnet/coreclr#208]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "stp x28, x29, [%[base], dotnet/coreclr#224]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "str x30, [%[base], dotnet/coreclr#240]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "mov x1, sp\n" \
      ~~~~~~~~~~~~~~~~
      "stp x1, x30, [%[base], dotnet/coreclr#248]\n" \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      : [base] "+r" (unw_base) : : "x1", "memory"); \
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   }), 0)

* Fix warning: ‘memset’ used with length equal to number of elements warning

Fix similar warnings to these by including the element size into total size
calculation.

src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp: In function ‘int main(int, char**)’:
src/pal/tests/palsuite/miscellaneous/SetEnvironmentVariableW/test1/test.cpp:89:31: warning: ‘memset’ used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
     memset(NewValue,0,BUF_SIZE);

* Define CLR specific compiler option CLR_CMAKE_COMPILER

By the time toolchain.cmake is called, the compiler detection from
cmake is not active. We need an intermediate definition to pass
to compiler detection.

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

5 years agoFix GCSample bit rot (dotnet/coreclr#22462)
Jan Kotas [Thu, 7 Feb 2019 18:17:45 +0000 (10:17 -0800)]
Fix GCSample bit rot (dotnet/coreclr#22462)

Fixes dotnet/coreclr#22459

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

5 years agoMerge pull request dotnet/coreclr#22435 from echesakovMSFT/TreatCLRTestExecutionArgum...
Egor Chesakov [Thu, 7 Feb 2019 17:58:32 +0000 (09:58 -0800)]
Merge pull request dotnet/coreclr#22435 from echesakovMSFT/TreatCLRTestExecutionArgumentsAsAnArrayInBash

Treat CLRTestExecutionArguments as an array in generated Bash scripts

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

5 years agoFixing Utf8Formatter.Float to support all the same format specifiers as the utf16...
Tanner Gooding [Thu, 7 Feb 2019 17:12:08 +0000 (09:12 -0800)]
Fixing Utf8Formatter.Float to support all the same format specifiers as the utf16 formatter. (dotnet/coreclr#22434)

* Fixing Utf8Formatter.Float to support all the same format specifiers as the utf16 formatter.

* Disabling some outdated CoreFX tests.

* Fixing TryFormatFloatingPoint to special-case format.IsDefault

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

5 years agoFix delegate creation for default interface methods on structs (dotnet/coreclr#22427)
Michal Strehovský [Thu, 7 Feb 2019 16:48:09 +0000 (17:48 +0100)]
Fix delegate creation for default interface methods on structs (dotnet/coreclr#22427)

We only need to find an unboxing stub if we resolved the interface to a valuetype method. If we resolved to a default interface method implementation, unboxing is not necessary.

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

5 years agoCleanup LLVM assumption (dotnet/coreclr#22456)
Sinan Kaya [Thu, 7 Feb 2019 09:28:29 +0000 (04:28 -0500)]
Cleanup LLVM assumption (dotnet/coreclr#22456)

We want to support GNU compilation for CoreCLR. Luckily both LLVM
and GNU compilers define __GNUC__ and there are a lot of things
they can share.

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

5 years agoFix CoreLib to include PasteArguments.Unix.cs correctly (dotnet/coreclr#22453)
Stephen Toub [Thu, 7 Feb 2019 03:37:31 +0000 (22:37 -0500)]
Fix CoreLib to include PasteArguments.Unix.cs correctly (dotnet/coreclr#22453)

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

5 years agoMove Array to shared partition (dotnet/coreclr#22321)
Marek Safar [Thu, 7 Feb 2019 03:36:45 +0000 (04:36 +0100)]
Move Array to shared partition (dotnet/coreclr#22321)

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

5 years agoImplement ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute (dotnet...
Marek Safar [Thu, 7 Feb 2019 03:34:48 +0000 (04:34 +0100)]
Implement ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute (dotnet/coreclr#22372)

* Implement ManifestBasedResourceGroveler::GetNeutralResourcesLanguageAttribute in shared managed code

* Remove native ::GetNeutralResourcesLanguage

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

5 years agoFix ARM64 GS with localloc
Bruce Forstall [Fri, 11 Jan 2019 01:06:49 +0000 (17:06 -0800)]
Fix ARM64 GS with localloc

Currently, all frame types place saved FP/LR at low addresses on the
frame, below the GS cookie. If a function has localloc, the dynamically
allocate and unsafe buffer will be lower than the saved FP/LR and
not the GS cookie won't properly protect the saved FP/LR.

This change introduces new frame types, used only for functions needing
a GS cookie and using localloc, saving FP/LR along with the rest of
the callee-saved registers at the top (highest addresses) of the frame,
above the GS cookie.

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

5 years agoIndex and Range updates (dotnet/coreclr#22331)
Tarek Mahmoud Sayed [Wed, 6 Feb 2019 23:15:46 +0000 (15:15 -0800)]
Index and Range updates (dotnet/coreclr#22331)

* Index and Range updates

* Address @mikedn  feedback

* Address Feedback

* more feedback

* Use Deconstruct in Range.GetOffsetAndLength

* Rename GetArrayRange to GetSubArray

* Temporary disable the old Corefx Range tests

* Return back the TimeSpan test disabling

* Fix Range jit test

* Exclude the jit test

* revert the changes in the jit Range test

* Address Suggested Feedback

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

5 years agoMerge pull request dotnet/coreclr#22450 from BruceForstall/DisableFlakySystemNetTests
Bruce Forstall [Wed, 6 Feb 2019 21:51:30 +0000 (13:51 -0800)]
Merge pull request dotnet/coreclr#22450 from BruceForstall/DisableFlakySystemNetTests

Disable flaky Linux/arm64 corefx System.Net.Sockets.Tests

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

5 years agoThrow an exception when passing strings by-value as out parameters. (dotnet/coreclr...
Jeremy Koritzinsky [Wed, 6 Feb 2019 21:05:28 +0000 (13:05 -0800)]
Throw an exception when passing strings by-value as out parameters. (dotnet/coreclr#21513)

* Throw an exception when passing strings by-value as out parameters.

* Fix encoding

* Don't use override in this PR.

* Clean up Marshal_In

Marshal_In was copied back into existence from Marshal_InOut. Clean it up a bit.

* Remove extraneous whitespace.

* Fix failing test.

* Remove out attribute in COM string tests.

* Add back attribute and check for exception thow in COM tests.

* Add block comment to explain the implementation of Reverse_LPWStr_OutAttr in the NETServer.

* Only throw in a CLR->Native marshalling situation.

* Fix asserts from changed code-paths used in ILWSTRMarshaler.

* Add comment and explicitly load in a null value (instead of leaving it uninitialized).

* Apply suggestions from code review

Co-Authored-By: jkoritzinsky <jkoritzinsky@gmail.com>
Co-authored-by: Jan Vorlicek <janvorli@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/2f88f32ffb6752c89e6751b4747f1b9cd971304d

5 years agoAllow lcl_var structs to be widened to primitive types on unix amd64. (dotnet/coreclr...
Jarret Shook [Wed, 6 Feb 2019 21:00:54 +0000 (13:00 -0800)]
Allow lcl_var structs to be widened to primitive types on unix amd64. (dotnet/coreclr#22437)

* Allow lcl_var structs to be widened to primitive types on unix amd64. The already happens on armarch

* Apply format patch

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

5 years agoDisable flaky Linux/arm64 corefx System.Net.Sockets.Tests
Bruce Forstall [Wed, 6 Feb 2019 20:33:43 +0000 (12:33 -0800)]
Disable flaky Linux/arm64 corefx System.Net.Sockets.Tests

Tracking: https://github.com/dotnet/coreclr/issues/21576

In general, any System.Net test that exhibits flakiness should be
disabled; we pay more in flakiness than we gain in coverage.

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

5 years agoTreat $(CLRTestExecutionArguments) as an array in Bash
Egor Chesakov [Tue, 5 Feb 2019 02:33:25 +0000 (18:33 -0800)]
Treat $(CLRTestExecutionArguments) as an array in Bash

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

5 years agoEnable baseservices/threading/paramthreadstart/ThreadStartString_1
Egor Chesakov [Tue, 5 Feb 2019 19:20:52 +0000 (11:20 -0800)]
Enable baseservices/threading/paramthreadstart/ThreadStartString_1

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

5 years agoAdd option to run tests in unloadable context (dotnet/coreclr#22332)
Jan Vorlicek [Wed, 6 Feb 2019 11:23:08 +0000 (12:23 +0100)]
Add option to run tests in unloadable context (dotnet/coreclr#22332)

This change adds new "runincontext" option to the tests/runtest.cmd that
allows running tests inside of an unloadable AssemblyLoadContext.
It also adds new property that allows tests to be marked as incompatible
with running this way. All known tests that have such issue are marked
in this PR too.

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

5 years agoMerge pull request dotnet/coreclr#22433 from BruceForstall/DisableFailingLinuxArm64Test
Bruce Forstall [Wed, 6 Feb 2019 07:27:07 +0000 (23:27 -0800)]
Merge pull request dotnet/coreclr#22433 from BruceForstall/DisableFailingLinuxArm64Test

Disable failing constrainedcall test

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

5 years agoMerge pull request dotnet/coreclr#22438 from BruceForstall/DisableFailingXarchTests
Bruce Forstall [Wed, 6 Feb 2019 07:26:18 +0000 (23:26 -0800)]
Merge pull request dotnet/coreclr#22438 from BruceForstall/DisableFailingXarchTests

Disable failing BestFitMapping tests

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

5 years agoMerge pull request dotnet/coreclr#22439 from BruceForstall/DisableWaitOne2
Bruce Forstall [Wed, 6 Feb 2019 07:24:53 +0000 (23:24 -0800)]
Merge pull request dotnet/coreclr#22439 from BruceForstall/DisableWaitOne2

Disable baseservices\threading\mutex\misc\waitone2 test

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

5 years agoMerge pull request dotnet/coreclr#22444 from BruceForstall/DisableGThread23
Bruce Forstall [Wed, 6 Feb 2019 07:24:01 +0000 (23:24 -0800)]
Merge pull request dotnet/coreclr#22444 from BruceForstall/DisableGThread23

Disable GThread23 test

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

5 years agoDisable GThread23 test
Bruce Forstall [Wed, 6 Feb 2019 03:00:16 +0000 (19:00 -0800)]
Disable GThread23 test

It fails regularly though randomly in the CI.

Tracking issue: https://github.com/dotnet/coreclr/issues/19339

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

5 years agoDisable failing constrainedcall test on Linux
Bruce Forstall [Tue, 5 Feb 2019 21:13:05 +0000 (13:13 -0800)]
Disable failing constrainedcall test on Linux

Tracked by https://github.com/dotnet/coreclr/issues/22423

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

5 years agoDisable baseservices\threading\mutex\misc\waitone2 test
Bruce Forstall [Wed, 6 Feb 2019 01:15:35 +0000 (17:15 -0800)]
Disable baseservices\threading\mutex\misc\waitone2 test

This test has been failing randomly in the CI on all architectures
for a long, long time.

Tracking issue: https://github.com/dotnet/coreclr/issues/6397

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

5 years agoDisable failing BestFitMapping tests
Bruce Forstall [Wed, 6 Feb 2019 00:55:30 +0000 (16:55 -0800)]
Disable failing BestFitMapping tests

Tests:
```
Interop\PInvoke\BestFitMapping\Char\AFT_PFT\AFT_PFT\AFT_PFT.cmd
Interop\PInvoke\BestFitMapping\Char\Assembly_False_False\Assembly_False_False\Assembly_False_False.cmd
Interop\PInvoke\BestFitMapping\LPStr\AFT_PFT\AFT_PFT\AFT_PFT.cmd
Interop\PInvoke\BestFitMapping\LPStr\Assembly_False_False\Assembly_False_False\Assembly_False_False.cmd
```

Tracked by https://github.com/dotnet/coreclr/issues/22436

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

5 years agoMerge pull request dotnet/coreclr#22431 from BruceForstall/DisableCorefxFailingTests
Bruce Forstall [Tue, 5 Feb 2019 21:27:21 +0000 (13:27 -0800)]
Merge pull request dotnet/coreclr#22431 from BruceForstall/DisableCorefxFailingTests

Disable failing Linux/arm64 corefx tests

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

5 years agoMerge pull request dotnet/coreclr#22432 from BruceForstall/DisableWindowsArm64CorefxC...
Bruce Forstall [Tue, 5 Feb 2019 20:46:35 +0000 (12:46 -0800)]
Merge pull request dotnet/coreclr#22432 from BruceForstall/DisableWindowsArm64CorefxCronJobs

Disable Windows arm64 corefx cron jobs

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

5 years agoFix ProjectN build breaks (dotnet/corertdotnet/coreclr#6954)
Michal Strehovský [Tue, 5 Feb 2019 17:03:52 +0000 (18:03 +0100)]
Fix ProjectN build breaks (dotnet/corertdotnet/coreclr#6954)

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

5 years agoAvoid duplicate tree lookup in GetCollatorFromSortHandle (dotnet/coreclr#22390)
Filip Navara [Tue, 5 Feb 2019 20:29:01 +0000 (21:29 +0100)]
Avoid duplicate tree lookup in GetCollatorFromSortHandle (dotnet/coreclr#22390)

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

5 years agoMerge pull request dotnet/coreclr#22425 from BruceForstall/UploadMsbuildLogs
Bruce Forstall [Tue, 5 Feb 2019 20:24:19 +0000 (12:24 -0800)]
Merge pull request dotnet/coreclr#22425 from BruceForstall/UploadMsbuildLogs

Configure MSBuild debug path and save any logs

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

5 years agoDisable Windows arm64 corefx cron jobs
Bruce Forstall [Tue, 5 Feb 2019 20:03:26 +0000 (12:03 -0800)]
Disable Windows arm64 corefx cron jobs

These currently all fail with timeout. They also take way too much time
to run. We have good Linux/arm64 corefx test coverage already.

The issue of these runs being slow is tracked by
https://github.com/dotnet/coreclr/issues/21236.

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