Aaron Robinson [Thu, 14 Mar 2019 22:15:56 +0000 (15:15 -0700)]
Fix the calling convention for P/Invokes and delegates to hostpolicy (dotnet/coreclr#23249)
* Fix the calling convention for P/Invokes and delegates
* Update mock library to match official hostpolicy calling conventions
Commit migrated from https://github.com/dotnet/coreclr/commit/
ce39609eff13c327b1ac27caeae83f691e67170a
Jan Vorlicek [Thu, 14 Mar 2019 21:30:00 +0000 (22:30 +0100)]
Fix GetProcessAffinityMask (dotnet/coreclr#23247)
The function was returning mask not expected by runtime for coreclr
built with NUMA enabled on machines with multiple NUMA nodes.
The mask was 0 in case the current process was affinitized to CPUs
from multiple NUMA nodes. It was following MSDN doc, however the
doc turned out to be ambiguous. Moreover, the runtime depended
on the fact that on Windows, a process is never run on multiple
NUMA nodes unless is explicitly calls APIs to set ideal processor
for threads. But on Unix, there is no such case and by default, a
process is affinitized to all existing processors over all NUMA
nodes.
And there was one more issue. The GetProcessAffinityMask was returning
a mask within a single CPU group, which is a transformed view of
NUMA node on Windows. So the CPU indices in the mask didn't necessarily
correspond to the native Unix CPU indices. But, the SetThreadAffinityMask
was using the native Unix CPU indices.
To fix the problem, the GetProcessAffinityMask is changed so that
it always returns a mask corresponding to the native Unix CPU indices
(reporting upto 64 processors as the mask is 64 bit wide). Thus it
corresponds to what the SetThreadAffinityMask expects. And it also exactly
matches the behavior when NUMA support is not compiled in.
Moreover, the COMPlus_GCHeapAffinitizeMask bits now correspond to
the native Unix CPU indices.
The GetProcessAffinityMask is used by GC and thread pool only when
NUMA is not enabled using the COMPlus_GCCpuGroup env variable.
Commit migrated from https://github.com/dotnet/coreclr/commit/
23fbf7e7ab231876b9d54b52bac044cdde159118
Koundinya Veluri [Thu, 14 Mar 2019 20:51:25 +0000 (13:51 -0700)]
Fix DisableTier0Jit when multi-core JIT is enabled (dotnet/coreclr#23200)
- With multi-core JIT, a method may be jitted before it is called, in which case the call counting entry would not already exist
Commit migrated from https://github.com/dotnet/coreclr/commit/
50d38a42a5085ad6ed43fc480c6d2b0562e6848e
Sergey Andreenko [Thu, 14 Mar 2019 20:36:03 +0000 (13:36 -0700)]
Update CoreFX Linux Arm64 exclusion list. (dotnet/coreclr#22697)
* Update CoreFX Linux Arm64 exclusion list.
* Exclude System.Globalization.Calendars.Tests.
* Exclude System.Threading.Tasks.Tests.
* Exclude dotnet/coreclr#23242
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f42cca807df8d70b206188858c8636f73ce0f78
Jan Vorlicek [Thu, 14 Mar 2019 09:22:44 +0000 (10:22 +0100)]
Merge pull request dotnet/coreclr#23203 from janvorli/fix-no-return-false-positives
Fix no-return false positives in static analyzer build
Commit migrated from https://github.com/dotnet/coreclr/commit/
6958ede8e835048b9d1ee9843d7587cacf527101
Michal Strehovský [Thu, 14 Mar 2019 08:33:59 +0000 (09:33 +0100)]
Delete suspicious code in delegate construction (dotnet/coreclr#22830)
Delegate construction is trying to do some weird special casing around closed delegates to interface methods that is breaking non-virtual delegates to default interface methods. The special casing has suspicious comments indicating people didn't know why it's needed in the first place, so I'm going with a theory that it's a cargo cult (e.g. why the reasons specified in the comments don't apply to normal virtual methods?).
Fixes dotnet/coreclr#22728.
Commit migrated from https://github.com/dotnet/coreclr/commit/
674bdcbc2ac824d005b5179cee3c5826b582b9a6
Sung Yoon Whang [Thu, 14 Mar 2019 02:42:28 +0000 (19:42 -0700)]
Disable tracing/inducedgc test on all Unix platforms (dotnet/coreclr#23240)
* Disabling tracing/tracevalidation/inducedgc test on all unix
* Leave the exclusion list on arm64 there
Commit migrated from https://github.com/dotnet/coreclr/commit/
b6ae87f8b644a51bf4cd926770d20d22b3a2031f
Sergey Andreenko [Thu, 14 Mar 2019 01:31:27 +0000 (18:31 -0700)]
Fix/clean compNoGCHelperCallKillSet for arm. (dotnet/coreclr#23078)
* Add an assert to compNoGCHelperCallKillSet.
That registers that lose GC or byref values also are in compHelperCallKillSet return set.
* Move compNoGCHelperCallKillSet from compiler to emitter.
* Rename `compNoGCHelperCallKillSet` to `emitGetGCRegsKilledByNoGCCall`.
* Fix GCRegsKill sets for arm CORINFO_HELP_PROF_FCN_ENTER and CORINFO_HELP_PROF_FCN_LEAVE.
Commit migrated from https://github.com/dotnet/coreclr/commit/
83327daf3c6186587f91182c39afd8e768baecfd
Brian Sullivan [Thu, 14 Mar 2019 00:33:25 +0000 (17:33 -0700)]
Merge pull request dotnet/coreclr#23109 from briansull/gh-21231
Fix for Issue 21231
Commit migrated from https://github.com/dotnet/coreclr/commit/
3d4ed7c829803206db7caea1e348bc4791aec0a6
Levi Broderick [Wed, 13 Mar 2019 22:43:25 +0000 (15:43 -0700)]
Add OperationStatus-based UTF8 transcoding APIs (dotnet/coreclr#23219)
Commit migrated from https://github.com/dotnet/coreclr/commit/
fdd611cbcdc0f7d922dd111e5e1831663c67e685
Bruce Forstall [Wed, 13 Mar 2019 22:38:41 +0000 (15:38 -0700)]
Merge pull request dotnet/coreclr#23220 from BruceForstall/FixArm64HfaJmpCallNyi
Arm64: Implement JMP call for HFA register arguments
Commit migrated from https://github.com/dotnet/coreclr/commit/
c71c92a0c0ff7ac442c3ca9d1ae7cc177072b23f
Brian Sullivan [Thu, 7 Mar 2019 22:20:44 +0000 (14:20 -0800)]
Fix for Issue 21231
When transferring a Zero offset from one GenTree node to another, we need to check if there already is a FieldSeq and append to it.
Added third parameter 'kind' to JitHashTable::Set, and Added enum SetKind
Only allow Set to overwrite an existing entry when kind is set to Overwrite.
Added validation for all calls to JitHashTable::Set
asserting that we don't expect the key to already exist or that we passed Overwrite indicating that we expect to handle it properly.
Added two test cases for Issue 21231
Commit migrated from https://github.com/dotnet/coreclr/commit/
ef1d1e86da8406ca86ca98b8d92b038fe1f08d7a
Juan Hoyos [Wed, 13 Mar 2019 21:38:41 +0000 (14:38 -0700)]
Update documentation: make docker images point to the registry. (dotnet/coreclr#23243)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ac4681867c7dbb92d32d0f26ec7d611b37e92e7e
Carol Eidt [Wed, 13 Mar 2019 21:26:51 +0000 (14:26 -0700)]
Fix SIMD handle issues (dotnet/coreclr#23193)
* Fix SIMD handle issues
PR dotnet/coreclr#23052 was overly aggressive at applying the provided class handle (which defaults to NO_CLASS_HANDLE). In addition, make a small change to `SIMDIntrinsicWiden`, as it doesn't need to go through the complexity of inferring a class handle when it already exists on the node it's duplicating.
Fix dotnet/coreclr#23159
Commit migrated from https://github.com/dotnet/coreclr/commit/
5198ce8d7aa80786b1ca7502db5fcf8cf6f3ddce
Carol Eidt [Wed, 13 Mar 2019 21:19:17 +0000 (14:19 -0700)]
Merge pull request dotnet/coreclr#23212 from CarolEidt/VectorABITest
Preliminary Vector ABI test
Commit migrated from https://github.com/dotnet/coreclr/commit/
52dc01aff1aeb1d972846706c65d7beb8ff9e1a7
Sergey Andreenko [Wed, 13 Mar 2019 20:08:38 +0000 (13:08 -0700)]
exclude tracing/keyword/TwoKeywords/TwoKeywords on WIndows x86. (dotnet/coreclr#23237)
Commit migrated from https://github.com/dotnet/coreclr/commit/
bc9722ccdc539413a386c0aff6500bfa6d88fd80
Michal Strehovsky [Wed, 13 Mar 2019 12:30:44 +0000 (05:30 -0700)]
Fix missed RelocatedType annotation
[tfs-changeset: 1735855]
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
00fbc8c5a94bde60e5f84e80ac8dd6b6da3ca310
Michal Strehovský [Wed, 13 Mar 2019 18:50:13 +0000 (19:50 +0100)]
Enable FeatureDefaultInterfaces unconditionally (dotnet/coreclr#23225)
Fixes dotnet/coreclr#22940.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6eebb9d678a786c081b121709fa7471ff0bd08df
Andrew Au [Wed, 13 Mar 2019 16:56:41 +0000 (09:56 -0700)]
Fix issue 23151 (Cleanup TODO introduced by PR dotnet/coreclr#23148)
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6089f795eb9d5e72f5db5c530d73bc901245e2a
Sung Yoon Whang [Wed, 13 Mar 2019 08:10:35 +0000 (01:10 -0700)]
Add new counter APIs (dotnet/coreclr#23077)
* Refactor EventCounter and add PollingCounter
* Add PollingCounter
* Add IncrementingEventCounter and IncrementingPollingCounter
* Add MetaData API to Counters
* Some more refactoring
* removing commented out code
* some more cleanup
* build fix and addressing some PR comments
* Addressing PR feedback
* use StringBuilder to generate metadata string
Commit migrated from https://github.com/dotnet/coreclr/commit/
d247b06ed9c4dc3e6f625629da7db846be687f2d
Aaron Robinson [Wed, 13 Mar 2019 03:34:45 +0000 (20:34 -0700)]
Default Interface COM testing project (dotnet/coreclr#23195)
* Add tests for native COM client consuming managed COM server that
consumes interfaces with default implementation.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b364ef6c7872d90d75063570f25495286b87acfd
Bruce Forstall [Sat, 9 Mar 2019 01:58:54 +0000 (17:58 -0800)]
Arm64: Implement JMP call for HFA register arguments
Add the code to load up HFA register arguments into their correct registers
before a JMP call.
Removes remaining NYI.
Fixes dotnet/coreclr#23147
Add a test case with several variants of HFA and JMP call.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c08f182bc90b0d32279201b7de89658765e3f6e8
Jan Vorlicek [Wed, 13 Mar 2019 00:07:00 +0000 (01:07 +0100)]
Move ANALYZER_NORETURN after function return type.
GCC doesn't like attributes before the extern keyword.
Commit migrated from https://github.com/dotnet/coreclr/commit/
78004e9a33422d1c2399339a3ac408f4c654d06b
Andy Ayers [Tue, 12 Mar 2019 23:46:24 +0000 (16:46 -0700)]
Don't retain modifiers for instantation stub signatures (dotnet/coreclr#23210)
`ConvToJitSig` is not expecting to see modifiers for return types in sigs,
so don't bother preserving them when creating instantiation stubs.
This comes up for instantiation stubs for methods of `ReadOnlySpan<T>`.
Also, if we are preserving modifiers in a sig, make sure to prefix their type
handles with `ELEM_TYPE_INTERNAL`.
Fixes dotnet/coreclr#23136.
Commit migrated from https://github.com/dotnet/coreclr/commit/
5831fe40394fcdc34fa161041956d379db433dd6
Tanner Gooding [Tue, 12 Mar 2019 21:29:38 +0000 (14:29 -0700)]
Fixing a couple of issues in the Utf8Parsing/Formatting code (dotnet/coreclr#23134)
* Fixing NumberToSingle and NumberToDouble to handle DigitsCount == 0
* Fixing Utf8Formatter.Float to transcode non ASCII bytes
* Responding to PR feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b00f12ce4457fc013efce340011b4759e78f9948
Carol Eidt [Tue, 12 Mar 2019 18:28:10 +0000 (11:28 -0700)]
Preliminary Vector ABI test
Commit migrated from https://github.com/dotnet/coreclr/commit/
31461ba11fecd93f951b3612e7487228c32dde62
John Salem [Tue, 12 Mar 2019 16:39:50 +0000 (09:39 -0700)]
Fix syntax bug: bash requires spaces around brackets for tests (dotnet/coreclr#23017)
Commit migrated from https://github.com/dotnet/coreclr/commit/
3a9bb4176f892bbde935478ff04cb05d3a54a64a
Andrew Au [Fri, 1 Mar 2019 18:12:48 +0000 (10:12 -0800)]
Fix issue 21089 (Add tests for the `EventPipe support for "Parameters"` feature.)
Commit migrated from https://github.com/dotnet/coreclr/commit/
18b6abc2c56adacb27b165491fc0ad757c24abdb
Michal Strehovský [Mon, 11 Mar 2019 20:57:29 +0000 (21:57 +0100)]
Replace Delegate.CreateDelegate (dotnet/corertdotnet/coreclr#7147)
Replacing this with a pattern that is easier to statically analyze. We use the GetType/GetMethod/CreateDelegate pattern in several places already.
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
cefce5b5b82bb31600824935c585225aed059271
Carol Eidt [Mon, 11 Mar 2019 23:11:50 +0000 (16:11 -0700)]
Merge pull request dotnet/coreclr#23141 from CarolEidt/Fix23059
Fix handling of struct setup assignments
Commit migrated from https://github.com/dotnet/coreclr/commit/
9dcbb4707c160b3479489e8421802c2eb3d93b44
Hugh Bellamy [Mon, 11 Mar 2019 20:59:13 +0000 (20:59 +0000)]
Fix NRE in EqualStringArrays (dotnet/coreclr#23174)
Commit migrated from https://github.com/dotnet/coreclr/commit/
e9f23f604d6ed754148930ac85c3bcd1e06b4e55
Michal Strehovský [Mon, 11 Mar 2019 20:58:20 +0000 (21:58 +0100)]
Fix bad test (dotnet/coreclr#23173)
The test was testing that a non-virtual call to an abstract method that is methodimpl on the same type will land in the methodimpl. This behavior is not specced and cannot be hit with any mainstream .NET languages. We are making non-virtual calls to abstract methods throw a BadImageFormatException instead.
Fixes dotnet/coreclr#23096.
Commit migrated from https://github.com/dotnet/coreclr/commit/
27b39d83535231d31f562002b78ac1e1b3b54be3
Bruce Forstall [Mon, 11 Mar 2019 20:36:45 +0000 (13:36 -0700)]
Merge pull request dotnet/coreclr#23187 from BruceForstall/AlwaysArchiveCoreFxTestResultsXml
Always archive corefx testresults.xml files
Commit migrated from https://github.com/dotnet/coreclr/commit/
873cc91a6e88364fd758dec2eb61ed20017cfdee
Bruce Forstall [Mon, 11 Mar 2019 20:10:43 +0000 (13:10 -0700)]
Always archive corefx testresults.xml files
These were only being archived for successful runs, which is
when they are the least interesting. Archive them for all test runs.
Commit migrated from https://github.com/dotnet/coreclr/commit/
99935d80bc2047393452fee6210e93ce569afb1c
Jan Vorlicek [Mon, 11 Mar 2019 16:49:05 +0000 (09:49 -0700)]
Fix no-return false positives in static analyzer build
There were about 800 false positive issues in the clang status analyzer
build caused by the fact that various forms of asserts were not considered
by the analyzer as not returning.
This change adds __attribute__((analyzer_noreturn)) (wrapped in a macro) to
those assertion functions.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c4ca1ddb2413a354e8f49fff4680f175a02e7d8e
Steve MacLean [Mon, 11 Mar 2019 16:26:57 +0000 (12:26 -0400)]
Add EntryPointFilter option (dotnet/coreclr#23054)
* Add EntryPointFilter
Commit migrated from https://github.com/dotnet/coreclr/commit/
2f2fd8d21f8dde67f3bbe125be62a0e53e34bd3b
Eric StJohn [Mon, 11 Mar 2019 15:53:46 +0000 (08:53 -0700)]
Add a target to get native resources from another DLL to ILProj SDK (dotnet/coreclr#23117)
We use a similar target in CoreFx and I'll need it for another project that is planning on
using this SDK.
When ILResourceReference it will be disassembled to get native resources (EG: fileversion)
to pass to ILasm.
If ILResourceReference is not specified then it does nothing.
Commit migrated from https://github.com/dotnet/coreclr/commit/
b0d380514fad5736b54b8f9ed5cd3ea915f5f42c
Dan Moseley [Sat, 9 Mar 2019 21:54:04 +0000 (13:54 -0800)]
Remove 2 suffix step 1 (dotnet/corefxdotnet/coreclr#35904)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
f94728547617160837baedc43b7786a457b3e45f
Jan Vorlicek [Mon, 11 Mar 2019 15:08:50 +0000 (16:08 +0100)]
Merge pull request dotnet/coreclr#23093 from franksinankaya/gcc_warnings_9
GCC Signed compare and Narrowing warnings
Commit migrated from https://github.com/dotnet/coreclr/commit/
f9820b7c45ed1ae99fef54944727e98bacbd2a2a
Jan Vorlicek [Mon, 11 Mar 2019 13:59:27 +0000 (14:59 +0100)]
Merge pull request dotnet/coreclr#23111 from am11/gcc-configuration
Improve gcc configuration
Commit migrated from https://github.com/dotnet/coreclr/commit/
123422de218d6ca5c36cbb7f34ece95dcae333da
Jan Vorlicek [Mon, 11 Mar 2019 12:23:25 +0000 (13:23 +0100)]
Merge pull request dotnet/coreclr#23099 from janvorli/remove-pal-cleanup
Remove init_count zeroing from PAL cleanup at process exit
Commit migrated from https://github.com/dotnet/coreclr/commit/
20ec8fa5448655309490106cf7ac72bf60b3485f
Jan Vorlicek [Mon, 11 Mar 2019 11:08:26 +0000 (12:08 +0100)]
Merge pull request dotnet/coreclr#23121 from janvorli/enable-clang-staticanalyzer-build
Enable build with clang static analyzer
Commit migrated from https://github.com/dotnet/coreclr/commit/
c132634fa1215e8145e35164733da7485bacb262
Adeel [Mon, 11 Mar 2019 09:38:32 +0000 (02:38 -0700)]
Remove conditions around CMAKE_REQUIRED_LIBRARIES
Commit migrated from https://github.com/dotnet/coreclr/commit/
107b9424d7dd56c1902b09bb1c67533215190ea8
Levi Broderick [Mon, 11 Mar 2019 04:40:27 +0000 (21:40 -0700)]
Refactor Encoding to split fast-path and fallback logic (dotnet/coreclr#23098)
This refactoring is limited to ASCIIEncoding at the moment, but it can easily be applied to UTF-8 / UTF-16 / UTF-32.
High-level changes:
- Fallback logic has been split from the fast-path, improving performance of GetBytes and similar routines.
- All of the plumbing of when to invoke the fallback logic and how to manage leftover data has been moved into the base class.
- Almost all of the logic except for the fast-path is now written in terms of verifiable code (Span and ReadOnlySpan).
- Minor bug fixes in EncoderNLS.Convert (see https://github.com/dotnet/coreclr/issues/23020).
Commit migrated from https://github.com/dotnet/coreclr/commit/
43a5159d39bd52195c5095da4006183f791c696b
Egor Bogatov [Sat, 9 Mar 2019 21:55:43 +0000 (00:55 +0300)]
Move Buffer to shared (dotnet/coreclr#23157)
Commit migrated from https://github.com/dotnet/coreclr/commit/
526c32c221192cd5876239b2d72c68d1ba0c40c3
Andrew Au [Sat, 9 Mar 2019 00:07:39 +0000 (16:07 -0800)]
Two more instances
Commit migrated from https://github.com/dotnet/coreclr/commit/
81e2f5008826cf8ea7cc51d0cb9fa711e1259506
Andrew Au [Fri, 8 Mar 2019 23:13:58 +0000 (15:13 -0800)]
Eliminate SampleProfilerEventInstance
Commit migrated from https://github.com/dotnet/coreclr/commit/
01024ebfc8b1d166fb345ac411e6aec571e4e571
Andrew Au [Sat, 9 Mar 2019 00:00:36 +0000 (16:00 -0800)]
Avoid StackWalk in EventPipeEventInstance constructor
Commit migrated from https://github.com/dotnet/coreclr/commit/
8009ba276895edc9decf49c8a2470a1e6bbe2997
Stephen Toub [Sat, 9 Mar 2019 16:41:43 +0000 (11:41 -0500)]
Add stack depth check to all Task continuations (dotnet/coreclr#23152)
Currently Task has a stack depth check that avoids stack overflows on very deep stack continuation chains, but it only applies to Task.ContinueWith, not to other kinds of continuations. This changes that to have it apply to all.
As part of this, this also deletes the current StackGuard type used to achieve the check. The type was meant to avoid expensive calls to check where we are on the stack, but now that we're using TryEnsureSufficientExecutionStack, it's actually faster to just call that rather than access the current StackGuard from a ThreadLocal. This then also cleans up the call sites nicely, as they no longer need finally blocks to undo the increment performed on the StackGuard.
Commit migrated from https://github.com/dotnet/coreclr/commit/
6633b51df7f91623190ba6bf04c00869cd0fc1e4
Marek Safar [Sat, 9 Mar 2019 05:32:53 +0000 (06:32 +0100)]
Move part of RuntimeHelpers to shared partition (dotnet/coreclr#23130)
* Move part of RuntimeHelpers to shared partition
* Remove FormatterServices.cs
Commit migrated from https://github.com/dotnet/coreclr/commit/
ed505143f888a16402d0ce891412cdf4f2cb4724
Aaron Robinson [Sat, 9 Mar 2019 01:36:37 +0000 (17:36 -0800)]
Properly override IsEquivalentTo() API in RuntimeType (dotnet/coreclr#23137)
* Properly override IsEquivalentTo() API in RuntimeType
* Add tests for API validation
Commit migrated from https://github.com/dotnet/coreclr/commit/
c194074a82ee35f31b1e55233b43256713b26467
Sung Yoon Whang [Fri, 8 Mar 2019 22:54:38 +0000 (14:54 -0800)]
Update eventcounter spec (dotnet/coreclr#23142)
Commit migrated from https://github.com/dotnet/coreclr/commit/
ee56e5874db8780c99d2d93169aacf477f7b73f1
Bruce Forstall [Fri, 8 Mar 2019 22:45:11 +0000 (14:45 -0800)]
Merge pull request dotnet/coreclr#23140 from BruceForstall/RemoveArm64NYI
Remove unneeded arm64 NYI
Commit migrated from https://github.com/dotnet/coreclr/commit/
c1feb4eda03d1d82908d4d733c95413a1c85d749
Jarret Shook [Fri, 8 Mar 2019 22:43:53 +0000 (14:43 -0800)]
Use 4 core external build queues (dotnet/coreclr#23079)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d1351f962f7c50deb2115ec2833ac469608b83d0
Sergey Andreenko [Fri, 8 Mar 2019 22:24:17 +0000 (14:24 -0800)]
Fix missing RunTests.sh in CoreFX Linux jobs. (dotnet/coreclr#23135)
Commit migrated from https://github.com/dotnet/coreclr/commit/
9df1fc369a768c342bc86b5e9c3311540a4ebf2b
Carol Eidt [Fri, 8 Mar 2019 21:09:41 +0000 (13:09 -0800)]
Fix handling of struct setup assignments
In dotnet/coreclr#22791 I was creating struct assignments with COMMAs on the rhs, but that isn't handled downstream.
Fix dotnet/coreclr#23059
Commit migrated from https://github.com/dotnet/coreclr/commit/
384eefbd899ced778d99314df0d9e76fdccf71a4
Bruce Forstall [Fri, 8 Mar 2019 20:43:54 +0000 (12:43 -0800)]
Remove unneeded arm64 NYI
InitVarDscInfo::alignReg is only used by `_TARGET_ARM_`, so put
it under that ifdef.
Contributes to dotnet/coreclr#18178
Commit migrated from https://github.com/dotnet/coreclr/commit/
9485e96368b5bfb64468d53fe5fb31f362be2e2a
Bruce Forstall [Fri, 8 Mar 2019 20:25:21 +0000 (12:25 -0800)]
Merge pull request dotnet/coreclr#23086 from BruceForstall/Arm64ChangeIntFloatSaveOrder
Arm64: always save int registers at higher addresses than float regs
Commit migrated from https://github.com/dotnet/coreclr/commit/
2a77dc515bccf78308232384522017e5a3bdc3f0
Andrew Hoefling [Thu, 7 Mar 2019 23:08:22 +0000 (18:08 -0500)]
Optimized RemoveItemsRange to call the list.RemoveRange if the items is of type List<T>
Commit migrated from https://github.com/dotnet/coreclr/commit/
d29c78bbbcb033f7d189bcc162e580176160a1c9
Andrew Hoefling [Thu, 7 Mar 2019 00:34:57 +0000 (19:34 -0500)]
Simplified the RemoveItem logic since we have more robust validation
Commit migrated from https://github.com/dotnet/coreclr/commit/
7e487423d166cf2768d3f6630071d908832f0fe4
Andrew Hoefling [Wed, 6 Mar 2019 17:57:09 +0000 (12:57 -0500)]
InsertItemsRange API now checks if the underlying items.IsReadOnly first then collection == null
Commit migrated from https://github.com/dotnet/coreclr/commit/
44e05888b328699d3a0ca4b76544d7c357b49b47
Andrew Hoefling [Wed, 6 Mar 2019 17:47:03 +0000 (12:47 -0500)]
Removed (Int64) cast statements from RemoveItemsRange when checking for overflow errors
Commit migrated from https://github.com/dotnet/coreclr/commit/
39be7e55798e4f81c531661b0df798e91c7d5936
Andrew Hoefling [Wed, 6 Mar 2019 01:31:19 +0000 (20:31 -0500)]
Added new RemoveRange validation check to see if the resulting range (index + count) > items.Count and if it is true throw ArgumentException
Commit migrated from https://github.com/dotnet/coreclr/commit/
f48e28bbd7e14fe9b6c708fe57624324a5e604eb
Andrew Hoefling [Wed, 6 Mar 2019 00:00:01 +0000 (19:00 -0500)]
Updated InsertItemsRange to simplify the expression and added performance improvements. If the underlying `items` is using List<T> we should use it's InsertRange method since it is optimized, othersie we use InsertItem
Commit migrated from https://github.com/dotnet/coreclr/commit/
dadee3b355c75e33d0c925b27ba3f301d100a51b
Andrew Hoefling [Tue, 5 Mar 2019 23:46:05 +0000 (18:46 -0500)]
Updated RemoveAt->RemoveItem. This change removes redundent validation checks that happen using the RemoveAt API. RemoveItem gives us direct access to invoke the command
Commit migrated from https://github.com/dotnet/coreclr/commit/
d3b9f9dac784c03e10619ff49c8f22579940192c
Andrew Hoefling [Tue, 5 Mar 2019 23:15:08 +0000 (18:15 -0500)]
Updated RemoveRange invocation of RemoveAt to use index instead of i, because the array changes with each iteration of the for loop and will cause side-effects which may include index out of range exceptions. This needs to be index because as the array shrinks the index is always at the correct position.
Commit migrated from https://github.com/dotnet/coreclr/commit/
2fb96bfe42d2b97577918c24be445cc8106ae593
Andrew Hoefling [Tue, 5 Mar 2019 23:14:01 +0000 (18:14 -0500)]
Added ArgumentOutOfRangeException exception in RemoveRange if the count is less than 0
Commit migrated from https://github.com/dotnet/coreclr/commit/
5f9e81d1577345c4f3fc4df475b8f3e7f672f0ce
Andrew Hoefling [Tue, 5 Mar 2019 05:26:08 +0000 (00:26 -0500)]
Updated RemoveItemsRange to properly remove each item and not just the index items
Commit migrated from https://github.com/dotnet/coreclr/commit/
b474a2a96d6ca31f3a093fd83b49537eee382794
Andrew Hoefling [Tue, 5 Mar 2019 04:50:36 +0000 (23:50 -0500)]
Updated RemoveItemsRange to prevent int.MaxValue overflow errors
Commit migrated from https://github.com/dotnet/coreclr/commit/
0190ab05d31de5ca020ee7a2325ff3d3625af43a
Andrew Hoefling [Tue, 5 Mar 2019 04:44:19 +0000 (23:44 -0500)]
Remove ternary operator from invocation as it is the same as inputing items.Count
Commit migrated from https://github.com/dotnet/coreclr/commit/
c32f57bdae5cd532ebb3587386db937528726ca6
Andrew Hoefling [Tue, 5 Mar 2019 03:28:05 +0000 (22:28 -0500)]
Added ReplaceItemsRange API and updated ReplaceRange to invoke the protected method
Commit migrated from https://github.com/dotnet/coreclr/commit/
96de98c1aab0b65c0dfd667bc86e6ab14794306c
Andrew Hoefling [Tue, 5 Mar 2019 02:54:41 +0000 (21:54 -0500)]
Adding braces on for loop
Commit migrated from https://github.com/dotnet/coreclr/commit/
69c3b0355df56fd47f98faf574e24f577f6d29c2
Andrew Hoefling [Tue, 5 Mar 2019 02:53:52 +0000 (21:53 -0500)]
Updated foreach to use T instead of var
Commit migrated from https://github.com/dotnet/coreclr/commit/
ff55c32b76d8843a9be7481200c05ac0d0e2c4c4
Andrew Hoefling [Tue, 5 Mar 2019 02:53:26 +0000 (21:53 -0500)]
Updated index out of range exception check to be a single comparison
Commit migrated from https://github.com/dotnet/coreclr/commit/
3460d643fa62340b45b85ad0a57934c523ba5496
Andrew Hoefling [Tue, 5 Mar 2019 01:16:16 +0000 (20:16 -0500)]
Added new Range Manipulation APIs for Collection<T> which propogate up to ObservableCollection<T>. AddRange, InsertRange, RemoveRange and Replace Range
Commit migrated from https://github.com/dotnet/coreclr/commit/
0f5aee3560635d2c58c023578d00d7955a995163
Adeel [Fri, 8 Mar 2019 19:04:43 +0000 (11:04 -0800)]
Use CLR_LINK
Commit migrated from https://github.com/dotnet/coreclr/commit/
4cfaacd6c29d033bb11869ca9ff700991965c051
Filip Navara [Fri, 8 Mar 2019 18:55:25 +0000 (19:55 +0100)]
Allow deserialization for ResourceManager created with non-default resource set type (dotnet/coreclr#23051)
Commit migrated from https://github.com/dotnet/coreclr/commit/
d74fa42f811dbe28a8c12ae39122f8d110fbfa5c
Bruce Forstall [Fri, 8 Mar 2019 18:31:56 +0000 (10:31 -0800)]
Merge pull request dotnet/coreclr#23119 from BruceForstall/Arm64PrePostIndexCoalescing
Allow coalescing of SP adjustment into single register prolog STR/LDR
Commit migrated from https://github.com/dotnet/coreclr/commit/
fbaff14510fb0c1844b30a3faaf9a2c8323f294b
mikedn [Fri, 8 Mar 2019 18:29:07 +0000 (20:29 +0200)]
Improve SSA renaming memory usage (dotnet/coreclr#15000)
* Cleanup DumpStacks
It's not exactly useful to dump all the stacks after pushing to a stack. Nor is it useful to dump all the stack after popping only some, perhaps none, in PopBlockStacks.
Also dump stack from top to bottom, makes it easier to find the top, which is usually what you care about during SSA renaming.
* Stop passing null block to SsaRenameState::Push
It makes no difference if the definition is in the "block before any real blocks..." or at the start of the first block, it's just an unnecessary complication.
* Stop handling byrefStatesMatchGcHeapStates in SsaRenameState
SsaBuilder already handles that, doing it again in SsaRenameState just duplicates logic.
* Stop using "count" as a name for "SSA number"
Worst name ever.
Also use "block" consistently, instead of a mix of "bb" and "block".
* Delete "ConstructedArray", not needed
* Various cleanup
- Change SsaRenameState to a class
- Cleanup remaining function comments
- Move SsaRenameStateForBlock & SsaRenameStateLocDef inside SsaRenameState
- Make EnsureStacks private
- Reorder data members
- Use m_ prefix consistently
* Replace jitstd::list with a custom stack
std::list has a few drawbacks:
- It's a doubly linked list but a singly linked list suffices so every node wastes 8 bytes for an extra pointer.
- The list object itself is relatively large 2 head/tail pointers, node count and memory allocator. There can be hundreds of such objects (one for each local variable) so the smaller the better.
Replace with a simple singly linked, intrusive list based stack.
* Share push code between lclvar and memory
It's pretty much the same logic (the only difference is that in the memory case "top" can't ever be null so by sharing the code we get a redundant null check).
Commit migrated from https://github.com/dotnet/coreclr/commit/
fb583867ae37e75cf9f5c4f556627283a257d67b
Adeel [Fri, 8 Mar 2019 18:03:08 +0000 (10:03 -0800)]
Remove extra quotes
Commit migrated from https://github.com/dotnet/coreclr/commit/
998e8efa2f0b2ba1e23c4ce582bba3d0f0001727
Egor Chesakov [Fri, 8 Mar 2019 17:56:20 +0000 (09:56 -0800)]
Add outerloop-jitstressregs, outerloop-jitstress2-jitstressregs, outerloop-gcstress0x3-gcstress0xc TestGroups (dotnet/coreclr#23047)
The following build definitions
* coreclr-ci
* coreclr-outerloop
* coreclr-outerloop-jitminopts-jitstress1-jitstress2
* coreclr-outerloop-jitstressregs
* coreclr-outerloop-jitstress2-jitstressregs
* coreclr-outerloop-gcstress0x3-gcstress0xc
can be triggered from pull requests via /azp run x command.
Commit migrated from https://github.com/dotnet/coreclr/commit/
41df61c0f570d94b962430e38b2c24181972b998
Andy Ayers [Fri, 8 Mar 2019 17:02:03 +0000 (09:02 -0800)]
JIT: rework codegen for Arm64 SIMD Extract/Insert intrinsics (dotnet/coreclr#23114)
Add an up-front bounds check during importation instead of waiting
until codegen. Mirrors what we do for similar cases on xarch.
Closes dotnet/coreclr#20260.
Commit migrated from https://github.com/dotnet/coreclr/commit/
34e83028171d6775d1020fe5dab7c4260caf16e1
Carol Eidt [Fri, 8 Mar 2019 16:35:39 +0000 (08:35 -0800)]
Merge pull request dotnet/coreclr#23052 from CarolEidt/Fix22850
Correctly type SIMD stack values
Commit migrated from https://github.com/dotnet/coreclr/commit/
42bacd6a5b0b56f5181c6ab60a9abf05174f3a41
Adeel [Fri, 8 Mar 2019 01:29:22 +0000 (17:29 -0800)]
Address @janvorli's feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
6d26a56a77e86edd3d1df4161c8a9ada5b99a35b
Jan Vorlicek [Fri, 8 Mar 2019 01:31:39 +0000 (17:31 -0800)]
Enable build with clang static analyzer
As part of LLVM, there is a clang static analyzer tool that provides
useful analysis of potential issues in the source code base.
This change enables building coreclr with that analyzer enabled.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7b7f8ec1e3f974a43e96c3f01cb0d5a2da913e17
Sung Yoon Whang [Fri, 8 Mar 2019 09:17:51 +0000 (01:17 -0800)]
disabling tracing/tracevalidation/inducedgc/inducedgc test on ARM64 (dotnet/coreclr#23125)
Commit migrated from https://github.com/dotnet/coreclr/commit/
97d979e539063aaf6c5f8b5446fe703c99e31b7a
Marek Safar [Fri, 8 Mar 2019 07:27:54 +0000 (08:27 +0100)]
Use platform specific implementation of GetCurrentProcessId (dotnet/coreclr#23084)
* Use platform specific implementation of GetCurrentProcessId
directly in shared location instead of relying on runtime export
* Move GetCurrentProcessId to Interop class
* Update ES_BUILD_STANDALONE build
Commit migrated from https://github.com/dotnet/coreclr/commit/
0fee55abb6b7c742cb487b12706dc54080e9e128
Dávid Kaya [Fri, 8 Mar 2019 05:12:31 +0000 (06:12 +0100)]
Added UserFlags field, unblocks dotnet/coreclr#34560 (dotnet/corefxdotnet/coreclr#35851)
* Added UserFlags field
* Added UserFlags
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
1fc9e9c28771863839bf54da3e17f9f2d12e84b2
Sergey Andreenko [Fri, 8 Mar 2019 03:43:37 +0000 (19:43 -0800)]
Fix a rare JitStress assert. (dotnet/coreclr#23116)
* Fix undefined behaviour when we check `this==nullptr`.
* Fix ifdef comment.
* Fix rare jit stress assert.
flowgraph.cpp: !IsUninitialized(tree) can fail if `UninitializedWord` returns a valid pointer value.
Commit migrated from https://github.com/dotnet/coreclr/commit/
24d05f5e6cb905da8d2bf84d0b1525586152c908
Sung Yoon Whang [Fri, 8 Mar 2019 02:34:17 +0000 (18:34 -0800)]
Fix how we check whether events are enabled via LTTng (dotnet/coreclr#22707)
* Fix how we check whether events are enabled via LTTng
* Add GCToEEInterface::UpdateGCEventStatus
* Fix build errors
* Finished hooking it up to post_gc
* Some comments about the event keyword/level detection logic
* Fix windows build
* Fix Prv provider keyword logic
* forgot to add one more ifdef
* Fix OSX build
* one more ifdef to fix
* Addressing PR feedback
* Update GCEventStatus at gc_heap::initialize_gc too
Commit migrated from https://github.com/dotnet/coreclr/commit/
4685a1e008ad7cf4118e8778d89e63d87ca5b7b6
Bruce Forstall [Fri, 8 Mar 2019 01:08:53 +0000 (17:08 -0800)]
Allow coalescing of SP adjustment into single register prolog STR/LDR
Commit migrated from https://github.com/dotnet/coreclr/commit/
6e6a4b26dfe914e6924d03ce91aa52f2fab05d79
Adeel [Fri, 8 Mar 2019 00:50:39 +0000 (16:50 -0800)]
Use DOTNET_${$1} environment variables
Commit migrated from https://github.com/dotnet/coreclr/commit/
89dcb477d1fd1e772c8ce1558e103ee72af60c3b
Carol Eidt [Fri, 8 Mar 2019 00:40:18 +0000 (16:40 -0800)]
Merge pull request dotnet/coreclr#22708 from BrianBohe/updating_comments
Updating ScopeInfo::siUpdate comments/documentation
Commit migrated from https://github.com/dotnet/coreclr/commit/
a2865ead29cc8ef73307927976c3dbaad1298d44
Adeel [Thu, 7 Mar 2019 22:23:55 +0000 (14:23 -0800)]
Improve gcc configuration
* Use `find_path` instead of `check_include_files` for lttng.
* `locate_gcc_exec gcc` to `locate_gcc_exec link` for `gcc_link`
* Remove unused `DCMAKE_OBJCOPY`
* Fix all warnings in gen-buildsys-gcc.sh reported by shellchecker.
Commit migrated from https://github.com/dotnet/coreclr/commit/
c6abb4361b008e03fab815e99e337bc1b5b57df2
Stephen Toub [Thu, 7 Mar 2019 22:28:21 +0000 (14:28 -0800)]
Add missing CopyToAsync override in FileStream.Unix.cs (dotnet/coreclr#23101)
Commit migrated from https://github.com/dotnet/coreclr/commit/
0523c2115da2b35d7f6ce028f4b128b25354078c
Jarret Shook [Thu, 7 Mar 2019 21:35:09 +0000 (13:35 -0800)]
Disable tests based on 23103 and 23096 (dotnet/coreclr#23104)
* Disable tests based on 23103 and 23096
* Remove disable for arm32 AV
Commit migrated from https://github.com/dotnet/coreclr/commit/
833e75d0e65ffa81f6baa1307efb9e6e6c526b8e
mikedn [Thu, 7 Mar 2019 21:29:09 +0000 (23:29 +0200)]
Fix ARMv8.1 atomics disassembly (dotnet/coreclr#23070)
Fixes dotnet/coreclr#20721.
Commit migrated from https://github.com/dotnet/coreclr/commit/
7f5329382ce62478789d80aefcc1e064da24287b
Aaron Robinson [Thu, 7 Mar 2019 20:19:53 +0000 (12:19 -0800)]
Update error message for when a parent is marked as COMVisible(false) (dotnet/coreclr#23092)
* Update message to include type and parent type marked as COMVisible(false)
Commit migrated from https://github.com/dotnet/coreclr/commit/
8b3c55c36531689c337df37f15eb5a40530fa42f
Sinan Kaya [Thu, 7 Mar 2019 02:25:21 +0000 (02:25 +0000)]
Fix signed compare warnings
warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
conversions
Update src/ToolBox/superpmi/mcs/verbdumptoc.cpp
Co-Authored-By: franksinankaya <41809318+franksinankaya@users.noreply.github.com>
Commit migrated from https://github.com/dotnet/coreclr/commit/
5a97d8e9f14763a4ff90d14d045f0173e8d4b944
Andy Ayers [Thu, 7 Mar 2019 18:52:19 +0000 (10:52 -0800)]
JIT: fix filter liveness computation (dotnet/coreclr#23044)
When a filter is finished executing, control can logically pass to the
associated handler, any enclosing handler or filter, or any finally or fault
handler nested within the associated try. This is a consequence of two-pass EH.
The jit was not propagating liveness from the nested handlers, which lead to a
live object being collected inadvertently.
This change updates `fgGetHandlerLiveVars` to find the nested handlers and
merge their live-in into the filter block live sets.
Because these implicit EH flow edges can create cycles in the liveness dataflow
equations, the jit will also now always iterate liveness when it sees there is
exception flow, to ensure livness reaches the appropriate fixed point.
Added test case.
Closes dotnet/coreclr#22820.
Commit migrated from https://github.com/dotnet/coreclr/commit/
f6cc0134fa4bb0d2f329ebc18c4eb662a5a5d973