When accessing a class member that is the target of an I/O customization rule with TBranch, ROOT crashes after throwing a warning of the form
Warning in <ReadBuffer>: Skipping Simple::fRun because the cache is missing.
$ make
<...>
$ root -q GenerateSimple.C
Processing GenerateSimple.C...
************************
* Row * simple.fR *
************************
* 0 * 100 *
* 1 * 200 *
************************
$ root -q ReadSimple.C
Processing ReadSimple.C...
Warning in <ReadBuffer>: Skipping Simple::fRun because the cache is missing.
*** Break *** segmentation violation
===========================================================
There was a crash (kSigSegmentationViolation).
This is the entire stack trace of all threads:
===========================================================
#0 __internal_syscall_cancel (a1=293816, a2=a2
entry=140723136731240, a3=a3
entry=0, a4=a4
entry=0, a5=a5
entry=0, a6=a6
entry=0, nr=61) at cancellation.c:44
#1 0x00007f714bc94b04 in __syscall_cancel (a1=<optimized out>, a2=a2
entry=140723136731240, a3=a3
entry=0, a4=a4
entry=0, a5=a5
entry=0, a6=a6
entry=0, nr=61) at cancellation.c:75
#2 0x00007f714bd05c6f in __GI___wait4 (pid=<optimized out>, stat_loc=stat_loc
entry=0x7ffca8939868, options=options
entry=0, usage=usage
entry=0x0) at ../sysdeps/unix/sysv/linux/wait4.c:30
#3 0x00007f714bd05cbb in __GI___waitpid (pid=<optimized out>, stat_loc=stat_loc
entry=0x7ffca8939868, options=options
entry=0) at waitpid.c:38
#4 0x00007f714bc547cd in do_system (line=<optimized out>) at ../sysdeps/posix/system.c:172
#5 0x00007f714c93409c in TUnixSystem::Exec (this=0x55f22b02fbf0, shellcmd=0x55f22d7d5590 "/home/jakob/Documents/CERN/ROOT/devel/dbg/etc/gdb-backtrace.sh 293800 1>&2") at /home/jakob/Documents/CERN/ROOT/devel/src/core/unix/src/TUnixSystem.cxx:2133
#6 0x00007f714c934990 in TUnixSystem::StackTrace (this=0x55f22b02fbf0) at /home/jakob/Documents/CERN/ROOT/devel/src/core/unix/src/TUnixSystem.cxx:2424
#7 0x00007f714c9389bc in TUnixSystem::DispatchSignals (this=0x55f22b02fbf0, sig=kSigSegmentationViolation) at /home/jakob/Documents/CERN/ROOT/devel/src/core/unix/src/TUnixSystem.cxx:3651
#8 0x00007f714c92fad0 in SigHandler (sig=kSigSegmentationViolation) at /home/jakob/Documents/CERN/ROOT/devel/src/core/unix/src/TUnixSystem.cxx:410
#9 0x00007f714c93886b in sighandler (sig=11) at /home/jakob/Documents/CERN/ROOT/devel/src/core/unix/src/TUnixSystem.cxx:3622
#10 0x00007f714c920b48 in textinput::TerminalConfigUnix::HandleSignal (this=0x7f714cabeae0 <textinput::TerminalConfigUnix::Get()::s>, signum=11) at /home/jakob/Documents/CERN/ROOT/devel/src/core/textinput/src/textinput/TerminalConfigUnix.cpp:99
#11 0x00007f714c92084e in (anonymous namespace)::TerminalConfigUnix__handleSignal (signum=11) at /home/jakob/Documents/CERN/ROOT/devel/src/core/textinput/src/textinput/TerminalConfigUnix.cpp:36
#12 <signal handler called>
#13 0x00007f714c8af19c in TClass::GetRealData (this=0x0, name=0x7f714cc1208f "fRun") at /home/jakob/Documents/CERN/ROOT/devel/src/core/meta/src/TClass.cxx:3567
#14 0x00007f714c8af0f9 in TClass::GetDataMemberOffset (this=0x0, name=0x7f714cc1208f "fRun") at /home/jakob/Documents/CERN/ROOT/devel/src/core/meta/src/TClass.cxx:3541
#15 0x00007f714cc0eb35 in ROOT::read_Simple_0(char*, TVirtualObject*) () from /home/jakob/Documents/CERN/ROOT/ROOT-3211/schemaEvolutionExample/simple/libSimpleV2.so
#16 0x00007f714b771b33 in TStreamerInfo::ReadBufferArtificial<char**> (this=this
entry=0x55f22d4be7a0, b=..., arr=
0x7ffca893d118: 0x7ffca893d110, aElement=aElement
entry=0x55f22d7d4390, narr=narr
entry=1, eoffset=eoffset
entry=0) at /home/jakob/Documents/CERN/ROOT/devel/src/io/io/src/TStreamerInfoReadBuffer.cxx:565
#17 0x00007f714b83d3d3 in TStreamerInfo::ReadBuffer<char**> (this=<optimized out>, b=..., arr=<optimized out>, compinfo=<optimized out>, first=<optimized out>, last=<optimized out>, narr=<optimized out>, eoffset=<optimized out>, arrayMode=<optimized out>) at /home/jakob/Documents/CERN/ROOT/devel/src/io/io/src/TStreamerInfoReadBuffer.cxx:1728
#18 0x00007f714b5dd791 in TStreamerInfoActions::GenericReadAction (buf=..., addr=0x7ffca893d6a0, config=0x55f22d7d4f60) at /home/jakob/Documents/CERN/ROOT/devel/src/io/io/src/TStreamerInfoActions.cxx:254
#19 0x00007f714b4cf1b9 in TStreamerInfoActions::TConfiguredAction::operator() (this=0x55f22d7d4ff0, buffer=..., object=0x7ffca893d6a0) at /home/jakob/Documents/CERN/ROOT/devel/src/io/io/inc/TStreamerInfoActions.h:123
#20 0x00007f714b4cce1b in TBufferFile::ApplySequence (this=0x55f22d7d51b0, sequence=..., obj=0x7ffca893d6a0) at /home/jakob/Documents/CERN/ROOT/devel/src/io/io/src/TBufferFile.cxx:3754
#21 0x00007f713836edd8 in TBranchElement::ReadLeavesMakeClass (this=0x55f22dc41e20, b=...) at /home/jakob/Documents/CERN/ROOT/devel/src/tree/tree/src/TBranchElement.cxx:4310
#22 0x00007f71383543c3 in TBranch::GetEntry (this=0x55f22dc41e20, entry=0, getall=0) at /home/jakob/Documents/CERN/ROOT/devel/src/tree/tree/src/TBranch.cxx:1752
#23 0x00007f71383682ad in TBranchElement::GetEntry (this=0x55f22dc41e20, entry=0, getall=0) at /home/jakob/Documents/CERN/ROOT/devel/src/tree/tree/src/TBranchElement.cxx:2826
Check duplicate issues.
Description
When accessing a class member that is the target of an I/O customization rule with TBranch, ROOT crashes after throwing a warning of the form
The crash comes from the fact that the rule code is executed but it has
oldObj->GetClass()set to nullptr.Left-over issue from https://its.cern.ch/jira/browse/ROOT-3211
Reproducer
simple.tar.gz
Reproduce with
ROOT version
master
Installation method
from sources
Operating system
Linux
Additional context
No response