summaryrefslogtreecommitdiff
path: root/src/vm
AgeCommit message (Collapse)AuthorFilesLines
2016-03-21Delete legacy netcf compat support (part 1)Jan Kotas13-274/+12
2016-03-19Fix a CrossGen CreatePDB issue that caused a Windows build breakJohn Chen1-1/+3
CrossGen /CreatePDB command gives preference to the TPA list while loading assemblies. So if the TPA contains the IL version of the input assembly but not the NI version, we would end up loading the IL instead of NI. This causes the CreatePDB command to fail, since it can't operate on IL images. This is fixed by putting the input file as the first entry in the TPA list. Another issue is when the above error does occur, the error message is very unclear (it only shows "Unspecified error"). This is fixed with a better error message. [tfs-changeset: 1587876]
2016-03-18Merge pull request #3812 from janvorli/fix-stubJan Vorlicek1-2/+6
Fix instantiating stub for methods of value types
2016-03-18Fix instantiating stub for methods of value typesJan Vorlicek1-2/+6
This change fixes a problem with instantiating stubs for methods of value types. The problem was that the CreateInstantiatingILStub didn't take into account the fact that methods of value types need to have "this" passed "byref". The issue manifested itself as a rare corruption of references in array of structs that were thin wrappers for string reference during GC stack scan. GC thought that the reference to an array entry is an object reference that starts with method table. GC marks method table pointers by setting their bit zero to 1. But in this case, it has accidentally modified an object reference instead and a test was crashing with wrong object address. The root cause of the problem is that the instantiating stubs were placed on a global singleton reference class no matter whether the target method was on a reference class or a value type. I have fixed it by putting the stubs on the instantiated target generic type instead.
2016-03-17Merge pull request #3783 from mikem8361/fixsosbpMike McLaughlin1-2/+2
Fixed problem with bpmd not working sometimes.
2016-03-17Fixed problem with bpmd not working sometimes.Mike McLaughlin1-2/+2
Fix some too earlier SOS initialization problem. Now returns an error. The DAC interface (IXCLRDataProcess) was being created everytime an command was run and the JIT and GC notification tables where being reinitialized each time losing any JIT notifications needed to resolve a breakpoint. Only create the DAC interface instance once. It does need to be flushed each time sos is entered though. Enable the module load and unload and exception callbacks when the DAC instance is created. This is what windbg does on Windows (along with flushing the DAC each time the target is restarted). It simplifies the breakpoint code; it no longer needs to enable/disable these notification flags. Cleaned up places where the DAC instance (direct calls to LoadClrDebugDll) and not released properly.
2016-03-16Update code to use COMPlus_ instead of COMPLUS_ when referencing knobsManu22-34/+34
2016-03-13Remove remaining strongname validation on WindowsJan Kotas2-4/+4
CodeCLR always skips strongname validation. Some code for strong name validation was still compiled for Windows, but not for Unix. This change removes the differences between Windows and Unix by never compiling the strong name validation code in.
2016-03-13Remove incorrect use of FEATURE_LEGACYSURFACE ifdefJan Kotas1-11/+9
2016-03-11Merge pull request #3671 from brianrob/multicorejitthreadJan Kotas1-7/+1
Use Default Stack Size for Multi-Core JIT Playback Thread
2016-03-11Merge pull request #3590 from jkotas/deadcodeJan Kotas68-3043/+67
Delete dead code
2016-03-10Update Multi-Core JIT to use the default stack size for the JIT playback thread.Brian Robbins1-7/+1
2016-03-10Fix a GC hole in a Ready-to-Run helperJohn Chen (CLR)1-2/+1
Assembly routines DelayLoad_Helper* were putting an argument at a wrong location on the stack. This resulted in a GC hole that caused random crashes, such as dotnet/cli#1785 and dotnet/roslyn#9632.
2016-03-09Delete dead codeJan Kotas68-3043/+67
- Delete BINDER, STANDALONE_BINDER and MDIL ifdefs
2016-03-09Merge pull request #3595 from janvorli/fix-stack-walk-with-finallyJan Vorlicek2-6/+16
Fix stack walking on Unix in case of finally
2016-03-08Fix stack walking on Unix in case of finallyJan Vorlicek2-6/+16
The issue is that the code in the StackFrameIterator::Filter that handles cases when a funclet frame that was already removed from the stack due to native frames unwinding works for catch funclets only and not for finally ones. The ExceptionTracker::GetCallerOfActualHandlingFrame is set for catch funclets only. To make it work for the finally funclets as well, we need to use information from the ExceptionTracker::m_EnclosingClauseInfoForGCReporting instead. There was also another problem in the Filter method that caused the function to spin in an infinite loop when a parent of a funclet was also a funclet. In such case, the code in the method rechecks the current frame but the special functionality to check the exception trackers data needs to be skipped for the recheck. And finally, when we find that the current frame was a parent of an unwound funclet from the evidence in the exception trackers, we also need to set the fSkippingFunclet.
2016-03-08Fix Unix exception handling in finalizersJan Vorlicek4-19/+23
When unhandled exception happens in a finalizer thread and there are no managed frames till the bottom of the stack, the Thread::VirtualUnwindToFirstManagedCallFrame then fails fast. The fix is to make the Thread::VirtualUnwindToFirstManagedCallFrame to return even in case no managed frame is called, which is indicated by its returning 0 as the resulting IP address. The DispatchManagedException then checks that and rethrows the exception instead of trying to call UnwindManagedExceptionPass1. I have also added INSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP to the FinalizerThread::FinalizerThreadStart so that the unhandled exception doesn't escape the stack. And I also needed to modify the UNINSTALL_UNHANDLED_MANAGED_EXCEPTION_TRAP to detect case when the unhandled exception filter was already executed so that it doesn't double-report the unhandled exception.
2016-03-05Modify zaprequire switch to allow Ready-to-Run imagesJohn Chen (CLR)1-0/+5
Address issue #3527.
2016-03-03197654 [x86] [scanRuntime] Fix contracts in gcenv.os.cppMaoni Stephens1-0/+4
[tfs-changeset: 1581565]
2016-03-03Refactor Utilcode's IAllocators.Pat Gavlin1-2/+3
- `DefaultAllocator` has been replaced with `HostAllocator` in RyuJIT, which uses the JIT hosting interface to allocate and free memory. - The definition of `DefaultAllocator` has been moved into its own file, as it remains in use by the interpreter and the binder. - `ProcessHeapAllocator` has been moved into JIT32, as that was its only remaining user. - `AllowZeroAllocator`'s static field has been changed to an instance field to avoid the need to define storage for the static field in Utilcode. [tfs-changeset: 1581242]
2016-03-02Merge pull request #3284 from sejongoh/pull_down_coredistoolSejong Oh2-14/+33
Pulling down coredistool package for gcstress test
2016-03-02Integrate GC changes from full frameworkMaoni Stephens1-0/+174
[tfs-changeset: 1580785]
2016-03-02Merge pull request #3456 from bbowyersmyth/StringReplaceJan Kotas1-1/+0
Port String.Replace(char, char) from CoreRT
2016-03-02Add pulling down coredistool package for gcstress testSejong OH2-14/+33
2016-03-02Port String.Replace(char, char) from CoreRTBruce Bowyer-Smyth1-1/+0
2016-02-29Support long paths in CoreCLR runtime on WindowsJohn Chen (JOCHEN7)3-18/+50
The CoreCLR runtime is updated to support long file paths on Windows. Pending updates to mscorlib.dll, the following scenarios are supported: * Run managed apps from a long path. * Load CoreCLR runtime and framework from a long path. * Load user assemblies from a long path. * Run CrossGen from a long path, with its input/output from a long path. * Generate debug log file at a long path. The following scenarios are not yet supported, and will be fixed in future commits: * Mscorlib.dll and framework assemblies are not yet long path compatible. Note that until mscorlib.dll is fixed, most of the runtime changes can't actually be used. * Support on non-Windows platforms. * Support for debugging and error reporting. * Tools such as ilasm or ildasm.
2016-02-29Fixes issue #2643 and #2731Rahul Kumar4-109/+106
2016-02-26Merge pull request #3375 from BruceForstall/FixAltJitLoadingJan Kotas1-8/+6
Fix CoreCLR altjit loading that was broken by LongFile work
2016-02-26Merge pull request #3357 from janvorli/fix-stackwalkJan Vorlicek3-23/+27
Fix stack walker on Unix
2016-02-25Fix CoreCLR altjit loading that was broken by LongFile workBruce Forstall1-8/+6
2016-02-26Fix stack walker on UnixJan Vorlicek3-23/+27
This change fixes the stack walker on Unix to properly account for the cases when funclet frames were reclaimed due to native frames unwinding and so they are not on the stack anymore. The stack walker needs to know that to properly skip reporting GC references for the parent frame of the funclet. While there was already code attempting to do that, it was incorrectly skipping some exception trackers and not skipping the current tracker in case the catch handler was not called yet. This problem was discovered while running stress tests with GCStress 3.
2016-02-25Remove Assembly.EscapeCodeBase property from CoreCLRPallavi Taneja2-5/+4
2016-02-25Merge pull request #3353 from jkotas/gc-updateJan Kotas1-4/+5
Update GC from CoreRT
2016-02-24Merge pull request #3335 from dotnet-bot/from-tfsJan Kotas6-118/+26
Merge changes from TFS
2016-02-24Fixes for GC updateJan Kotas1-4/+5
2016-02-24Workaround missing UrlEscapeJan Kotas1-0/+5
2016-02-24Merge pull request #3334 from brianrob/perfmap_crossgen_r2rJan Kotas1-6/+5
Fix PerfMap::GetNativeImageSignature to work for ready to run images
2016-02-24Merge pull request #3233 from vancem/RemoveSecurityCheckJan Kotas2-2/+6
Revert "Revert "Remove useless security checks""
2016-02-23[Fix build break] In the previous change I exposed some APIs in mscorlib.dll ↵Pallavi Taneja2-7/+1
to unblock System.Reflection change. However, crossgen.exe trips on this mscorlib.dll since some of the methods it uses is not part of the FEATURE_CORECLR. This change simply exposes these APIs for now. [tfs-changeset: 1578199]
2016-02-23Fix PerfMap::GetNativeImageSignature to work for ready to run images.Brian Robbins1-6/+5
2016-02-23Expose a hosting interface for the JIT.Pat Gavlin4-111/+20
This is the first significant step towards removing the JIT's dependence on utilcode. This change introduces a new interface, `ICorJitHost`, that allows functionality that would usually be provided by the OS to be overridden by the program that is hosting the JIT. At the moment, this is limited to memory allocation and configuration value (e.g. environment variable) access. If the JIT exports a function named `jitStartup`, an instance of the `ICorJitHost` must be provided via that function before the first call to `getJit`. The VM and other implementors of the JIT interface have been updated accordingly. Most implementors should use the common implementation of `ICorJitHost` (cleverly named `JitHost`) in utilcode which respects the CLR's hosting policy. Note that this change does not update RyuJIT (or any other JITs) to use any of the functionality exposed by `ICorJitHost`; that work is left for future changes. [tfs-changeset: 1578176]
2016-02-19Merge pull request #2998 from ramarag/LongFileSupportRama krishnan Raghupathy18-302/+362
Initial Support for LongFile in the VM
2016-02-19This Change Adds initial Support for LongFiles in the VM,Rama Krishnan Raghupathy18-302/+362
They are: 1. Wrappers for OS APIs which take or return PATHS 2. Fixing the usage of following Api's: GetEnvironmentVariableW SearchPathW GetShortPathNameW GetLongPathNameW GetModuleFileName Work remaining: Remove fixed size buffers in the VM
2016-02-19Merge pull request #3250 from janvorli/fix-explicit-frames-popping-2Sergiy Kuryata2-51/+86
Fix the explicit frames unwinding on Unix
2016-02-19Fix the explicit frames unwinding on UnixJan Vorlicek2-51/+86
This change fixes a problem when exception unwinds native frames of code that contains explicit frames. There were two issues. First, the destructor of the explicit frame base class Frame that was responsible for popping the frames was missing switch to GC cooperative mode and so it could pop frames that GC was currently walking. And second, after adding the switch to cooperative mode, it turned out that if a thread gets blocked in the Frame destructor due to GC and the stack walker tries to get stack cookie from FrameWithCookie wrapper of a class derived from the Frame, it fails since the vtable pointer was already reset to the vtable of the base Frame class and it detects that as an invalid case. The fix was to add destructors to all final classes derived from Frame and perform the frame popping from there.
2016-02-18Delete MDIL generation support from JIT-EE interfaceJan Kotas3-656/+30
2016-02-18Revert "Revert "Remove useless security checks""Vance Morrison2-2/+6
This reverts commit a5e803cf70d861022f3b6cddb9045edb8a222e78. Remove more calls to PerformSecurityCheck
2016-02-17Merge pull request #3215 from jkotas/arm-floatargsJan Kotas3-8/+8
Save/restore floating point arguments in asm macros on Linux arm and arm64
2016-02-17Save/restore floating point arguments in transition block on arm and arm64Jan Kotas3-8/+8
The transition block prolog/epilog macros were not correctly saving and restoring the floating point arguments on arm and arm64 on Unix.
2016-02-17Option for Enforcing Intrinsic Expansiondotnet-bot2-2/+9
Currently intrinsic is disabled under MIN_OPT while being enabled under OPT. There is no way to enforce intrinsic expansion where non-intrinsic (call) path is not yet implemented. This adds an optional output boolean argument to getIntrinsicID that tells JIT whether to enforce intrinsic expansion. If JIT cannot expand intrinsic for such case, fatal error occurs. There is no functional change the argument is default to false. [tfs-changeset: 1575973]