Stephen Toub [Tue, 10 Sep 2019 01:10:07 +0000 (21:10 -0400)]
Remove use of WeakReference from corelib (dotnet/coreclr#26597)
Only remaining use is the one place it shows up in public API, in GC.GetGeneration(WeakReference).
Commit migrated from https://github.com/dotnet/coreclr/commit/
778cc84ed4321cb5b3990e6bb683be4ee56bb8a1
Tyler Brinkley [Tue, 10 Sep 2019 01:08:53 +0000 (20:08 -0500)]
Make StringComparer.Create throw ArgumentNullException (dotnet/coreclr#26570)
* Make StringComparer.Create throw ArgumentNullException
Throws proper exception.
* Update CoreFX.issues.rsp
Commit migrated from https://github.com/dotnet/coreclr/commit/
69ff008fde9a23996029c4fa25b6f4fba4d815cf
Stephen Toub [Tue, 10 Sep 2019 01:07:56 +0000 (21:07 -0400)]
Remove remaining ToLower() use from corelib (dotnet/coreclr#26602)
Also happens to save a string allocation, but that's a drop in the bucket in this function.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4432a27c3b221cc0398a3b7be5d372bd4986a980
Stephen Toub [Tue, 10 Sep 2019 01:07:44 +0000 (21:07 -0400)]
Remove sub-array allocation from GetManifestResourceNamesList (dotnet/coreclr#26601)
Also removes dependency on System.Range and RuntimeHelpers.GetSubArray in a simple console app such that they can be trimmed away.
Commit migrated from https://github.com/dotnet/coreclr/commit/
86fadd1f51a8d3a4276cc64ae830161503846a9a
Stephen Toub [Tue, 10 Sep 2019 01:07:33 +0000 (21:07 -0400)]
Remove Lazy/LazyInitializer from mscorlib.h (dotnet/coreclr#26603)
We do not need to special-case these types for reflection invocation, and doing so is currently keeping them from being trimmed when not otherwise used.
Commit migrated from https://github.com/dotnet/coreclr/commit/
70202b04cab861c7f3fd504a08e33153c2739d73
Steve MacLean [Mon, 9 Sep 2019 23:43:27 +0000 (19:43 -0400)]
Abort FuncEval on unaligned SP (dotnet/coreclr#26572)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3b177c44a3005cd5733ec4f94b6c1408abbc4290
Sergey Andreenko [Mon, 9 Sep 2019 23:36:06 +0000 (16:36 -0700)]
Fix the loop iterator in `CheckNoTransformableIndirectCallsRemain`. (dotnet/coreclr#26599)
The error was made in 2017 https://github.com/dotnet/coreclr/commit/dotnet/coreclr@
654fed28001085adc162de1ea3207e9a22230235.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eed279f32ae3eeb5e959fc27d54372960382644e
John Salem [Mon, 9 Sep 2019 18:32:48 +0000 (11:32 -0700)]
Add a check to ensure that there are not any zombied Diagnostics IPC sockets on Linux and error in a readable manner if we are unable to clean them up before running the test (dotnet/coreclr#26573)
Commit migrated from https://github.com/dotnet/coreclr/commit/
336662ca1bde4973ce4e2a33f0bee09f1adb5b6e
Jeremy Koritzinsky [Mon, 9 Sep 2019 18:14:48 +0000 (11:14 -0700)]
Remove unused CMake command to build native test assets as par… (dotnet/coreclr#26454)
Commit migrated from https://github.com/dotnet/coreclr/commit/
2af6907b5258ac3e13d7938f2c22db81eb0af5aa
mikedn [Mon, 9 Sep 2019 17:09:17 +0000 (20:09 +0300)]
Stop using LIST nodes for CALL arg lists (dotnet/coreclr#26392)
* Stop using GT_LIST in GenTreeCall
* Clarify optAssertionGenJtrue code
* Cleanup optCreateAssertion
* Cleanup AddHiddenArgument
* Cleanup impInlineIsGuaranteedThisDerefBeforeAnySideEffects
Commit migrated from https://github.com/dotnet/coreclr/commit/
667222e7cee75c0473e2e6b3a9c89dd5043ff176
Marek Safar [Mon, 9 Sep 2019 16:58:25 +0000 (18:58 +0200)]
Move TypedReference::SetTypedReference exception throw to managed (dotnet/coreclr#26596)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7c9432c3ee874d8d5c4b1e5f38670ebef43bfb3f
Michal Strehovský [Wed, 4 Sep 2019 16:03:14 +0000 (18:03 +0200)]
Add project files
Commit migrated from https://github.com/dotnet/coreclr/commit/
5dc16c89311f4508ff05ffff15b4437bee3950a5
Michal Strehovský [Fri, 6 Sep 2019 14:48:52 +0000 (16:48 +0200)]
Do not precompile crossgen2
build-test.cmd limits precompilation to things that are directly in CORE_ROOT. We should do the same on Unix.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b660fc665a76b490e882d4ec993139b903cda2d
Tomas [Sat, 7 Sep 2019 18:10:33 +0000 (20:10 +0200)]
Exclude crossgen2 from CoreCLR test dependencies
Commit migrated from https://github.com/dotnet/coreclr/commit/
a1c32fc2fbdfb054a1548b861d4cf52075c3bca9
dotnet-bot [Mon, 9 Sep 2019 08:37:58 +0000 (10:37 +0200)]
Initial population of crossgen2 sources from CoreRT repo as of commit dotnet/coreclr@
48b4932a57a8aa3a2be45560ac9cac51003dd8b3
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce1c7ed76cc113396cbbf25329b99089af6cc784
Konstantin Baladurin [Mon, 9 Sep 2019 15:40:14 +0000 (00:40 +0900)]
Linux/x86: fix build (dotnet/coreclr#26594)
Commit migrated from https://github.com/dotnet/coreclr/commit/
82f0870166f8c6a1c34497f5f088cdcebb4a33f7
Stephen Toub [Mon, 9 Sep 2019 13:50:16 +0000 (09:50 -0400)]
Replace HashHelpers.Combine with HashCode.Combine (dotnet/coreclr#26589)
* Replace HashHelpers.Combine with HashCode.Combine
* Address PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
1894302e7031a4677191dc383b781a89cca9bd2c
Michal Strehovský [Sun, 8 Sep 2019 20:00:18 +0000 (22:00 +0200)]
Mark unsafe intrinsics as reflection blocked
Keeping these reflection enabled pulls in quite a bit of junk (generic dictionaries, standalone method bodies, bookkeeping) that adds up to 1.5% of the size of Hello World...
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
87d194f3ecc0b41e95b43e3132e947feb9e6514b
Stephen Toub [Sat, 7 Sep 2019 14:47:49 +0000 (10:47 -0400)]
Fix race conditions in CultureInfo.GetCultureInfoHelper (dotnet/coreclr#26567)
The implementation reads the current value of the static cache field and then later overwrites that field with the originally read value. If ClearCachedData was called in the interim to clear the cached data, this will end up effectively undoing part of that clearing, as it'll end up restoring the previous cache. The fix is to write back the new reference only when we need to, which we could do when we detect it's null.
There's a secondary race condition this fixes as well. When a name and an altname are used with CultureInfo.GetCurrentCulture(string, string), the implementation was publishig the newly created instance into the dictionary under the lock, but then after the lock was released, it was setting that TextInfo to be read-only. That provides a window where another thread could see it as non-read-only and mutate it. The fix is to ensure it's marked as read-only fully before it's published.
As I was doing this, it struck me that the implementation was overly complicated, trying to merge three different code paths for three different callers, presumably to share code, but most of the code ended up not being shared anyway, which just made the code harder to follow for little gain. So, I split it back out into the three calling functions and removed the helper.
I also changed the locking mechanism. It had been using a single shared lock to protect all state, but the purpose of the lock is really just to synchronize access to an individual dictionary, so we can just lock on the relevant dictionary.
Commit migrated from https://github.com/dotnet/coreclr/commit/
456afea9fbe721e57986a21eb3b4bb1c9c7e4c56
Sergey Andreenko [Sat, 7 Sep 2019 08:35:59 +0000 (01:35 -0700)]
Add a repro for GitHub_26311. (dotnet/coreclr#26553)
* Add a repro for GitHub_26311.
Add an IL test that reproduces GitHub_26311 without using external functions and stress modes.
The test uses tail call opcode to force tail call to VSD over generic class via a slow helper.
* Exclude the test for windows x64.
Commit migrated from https://github.com/dotnet/coreclr/commit/
1416a9c8703be562f3f01ed3da5825e3c3a1c286
Stephen Toub [Thu, 5 Sep 2019 21:15:13 +0000 (17:15 -0400)]
Fix IDE0026 (use expression-bodied members for indexers)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bd8e35e41e6a6e626c4fc623845ec40b7704d109
Stephen Toub [Thu, 5 Sep 2019 14:12:31 +0000 (10:12 -0400)]
Use null coalescing assignment operator in more places
There's currently no auto-fix for this, so the fixes were done manually.
Commit migrated from https://github.com/dotnet/coreclr/commit/
208d864733c86e00499b15b310fe661a9aacc7ba
Stephen Toub [Fri, 6 Sep 2019 13:08:45 +0000 (09:08 -0400)]
Remove stale SuppressMessage attributes (dotnet/coreclr#26501)
Commit migrated from https://github.com/dotnet/coreclr/commit/
94f6badbea1eb09104041bba01273b4a39a2d4a2
Vitek Karas [Fri, 6 Sep 2019 10:59:09 +0000 (03:59 -0700)]
Remove unnecessary file handle parameter in PEImageLayout methods (dotnet/coreclr#26530)
The handle is always the owner's PEImage->GetFileHandle, and so the PEImageLayout can call that instead of passing it around through parameters.
Commit migrated from https://github.com/dotnet/coreclr/commit/
af62a24b0452392a461a4402ffad0c6320f41d9d
mikedn [Thu, 5 Sep 2019 19:35:32 +0000 (22:35 +0300)]
Fix broken float compare mapping to VNFunc (dotnet/coreclr#20782)
* Fix broken float compare mapping to VNFunc
The existing code uses GTF_UNSIGNED instead of GTF_RELOP_NAN_UN to select unordered VN funcs.
* Rename relopFuncs
Commit migrated from https://github.com/dotnet/coreclr/commit/
f23c07f692e4ce8cf6385afb7246b7cfbeff28ee
mikedn [Thu, 5 Sep 2019 18:10:30 +0000 (21:10 +0300)]
Pull struct type info out of GenTreeObj (dotnet/coreclr#21705)
* Introduce ClassLayout
* Delete unused getStructGcPtrsFromOp
* Use ClassLayout in GenTreeObj/Blk
* Use ClassLayout in LclVarDsc
* Remove layout info from GenTreePutArgStk
* Always initialze ClassLayout GC layout
* Make ClassLayout::GetGCPtrs private
* Restore genAdjustStackForPutArgStk asserts
* Comments
* Put layout related code in new files
* More comments and small tweaks
Commit migrated from https://github.com/dotnet/coreclr/commit/
9479f67577bbb02ea611777b00308f42252fb2bc
Fadi Hanna [Thu, 5 Sep 2019 17:35:04 +0000 (10:35 -0700)]
Fixes around the GetModuleIfLoaded and related APIs (dotnet/coreclr#26516)
* Enabling precompiled generics to be loaded from the root entrypoint R2R module.
Include R2RDump tool changes that match the CoreRT cross module signatures in the instantiations table
Commit migrated from https://github.com/dotnet/coreclr/commit/
21d651bb4613ca480cd97793fe5d854af36b765c
jiangzeng01 [Thu, 5 Sep 2019 16:29:30 +0000 (00:29 +0800)]
Add 3 EventPipe tests about GC (dotnet/coreclr#26429)
* Add 3 EventPipe tests about GC
* Set eventpipe tests priority to 1
Commit migrated from https://github.com/dotnet/coreclr/commit/
363e42ca38a3846d18c0c07bdb71594fdba235d2
Vladimir Sadov [Thu, 5 Sep 2019 13:17:25 +0000 (06:17 -0700)]
GC long running tests (dotnet/coreclr#26489)
* - add gc-longrunning pipeline to run GC long running tests.
- make GC reliability framework one of GC long running tests.
* Temporarily enable Win10.ARM64 helix queue - for this PR only
* increase timeouts
* fewer inner cycles per one iteration in slower tests.
* Final touches - increase GC reliability Framework timeout to 60min.
remove Windows.10.Arm64.Open from the platform matrix (was added temporarily just to test this PR)
* Disable ARM for now.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6b3b77a181176b9a83c4a8d1bf40ef6b8981da64
Bruce Forstall [Thu, 5 Sep 2019 00:37:13 +0000 (17:37 -0700)]
Add regularly scheduled runs for additional pipelines (dotnet/coreclr#26515)
Pipelines: jitstress-isas-arm, jitstress-isas-x86, jitstressregs-x86.
Only once per week currently, on weekends.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f821e2ac58f096bf5c5a830064345c5b16f1db27
Sung Yoon Whang [Thu, 5 Sep 2019 00:16:06 +0000 (17:16 -0700)]
Improve eventcounter test (dotnet/coreclr#26517)
Commit migrated from https://github.com/dotnet/coreclr/commit/
043549f42cd402d4af3513e185bd0f3fae9fd2fb
Koundinya Veluri [Wed, 4 Sep 2019 18:23:37 +0000 (11:23 -0700)]
Don't use code rejitted at tier 1 when the JIT falls back to min-opts due to method size/complexity (dotnet/coreclr#26503)
Fixes https://github.com/dotnet/coreclr/issues/26419
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0df78cff9e2a1a0bbb669420a120444657913b2
Next Turn [Wed, 4 Sep 2019 18:22:25 +0000 (02:22 +0800)]
Remove unnecessary !s for [DoesNotReturn] (dotnet/coreclr#26512)
Commit migrated from https://github.com/dotnet/coreclr/commit/
823f586da0bbcfba48dd0c456af8fddbb8f780d2
Stephen Toub [Wed, 4 Sep 2019 17:57:13 +0000 (13:57 -0400)]
Fix StyleCop tuple warnings (dotnet/coreclr#26514)
A few PRs crossed such that PR validation passed but master is issuing lots of warnings-as-errors.
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4a84e2b9260388cce41634476dadf12aef39c8a
Stephen Toub [Wed, 4 Sep 2019 17:16:07 +0000 (13:16 -0400)]
Restore partial Corelib build support in VS (dotnet/coreclr#26511)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8bab017e5d036c58dd2694d3130a08d35bb95f97
Austin Wise [Wed, 4 Sep 2019 17:04:23 +0000 (10:04 -0700)]
Fix print when failing to load coredistools. (dotnet/coreclr#26473)
Commit migrated from https://github.com/dotnet/coreclr/commit/
a5b4b5883bb788d1dedf2694b9a88fa8137d2895
Jakob Botsch Nielsen [Wed, 4 Sep 2019 16:32:41 +0000 (09:32 -0700)]
Refactor tailcall decisions out of fgMorphCall (dotnet/coreclr#26158)
* Refactor tailcall decisions out of fgMorphCall
Introduce fgMorphPotentialTailCall to simplify the control flow of
tailcall morph.
* Fix formatting
* Some minor fixes including build break fix
* Set tailcalls to void return type again
Missed change during the refactoring
* Fix formatting again
* Fix formatting again again
* Add some helpful comments
* Return new node for finished morph instead
Commit migrated from https://github.com/dotnet/coreclr/commit/
23d2d3dd98aaf9ce098ed12f70ecf0442fa9302f
Stephen Toub [Wed, 4 Sep 2019 03:51:50 +0000 (23:51 -0400)]
Fix several recently added StyleCop tuple rules (dotnet/corefxdotnet/coreclr#40794)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
a43b2abba24c90058b1eeaf12d2241a66619acde
Stephen Toub [Wed, 4 Sep 2019 15:58:36 +0000 (11:58 -0400)]
Remove `readonly` from GCHandle field on Gen2GcCallback (dotnet/coreclr#26509)
GCHandle is mutable, and this type does call Free on the handle, but with it marked as readonly, the mutations performed by Free will be done on a copy rather than on the original.
Commit migrated from https://github.com/dotnet/coreclr/commit/
85bec20cfeed5d364f7298d94fa37ca11f0accff
Stephen Toub [Wed, 4 Sep 2019 15:21:59 +0000 (11:21 -0400)]
Use expression-bodied members in more places (dotnet/coreclr#26500)
* Fix IDE0027 (use expression body for accessors)
* Fix IDE0023 / IDE0024 (use expression body for operators)
* Apply suggestions from code review
Co-Authored-By: Adam Sitnik <adam.sitnik@gmail.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b9509e01b9e1f840b990c56f5b4dfce33002896
Andrew Au [Wed, 4 Sep 2019 14:27:23 +0000 (07:27 -0700)]
ImproveComments - making sure the comment is accurately describing the code (dotnet/coreclr#26442)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e184d3deb448318a645d6bf7d51389e382344c3b
Stephen Toub [Wed, 4 Sep 2019 13:19:57 +0000 (09:19 -0400)]
Update StyleCop.Analyzers to same verison used by corefx (dotnet/coreclr#26499)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9382509c4f36f5681ae62d1fd47a09d2d8282c07
Stephen Toub [Tue, 3 Sep 2019 22:07:33 +0000 (18:07 -0400)]
Update analyzer versions (dotnet/corefxdotnet/coreclr#40778)
In particular to pick up StyleCop fixes related to C# 8 and nullability.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
d2ecc4dc905b3c7dd49004687e7bb80dda98cbe3
Stephen Toub [Tue, 3 Sep 2019 21:07:30 +0000 (17:07 -0400)]
Avoid some unnecessary initialization in DateTimeParse (dotnet/coreclr#26487)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e1b160523db1c6e7d96aa3c9244a0baf8edb06a
Stephen Toub [Tue, 3 Sep 2019 21:01:52 +0000 (17:01 -0400)]
Remove unnecessary parens from `return (true);` and `return (false);` (dotnet/coreclr#26488)
Just a search and replace.
Commit migrated from https://github.com/dotnet/coreclr/commit/
eccb96a7b78e6c5c35addedd49b1798ef1e2e401
Jan Kotas [Tue, 3 Sep 2019 21:00:45 +0000 (14:00 -0700)]
Refactor BinaryReader.ReadChars using Span (dotnet/coreclr#26325)
Avoids unsafe code and makes the code simpler
Commit migrated from https://github.com/dotnet/coreclr/commit/
98d09ee2bd784d58b2b5f5fab0dc115956f73ae5
Koundinya Veluri [Tue, 3 Sep 2019 17:38:01 +0000 (10:38 -0700)]
Refactor call counting for tiering and some other things (dotnet/coreclr#26393)
Refactor call counting for tiering and some other things
- Moved call counting to after jitting is done, when the tier of the code becomes clear. Passed info back about whether the method should be recorded for call counting through the `PrepareCodeConfig` to avoid some more expensive rechecks.
- Moved checks for aggressive optimization and QuickJit to the point when JIT flags are determined
- Specialized `PublishVersionalbeCodeIfNecessary` for methods versionable with and without a jump stamp
- Added fast paths for cases operating on the default native code version to avoid code versioning overhead during startup
- Methods are not counted on first call, only recorded for counting later. First call to a method is determined by whether the thread generated or loaded code for the method. Threads that wait for jitting to complete don't count calls either. Once the method already has native code and goes through the prestub, its calls are counted.
- Overall, time spent in DoPrestub decreased noticeably when tiering is enabled, almost the same as with tiering disabled typically. Small improvement to startup time, seems to decrease by a few milliseconds.
- Fixed a bug where, when call counting for a method stops due to the tiering delay being activated, it was extending the delay as though it were the first call to the method
- This was noticably increasing time taken to reach steady-state perf by keeping the delay active for longer than necessary. After the fix, steady-state perf is reached sooner without any noticeable overhead in-between.
- A fix creates a potential race between thread A recording a method to be counted later, thread B resetting the method's entry point for counting calls, then thread A setting the tier 0 code as the entry point, and the method would not be tiered up. For now I decided to stop call counting only when a flag that would extend the delay timer is set, with other planned work this code and issue would go away.
- Miscellaneous small changes
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e72575313deeb3a5891324661fcc1287ded3325
Steve MacLean [Tue, 3 Sep 2019 16:31:54 +0000 (12:31 -0400)]
Modify amd64walker to use table based decode (dotnet/coreclr#25958)
* Modify amd64walker to use table based decode
Use tables for NativeWalker::DecodeInstructionForPatchSkip()
Also files used to generate the decode tables in doc folder.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f82281f8840d33b2c818885e103b86bae4079f7d
Tomáš Rylek [Mon, 2 Sep 2019 20:35:32 +0000 (22:35 +0200)]
Keep tokenScope consistent during devirtualization (dotnet/coreclr#26453)
Previously, when we were constructing the CORINFO_RESOLVED_TOKEN
to represent a devirtualized method, we reused the previous
tokenScope so that the tokenScope effectively went out of sync
with the token value.
Based on Andy's advice I have changed this logic to update the
tokenScope by calling the JIT interface method getMethodModule
for the resolved virtual method. I have verified locally that
(with a bit of counterpart CPAOT changes) this logic fixes the
bug I was previously hitting due to this inconsistency.
Thanks
Tomas
Commit migrated from https://github.com/dotnet/coreclr/commit/
b18ea9c7a4a7e8e940e77898b11f375879e63faf
dotnet-maestro[bot] [Sun, 1 Sep 2019 10:37:25 +0000 (03:37 -0700)]
[master] Update dependencies from dotnet/corefx (dotnet/coreclr#26446)
* Update dependencies from https://github.com/dotnet/corefx build
20190831.1
- Microsoft.NETCore.Platforms - 5.0.0-alpha1.19431.1
- Microsoft.Private.CoreFx.NETCoreApp - 5.0.0-alpha1.19431.1
* 3.0 -> 5.0
Commit migrated from https://github.com/dotnet/coreclr/commit/
c26f2eb4bae7a94375756fe7f075c13c4871b003
Bruce Forstall [Sun, 1 Sep 2019 02:34:07 +0000 (19:34 -0700)]
Save corefx test build artifacts to unique folder (dotnet/coreclr#26466)
* Save corefx test build artifacts to unique folder
It would be better to also include the `r2r` and `corefx` tags
in the archive filename, for clarity, but that is a bigger change
and not necessary to fix the current failing jobs due to the
existing name conflict.
* Add -
Commit migrated from https://github.com/dotnet/coreclr/commit/
89db551b36921faa1115c2f55d9eeb3e82cc39a9
Jarret Shook [Fri, 30 Aug 2019 23:56:05 +0000 (16:56 -0700)]
dlopen on Linux seems to not check the current working directory (dotnet/coreclr#26235)
* dlopen on Linux seems to not check the current working directory
Therefore change the path of coredistools to an absolute path and
calculate it based on the path of the current dll.
* Address pr feedback
* Small change to increase ptr
* Fix windows build break
* Correctly fix windows build
Commit migrated from https://github.com/dotnet/coreclr/commit/
d951f5f0ee8862f954c69a4fd9e05184bad15d25
Jeremy Koritzinsky [Fri, 30 Aug 2019 23:08:36 +0000 (16:08 -0700)]
Add ability to only copy native test files to managed tests in build-test scripts (dotnet/coreclr#26451)
* Add MSBuild targets neccesary to copy native test assets to managed projects that need them in a way separate from the managed test build.
* Hook up native test binary copying through build-test scripts.
* Unix script changes/cleanup
* Remove unconditional generatelayout in runtest.sh
* Add new options to usage
Commit migrated from https://github.com/dotnet/coreclr/commit/
05c6400d3614ef15dc76e458ff83e54dc0326c4c
Carol Eidt [Fri, 30 Aug 2019 22:08:14 +0000 (15:08 -0700)]
Cleanup unreachable struct code (dotnet/coreclr#26406)
A `GT_INDEX_ADDR` never has struct type
`GT_MKREFANY` and `GT_RET_EXPR` don't survive beyond morph
A `GT_IND` representing a struct element doesn't require `EncodeElemType`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed3efef2583f793dcf9dbff519cec797ba420f6f
Dong-Heon Jung [Fri, 30 Aug 2019 21:05:53 +0000 (06:05 +0900)]
Mark Relocation Section as NotNeeded (dotnet/coreclr#25715)
- After relocation, relocation section in zap image is not necessary.
- Mark the section as NotNeeded by giving advice(madvise with MADV_DONTNEED)
- It reduces 120~150KB PSS in tizen sample apps.
Commit migrated from https://github.com/dotnet/coreclr/commit/
4036c492d23ec3322b01573aab6190233db1f149
Next Turn [Fri, 30 Aug 2019 21:04:37 +0000 (05:04 +0800)]
Use Span<T> in Encoding (dotnet/coreclr#25860)
Commit migrated from https://github.com/dotnet/coreclr/commit/
6efffaa9aa6d289f0ae1d44b7bc61c87f00f5a37
Jan Vorlicek [Fri, 30 Aug 2019 00:35:21 +0000 (02:35 +0200)]
Update JITEEVersionIdentifier (dotnet/coreclr#26395)
When making a fix for GS cookie check on ARM some time ago, I have not
realized that it changes the JIT to EE interface and thus the
JITEEVersionIdentifier needs to be updated.
This change fixes the problem.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b18bb0b432da925f71c266ed5d17f54c0d202f27
Carol Eidt [Tue, 27 Aug 2019 22:50:24 +0000 (15:50 -0700)]
Cleanup unreachable struct code
A `GT_INDEX_ADDR` never has struct type
`GT_MKREFANY` and `GT_RET_EXPR` don't survive beyond morph
A `GT_IND` representing a struct element doesn't require `EncodeElemType`.
Commit migrated from https://github.com/dotnet/coreclr/commit/
ab97d0588492a690bf2ee0d4d1d78e077c488eac
Carol Eidt [Thu, 29 Aug 2019 20:53:58 +0000 (13:53 -0700)]
Correctly handle variable argument SIMDScalar (dotnet/coreclr#26421)
* Correctly handle variable argument SIMDScalar
Fix dotnet/coreclr#26286
Commit migrated from https://github.com/dotnet/coreclr/commit/
a6d752133cd91190530ad92024e76aae281de3c4
mikedn [Thu, 29 Aug 2019 17:41:02 +0000 (20:41 +0300)]
PHI_ARG actually has level 0, not 1 (dotnet/coreclr#26428)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1b917b164ba9ac2f6398f3e6ecff418c2cc4a66c
Carol Eidt [Thu, 29 Aug 2019 15:14:45 +0000 (08:14 -0700)]
[skip ci] Update first-class-structs doc (dotnet/coreclr#26416)
Update first-class-structs doc
Commit migrated from https://github.com/dotnet/coreclr/commit/
930a7b9ed015aaa1a3f3abb5578c8c63d38cb0d7
Jan Vorlicek [Thu, 29 Aug 2019 13:28:09 +0000 (15:28 +0200)]
Fix JIT_CheckedWriteBarrier for MHR (dotnet/coreclr#26430)
When Mojave hardened runtime support is enabled, the runtime places the
JIT_WriteBarrier copy into a dynamically allocated memory page. But
the JIT_CheckedWriteBarrier has a relative jump to the JIT_WriteBarrier
that I've missed when adding the MHR support and so we end up calling
the original unpatched code of the JIT_WriteBarrier from it.
This repros in release build only and causes problems only rarely,
so it was not detected until the corefx was updated to use the latest
coreclr. Even in the corefx tests, it caused problems when compiling
only one of the corefx tests.
This change fixes it in the same way as we handle jump to JIT_WriteBarrier
in the JIT_Stelem_Ref and its helpers - by using an indirect jump.
We do this for OSX only.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b036452e3ed5d8b60435e3423e4fec245827ce1
Brian Robbins [Wed, 28 Aug 2019 23:38:05 +0000 (16:38 -0700)]
Emit RVA Instead of File Offset by Default in Native Image PerfMap Files (dotnet/coreclr#26403)
Commit migrated from https://github.com/dotnet/coreclr/commit/
103152396592b857f5aaa499b57f65a0bbe405b2
Michelle McDaniel [Wed, 28 Aug 2019 22:08:41 +0000 (15:08 -0700)]
Disable signing and publishing on perf builds (dotnet/coreclr#26390)
* Disable signing and publishing on perf builds
* Mark default to false
* Change to signBinaries and publishToBlobFeed
Commit migrated from https://github.com/dotnet/coreclr/commit/
8feac49899d6b86049786f1482576a39bbc522d6
Juan Hoyos [Wed, 28 Aug 2019 20:46:03 +0000 (13:46 -0700)]
Add generated resource source files to sourcelink PDBs (dotnet/coreclr#26394)
* Add generated resource source files as embedded resources to sourcelink-enabled managed PDBs
Commit migrated from https://github.com/dotnet/coreclr/commit/
e4a2b8e6de8a62a691a7af986bdd1ce6b53ddf18
Egor Bogatov [Wed, 28 Aug 2019 18:47:38 +0000 (21:47 +0300)]
Move FormatTypeName to Type (dotnet/coreclr#25631)
Commit migrated from https://github.com/dotnet/coreclr/commit/
f07c13cadc378649f10d024bb8a40a3878fa661f
Eric Erhardt [Wed, 28 Aug 2019 03:21:42 +0000 (22:21 -0500)]
Don't validate empty TransitionTimes on deserialization. (dotnet/coreclr#26405)
On Unix, TransitionTimes are not used, so they are left empty. When deserializing an empty TransitionTime, it is throwing an exception because those are not normally valid. Fix deserialization to not validate empty TransitionTimes.
Fix dotnet/corefx 40578
Commit migrated from https://github.com/dotnet/coreclr/commit/
937f2f436425f6c0db8f35bfe3cbde88c966c848
Ivan Diaz Sanchez [Wed, 28 Aug 2019 03:21:10 +0000 (20:21 -0700)]
Moved misplaced assert in StompWriteBarrier for safety. (dotnet/coreclr#26407)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5b247316ddd7f4beb7cf8bd21bb49b84702f1883
Aaron Robinson [Wed, 28 Aug 2019 03:20:58 +0000 (20:20 -0700)]
Remove ComputeSuppressUnmanagedCodeAccessAttr() and usage. (dotnet/coreclr#26409)
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f8014fc2ba126149a361c9de21e5f9ee1fca7cf
Jeremy Koritzinsky [Wed, 28 Aug 2019 00:39:42 +0000 (17:39 -0700)]
Change test stage to only depend on the build stage (not on servicing stages). (dotnet/coreclr#26402)
Commit migrated from https://github.com/dotnet/coreclr/commit/
814be8042b289b3c765a39430d7b601417b9b8e5
Jan Vorlicek [Wed, 28 Aug 2019 00:01:52 +0000 (02:01 +0200)]
Unify Unix arm compiler optimization options (dotnet/coreclr#26299)
Long time ago, we were using clang 3.8 for building for Unix arm. There
was a codegen bug that forced us to set optimization for release build
to -O1 instead of -O3.
Now the minimum clang version we use for arm is 5.0 and I've verified
that binaries compiled with -O3 pass all the Coreclr pri 1 tests and so
the issue is gone.
So this change unifies the optimization levels for all architectures.
Commit migrated from https://github.com/dotnet/coreclr/commit/
a7b43df9208036ebeb56bf0cd6c498aef3692407
Jeremy Koritzinsky [Tue, 27 Aug 2019 22:13:03 +0000 (15:13 -0700)]
Fix marshalling a pinnable multi-dimensional array via a P/Inv… (dotnet/coreclr#26279)
* Use the exact methodtable of the parameter to calculate the offset into a pinned array.
* Fix logic check.
* Update precondition.
* Fix accidental union overlap.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f43185b07889fabb2e07c8fe4c1dfcd74f17747c
mikedn [Tue, 27 Aug 2019 21:28:43 +0000 (00:28 +0300)]
Stop using LIST nodes for PHI operand lists (dotnet/coreclr#20266)
* Stop using LIST nodes for PHI operand lists
* Speed up PHI creation
Calling gtSetStmtInfo/fgSetStmtSeq every time an arg is added is rather expensive and not really needed. Costs are always 0 and the shape of the PHI tree is always the same.
Removal of GT_LIST nodes makes it easier to update the linear order incrementally when a GT_PHI_ARG node is added.
* Cleanup PHI value numbering
This replaces the manual traversal of PHI's list of uses with a range-based for loop and cleans up a bunch of convoluted code.
* Remove redundant AsPhi
* Remove list pointer union
* Update PHI equality check
* Add GenTreePhi comment
* Rename op to node
Commit migrated from https://github.com/dotnet/coreclr/commit/
501c1e3629bbe89cbcec2ee8057ec111a88bdbc8
Stephen Toub [Tue, 27 Aug 2019 21:18:17 +0000 (17:18 -0400)]
Fix pragma warning restore (dotnet/coreclr#26389)
Commit migrated from https://github.com/dotnet/coreclr/commit/
00327a318e55499301d05ba5b98549e3b98ea425
Jarret Shook [Tue, 27 Aug 2019 16:56:26 +0000 (09:56 -0700)]
Ups timeout for build-test-job as we have been seeing timeouts (dotnet/coreclr#26391)
Commit migrated from https://github.com/dotnet/coreclr/commit/
265cb82e96f48d22375faa65b6294b98667246cf
Tomáš Rylek [Tue, 27 Aug 2019 16:51:33 +0000 (18:51 +0200)]
Fix incorrect merge of test build / run split with staged build (dotnet/coreclr#26382)
Commit migrated from https://github.com/dotnet/coreclr/commit/
782c8faa4055dd6faa98c20fbfce4519fa01940a
Jakob Botsch Nielsen [Mon, 26 Aug 2019 18:16:15 +0000 (18:16 +0000)]
Fix SIMD local alignment check for empty rsp-based frames
Fixes dotnet/coreclr#26022
Commit migrated from https://github.com/dotnet/coreclr/commit/
cd9215e39cda8846003210d6ec415211207bebc7
Jakob Botsch Nielsen [Mon, 26 Aug 2019 17:38:31 +0000 (17:38 +0000)]
Some minor ABI stress improvements
Allow specifying max parameters to simplify producing smaller examples
Commit migrated from https://github.com/dotnet/coreclr/commit/
cbecd400575dda16f7a8b99e1480e405d2dcb680
Jan Kotas [Tue, 27 Aug 2019 11:48:53 +0000 (04:48 -0700)]
Delete unused access right checks from PAL (dotnet/coreclr#26383)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b283f8c9833d9c38b4e21640c6aada16fd642bde
Tarek Mahmoud Sayed [Tue, 27 Aug 2019 01:03:40 +0000 (18:03 -0700)]
Fix Abbreviated Genitive Month Names Parsing (dotnet/coreclr#26379)
* Fix Abbreviated Genitive Month Names Parsing
In 3.0 we have fixed the formatting to use the abbreviated genitive month names when having "d" format specifier followed by "MMM". This fix is good as original formatting specs required but we needed to support the parsing when we have such genitive names.
* Addressing the feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6553f380154ff69314eee6f1a28d669d9037f26
John Salem [Mon, 26 Aug 2019 20:30:45 +0000 (13:30 -0700)]
[master] Enhance EventPipe tests (dotnet/coreclr#26322)
* Enhance EventPipe tests with better logging to better understand intermittent test failures that crop up in CI and can't be reproduced locally
* Remove unused field
* increase event count in attempt to give SampleProfiler thread a chance to fire
* Update logger to singleton so it can be used anywhere in the test
* updated logging for all tests
* reduced number of events sent to 100,000 instead of 1,000,000
Commit migrated from https://github.com/dotnet/coreclr/commit/
47cd01e5979943b152d398ddcc319e4ed15ab05b
Michelle McDaniel [Mon, 26 Aug 2019 19:51:32 +0000 (12:51 -0700)]
Fix performance pipeline (dotnet/coreclr#26373)
Commit migrated from https://github.com/dotnet/coreclr/commit/
4519204c19833104451003886b23c39218a48a23
Tomáš Rylek [Mon, 26 Aug 2019 19:41:13 +0000 (21:41 +0200)]
Split test build and run into two jobs (2nd attempt) (dotnet/coreclr#26362)
This change is intended to split the test job in CI runs into two
jobs - one building the tests and another sending the run to Helix.
To facilitate this, I have copied the bulk of the existing
test-job.yml file into two new files, build-test.yml and run-test.yml;
test-job.yml has become a mere wrapper invoking these two new files.
The new build-test file builds the tests, zips the output folder
and publishes it as an Azure artifact (the artifact publishing step
is no longer optional). The subsequent run-test step downloads the
test artifacts and triggers the Helix run for the test set.
The motivation for this change is to mitigate various transient
issues seen in CoreCLR CI runs - when a test execution fails in a
non-deterministic manner, before this change the developer needed to
rerun the lengthy test build step just to retry the tests. This
change should enable rerunning just the test execution step in such
case.
Thanks
Tomas
P.S. This is my 2nd attempt at the merge; Jarret had to roll back my
original Friday merge that broke CoreCLR outerloop testing.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0ea60e99a30f0ef9116b13546578e55a0113b1f4
Jeremy Koritzinsky [Mon, 26 Aug 2019 19:35:19 +0000 (12:35 -0700)]
Fix typo in calculating path to ILDasm in Microsoft.NET.SDK.IL (dotnet/coreclr#26343)
When I cleaned up the Microsoft.NET.SDK.IL implementation, I missed one typo. This causes the SDK to fail to resolve ILDasm as discovered in https://github.com/dotnet/winforms/pull/1684.
Commit migrated from https://github.com/dotnet/coreclr/commit/
0746a8fb8608cc51e9f8f44deb879e61bbf085e4
Egor Bogatov [Mon, 26 Aug 2019 18:04:47 +0000 (21:04 +0300)]
Move AppContext.CoreCLR.cs to shared, remove static ctor (dotnet/coreclr#26045)
* Remove AppContext.CoreCLR.cs (move to shared)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1945ed33879f07cadf5cb495725c4ba304a71af8
Jarret Shook [Mon, 26 Aug 2019 17:35:18 +0000 (10:35 -0700)]
Disable based on dotnet/coreclr#26335 (dotnet/coreclr#26336)
* Disable based on dotnet/coreclr#26335
* Change to disable for all platforms
Commit migrated from https://github.com/dotnet/coreclr/commit/
3fc30525368908bbff06fa0c2743bb3b4b062c23
blaster7th [Mon, 26 Aug 2019 15:25:26 +0000 (17:25 +0200)]
Corrected typo for X86 (dotnet/coreclr#26361)
Commit migrated from https://github.com/dotnet/coreclr/commit/
b5748e6674bf90be7f1f0985136736ed1f7c41bc
Stephen Toub [Mon, 26 Aug 2019 12:59:21 +0000 (08:59 -0400)]
Fix comment typo in ManualResetValueTaskSourceCore
Commit migrated from https://github.com/dotnet/coreclr/commit/
15daca125fbb15bc3a9b65977957edd936fff752
Matt Warren [Mon, 26 Aug 2019 12:22:10 +0000 (13:22 +0100)]
Remove redundant comment (dotnet/coreclr#26369)
It *seems* that this comment is redundant, there is no longer any code that does the checks it's describing (I assume that the security-related code was removed at some point?)
Also the `_ASSERTE(..)` statement is a duplicate of the one above, so it's also redundant
Commit migrated from https://github.com/dotnet/coreclr/commit/
49b5a0513d73894b2e4fdc5f527546bf674ca37d
Vladimir Sadov [Mon, 26 Aug 2019 02:14:06 +0000 (19:14 -0700)]
Do not use `AllocateUninitializedArray` in private array pools. (dotnet/coreclr#26338)
User may have extra expectations for the privatly owned array pools.
For example there could be an expectation that array never contains negative numbers (since user never puts them there). Uninitialized allocations can break such expectations.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c89fd6f88744bfee034e792906700c5a17e1b953
Stephen Toub [Mon, 26 Aug 2019 00:30:39 +0000 (20:30 -0400)]
Disable SA1001 for LocaleData.Unix.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
35d96a6c9e0820fef7f69f4c780c6c04b10628a5
Stephen Toub [Sat, 24 Aug 2019 02:24:14 +0000 (22:24 -0400)]
Contribute to IDE0055 (fix formatting)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
7dab7a69df2e864e7ced729ec3d3d2470f02125c
Stephen Toub [Thu, 22 Aug 2019 17:10:47 +0000 (13:10 -0400)]
Contribute to StyleCop SA1002 (semicolon spacing)
However, I'm not enabling the rule permanently, as it disagrees with VS IDE0055 about the spacing around semicolons at the end of empty while and for loops.
Because this also impacts `for (;;)` loops, I also searched and replaced those with `while (true)`, to standardize on that across the codebase.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
63c09bbf88cc6524ea8478fdea430ba45275a933
Stephen Toub [Thu, 22 Aug 2019 15:47:00 +0000 (11:47 -0400)]
Fix StyleCop warning SA1001 (spaces around commas)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
df2e29dae84d1e85763f9dac409d39c48545f9ef
Stephen Toub [Mon, 26 Aug 2019 02:10:37 +0000 (22:10 -0400)]
Separate Async*MethodBuilder types into their own files (dotnet/coreclr#26364)
* Separate async method builder types into their own files
* Minor cleanup of AsyncTaskMethodBuilder types
* Split AsyncValueTaskMethodBuilder types into their own files
Commit migrated from https://github.com/dotnet/coreclr/commit/
def4f696fbfde6ff05c3a4d88f092e21e684ea0f
Jan Kotas [Sat, 24 Aug 2019 17:10:00 +0000 (10:10 -0700)]
Fix BinaryReader.ReadChars for fragmented Streams (dotnet/coreclr#26324)
BinaryReader.ReadChars incorrectly read more than necessary from the underlying Stream when multi-byte characters straddled the read chunks.
Fixes https://github.com/dotnet/corefx/issues/40455
Commit migrated from https://github.com/dotnet/coreclr/commit/
4e8339f0d025146a60b4fe8bba8d65dc787405c2
Aaron Robinson [Sat, 24 Aug 2019 13:32:36 +0000 (06:32 -0700)]
Remove unused test file introduced in dotnet/coreclr#25948 (dotnet/coreclr#26349)
Commit migrated from https://github.com/dotnet/coreclr/commit/
1f5383110f0f1672991697cbfbb1d27383a64e88
Next Turn [Sat, 24 Aug 2019 13:32:02 +0000 (21:32 +0800)]
Remove unnecessary !s for [DoesNotReturn] (dotnet/coreclr#26350)
Commit migrated from https://github.com/dotnet/coreclr/commit/
850529a98b32be66bdec5a54a2ef684207d918f2
Anirudh Agnihotry [Sat, 24 Aug 2019 02:56:51 +0000 (19:56 -0700)]
adding ci legs to release 3.1 branch (dotnet/coreclr#26217)
* adding ci legs to release 3.1 branch
* removing regex and adding branches as regex was not working
Commit migrated from https://github.com/dotnet/coreclr/commit/
c3d7d560f9d78053913893d6a88320ef9712cdb1
Fadi Hanna [Sat, 24 Aug 2019 00:16:29 +0000 (17:16 -0700)]
Move testing jobs to a separate stage after the validation/publishing stage (dotnet/coreclr#26334)
* Move testing jobs to a separate stage after the validation/publishing stage
Commit migrated from https://github.com/dotnet/coreclr/commit/
0bbc89c7279a2655e8cfe8466eb69d85899033a8