summaryrefslogtreecommitdiff
path: root/src/vm/frames.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-04-01Fix next round of warning typesJan Vorlicek1-1/+1
This change fixes the following warnings: 1) Assignment in a condition should be wrapped in () 2) Priority of && / || should be indicated by parentheses. 3) Unknown #pragma optimize ifdefed out for non MSVC 4) Unused functions deleted or put under #ifdef 5) Extra tokens warning disabling moved to the CMakeLists.txt in the src/inc 6) Self assignment of a member or local variable 7) Assigning ~0 to a bitfield member that was just 8 bit wide It also fixes a bug in the STRESS_LOGxx macro invocation in exceptionhandling.cpp and stackwalk.cpp related to recent adding the DBG_ADDR macro usage. This macro expanded a single parameter into two expressions to extract high / low 32 bits separately. But the STRESS_LOGxx parameters are passed to the StressLog::LogMsg method as follows: (void*)(size_t)(data1) That means that the expanded pair x, y would be inserted as data 1 and that leads to ignoring the x due to the comma operator.
2015-03-13Fix managed exception unwinding through CallDescrWorkerInternalJan Vorlicek1-0/+13
This change fixes issue with exception unwinding in the case when the unwinding passed through a frame of the CallDescrWorkerInternal function. This function had personality routine on it, but a windows style personality routine was specified. The windows one has a completely different signature, so the code was crashing. When looking into that, I've found that even if I have implemented a proper Unix style personality routine, it cannot work the same way on Linux as it used to work on Windows. This personality routine's goal is to pop Frames from the Frame list in the current thread so that all frames upto the frame handling the exception are popped. There are two problems on Linux. First, unlike on Windows, the personality routine is not passed the RSP of the frame handling the exception in an official way. Although it can be extracted from the private_2 member of the exception object during the 2nd pass, it is an implementation detail that we cannot rely on. Moreover, even if we used that, it would still not be the right frame in all cases due to the fact that we implement exception filters by catching and rethrowing and so the frame we would get would be the frame of a filtering catch in case there was one. My solution to this problem is to add destructor to the Frame type and let it pop the frame being destroyed if it is still in the list in the current thread. That way the native code unwinding automatically takes care of popping the frames. As an additional changes, I've added handling of the case when the Thread::VirtualUnwindToFirstManagedCallFrame walks out of stack, fixed a stack alignment issue in the recently added StartUnwindingNativeFrames function and a cosmetic change in the UnwindManagedExceptionPass1.
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+2154
[tfs-changeset: 1407945]