Here’s the relevant (I think) bit of valgrind output. It seems to crash before the log gets printed so I don’t get the list of code to be JITted:
==912271== Conditional jump or move depends on uninitialised value(s)
==912271== at 0x2A4F469E: ???
==912271== by 0x2A4F308E: ???
==912271== by 0x9F82E9D: cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const (in /opt/root/lib/libCling.so)
==912271== by 0x9F0AEBA: cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) (in /opt/root/lib/libCling.so)
==912271== by 0x9F0C62B: cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) (in /opt/root/lib/libCling.so)
==912271== by 0x9E41A02: TCling::Calc(char const*, TInterpreter::EErrorCode*) (in /opt/root/lib/libCling.so)
==912271== by 0x5ABCF79: ROOT::Internal::RDF::InterpreterCalc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x5AC9FED: ROOT::Detail::RDF::RLoopManager::Jit() (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x5AD199D: ROOT::Detail::RDF::RLoopManager::Run() (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x1BF737: TriggerRun (RResultPtr.hxx:350)
==912271== by 0x1BF737: ROOT::RDF::RResultPtr<ROOT::RDF::RCutFlowReport>::Get() (RResultPtr.hxx:142)
==912271== by 0x151DF1: operator-> (RResultPtr.hxx:205)
==912271== by 0x151DF1: main (resolved-recon.cpp:1132)
==912271==
==912271== Use of uninitialised value of size 8
==912271== at 0x2A4F5219: ???
==912271== by 0x2A4F3DC5: ???
==912271== by 0x2A4F46BA: ???
==912271== by 0x2A4F308E: ???
==912271== by 0x9F82E9D: cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const (in /opt/root/lib/libCling.so)
==912271== by 0x9F0AEBA: cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) (in /opt/root/lib/libCling.so)
==912271== by 0x9F0C62B: cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) (in /opt/root/lib/libCling.so)
==912271== by 0x9E41A02: TCling::Calc(char const*, TInterpreter::EErrorCode*) (in /opt/root/lib/libCling.so)
==912271== by 0x5ABCF79: ROOT::Internal::RDF::InterpreterCalc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x5AC9FED: ROOT::Detail::RDF::RLoopManager::Jit() (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x5AD199D: ROOT::Detail::RDF::RLoopManager::Run() (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x1BF737: TriggerRun (RResultPtr.hxx:350)
==912271== by 0x1BF737: ROOT::RDF::RResultPtr<ROOT::RDF::RCutFlowReport>::Get() (RResultPtr.hxx:142)
==912271==
==912271== Invalid read of size 8
==912271== at 0x2A4F5219: ???
==912271== by 0x2A4F3DC5: ???
==912271== by 0x2A4F46BA: ???
==912271== by 0x2A4F308E: ???
==912271== by 0x9F82E9D: cling::IncrementalExecutor::executeWrapper(llvm::StringRef, cling::Value*) const (in /opt/root/lib/libCling.so)
==912271== by 0x9F0AEBA: cling::Interpreter::RunFunction(clang::FunctionDecl const*, cling::Value*) (in /opt/root/lib/libCling.so)
==912271== by 0x9F0C62B: cling::Interpreter::EvaluateInternal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cling::CompilationOptions, cling::Value*, cling::Transaction**, unsigned long) (in /opt/root/lib/libCling.so)
==912271== by 0x9E41A02: TCling::Calc(char const*, TInterpreter::EErrorCode*) (in /opt/root/lib/libCling.so)
==912271== by 0x5ABCF79: ROOT::Internal::RDF::InterpreterCalc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x5AC9FED: ROOT::Detail::RDF::RLoopManager::Jit() (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x5AD199D: ROOT::Detail::RDF::RLoopManager::Run() (in /opt/root/lib/libROOTDataFrame.so)
==912271== by 0x1BF737: TriggerRun (RResultPtr.hxx:350)
==912271== by 0x1BF737: ROOT::RDF::RResultPtr<ROOT::RDF::RCutFlowReport>::Get() (RResultPtr.hxx:142)
==912271== Address 0x5 is not stack'd, malloc'd or (recently) free'd
==912271==
*** Break *** segmentation violation
I’m printing a cutflow report to trigger the event loop earlier than it otherwise would be, in order to figure out what’s triggering the crash.