Skip to content

PyROOT / cppyy: potentially ineffcicient "member offset" on enumerators #10724

@Axel-Naumann

Description

@Axel-Naumann

Running ROOT.TParameter["char"]().Print() triggers the following backtrace:

#6  0x00007f5aa1508536 in cling::Interpreter::EvaluateInternal (this=0x55c3b6db88f0, 
    input="TParameter<char>::kMultiply;", CO=..., V=0x7ffeae65ef40, wrapPoint=45)
    at /home/axel/build/root/master2/src/interpreter/cling/lib/Interpreter/Interpreter.cpp:1379
#7  0x00007f5aa1506307 in cling::Interpreter::process (this=0x55c3b6db88f0, 
    input="TParameter<char>::kMultiply;", V=0x7ffeae65ef40, T=0x0, disableValuePrinting=false)
    at /home/axel/build/root/master2/src/interpreter/cling/lib/Interpreter/Interpreter.cpp:840
#8  0x00007f5aa175d89a in cling::MetaProcessor::process (this=0x55c3b78351a0, input_line=..., 
    compRes=@0x7ffeae65eefc: cling::Interpreter::kSuccess, result=0x7ffeae65ef40, disableValuePrinting=false)
    at /home/axel/build/root/master2/src/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:341
#9  0x00007f5aa12b19c0 in HandleInterpreterException (metaProcessor=0x55c3b78351a0, 
    input_line=0x55c3bb82fd10 "TParameter<char>::kMultiply;", 
    compRes=@0x7ffeae65eefc: cling::Interpreter::kSuccess, result=0x7ffeae65ef40)
    at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:2448
#10 0x00007f5aa12b265d in TCling::ProcessLine (this=0x55c3b6cef830, 
    line=0x55c3bb8310e0 "TParameter<char>::kMultiply;", error=0x0)
    at /home/axel/build/root/master2/src/core/metacling/src/TCling.cxx:2608
#11 0x00007f5aa710b936 in Cppyy::GetDatamemberOffset (scope=18, idata=3)
    at /home/axel/build/root/master2/src/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx:1995
#12 0x00007f5aa7288e96 in CPyCppyy::BuildScopeProxyDict (scope=18, pyclass=0x55c3bb8545f0)
    at /home/axel/build/root/master2/src/bindings/pyroot/cppyy/CPyCppyy/src/ProxyWrappers.cxx:353
#13 0x00007f5aa728a648 in CPyCppyy::CreateScopeProxy (name="TParameter<char>", parent=0x55c3b870c0b0)
    at /home/axel/build/root/master2/src/bindings/pyroot/cppyy/CPyCppyy/src/ProxyWrappers.cxx:681
#14 0x00007f5aa7265443 in (anonymous namespace)::MakeCppTemplateClass (args=0x7f5a8ad24ec0)
    at /home/axel/build/root/master2/src/bindings/pyroot/cppyy/CPyCppyy/src/CPyCppyyModule.cxx:368

That seems unnecessary; TClass and friends should know it's an enumerator and should know the value of it.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions