platform/upstream/dotnet/runtime.git
5 years agofix BSWAP16 intrinsic handling of signed values (dotnet/coreclr#22666)
Clinton Ingram [Sat, 23 Feb 2019 17:06:16 +0000 (09:06 -0800)]
fix BSWAP16 intrinsic handling of signed values (dotnet/coreclr#22666)

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

5 years agoMove AssemblyLoadContext to shared partition (dotnet/coreclr#22685)
Marek Safar [Sat, 23 Feb 2019 10:06:32 +0000 (11:06 +0100)]
Move AssemblyLoadContext to shared partition (dotnet/coreclr#22685)

* Move AssemblyLoadContext to shared partition

* Move static initializer to DefaultAssemblyLoadContext

and remove stream copying from lock scope

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

5 years agoMake System.Runtime.CompilerServices.Unsafe inbox (dotnet/corefxdotnet/coreclr#35526)
Eric StJohn [Sat, 23 Feb 2019 02:20:16 +0000 (18:20 -0800)]
Make System.Runtime.CompilerServices.Unsafe inbox (dotnet/corefxdotnet/coreclr#35526)

* Make System.Runtime.CompilerServices.Unsafe inbox

Fix a couple places where we wanted to use it from other inbox assemblies but couldn't.

Unsafe remains as a package and newer versions of Unsafe will replace the inbox Version,
permitting us to add API over time.

* Update Rune tests to use TryEncodeToUtf8Bytes directly

* Add temporary suppression to package tests

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

5 years agoAdding a missing single-quote (dotnet/coreclr#22809)
Tanner Gooding [Sat, 23 Feb 2019 03:11:32 +0000 (19:11 -0800)]
Adding a missing single-quote (dotnet/coreclr#22809)

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

5 years agoRemove 'from HRESULT' (dotnet/coreclr#22782)
Dan Moseley [Sat, 23 Feb 2019 02:57:02 +0000 (18:57 -0800)]
Remove 'from HRESULT' (dotnet/coreclr#22782)

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

5 years agoChange Environment.Version to return product version (dotnet/coreclr#22664)
Jan Kotas [Sat, 23 Feb 2019 01:56:02 +0000 (17:56 -0800)]
Change Environment.Version to return product version (dotnet/coreclr#22664)

* Change Environment.Version to return product version

- Contributes to https://github.com/dotnet/corefx/issues/31099
- Use AssemblyInformationalVersion attribute as fallback

* Add sanity test for Environment.Version

* Disable CodeDom tests

* Fix test assembly name

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

5 years agoCorrectly build packages for linux-musl-arm64 (dotnet/coreclr#22793)
Jarret Shook [Sat, 23 Feb 2019 00:01:03 +0000 (16:01 -0800)]
Correctly build packages for linux-musl-arm64 (dotnet/coreclr#22793)

* Correctly build packages for linux-musl-arm64

Also add build-package step to PR.

* Correctly add back if

* Fix build-packages

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

5 years agoEnable FEATURE_BASICFREEZE (dotnet/coreclr#22776)
Mukul Sabharwal [Fri, 22 Feb 2019 23:56:28 +0000 (15:56 -0800)]
Enable FEATURE_BASICFREEZE (dotnet/coreclr#22776)

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

5 years agoAdd fatal error details printing (dotnet/coreclr#22789)
Jan Vorlicek [Fri, 22 Feb 2019 22:11:14 +0000 (23:11 +0100)]
Add fatal error details printing (dotnet/coreclr#22789)

Before this change, we were only printing details on fatal errors with
error code COR_E_FAILFAST. For other error codes we were just silently
exiting.
This change enables printing fatal error details for all kinds of fatal
errors.

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

5 years agoUpdate CoreFX Windows Arm32 exclusion list. (dotnet/coreclr#22695)
Sergey Andreenko [Fri, 22 Feb 2019 21:38:50 +0000 (13:38 -0800)]
Update CoreFX Windows Arm32 exclusion list. (dotnet/coreclr#22695)

* Update CoreFX Windows Arm32 exclusion list.

* Exclude System.Globalization.Calendars.Tests.

* Disable System.Net.Sockets.Tests

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

5 years agoIgnore EINVAL/EBADF errors from FTruncate in FileStream.Init (dotnet/coreclr#22788)
Stephen Toub [Fri, 22 Feb 2019 21:15:31 +0000 (16:15 -0500)]
Ignore EINVAL/EBADF errors from FTruncate in FileStream.Init (dotnet/coreclr#22788)

They indicate we're working with a special file, where failure to truncate is not a fatal condition.

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

5 years agoDisable IJW tests on Windows 7. (dotnet/coreclr#22779)
Jeremy Koritzinsky [Fri, 22 Feb 2019 20:39:56 +0000 (12:39 -0800)]
Disable IJW tests on Windows 7. (dotnet/coreclr#22779)

Windows 7 loads desktop mscoree.dll when loading System.Private.CoreLib, before we can load our fake mscoree. So, when IJW modules are loaded, they load the real mscoree.dll, which breaks coreclr's IJW loading. Once we have true .NET Core IJW support in the MSVC++ compiler and .NET Core, then we'll be able to reenable these tests on Win7.

Fixes dotnet/coreclr#21796.

cc: @RussKeldorph @echesakovMSFT

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

5 years agoR2RDump - Gracefully handle inability to parse GC Info
Simon Nattress [Thu, 21 Feb 2019 21:37:50 +0000 (13:37 -0800)]
R2RDump - Gracefully handle inability to parse GC Info

The Amd64 GC Info parser is not complete in its implementation and
sometimes will index to a location beyond the size of the image.

If we fail to parse the GC info for a method, continue dumping the rest
of the image.

Emit a warning when this happens so we don't forget about this.

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

5 years agoMore GNUC Fixes (dotnet/coreclr#22687)
Sinan Kaya [Fri, 22 Feb 2019 19:11:19 +0000 (14:11 -0500)]
More GNUC Fixes (dotnet/coreclr#22687)

* Replace __sync_swap with __atomic_exchange_n

__sync_swap() is a clang specific function.

* Remove multiline comment

* Add paranthesis around sum

src/md/hotdata/../inc/streamutil.h:73:34: warning: suggest parentheses around ‘+’ in operand of ‘&’ [-Wparentheses]
     UINT32 aligned = *totalBytes + 3 & ~3;

* Define __int64

* Define windows types for tests

* Remove undefined has_builtin defines and define alloca and inline for GNUC

* Remove __clang__ where possible

* Add implicit casting to help compiler find WCHAR* variant

src/binder/assembly.cpp:294:73: error: no matching function for call to ‘SString::SString(SString)’
         return (pAsmName == nullptr ? nullptr : pAsmName->GetSimpleName());
                                                                         ^
In file included from src/inc/sstring.h:1082:0,
                 from src/inc/ex.h:19,
                 from src/inc/stgpool.h:28,
                 from src/inc/../md/inc/metamodel.h:18,
                 from src/inc/../md/inc/metamodelro.h:19,
                 from src/inc/metadata.h:17,
                 from src/binder/../vm/util.hpp:19,
                 from src/binder/../vm/common.h:110,
                 from src/binder/assembly.cpp:14:
src/inc/sstring.inl:73:8: note: candidate: SString::SString(void*, COUNT_T)
 inline SString::SString(void *buffer, COUNT_T size)
        ^
src/inc/sstring.inl:73:8: note:   candidate expects 2 arguments, 1 provided
src/inc/sstring.inl:436:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*, COUNT_T)
 inline SString::SString(tagLiteral dummytag, const WCHAR *literal, COUNT_T count)
        ^
src/inc/sstring.inl:436:8: note:   candidate expects 3 arguments, 1 provided
src/inc/sstring.inl:418:8: note: candidate: SString::SString(SString::tagLiteral, const WCHAR*)
 inline SString::SString(tagLiteral dummytag, const WCHAR *literal)
        ^
src/inc/sstring.inl:418:8: note:   candidate expects 2 arguments, 1 provided
src/inc/sstring.inl:401:8: note: candidate: SString::SString(SString::tagUTF8Literal, const UTF8*)
 inline SString::SString(tagUTF8Literal dummytag, const UTF8 *literal)
        ^
src/inc/sstring.inl:401:8: note:   candidate expects 2 arguments, 1 provided
src/inc/sstring.inl:382:8: note: candidate: SString::SString(SString::tagLiteral, const CHAR*)
 inline SString::SString(tagLiteral dummytag, const ASCII *literal)

* Reorder DLLEXPORT and STDAPI

GNUC wants extern "C" <attribute> format.

* Abstract __FUNCSIG__

* Abstract __debugbreak()

* Move common compiler options out of clang and add Wno-unused-value

* Add paranthesis around || and &&

src/gc/gc.cpp:9084:38: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
                     (!chosen_power2) && (i < free_space_count));

* Set Wno-delete-non-virtual-dtor for CXX files only

* Don't warn on unterminated endif labels

* Suppress unused functions

* Use 0x syntax rather than h syntax on GNU asm files

* Correct constructor call directly

src/ToolBox/superpmi/superpmi-shared/logging.cpp:301:27:   required from here
src/inc/clr_std/string:58:9: error: cannot call constructor ‘std::basic_string<char>::basic_string’ directly
         this->basic_string::basic_string(_Ptr, c_len(_Ptr));

* Suppress NULL used in arithmetic warnings

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

5 years agoDisable tests that fail to build under 3.0.0-preview3 (dotnet/coreclr#22774)
Jarret Shook [Fri, 22 Feb 2019 17:32:38 +0000 (09:32 -0800)]
Disable tests that fail to build under 3.0.0-preview3 (dotnet/coreclr#22774)

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

5 years agoExclude /Interop/COM/NETClients/Events/NETClientEvent for arm32 Windows. (dotnet...
Sergey Andreenko [Fri, 22 Feb 2019 17:27:21 +0000 (09:27 -0800)]
Exclude /Interop/COM/NETClients/Events/NETClientEvent for arm32 Windows. (dotnet/coreclr#22785)

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

5 years agoStore information about partial ngen in R2R images (dotnet/coreclr#22680)
Michal Strehovský [Fri, 22 Feb 2019 14:44:01 +0000 (15:44 +0100)]
Store information about partial ngen in R2R images (dotnet/coreclr#22680)

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

5 years agoUpdate ReJIT/MethodDescBackpatchInfoTracker lock relationship (dotnet/coreclr#22741)
David Mason [Fri, 22 Feb 2019 07:59:54 +0000 (23:59 -0800)]
Update ReJIT/MethodDescBackpatchInfoTracker lock relationship (dotnet/coreclr#22741)

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

5 years agoDelete unused FEATURE flags (dotnet/coreclr#22781)
Jan Kotas [Fri, 22 Feb 2019 06:33:31 +0000 (22:33 -0800)]
Delete unused FEATURE flags (dotnet/coreclr#22781)

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

5 years agoFix CoreFX build break. (dotnet/coreclr#22773)
Sergey Andreenko [Fri, 22 Feb 2019 05:50:06 +0000 (21:50 -0800)]
Fix CoreFX build break. (dotnet/coreclr#22773)

* Fix CoreFX build break.

Introduced by https://github.com/dotnet/corefx/pull/34385.

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

5 years agoCleanup unnecessary COUNTER_ONLY (dotnet/coreclr#22759)
Jan Kotas [Fri, 22 Feb 2019 02:16:16 +0000 (18:16 -0800)]
Cleanup unnecessary COUNTER_ONLY (dotnet/coreclr#22759)

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

5 years agoAdd exception counter (dotnet/coreclr#22734)
Sung Yoon Whang [Fri, 22 Feb 2019 01:48:48 +0000 (17:48 -0800)]
Add exception counter (dotnet/coreclr#22734)

* Add exception counter

* Fix build

* Make FCall return UINT32

* Move GetExceptionCount to Exception

* more PR comments, fix x86 build

* Remove global variable initialization

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

5 years agoCorrect __CrossBuild in build-packages to be 0 or 1 (dotnet/coreclr#22769)
Jarret Shook [Fri, 22 Feb 2019 00:29:59 +0000 (16:29 -0800)]
Correct __CrossBuild in build-packages to be 0 or 1 (dotnet/coreclr#22769)

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

5 years agoMerge pull request dotnet/coreclr#22731 from briansull/issue-22436
Brian Sullivan [Thu, 21 Feb 2019 23:37:55 +0000 (15:37 -0800)]
Merge pull request dotnet/coreclr#22731 from briansull/issue-22436

Fix Issue 22436 - noway_assert  'expTyp == cseLclVarTyp' in optcse.cpp

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

5 years agoDo not use portablebuild=false for linux-musl (dotnet/coreclr#22760)
Jarret Shook [Thu, 21 Feb 2019 22:41:40 +0000 (14:41 -0800)]
Do not use portablebuild=false for linux-musl (dotnet/coreclr#22760)

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

5 years ago[XUnit] Use ParallelRun==Collections on all platforms. (dotnet/coreclr#22746)
Sergey Andreenko [Thu, 21 Feb 2019 22:38:42 +0000 (14:38 -0800)]
[XUnit] Use ParallelRun==Collections on all platforms. (dotnet/coreclr#22746)

* Use ParallelRun==Collections on all platforms.

* Fix formatting

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

5 years agoRemove unused perfcounter code (dotnet/coreclr#22742)
Sung Yoon Whang [Thu, 21 Feb 2019 22:19:27 +0000 (14:19 -0800)]
Remove unused perfcounter code (dotnet/coreclr#22742)

* removing references to COUNTER_ONLY, ENABLE_PERF_COUNTERS in src/vm directory

* removing perfcounters* files

* Fix build

* Remove PerfCounterSupportedBuild

* Some more cleanup on the GC side

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

5 years ago[Unix|*] Rework and share the logic for determining __DistroRid (dotnet/coreclr#22628)
Jarret Shook [Thu, 21 Feb 2019 21:16:33 +0000 (13:16 -0800)]
[Unix|*] Rework and share the logic for determining __DistroRid (dotnet/coreclr#22628)

* [Unix|*] Rework and share the logic for determining __DistroRid

This will consolidate all of our different functions which determine
the __DistroRid into one file. In addition, it will remove the unused
__HostDistroRid file.

Lastly, it corrects the rid choice when crossbuilding musl-arm64 as the
cross-rootfs non-portable build will correctly be picked up.

* Fix typo and use __BuildArch in place of __Arch

* Correct non-portable build decision

* Add error for missing redhat-release

* Fix redhat comparison

* Correct previous rhel or

* Fix cross scenerio

* Fix missed $

* Set __RuntimeId for runtest.proj

* Correct naming convention of file

* Address feedback and support -portablebuild=0

With this change:

1. build.sh and build-test.sh should build portable by default.
2. init-distro-rid.sh checks __PortableBuild=1. If so, then it must force rhel 6 and freebsd to __PortableBuild=0 and use the non-portable build
    - For __PortableBuild=0 init-distro-rid.sh sets the non-portable rid correctly to "${ID}.${VERSION_ID}-${buildArch}"

* Correct arguments

* Fix if to include then

* A few more changes to correct linux-musl-arm64

* Add error for non-cross build and correctly pass ROOTFS_DIR

* Correctly exit instead of echo

* Correct isCrossBuild and use rootfsDir only

* Add documentation

* Address feedback

* Rework rhel if

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

5 years agoincreasing LocalGC version to 3 for 3.0 (dotnet/coreclr#22751)
Maoni Stephens [Thu, 21 Feb 2019 19:54:27 +0000 (11:54 -0800)]
increasing LocalGC version to 3 for 3.0 (dotnet/coreclr#22751)

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

5 years agoClean up unused parameters around Assembly::Load (dotnet/coreclr#22716)
Marek Safar [Thu, 21 Feb 2019 18:54:17 +0000 (19:54 +0100)]
Clean up unused parameters around Assembly::Load (dotnet/coreclr#22716)

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

5 years agoMispelling
Brian Sullivan [Thu, 21 Feb 2019 17:53:40 +0000 (09:53 -0800)]
Mispelling

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

5 years agoSupport COM events (dotnet/coreclr#22721)
Aaron Robinson [Thu, 21 Feb 2019 17:51:10 +0000 (09:51 -0800)]
Support COM events (dotnet/coreclr#22721)

* Add support for COM events
* Add COM Event tests

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

5 years agoAdded enclosing brances for if/then stmts
Brian Sullivan [Thu, 21 Feb 2019 17:29:07 +0000 (09:29 -0800)]
Added enclosing brances for if/then stmts

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

5 years agoJIT: handle preference miss two register xmm return case (dotnet/coreclr#22733)
Andy Ayers [Thu, 21 Feb 2019 16:25:52 +0000 (08:25 -0800)]
JIT: handle preference miss two register xmm return case (dotnet/coreclr#22733)

Fix a bug in codegen when returning a Vector3 result where the target
register is not one of the two return registers.

Re-enable the associated test.

Closes dotnet/coreclr#22401.

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

5 years agoAdd VS debugging info to our instructions
Noah Falk [Thu, 21 Feb 2019 12:10:41 +0000 (04:10 -0800)]
Add VS debugging info to our instructions

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

5 years agoEnable the HWIntrinsic extension methods and remove the instance implementations...
Tanner Gooding [Thu, 21 Feb 2019 11:09:40 +0000 (03:09 -0800)]
Enable the HWIntrinsic extension methods and remove the instance implementations (dotnet/coreclr#22705)

* Removing various S.R.I.Vector instance method APIs, since they should now be exposed as extension methods

* Updating the JIT to recognize the S.R.I.Vector extension methods.

* Updating various S.R.I.Vector test templates

* Regenerating the S.R.I tests that are created from a template.

* Fixing the numArgs for Base_Vector256_GetLower

* Fixing the handling for `Base_VectorXXX_As` to normalize the struct type.

* Adding the Base_Vector128_As intrinsics back for arm64

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

5 years agoMove Thread to shared CoreLib (dotnet/corefxdotnet/coreclr#35462)
Filip Navara [Thu, 21 Feb 2019 02:23:41 +0000 (03:23 +0100)]
Move Thread to shared CoreLib (dotnet/corefxdotnet/coreclr#35462)

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

5 years agoReduce struct copy by 1 in ValueTask.GetAwaiter (dotnet/coreclr#22738)
Ben Adams [Thu, 21 Feb 2019 07:26:06 +0000 (07:26 +0000)]
Reduce struct copy by 1 in ValueTask.GetAwaiter (dotnet/coreclr#22738)

* Reduce struct copy by 1 in ValueTask.GetAwaiter

* Bit more explicit

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

5 years agoRemoved some dead code
Andrew Au [Wed, 20 Feb 2019 04:39:26 +0000 (20:39 -0800)]
Removed some dead code

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

5 years agoFix Isuue 22436 - noway_assert 'expTyp == cseLclVarTyp' in optcse.cpp
Brian Sullivan [Thu, 21 Feb 2019 00:26:38 +0000 (16:26 -0800)]
Fix Isuue 22436 - noway_assert  'expTyp == cseLclVarTyp' in optcse.cpp
We now allow TYP_BYREF to be compatible with TYP_I_IMPL when performing CSE substitutions.
Re-enable the failing BestFitMapping interop tests

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

5 years agoRemove accidentally added Windows.10.Nano.Amd64 from Windows_x86 in platform-matrix...
Egor Chesakov [Wed, 20 Feb 2019 22:43:35 +0000 (14:43 -0800)]
Remove accidentally added Windows.10.Nano.Amd64 from Windows_x86 in platform-matrix.yml (dotnet/coreclr#22723)

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

5 years agoFix dblarray tests and reenable for arm32 (dotnet/coreclr#22718)
Andy Ayers [Wed, 20 Feb 2019 20:39:02 +0000 (12:39 -0800)]
Fix dblarray tests and reenable for arm32 (dotnet/coreclr#22718)

Run the allocate/gen-check sequence under a forbid GC region, and enable the
tests for arm32.

Closes dotnet/coreclr#22015.

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

5 years agoUse ThrowHelper in ManualResetValueTaskSourceCore (dotnet/coreclr#22714)
Stephen Toub [Wed, 20 Feb 2019 19:36:56 +0000 (14:36 -0500)]
Use ThrowHelper in ManualResetValueTaskSourceCore (dotnet/coreclr#22714)

Just move the helper being used to ThrowHelper.

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

5 years agoUse Build.DefinitionName for Creator when submitting tests to Helix (dotnet/coreclr...
Egor Chesakov [Wed, 20 Feb 2019 19:35:58 +0000 (11:35 -0800)]
Use Build.DefinitionName for Creator when submitting tests to Helix (dotnet/coreclr#22692)

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

5 years agoFix tizen rootfs building (dotnet/coreclr#22715)
Konstantin Baladurin [Wed, 20 Feb 2019 19:13:35 +0000 (22:13 +0300)]
Fix tizen rootfs building (dotnet/coreclr#22715)

Move tizen-release package from base to unified repo

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

5 years agoFix bug introduced during cleanup in JapaneseLunisolarCalendar (dotnet/coreclr#22717)
Stephen Toub [Wed, 20 Feb 2019 18:34:32 +0000 (13:34 -0500)]
Fix bug introduced during cleanup in JapaneseLunisolarCalendar (dotnet/coreclr#22717)

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

5 years agoAllow Task.WaitAny completion to run synchronously (dotnet/coreclr#21245)
Ben Adams [Wed, 20 Feb 2019 18:32:40 +0000 (18:32 +0000)]
Allow Task.WaitAny completion to run synchronously (dotnet/coreclr#21245)

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

5 years agoAbstract deprecated and selectany for GCC and remove LLVM'ism where possible (dotnet...
Sinan Kaya [Wed, 20 Feb 2019 16:59:22 +0000 (11:59 -0500)]
Abstract deprecated and selectany for GCC and remove LLVM'ism where possible (dotnet/coreclr#22662)

* Abstract selectany

* Fix initializer element is not constant

src/corefx/System.Globalization.Native/pal_icushim.c:58:34: error: initializer element is not constant
 static const int MaxICUVersion = MinICUVersion + 20;

* Enable ms extensions

* Apply LLVM patterns to GCC

* Remove deprecated function

* Fix const conversion error

src/corefx/System.Globalization.Native/pal_calendarData.c:390:16: warning: passing argument 1 of ‘ures_close_ptr’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ures_close(erasResBundle);

src/corefx/System.Globalization.Native/pal_calendarData.c:419:22: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
char* name = GetCalendarName(calendarId);

* Remove old compiler option

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

5 years agoFix race condition in ManualResetValueTaskSourceCore (dotnet/coreclr#22711)
Stephen Toub [Wed, 20 Feb 2019 11:54:11 +0000 (06:54 -0500)]
Fix race condition in ManualResetValueTaskSourceCore (dotnet/coreclr#22711)

* Fix race condition in ManualResetValueTaskSourceCore

ManualResetValueTaskSourceCore.GetStatus is used from ValueTaskAwaiter.IsCompleted.  If GetStatus returns Success too early, then IsCompleted will also return true too early, which will result in GetResult being called too early.  This doesn't happen today when an MRVTSC is used sequentially.  But if an instance is pooled by the object its stored on getting put back into a pool as part of a call to the wrapper's GetResult, then we can end up in the following situation:
- Thread 1 starts an await on an instance containing an MRVTSC.  It calls IsCompleted.
- Thread 2 starts to complete that instance, getting as far as calling SignalCompletion and setting _completed to true but not yet setting _continuation.
- Thread 1 sees _completed == true and returns true from IsCompleted.  It calls GetResult, and the wrapper extracts the result from the instance, resets it, and puts it back into the pool.
- Thread 3 takes the object out of the pool and starts using it.
- Thread 2 continues SignalCompletion on that instance, and sets _continuation to the sentinel.
- Now Thread 3's instance's _continuation is the sentinel when it should be null.  If it calls SignalCompletion, it'll erroneously find that _continuation is not null and will queue _continuation/_continuationState for execution, resulting in the sentinel getting executed.  If it calls OnCompleted, it'll find that the _continuation is not null, and will queue the supplied continuation/state to execute immediately even though the operation may not yet actually be done.

The fix is simply to check not just _completed but also _continuation.  The operation is considered pending if either _completed is false, meaning SignalCompletion has not yet been called, or if _continuation is still null, meaning it's neither been set to the supplied delegate nor to the sentinel.  We can't just rely on _completed for the above outlined reasons, and we can't just rely on _continuation because it can be non-null if OnCompleted was called to hook up a callback (if we only cared about the await pattern, then we could just check _continuation and wouldn't need _completed, but we also need to support non-await access).

* Address PR feedback

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

5 years agoFix CLRDataCreateInstance export. This was breaking SOS. (dotnet/coreclr#22701)
Mike McLaughlin [Wed, 20 Feb 2019 07:16:25 +0000 (23:16 -0800)]
Fix CLRDataCreateInstance export. This was breaking SOS. (dotnet/coreclr#22701)

Fix CLRDataCreateInstance export. This was breaking SOS.

Added the right cmake magic so the function is exported properly.

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

5 years agoAdd ManagedRuntimeEventSource (dotnet/coreclr#22515)
Sung Yoon Whang [Wed, 20 Feb 2019 05:40:12 +0000 (21:40 -0800)]
Add ManagedRuntimeEventSource (dotnet/coreclr#22515)

* Adding a dummy ManagedRuntimeEventSource

* Add ManagedRuntimeEventSource

* Renaming ManagedRuntimeEventSource to RuntimeEventSource

* some cleanup

* use Condition instead of ifdefing out the whole file

* some cleanups

* remove unused namespaces

* Move m_RuntimeEventSource to RuntimeEventSource from EventPipeController

* Adding some TODO items

* address more pr comments

* Use GUID to initialize RuntimeEventSource

* Exclude BasicEventSourceTests from CoreFX test CI leg

* Addressing rest of the PR feedback

* dont dispose counters on disable command to avoid races

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

5 years agoEarly out from vectored exception handler on uninitialized threads (dotnet/coreclr...
Jan Kotas [Wed, 20 Feb 2019 04:48:19 +0000 (20:48 -0800)]
Early out from vectored exception handler on uninitialized threads (dotnet/coreclr#22702)

Fixes dotnet/coreclr#22698

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

5 years agoUse out arguments in UmAlQuraCalendar (dotnet/coreclr#22704)
Jan Kotas [Wed, 20 Feb 2019 04:38:15 +0000 (20:38 -0800)]
Use out arguments in UmAlQuraCalendar (dotnet/coreclr#22704)

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

5 years agoCleanup CoreLib makefiles (dotnet/coreclr#22706)
Jan Kotas [Wed, 20 Feb 2019 04:36:46 +0000 (20:36 -0800)]
Cleanup CoreLib makefiles (dotnet/coreclr#22706)

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

5 years agoAdding tannergooding to the arm64Users list. (dotnet/coreclr#22665)
Tanner Gooding [Wed, 20 Feb 2019 02:07:44 +0000 (18:07 -0800)]
Adding tannergooding to the arm64Users list. (dotnet/coreclr#22665)

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

5 years agoMerge pull request dotnet/coreclr#22656 from briansull/fix_arm64_assert
Brian Sullivan [Wed, 20 Feb 2019 01:31:27 +0000 (17:31 -0800)]
Merge pull request dotnet/coreclr#22656 from briansull/fix_arm64_assert

ARM64: Correct the assert to add R8 as a potential valid arg register

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

5 years agoFix formatting
Brian Sullivan [Tue, 19 Feb 2019 23:30:09 +0000 (15:30 -0800)]
Fix formatting

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

5 years agoUse RunContinuationsAsynchronously in SemaphoreSlim.WaitAsync (dotnet/coreclr#22686)
Stephen Toub [Tue, 19 Feb 2019 22:35:06 +0000 (17:35 -0500)]
Use RunContinuationsAsynchronously in SemaphoreSlim.WaitAsync (dotnet/coreclr#22686)

SemaphoreSlim.Release shouldn't invoke arbitrary continuations as part of its invocation, so when it dequeues a task waiter and goes to complete it, rather than just calling TrySetResult, it queues the task to the thread pool to have TrySetResult invoked there.  Now that we have RunContinuationsAsynchronously, though, we can just use that functionality instead.  This has two main benefits:
1. We avoid queueing a work item entirely if there are no continuations from the task.  This might happen, for example, if the semaphore is released so quickly after waiting on it that the WaitAsync caller hasn't yet hooked up a continuation, in which case the await on the WaitAsync task will just see IsCompleted as true and continue running.
2. We avoid queueing a work item when the task represents a synchronous Wait, which happens if there's already a pending WaitAsync when Wait goes to block.  The main benefit here is avoiding potential thread pool starvation, if threads in the pool are blocked in such Waits, and previously another thread pool thread would have been needed to run the queued work item to complete the synchronous Wait.

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

5 years agoCorrect the assert to add R8 as a potential valid register
Brian Sullivan [Sat, 16 Feb 2019 02:06:38 +0000 (18:06 -0800)]
Correct the assert to add R8 as a potential valid register
Also fix the calls to RemoveElemD to use lvVarIndex
Re-enable the interop tests that were failing on ARM64

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

5 years agoCleanup Calendars code (dotnet/coreclr#22582)
Hugh Bellamy [Tue, 19 Feb 2019 21:33:26 +0000 (21:33 +0000)]
Cleanup Calendars code (dotnet/coreclr#22582)

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

5 years agoFixing extension method overload resolution for some S.R.I.Vector methods (dotnet...
Tanner Gooding [Tue, 19 Feb 2019 21:24:30 +0000 (13:24 -0800)]
Fixing extension method overload resolution for some S.R.I.Vector methods (dotnet/coreclr#22696)

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

5 years agoUse testGroup for defining test jobs (dotnet/coreclr#22608)
Egor Chesakov [Tue, 19 Feb 2019 18:12:43 +0000 (10:12 -0800)]
Use testGroup for defining test jobs (dotnet/coreclr#22608)

This adds a mapping between testGroup string and values of the following parameters:

* scenarios
* priority
* timeoutTotalInMinutes
* timeoutPerTestCollectionInMinutes
* timeoutPerTestInMinutes

and uses testGroup on a level of azure-pipeline.yml to set these values.

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

5 years agoEnable telemetry for official builds
Russ Keldorph [Fri, 15 Feb 2019 23:47:01 +0000 (15:47 -0800)]
Enable telemetry for official builds

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

5 years agoOptimize Vector128/256<T>.Get/WithElement (dotnet/coreclr#22353)
Fei Peng [Tue, 19 Feb 2019 15:50:15 +0000 (07:50 -0800)]
Optimize Vector128/256<T>.Get/WithElement (dotnet/coreclr#22353)

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

5 years agoAdding an update-dependencies.cmd script, like CoreFX has. (dotnet/coreclr#22672)
Tanner Gooding [Tue, 19 Feb 2019 15:29:07 +0000 (07:29 -0800)]
Adding an update-dependencies.cmd script, like CoreFX has. (dotnet/coreclr#22672)

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

5 years agoFail loading types with default interface methods for fragile ngen (dotnet/coreclr...
Michal Strehovský [Tue, 19 Feb 2019 12:47:50 +0000 (13:47 +0100)]
Fail loading types with default interface methods for fragile ngen (dotnet/coreclr#22603)

We are not generating the right data structures for this. Since fragile crossgen is no longer a mainstream scenario, it's not worth the effort to add default interface methods support for it.

This avoids `!"Precode::GetPrecodeFromEntryPoint: Unexpected code in precode"` and similar issues.

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

5 years agoAdjust gc stress compatibility settings for two tests (dotnet/coreclr#22633)
Andy Ayers [Tue, 19 Feb 2019 07:43:46 +0000 (23:43 -0800)]
Adjust gc stress compatibility settings for two tests (dotnet/coreclr#22633)

* enable eventsourcetrace for gc stress. Closes dotnet/coreclr#17188.
* disable GitHub_12224 for gc stress (relies on timeout). Closes dotnet/coreclr#19086.

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

5 years agoUse correct version for Microsoft.NETCore.Platforms (dotnet/coreclr#22683)
Jan Kotas [Tue, 19 Feb 2019 00:38:20 +0000 (16:38 -0800)]
Use correct version for Microsoft.NETCore.Platforms (dotnet/coreclr#22683)

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

5 years agoRemove resetting of unmanaged thread locale from thread pool APIs (dotnet/coreclr...
Jan Kotas [Tue, 19 Feb 2019 00:37:19 +0000 (16:37 -0800)]
Remove resetting of unmanaged thread locale from thread pool APIs (dotnet/coreclr#22682)

The cost of doing this is showing up in the TechEmpower profiles. There is a lot of thread locale state in unmanaged libraries and OS APIs that the threadpool friendly code has to be aware off. It does not make sense to keep reseting just the Locale.

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

5 years agoFix constrained call corner cases (dotnet/coreclr#22464)
Michal Strehovský [Mon, 18 Feb 2019 16:19:55 +0000 (17:19 +0100)]
Fix constrained call corner cases (dotnet/coreclr#22464)

Fixes dotnet/coreclr#22423. I'm still unclear on how JitStress manages to get itself into that situation, but I was able to write a repro that triggers the `!pMDAfterConstraintResolution->IsInterface()` assert using regular IL, so we need to handle that either way. The repro for that is constrained3.il.

While figuring out the repro, I wrote a bunch of other test code and found another bug (constrained2), where we would box in a situations that doesn't require boxing (canonically ambiguous situation where there's a suitable default interface implementation and a valuetype implementation of the constrained method that does not requires boxing once we no longer deal with __Canon).

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

5 years agoFix warning causing error in warning as error (Windows) (dotnet/coreclr#22660)
Ben Adams [Mon, 18 Feb 2019 08:17:13 +0000 (08:17 +0000)]
Fix warning causing error in warning as error (Windows) (dotnet/coreclr#22660)

BOOL -> bool conversion

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

5 years agoFix Integer Rounding issue and duplicate definition of __deref in sal.h (dotnet/corec...
Sinan Kaya [Mon, 18 Feb 2019 05:12:28 +0000 (00:12 -0500)]
Fix Integer Rounding issue and duplicate definition of __deref in sal.h (dotnet/coreclr#22645)

* Fix large integer truncation

pal/pal.h:4988:43:
warning: large integer implicitly truncated to unsigned type
[-Woverflow]
     static const SIZE_T NoTargetFrameSp = SIZE_MAX;
                                                ^~~~~~~~

* Fix compilation error with GCC

/usr/include/c++/7.3.0/debug/functions.h:452:15: error: expected unqualified-id before ')' token
       __deref();
               ^
/usr/include/c++/7.3.0/debug/functions.h:455:34: error: expected primary-expression before '<' token
       typename = decltype(__deref<_It>() < __deref<_It>())>
                                  ^
/usr/include/c++/7.3.0/debug/functions.h:455:38: error: expected primary-expression before '>' token
       typename = decltype(__deref<_It>() < __deref<_It>())>
                                      ^
/usr/include/c++/7.3.0/debug/functions.h:455:40: error: expected primary-expression before ')' token
       typename = decltype(__deref<_It>() < __deref<_It>())>
                                        ^

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

5 years agoDelete RtlMoveMemory and tests (dotnet/coreclr#22668)
Adeel Mujahid [Mon, 18 Feb 2019 04:29:23 +0000 (06:29 +0200)]
Delete RtlMoveMemory and tests (dotnet/coreclr#22668)

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

5 years agoFix the build of Loader/NativeLib test (dotnet/coreclr#22648)
Swaroop Sridhar [Sun, 17 Feb 2019 21:27:41 +0000 (13:27 -0800)]
Fix the build of Loader/NativeLib test (dotnet/coreclr#22648)

The native test assets were not build correctly on Unix platforms.
The native library exports were generated as private symbols by clang.

This change fixes the export declaration so that the global symbols are
correctly generated for exported symbols.

Fixes dotnet/coreclr#22549

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

5 years agoOnly import the RoslynPropsFile if it exists. (dotnet/coreclr#22657)
Tanner Gooding [Sun, 17 Feb 2019 03:38:04 +0000 (19:38 -0800)]
Only import the RoslynPropsFile if it exists. (dotnet/coreclr#22657)

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

5 years agoFix visibility and signed comparison issues for GCC (dotnet/coreclr#22586)
Adeel Mujahid [Sun, 17 Feb 2019 01:50:17 +0000 (03:50 +0200)]
Fix visibility and signed comparison issues for GCC (dotnet/coreclr#22586)

* Fix visibility and signed comparison issues for GCC

* Fix hidden _CLRDataCreateInstance warned by macOS

* Fix indentation in vswprintf/test1

* Change void* to PVOID in implementation files

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

5 years agoAvoid pulling in Lazy<T> during startup (dotnet/coreclr#22659)
Jan Kotas [Sun, 17 Feb 2019 01:49:06 +0000 (17:49 -0800)]
Avoid pulling in Lazy<T> during startup (dotnet/coreclr#22659)

Environment constructor runs on every startup path. Remove dependency on Lazy<T> from it.

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

5 years agoMerge pull request dotnet/coreclr#22528 from mikedn/idx-addr
Carol Eidt [Sat, 16 Feb 2019 15:06:45 +0000 (07:06 -0800)]
Merge pull request dotnet/coreclr#22528 from mikedn/idx-addr

Fix genCodeForIndexAddr

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

5 years ago[master] Update dependencies from dotnet/corefx (dotnet/coreclr#22595)
dotnet-maestro[bot] [Sat, 16 Feb 2019 07:50:21 +0000 (23:50 -0800)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#22595)

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

This change updates the following dependencies
- Microsoft.NETCore.Platforms - 3.0.0-preview4.19113.23
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview4.19113.23

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

This change updates the following dependencies
- Microsoft.NETCore.Platforms - 3.0.0-preview4.19115.1
- Microsoft.Private.CoreFx.NETCoreApp - 4.6.0-preview4.19115.1

* Fixing up the tests dependent on the S.R.I.Vector API changes

* Regenerating the tests dependent on the S.R.I.Vector API changes

* Disabling an outdated CoreFX test.

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

5 years agoSet the 'PLATFORM_OSX' constant during OSX build (dotnet/coreclr#22639)
Aaron Robinson [Sat, 16 Feb 2019 05:28:50 +0000 (21:28 -0800)]
Set the 'PLATFORM_OSX' constant during OSX build (dotnet/coreclr#22639)

* Set the 'PLATFORM_OSX' constant during OSX build

* Remove PLATFORM_OSX define from SPCL

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

5 years agoFix bug in FindDispatchSlot usage
Aaron Robinson [Sat, 16 Feb 2019 05:25:08 +0000 (21:25 -0800)]
Fix bug in FindDispatchSlot usage

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

5 years agoUpdate BuildTools, IbcData, PgoData to 3.0.0-preview1-03715-01, master-20190208.1...
Tanner Gooding [Sat, 16 Feb 2019 05:11:56 +0000 (21:11 -0800)]
Update BuildTools, IbcData, PgoData to 3.0.0-preview1-03715-01, master-20190208.1, master-20190208.1, respectively (master) (dotnet/coreclr#22647)

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

5 years agoUpdating some local functions to be 'static' (captureless). (dotnet/coreclr#22635)
Tanner Gooding [Fri, 15 Feb 2019 23:17:52 +0000 (15:17 -0800)]
Updating some local functions to be 'static' (captureless). (dotnet/coreclr#22635)

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

5 years agoJIT: modify how jit determines when to update a type (dotnet/coreclr#22618)
Andy Ayers [Fri, 15 Feb 2019 22:39:33 +0000 (14:39 -0800)]
JIT: modify how jit determines when to update a type (dotnet/coreclr#22618)

For single-def locals, the type of a reference seen at the assignment to the
local may be a more specific type than the local's declared type. If so the jit
would prefer to use the assignment type to describe the local's value, as this
will lead to better optimization. For instance in
```
    object x = "a string";  // only assignment to x
```
the jit can optimize better if it models the type of `x` as `string`.

Instead of relying on `mergeClasses` plus some jit-side screening to decide if
the assignment type is a more specific type, implement a new jit interface
method `isMoreSpecificType` that tries to answer this question more directly.

Added a test case with type equivalence that hit asserts.

Closes dotnet/coreclr#22583.

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

5 years agoDisable arm64 contracts. (dotnet/coreclr#22605)
Sergey Andreenko [Fri, 15 Feb 2019 22:03:47 +0000 (14:03 -0800)]
Disable arm64 contracts. (dotnet/coreclr#22605)

* Fix ifdef for `g_DbgSuppressAllocationAsserts`.

It needs to be defined under `FEATURE_INTEROP_DEBUGGING`.

* Unify contracts disabling for UNIX/ARM.

It also disables some parts that were disabled for ARM, but not for UNIX.
It fixes the difference that we see between ARM32 and ARM64 Unix Checked.

* Disable contracts on arm64.

FIxes the difference that we see between windows arm32 and arm64 in checked/debug builds.

* Revert CoreFX arm64 timeout change.

That is no longer necessary.

* Reenable arm64 corefx jobs.

They should not fail with timeouts anymore.

* Don't allow `g_DbgSuppressAllocationAsserts` defnition in release builds.

* delete AssertAllocationAllowed

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

5 years agoPort profiler howtos from David Broman's blog to the documentation folder (dotnet...
David Mason [Fri, 15 Feb 2019 22:02:31 +0000 (14:02 -0800)]
Port profiler howtos from David Broman's blog to the documentation folder (dotnet/coreclr#22363)

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

5 years agoPublish version to dotnet/versions
Steve MacLean [Mon, 11 Feb 2019 21:39:44 +0000 (16:39 -0500)]
Publish version to dotnet/versions

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

5 years agoFix UpdatePublishedVersions.ps1
Steve MacLean [Thu, 14 Feb 2019 21:04:47 +0000 (16:04 -0500)]
Fix UpdatePublishedVersions.ps1

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

5 years agoWiden index to a temporary register
Mike Danes [Fri, 15 Feb 2019 18:56:59 +0000 (20:56 +0200)]
Widen index to a temporary register

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

5 years agoDelete references to System.Memory package that does not exist anymore (dotnet/corecl...
Jan Kotas [Fri, 15 Feb 2019 19:23:45 +0000 (11:23 -0800)]
Delete references to System.Memory package that does not exist anymore (dotnet/coreclr#22626)

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

5 years agoDisable failing corefx test (dotnet/coreclr#22625)
Jan Kotas [Fri, 15 Feb 2019 18:25:05 +0000 (10:25 -0800)]
Disable failing corefx test (dotnet/coreclr#22625)

Related to https://github.com/dotnet/corefx/issues/35351

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

5 years agoManually update the dependencies.props and move S.P.Corelib to use LangVersion=8...
Tanner Gooding [Fri, 15 Feb 2019 17:20:37 +0000 (09:20 -0800)]
Manually update the dependencies.props and move S.P.Corelib to use LangVersion=8.0 (dotnet/coreclr#22452)

* Update BuildTools to preview1-03713-01 (master)

* Updating CoreCLR to use LangVersion=8.0

* Moving the Windows scripts to default to `dotnet msbuild` for managed components

* Setting UseSharedCompilation=true

* Changing some additional callsites that were using msbuild to use dotnet msbuild

* Revert packages.builds to use Desktop msbuild on Windows

* Fixing runtest.cmd to always set DotNetCli

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

5 years agoReserve fast dictionary slots for Tier1 code (dotnet/coreclr#22619)
Jan Kotas [Fri, 15 Feb 2019 16:20:12 +0000 (08:20 -0800)]
Reserve fast dictionary slots for Tier1 code (dotnet/coreclr#22619)

Disable use of fast dictionary slots for R2R images when tiered JITing is enabled.

Fixes dotnet/coreclr#22400

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

5 years agoRemove CoreLib's src\Interop\Windows directory (dotnet/coreclr#22622)
Stephen Toub [Fri, 15 Feb 2019 16:05:07 +0000 (11:05 -0500)]
Remove CoreLib's src\Interop\Windows directory (dotnet/coreclr#22622)

It contains only one file with an interop signature that's not actually being used. Deleting the dup.

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

5 years agoFix CoreFX build breaks
Jan Kotas [Fri, 15 Feb 2019 08:11:29 +0000 (00:11 -0800)]
Fix CoreFX build breaks

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

5 years agoFixing the number formatting code to only recognize 'R' for double/float. (dotnet...
Tanner Gooding [Fri, 15 Feb 2019 06:24:40 +0000 (22:24 -0800)]
Fixing the number formatting code to only recognize 'R' for double/float. (dotnet/coreclr#22613)

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

5 years agoMove Reflection.Emit Tokens to shared partition (dotnet/coreclr#22602)
Marek Safar [Fri, 15 Feb 2019 02:28:01 +0000 (03:28 +0100)]
Move Reflection.Emit Tokens to shared partition (dotnet/coreclr#22602)

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

5 years agoMissed optimization from dotnet/coreclr#22497
Grant [Fri, 15 Feb 2019 02:21:52 +0000 (18:21 -0800)]
Missed optimization from dotnet/coreclr#22497

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

5 years agoRemove unnecessary ProjectReferences to CoreCLRTestLibrary (dotnet/coreclr#22539)
Egor Chesakov [Fri, 15 Feb 2019 01:26:18 +0000 (17:26 -0800)]
Remove unnecessary ProjectReferences to CoreCLRTestLibrary (dotnet/coreclr#22539)

Remove the ProjectReferences to CoreCLRTestLibrary.csproj in the project files where CoreCLRTestLibrary is not actually being used.

Each ProjectReference item is ended up in PrepareProjectReferences target that creates unnecessary items.

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

5 years agoReplace multi-loaderallocator hash implementation in MethodDescBackpatchInfo (dotnet...
David Wrighton [Fri, 15 Feb 2019 01:07:14 +0000 (17:07 -0800)]
Replace multi-loaderallocator hash implementation in MethodDescBackpatchInfo (dotnet/coreclr#22285)

* GCHeapHash
- Hashtable implementation for runtime use
- Implementation written in C++
- Data storage in managed heap memory
- Based on SHash design, but using managed memory

CrossLoaderAllocatorHash
- Hash for c++ Pointer to C++ pointer where the lifetimes are controlled by different loader allocators
 - Support for add/remove/visit all entries of 1 key/visit all entries/ remove all entries of 1 key
- Supports holding data which is unmanaged, but data items themselves can be of any size (key/value are templated types)

* Swap MethodDescBackpatchInfo to use the CrossLoaderAllocatorHash

* The MethodDescBackpatchCrst needs to be around an allocation
- Adjust the Crst so that it can safely be used around code which allocates
- Required moving its use out from within the EESuspend logic used in rejit

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