summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2018-05-01Merge pull request #17846 from weshaggard/FixSourceBuildWes Haggard1-5/+5
Switch source build property to DotNetBuildFromSource
2018-05-01Disable GC Coop mode switching during fatal error handling during GC ↵Sung Yoon Whang3-5/+69
exception (#17710) (#17844)
2018-04-30Add better portable PDB caching to System.Diagnostics.StackTrace. (#17804) ↵Mike McLaughlin4-83/+71
(#17842) Add portable PDB caching to StackTrace. This is the mscorlib side of the change.
2018-04-30Switch source build property to DotNetBuildFromSourceWes Haggard1-5/+5
Detect source-build via DotNetBuildFromSource instead of DotNetBuildOffline which is set for the tarball build.
2018-04-30Initialize Compiler::Vector128/256ULongHandle in compInitCarol Eidt1-0/+2
2018-04-30Merge pull request #17779 from weshaggard/RemoveAlpineBuildsWes Haggard1-1/+0
[release/2.1] Remove Alpine 3.6 builds
2018-04-30Don't optimize away Task code needed for debugger (#17786)Jan Kotas1-0/+10
This prevents the IL linker from optimizing away some properties/methods related to tasks that are used by a debugger but are not referenced anywhere else in coreclr. This specifically fixes async callstack frames for the xplat C# debugger.
2018-04-30Fix Number.ParseNumber to not assume '\0' at the end of a span (#17808) (#17820)Stephen Toub1-26/+35
* Fix Number.ParseNumber to not assume '\0' at the end of a span This routine was written for parsing strings, which are implicitly null-terminated, and it doesn't factor in string length but instead uses tricks to exit loops when the next character is null. Now that the routine is also used for spans, this is very problematic, as spans need not be null terminated, and generally aren't when they represent slices, and expecting a null termination like this can result in walking off the end of valid memory. I would like to see all of this code rewritten to use span. In the interim, though, as a short-term fix I've changed all dereferences of the current position to compare against the length of the span (or, rather, a pointer to the end), and pretend that a null terminator was found if we've hit the end. * Address PR feedback
2018-04-25Remove Alpine 3.6 buildsWes Haggard1-1/+0
The alpine 3.6 builds have been replaced with the more generic linux-musl builds so removing them.
2018-04-23Make intra-build containers private (#17682)Matt Mitchell1-3/+3
Make intra-build containers private
2018-04-21Use volatile load to read brick table entries (#17718)Jan Kotas2-15/+9
Fixes #17716
2018-04-20Preserve pinned flag in {ReadOnly}Memory<T>.Slice (dotnet/corefx#29246) ↵Ahson Khan2-7/+19
(#17712) (#17714) * Preserve pinned flag in {ReadOnly}Memory<T>.Slice * Address PR feedback. Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
2018-04-20Port two changes from CoreFX missed by mirror: (#17713)Dan Moseley2-10/+42
commit b4d701a72c20b695715371a99b48473053b63250 Author: Ahson Khan <ahkha@microsoft.com> Date: Wed Apr 11 13:43:36 2018 -0700 Add CreateFromPinnedArray to System.Memory ref and add tests (#28992) * Fixing bug in Memory.Pin and adding API to uapaot baseline commit 76e01040fcfdb1c652ef1bf4e8e123c7db4e1be8 Author: Ahson Khan <ahkha@microsoft.com> Date: Mon Apr 16 01:54:54 2018 -0700 Update xml comment for {ReadOnly}Memory.Pin method (#29137)
2018-04-20fix DevDiv_601045 assert (#17685)Sergey Andreenko1-1/+3
2018-04-19Merge pull request #17675 from weshaggard/addlinuxmusl21Wes Haggard1-5/+12
[release/2.1] Add linux-musl build leg
2018-04-19Fix reading Time zone rules using Julian days (#17672)Tarek Mahmoud Sayed2-62/+138
2018-04-19Add linux-musl build legWes Haggard1-5/+12
2018-04-18Skip container creation (#17655)Matt Mitchell1-18/+21
Skip container creation if not in flatcontainer mode Container creation isn't required and would be incorrect if the ExpectedFeedUrl's account name didn't match AccountName
2018-04-18Merge pull request #17615 from CarolEidt/Port17575To2.1Carol Eidt1-8/+0
[Arm64] Disable SIMD in crossgen (added as part of #14633)
2018-04-17Fix extra register-dependency on mem-form cvtsd/s2ssCarol Eidt1-2/+2
2018-04-17[Arm64] Disable SIMD in crossgen (added as part of #14633)Carol Eidt1-8/+0
2018-04-16Merge commit 'master' into release/2.1Russ Keldorph148-2263/+3093
2018-04-15[Arm64] Add full barrier after locking operations (#17567)Steve MacLean1-8/+7
2018-04-14Avoid creating illegal byref pointers (#17524)Bruce Forstall2-1/+105
Byref pointers need to point within their "host" object -- thus the alternate name "interior pointers". If the JIT creates and reports a pointer as a "byref", but it points outside the host object, and a GC occurs that moves the host object, the byref pointer will not be updated. If a subsequent calculation puts the byref "back" into the host object, it will actually be pointing to garbage, since the host object has moved. This occurred on ARM with array index calculations, in particular because ARM doesn't have a single-instruction "base + scale*index + offset" addressing mode. Thus, we were generating, for the jaggedarr_cs_do test case, `ProcessJagged3DArray()` function: ``` // r0 = array object, r6 = computed index offset. We mark r4 as a byref. add r4, r0, r6 // r4 - 32 is the offset of the object we care about. Then we load the array element. // In this case, the loaded element is a gcref, so r4 becomes a gcref. ldr r4, [r4-32] ``` We get this math because the user code uses `a[i - 10]`, which is essentially `a + (i - 10) * 4 + 8` for element size 4. This is optimized to `a + i * 4 - 32`. In the above code, `r6` is `i * 4`. In this case, after the first instruction, `r4` can point beyond the array. If a GC happens, `r4` isn't updated, and the second instruction loads garbage. There are several fixes: 1. Change array morphing in `fgMorphArrayIndex()` to rearrange the array index IR node creation to only create a byref pointer that is precise; don't create "intermediate" byref pointers that don't represent the actual array element address being computed. The tree matching code that annotates the generated tree with field sequences needs to be updated to match the new form. 2. Change `fgMoveOpsLeft()` to prevent the left-weighted reassociation optimization `[byref]+ (ref, [int]+ (int, int)) => [byref]+ ([byref]+ (ref, int), int)`. This optimization creates "incorrect" byrefs that don't necessarily point within the host object. 3. Add an additional condition to the `Fold "((x+icon1)+icon2) to (x+(icon1+icon2))"` morph optimization to prevent merging of constant TYP_REF nodes, which now were being recognized due to different tree shapes. This was probably always a problem, but the particular tree shape wasn't seen before. These fixes are all-platform. However, to reduce risk at this point, the are enabled for ARM only, under the `FEATURE_PREVENT_BAD_BYREFS` `#ifdef`. Fixes #17517. There are many, many diffs. For ARM32 ngen-based desktop asm diffs, it is a 0.30% improvement across all framework assemblies. A lot of the diffs seem to be because we CSE the entire array address offset expression, not just the index expression.
2018-04-14Make Windows builds always portableRuss Keldorph1-7/+2
Apparently there is little or no need for a non-portable Windows build, so rather than trying to figure out which version of Windows we are building on, just ignore -PortableBuild=false. We can add a warning or refuse to accept the switch later if necessary, but for now we need to continue accepting it to avoid build breaks. Fixes #14291
2018-04-14[Arm64/Linux] #17521 for linux (#17546)Steve MacLean1-0/+6
2018-04-14Fix random Segfaults on Ubuntu arm (#17523)Egor Chesakov1-1/+24
Fix random Segfaults on Ubuntu arm
2018-04-13Fix OpenVirtualProcess on Linux issue. (#17551)Mike McLaughlin1-3/+5
2018-04-13Insert int3 after non-returning calls at the end of basic blocks. (#17535)Eugene Rozenfeld1-0/+16
This is a follow-up to #17501 that fixed #17398. gc pointer reporting in fully-interruptible mode: the latter assumed that register gc pointer liveness doesn't change across calls while #6103 introduced codegen where it wasn't true. doesn't change across calls. This change inserts int3 after non-returning calls at the end of basic blocks so that gc pointer liveness doesn't change across calls. This is additional insurance in case any other place in the runtime is dependent on that contract.
2018-04-13Fix default style argument to Double/Single/Decimal.Parse (#17556)Stephen Toub3-3/+3
2018-04-13Merge pull request #17531 from BruceForstall/SpmiProtectJitStartupBruce Forstall2-11/+60
Protect SuperPMI from crashes calling jitStartup
2018-04-13[Arm64/Linux] Use platform memset/memcpy (#17536)Steve MacLean2-330/+16
Fixes buggy memset implementation Use heavily optimized platform implementation Follows amd64 & arm precedent
2018-04-13[Arm64/Windows] Simplify JIT_MemSet & JIT_MemCpy (#17537)Steve MacLean1-222/+37
JIT_Memset alignment code was definitly broken for some unaligned cases JIT_MemCpy likely had the same issue Simplify implementation to reduce maintenance burden
2018-04-13Preserve VASigCookieReg across PInvokeStubWorker call (#17521)Aditya Mandaleeka1-2/+8
The call to PInvokeStubWorker can do all kinds of stuff to the VASigCookieReg in the GenericPInvokeCalli case, since x15 is just a temporary register. Let's save it in a callee-saved register so that when we come back after stub generation, we still have the correct value for the VASigCookie.
2018-04-13Collapse leftover AsSpan().Slice(...) into AsSpan(...) (#29078)Ahson Khan1-1/+1
Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
2018-04-12Remove CreateFromPinnedArray from Memory (moved to MemoryMarshal) (#17532)Ahson Khan1-31/+0
2018-04-12Fix for 17398. (#17501)Eugene Rozenfeld1-11/+31
When enumerating live gc registers, if we are not on the active stack frame, we need to report callee-save gc registers that are live before the call. The reason is that the liveness of gc registers may change across a call to a method that does not return. In this case the instruction after the call may be a jump target and a register that didn't have a live gc pointer before the call may have a live gc pointer after the jump. To make sure we report the registers that have live gc pointers before the call we subtract 1 from curOffs.
2018-04-12Use string.IsNullOrEmpty to eliminate bounds check to first char (#17512)Ben Adams1-1/+7
2018-04-12Protect SuperPMI from crashes calling jitStartupBruce Forstall2-11/+60
When we call jitStartup, we pass a JitHost interface that the JIT calls to query for data. These queries look up in the recorded MCH data, and could fail (and throw an exception) if data is missing, which it can be for running non-matching altjit against a collection. Protect these calls with exception handling.
2018-04-11Fixed checks for Avx/Avx2.InsertVector128 to check the type of the second argBrian Sullivan1-2/+2
Added test case JIT\HardwareIntrinsics\X86\Regression\GitHub_17435
2018-04-11Mutate the global heap valuenumber for any HW intrinsic that performs a ↵Brian Sullivan6-34/+254
memory store operation Use fgMutateGcHeap to record memory write operations by HW Intrinsics Set flags for the HW Intrinsic nodes that access Memory Added support for HWIntrinsic nodes to OperMayThrow Added support for GT_HWIntrinsic to GenTree::OperRequiresAsgFlag() and GenTree::OperIsImplicitIndir() Refactored GenTreeHWIntrinsic::OperIsMemoryLoad() and GenTreeHWIntrinsic::OperIsMemoryStore() Added GenTreeHWIntrinsic::OperIsMemoryLoadOrStore() Deleted the static version of OperIsImplicitIndir(gtOper)
2018-04-11Some cleanup for ArrayPool trimming (#17518)Jeremy Kuhne2-18/+31
* Some cleanup for ArrayPool trimming - fix static names - make config switch more specific - tweak tls free logic for logging * Tweak the name of the config switch
2018-04-11Remove MemoryManager.Length (#17498)Ben Adams2-18/+51
* Remove MemoryManager.Length * Feedback * XML comment nits
2018-04-11Merge pull request #17431 from CarolEidt/Fix17389Carol Eidt3-24/+70
LSRA: remove last uses only at use point
2018-04-11Fix Valuenum:EvalFuncForConstantArgs (#17506)Sergey Andreenko1-6/+5
2018-04-11Fix CoreRT build breaksJan Kotas2-7/+2
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2018-04-11Add GetPinnableReference back to Span and ReadOnlySpan (#17504)Ahson Khan2-0/+14
2018-04-11Fix Assert in ValueTask (#17511)Ben Adams1-1/+1
2018-04-11Fix cmake toolchain compile flags loop (#17380)Petr Bred1-1/+2
- fix https://github.com/dotnet/corert/issues/5093 - cmake toolchain refactoring Signed-off-by: Petr Bred <bredpetr@gmail.com>
2018-04-10Simple trim of ArrayPool buffers (#17078)Jeremy Kuhne10-121/+362
* Simple trim of ArrayPool buffers Trim ArrayPool buffers on Gen2 GC if the buffer stack hasn't been emptied for awhile. If you haven't pulled all of the buffers in the past 10 seconds, let loose the top buffer on the stack and give the stack another 2 seconds of potential life. When the stack gets it's bottom bufferr returned the clock resets. * Collect thread locals as well * Add event * Incorporate memory pressure into trimming. Idea is that we normally give buckets a minute of age time unless the pressure starts to ramp up. As it ramps up we'll trim more off the stacks. If it gets really high we'll consider stale to be 10s instead of 1 min. * Add implementation back for PinnableBufferCacheEventSource. * Remove security attribute. Fix GetMemoryInfo signature * Always use Tls* for shared pools Add environment variable switch * Add guid to PinnableBufferCacheEventSource * Address feedback - move setting code to CLRConfig - add constructor to PBCES - trim large arrays more aggressively - tweak names (ticks to ms, etc.) - interlock creating the cleanup callback - fix project file Rent/return perf numbers are unchanged * Remove static constructor Inline Unsafe.SizeOf * Fix spacing issue * Trim all thread locals when memory pressure is high. Move constants inline. * Undo formatting changes * Add back the internal call * Put the right bits back *sigh* * Missing the line feed * Add event for trim polling * Undo PinnableBufferCacheEventSource reimplementation