EvaluateInternal: capture ValuePrinting request early:
`RunFunction()` might trigger unloading of `lastT`, so store its setting for "want value printing" in a local variable before calling RunFunction(). Fixes valgrind complaining about `./stressInterpreter` which is reloading the "outer" stressInterpreter.cxx from inside `RunFunction()`.
This commit is contained in:
parent
3afd3b4056
commit
a860c891d4
@ -1409,11 +1409,11 @@ namespace cling {
|
||||
!lastT->getWrapperFD()) // no wrapper to run
|
||||
return Interpreter::kSuccess;
|
||||
else {
|
||||
bool WantValuePrinting = lastT->getCompilationOpts().ValuePrinting
|
||||
!= CompilationOptions::VPDisabled;
|
||||
ExecutionResult res = RunFunction(lastT->getWrapperFD(), V);
|
||||
if (res < kExeFirstError) {
|
||||
if (lastT->getCompilationOpts().ValuePrinting
|
||||
!= CompilationOptions::VPDisabled
|
||||
&& V->isValid()
|
||||
if (WantValuePrinting && V->isValid()
|
||||
// the !V->needsManagedAllocation() case is handled by
|
||||
// dumpIfNoStorage.
|
||||
&& V->needsManagedAllocation())
|
||||
|
Loading…
x
Reference in New Issue
Block a user