summaryrefslogtreecommitdiff
path: root/src/vm/interpreter.cpp
diff options
context:
space:
mode:
authorMike McLaughlin <mikem@microsoft.com>2016-08-31 12:27:12 -0700
committerGitHub <noreply@github.com>2016-08-31 12:27:12 -0700
commit97448547841a58e3b74459d35a48c2b7978d97bc (patch)
treed14b30a9cd17e2c54fbabb4ebb8cd1bd778096d2 /src/vm/interpreter.cpp
parentb73fad38425cd52008d830f7207f81873415e1a5 (diff)
downloadcoreclr-97448547841a58e3b74459d35a48c2b7978d97bc.tar.gz
coreclr-97448547841a58e3b74459d35a48c2b7978d97bc.tar.bz2
coreclr-97448547841a58e3b74459d35a48c2b7978d97bc.zip
Fix funceval of a function returning 16 byte value type. (#6997)
On Linux and OS X, structs less or equal to 16 bytes (instead of 8 bytes on Windows) are enregistered. Only 8 bytes is being passed back to debugger during a funceval of a property or method that returns a 16 byte value type. To fix this, the 16 byte return value (which is only used for enregistered structures of that size on xplat) needed to be plumbed from CallTargetWorker through the MethodDescCallSite macros to the func eval code. The func eval code needed to also deal with 16 byte results. NUMBER_RETURNVALUE_SLOTS is the number of ARG_SLOTs that will contain the maximum enregistered return value. CordbEval:m_result is now ARG_SLOT[NUMBER_RETURNVALUE_SLOTS]. CallTargetWorker is now passed a pointer and the count of bytes to/of the return value buffer. Minor fix to SOS SymbolReader function.
Diffstat (limited to 'src/vm/interpreter.cpp')
-rw-r--r--src/vm/interpreter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vm/interpreter.cpp b/src/vm/interpreter.cpp
index 198ed2b26a..a540cff0b0 100644
--- a/src/vm/interpreter.cpp
+++ b/src/vm/interpreter.cpp
@@ -9578,6 +9578,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T
// This is the argument slot that will be used to hold the return value.
ARG_SLOT retVal = 0;
+ _ASSERTE (NUMBER_RETURNVALUE_SLOTS == 1);
// If the return type is a structure, then these will be initialized.
CORINFO_CLASS_HANDLE retTypeClsHnd = NULL;
@@ -9853,7 +9854,7 @@ void Interpreter::DoCallWork(bool virtualCall, void* thisArg, CORINFO_RESOLVED_T
#if INTERP_ILCYCLE_PROFILE
bool b = CycleTimer::GetThreadCyclesS(&startCycles); assert(b);
#endif // INTERP_ILCYCLE_PROFILE
- retVal = mdcs.CallTargetWorker(args);
+ mdcs.CallTargetWorker(args, &retVal, sizeof(retVal));
if (pCscd != NULL)
{
@@ -10323,7 +10324,7 @@ void Interpreter::CallI()
// to be a managed calling convention.)
MethodDesc* pStubContextMD = reinterpret_cast<MethodDesc*>(m_stubContext);
bool transitionToPreemptive = (pStubContextMD != NULL && !pStubContextMD->IsIL());
- retVal = mdcs.CallTargetWorker(args, transitionToPreemptive);
+ mdcs.CallTargetWorker(args, &retVal, sizeof(retVal), transitionToPreemptive);
}
// retVal is now vulnerable.
GCX_FORBID();