summaryrefslogtreecommitdiff
path: root/src/vm
AgeCommit message (Collapse)AuthorFilesLines
2015-12-16Bug fixes from desktopJan Kotas5-23/+43
- Low memory perf fixes in GC - Update EnC-capable logic to depend on assembly manifest [tfs-changeset: 1558202]
2015-12-15Merge pull request #2341 from mikem8361/pipefile2Mike McLaughlin1-1/+2
Debugger transport pipe file cleanup - Part 2
2015-12-15Debugger transport pipe file cleanup - Part 2Mike McLaughlin1-1/+2
Clean up the pipe files in /tmp for unhandled managed exception termination. Added a simple PAL shutdown API to set (one) shutdown callback handler which is used by the debugger code to cleanup the transport thus removing the pipe files from /tmp. This callback is executed PAL_Shutdown, ExitProcess and TerminateProcess, the later used to terminate the process for an unhandled managed exception. Add the __attribute__((destructor)) to the ShutdownTransport function to cover the case if the if a third party host, the managed runtime or third party pinvoked code calls exit().
2015-12-15Build arm64 using private toolsetRahul Kumar4-4/+33
Successfully builds all binaries except sos.dll & x64 binaries
2015-12-15Move Thread.Abort under FEATURE_LEGACYSURFACEJan Kotas1-0/+2
2015-12-14PAL Module/shutdown cleanup.Mike McLaughlin1-1/+1
Added a PAL_Shutdown function that cleans/shutdowns the PAL without exiting/terminating the process doing exactly what ExitProcess/TerminateProcess before exiting the process. Removed the PAL_InitializeCoreCLR export. The new coreclr_* hosting apis should be used. Moved the "is module manager initialized" check (exe_module.prev != NULL) inside the module lock to prevent races during shutdown in LOADCallDllMain. Removed LOADFreeModules so we never try to call the DLL_PROCESS_DETACH handlers. Most of this cleanup happened because I was trying to getting the DLL_PROCESS_DETACH notifications working, but there were too many opportunities for deadlock. Emulating Windows behavior isn't that important and in this case will cause more problems that it fixes. Removed PAL_RegisterLibrary*/PAL_UnregisterLibrary. They were only used in one place to load modules that don't exist anymore (rotor_palrt and sscoree). Renamed LOAD_SEH_CallDllMain to LoadCallDllMainSafe (we don't usually use _ in names) and use this function in all the places we call the DllMain handler. This combines some code in a common place and protects all DllMain calls from exceptions. Source code formatting cleanup and moved internal functions around to be next to the rest of the internal functions. Initialize pDllMain to NULL in LOADAllocModule. Get the DllMain function address into LOADAddModule so that it is initialized in the PAL_RegisterModule path. Changed PAL_UnregisterModule not to call the DllMain function.
2015-12-13Remove unnecessary files from build and disable LNK4221Mike Danes2-22/+12
Some files have their contents ifdefed out because some CLR features (remoting, CAS, fusion etc.) are not present (and they'll probably never be) in CoreCLR. A few others are DAC, CrossGen or arch specific so they have been moved to the appropiate file lists.
2015-12-12Merge pull request #2321 from dotnet-bot/from-tfsJan Kotas7-119/+169
Merge changes from TFS
2015-12-11Port of all JIT changes for .NET Framework 4.6.1 changesBrian Sullivan7-119/+169
http://blogs.msdn.com/b/dotnet/archive/2015/11/30/net-framework-4-6-1-is-now-available.aspx .NET Framework list of changes in 4.6.1 https://github.com/Microsoft/dotnet/blob/master/releases/net461/dotnet461-changes.md Additional changes including - Working ARM64 JIT compiler - Additional JIT Optimizations o Tail call recursion optimization o Array length tracking optimization o CSE for widening casts o Smaller encoding for RIP relative and absolute addresses in addressing modes o Tracked Local Variable increased to 512 o Improved handling of Intrinsics System.GetType() o Improved handling of Math intrinsics - Work for the X86 Ryu-JIT compiler [tfs-changeset: 1557101]
2015-12-11Fix pipe file cleanup in /tmp directory.Mike McLaughlin1-0/+6
The debugger/transport shutdown was not being called because we don't emulate coreclr's DllMain DLL_PROCESS_DETACH callbacks. Adding the DLL_PROCESS_DETACH DllMain callbacks will potentially crash deadlocks and other problems. Added the debugger terminate/shutdown call to EEShutDown's first phase.
2015-12-09Merge pull request #2277 from kouvel/FinalizerDeadlockUndoStephen Toub1-6/+0
Revert "Disable suspend on shutdown during shutdown finalization"
2015-12-08Revert "Disable suspend on shutdown during shutdown finalization"Koundinya Veluri1-6/+0
Reverting commit b18d2a7e30a0d7066d2c09711de07488a7dec475 (PR #2207) due to issue dotnet/corefx#4899, while investigating the issue, to unblock the CI.
2015-12-08Fix build breaks after GC updateJan Kotas2-21/+52
2015-12-08Disable suspend on shutdown during shutdown finalizationKoundinya Veluri1-0/+6
The main thread does not time out waiting for the finalizer thread to complete during shutdown. Cases examined had the main thread blocked waiting for the finalizer thread to complete its work. The finalizer thread was blocked on either the "waiting for GC completion" event or one of the the GC spinlocks. Another thread was blocked for shutdown after entering the spinlock while allocating, or during GC. Allowing other threads to suspend for shutdown could cause the finalizer thread to block indefinitely, leading to a deadlock.
2015-12-06Enable SAFESEH in the Windows x86 buildMike Danes2-1/+22
2015-12-01Fix regression on desktop introduce by #2164Jan Kotas3-3/+3
[tfs-changeset: 1553409]
2015-11-25Integrate bug fixes from desktopJan Kotas2-18/+15
[tfs-changeset: 1552157]
2015-11-25Make app shutdown wait for secondary threadsJan Vorlicek5-7/+7
This change makes the CoreCLR behavior the same as the desktop CLR w.r.t. the app shutdown and secondary threads. Now the application waits for secondary threads to exit before exiting.
2015-11-24Small architecture specific changes to fix the build on linux arm64.jashook1-1/+1
2015-11-20Fix build breaks in desktop buildJan Kotas1-0/+2
[tfs-changeset: 1550852]
2015-11-20Merge pull request #2121 from dotnet-bot/from-tfsJan Kotas1-2/+2
Merge changes from TFS
2015-11-20Merge pull request #2107 from pgavlin/SysVCleanupPat Gavlin3-39/+14
Small cleanups in SysV classification.
2015-11-20Fix build breaks in legacy buildJan Kotas1-2/+2
[tfs-changeset: 1550765]
2015-11-20Merge pull request #2116 from jkotas/gc-updateJan Kotas1-1/+17
Update GC from CoreRT
2015-11-20Merge pull request #2114 from sergiy-k/byrefraxJan Kotas1-12/+9
Do not preserve volatile registers in JIT_ByRefWriteBarrier
2015-11-20Fix build breaks after GC updateJan Kotas1-1/+17
2015-11-19Do not preserve volatile registers in JIT_ByRefWriteBarrierSergiy Kuryata1-12/+9
RyuJIT assumes that all volatile registers can be trashed by the CORINFO_HELP_ASSIGN_BYREF helper (i.e. JIT_ByRefWriteBarrier). So we don't need to save and restore them and can reduce the size of the barrier by a couple of instructions.
2015-11-19Merge pull request #2110 from janvorli/refactor-gc-typesJan Kotas14-21/+21
Refactor gc types
2015-11-19Some formatting cleanupJan Vorlicek2-2/+2
Code formatting (alignment) needs to be fixed at few places.
2015-11-19Merge pull request #2102 from dotnet-bot/from-tfsJan Kotas1-3/+5
Merge changes from TFS
2015-11-19Small cleanups in SysV classification.Pat Gavlin3-39/+14
- Clean up/clarify the logic in CEEInfo::getSystemVAmd64PassStructInRegisterDescriptor - Move a static helper function off of MethodTable
2015-11-19Replaced remaining typesJan Vorlicek2-4/+4
LPARAM, SSIZE_T
2015-11-19Merge pull request #1981 from pgavlin/SysVPat Gavlin2-69/+67
Fix struct padding issues with SysV struct classification.
2015-11-19Add casts to APIs that require LONG / DWORD parametersJan Vorlicek3-4/+4
2015-11-19Fix ARM64 build breakJan Kotas1-3/+5
[tfs-changeset: 1550309]
2015-11-19Merge pull request #2098 from janvorli/fix-threadpool-shiftwaitarrayJan Vorlicek1-2/+2
Fix issue with threadpool and wait for multiple objects on Linux
2015-11-19Fix issue with threadpool and wait for multiple objects on LinuxJan Vorlicek1-2/+2
There is a method ThreadpoolMgr::ShiftWaitArray which uses memcpy to do a move a segment of the waitPointer and waitHandle arrays one position down, so the source and destination ranges overlap. However, it uses memcpy, which on Linux copies items starting from the last one. So the arrays get corrupted after the memcpy, containing multiple copies of the last element and not containig some elements that were expected to move. The fix is to use memmove which should be used when the source and destination memory regions overlap.
2015-11-18Fix dac verification errors caused by 48617aeRahul Kumar1-2/+4
2015-11-18Fix struct padding issues with SysV struct classification.Pat Gavlin2-69/+67
This change revises the handling of padding bytes between struct fields and bytes that trail the last field in a struct. These changes address problems with structs that contain > 8 bytes between fields as well as C# fixed arrays (which are emitted as a struct with a single field of the fixed array element type and an explicit size derived from the number of elements and the size of the element type). The classification given to a particular byte that is not part of a formal field depends on whether that byte is between fields or trails the final field in a struct. Bytes in the former category-- padding bytes--are classified as NO_CLASS as per the SysV ABI spec. Bytes in the latter category--"leftover" bytes after the final field of a struct--are assigned the classification of the final field in the struct. This allows C# fixed-size arrays to work properly, as their representative structs are logically (but unfortunately not physically) structs with element-count fields of the element type. Were they explicit, each of these fields would have the same classification.
2015-11-18Replace most windows style types by c++ typesJan Vorlicek9-14/+14
This change replaces DWORD, LONGLONG, ULONGLONG, SIZE_T, BYTE, LONG32 and few more by standard c++ types. The DWORD still remains present in signatures of Windows APIs used by the GC. There are few issues with those that need to get fixed.
2015-11-18Revert change in 4e06e42 that broke ARM cross buildBen Pye1-1/+1
2015-11-17Merge pull request #2016 from steveharter/CMakeSteve Harter10-42/+88
Enable Clang sanitizers for debug builds (address sanitizer, undefined behavior sanitizer and leak sanitizer)
2015-11-17Enable CLANG sanitizers for native debug buildsSteve Harter10-42/+88
2015-11-16Fixed a bad merge issue and some internal API cleanup.Lubomir Litchev4-21/+69
Sometime ago when the SystemVStructs branch was PRed into master a bad merge has occured. Some struct classification cleanup for native vs. managed struct layout representation. When classifying a native layout of the struct use the following algorithm. 1. If the struct has special marshaling it has a native layout. In such cases the classifier needs to use the native layout. 2. For structs with no native layout, the managed layout should be used even if classified for the purposes of marshaling/PInvoke passing.
2015-11-12Merge pull request #2033 from brianrob/crossgen_perfmap2Brian Robbins6-56/+316
Enable Offline Generation of Text-Based Symbol Tables for NGEN Images
2015-11-12Merge pull request #2013 from mikem8361/createthreadMike McLaughlin2-5/+9
Fix Thread.Start while debugging bug on OSX.
2015-11-13Merge pull request #2031 from janvorli/fix-exceptions-in-filterJan Vorlicek1-1/+28
Fix processing of unhandled exception in exception filter
2015-11-12Fix Thread.Start while debugging bug on OSX.Mike McLaughlin2-5/+9
The OSX exception logic is running on a separate thread from the one that the exception happened. The CatchHardwareExceptionHolder::IsEnabled used to check for h/w exception holders assumed it was running on the thread the exception/holders happened not the exception notification thread. Moved the h/w exception holder count to the CPalThread object instead of a TLS thread variable so the OSX exception code can check it given a CPalThread instance. The main problem was that the stubmgr when creating a thread (for the start notification) put a breakpoint in ThePreStubPatch which is in the coreclr text section and because the h/w exception holder check was broken, it thought the breakpoint wasn't the debugger's and aborted the coreclr process. The other part of this fix is to put a h/w exception holder around the called to ThePreStubPatch in prestub.cpp. The stubmgr's delegate invoke subclass used the wrong registers for Linux/OSX to read the "this" and parameter registers. Added the proper ifdefs and registers (ecx -> rdi, rdx -> rsi) for the Unix platforms. On both Linux and OSX, the h/w exception holder check in the exception routing logic needed to check if the int3/trap is in DBG_DebugBreak so asserts always abort/core dump. Move DBG_DebugBreak to an assembly worker so the start/end address can be used for this check.
2015-11-12Enable offline generation of text-based symbol tables for native images. ↵Brian Robbins6-56/+316
This is needed in order to profile applications on Linux using perf_event. This change also modifies the runtime to emit a perfmap entry when a native image is loaded so that offline trace processing tools can identify when a perfmap file for a native image is needed and generate it.
2015-11-12Merge pull request #2024 from jkotas/crossgen-ifdefsJan Kotas5-10/+16
Improve FEATURE_NATIVE_IMAGE_GENERATION ifdefs