root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically

Home Page:https://root.cern

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation violation during build on ix86 (32 bit intel)

ellert opened this issue · comments

Check duplicate issues.

  • Checked for duplicates

Description

The build of ROOT 6.32.00 on ix86 crashes with a segmentation fault during the generation of the tutorials/hsimple.root file:

===========================================================
There was a crash (kSigSegmentationViolation).
This is the entire stack trace of all threads:
===========================================================
#0  0xf7f03589 in __kernel_vsyscall ()
#1  0xf76ada87 in wait4 () from /lib/libc.so.6
#2  0xf76adc06 in waitpid () from /lib/libc.so.6
#3  0xf76061d8 in do_system () from /lib/libc.so.6
#4  0xf7d17a81 in TUnixSystem::Exec (this=0x57816fd0, shellcmd=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:2151
#5  TUnixSystem::StackTrace (this=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:2442
#6  0xf7d12654 in TUnixSystem::DispatchSignals (this=0x57816fd0, sig=kSigSegmentationViolation) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:3662
#7  0xf7d126d8 in SigHandler (sig=kSigSegmentationViolation) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/unix/src/TUnixSystem.cxx:410
#8  0xf7d02a21 in (anonymous namespace)::TerminalConfigUnix__handleSignal (signum=11) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/textinput/src/textinput/TerminalConfigUnix.cpp:36
#9  <signal handler called>
#10 0xf6f9e92e in bswapcpy32 (to=0x59098bb2, from=0x0, n=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/inc/Bswapcpy.h:61
#11 TBufferFile::WriteFastArray (this=0x58d8e800, ii=0x0, n=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2071
#12 0xf7c419b2 in TArrayI::Streamer (this=0x58ac6028, b=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/cont/src/TArrayI.cxx:157
#13 0xf7d7f75c in ROOT::streamer_TArrayI (buf=..., obj=0x58ac6028) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/redhat-linux-build/core/G__Core.cxx:23134
#14 0xf6fa16a0 in TClass::Streamer (this=0x590e5010, obj=0x58ac6028, b=..., onfile_class=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/meta/inc/TClass.h:614
#15 TBufferFile::WriteFastArray (streamer=0x0, this=0x58d8e800, start=0x58ac6028, cl=0x590e5010, n=1) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2354
#16 TBufferFile::WriteFastArray (this=0x58d8e800, start=0x58ac6028, cl=0x590e5010, n=1, streamer=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2336
#17 0xf722eaf7 in TStreamerInfo::WriteBufferAux<char**> (this=0x592155f0, b=..., arr=
0xffefcb48: 0xffefcb44, compinfo=0x594d315c, first=<optimized out>, last=1, narr=1, eoffset=0, arrayMode=2) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoWriteBuffer.cxx:633
#18 0xf7071540 in TStreamerInfoActions::GenericWriteAction (buf=..., addr=0x58ac5e90, config=0x594d3150) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoActions.cxx:202
#19 0xf6f9f36b in TStreamerInfoActions::TConfiguredAction::operator() (this=0x58dbeab4, buffer=..., object=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/inc/TStreamerInfoActions.h:123
#20 TBufferFile::ApplySequence (this=0x58d8e800, sequence=..., obj=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3679
#21 0xf6fa6058 in TBufferFile::WriteClassBuffer (this=<optimized out>, cl=<optimized out>, pointer=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3648
#22 0xe4213daf in TTree::Streamer (this=0x58ac5e90, b=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TTree.cxx:9626
#23 0xe42319ec in ROOT::streamer_TTree (buf=..., obj=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/redhat-linux-build/tree/tree/G__Tree.cxx:4359
#24 0xf7ced0ad in TStreamerBase::WriteBuffer (this=0x590a9640, b=..., pointer=0x58ac5e90 "\260\360", <incomplete sequence \344>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/meta/src/TStreamerElement.cxx:859
#25 0xf7231bc8 in TStreamerInfo::WriteBufferAux<char**> (this=0x590a94b0, b=..., arr=
0xffefce18: 0xffefce14, compinfo=0x59354f6c, first=<optimized out>, last=1, narr=1, eoffset=0, arrayMode=2) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoWriteBuffer.cxx:660
#26 0xf7071540 in TStreamerInfoActions::GenericWriteAction (buf=..., addr=0x58ac5e90, config=0x59354f60) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoActions.cxx:202
#27 0xf6f9f36b in TStreamerInfoActions::TConfiguredAction::operator() (this=0x594d4bc0, buffer=..., object=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/inc/TStreamerInfoActions.h:123
#28 TBufferFile::ApplySequence (this=0x58d8e800, sequence=..., obj=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3679
#29 0xf6fa6058 in TBufferFile::WriteClassBuffer (this=<optimized out>, cl=<optimized out>, pointer=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3648
#30 0xe41e2ac5 in TNtuple::Streamer (this=0x58ac5e90, b=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TNtuple.cxx:270
#31 0xf7043ae5 in TKey::TKey (this=0x59097cb0, obj=0x58ac5e90, name=0x58ac5ea1 "ntuple", bufsize=8261, motherDir=0x5822ab00) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TKey.cxx:249
#32 0xf700e052 in TFile::CreateKey (this=0x5822ab00, mother=0x5822ab00, obj=0x58ac5e90, name=0x58ac5ea1 "ntuple", bufsize=8261) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TFile.cxx:1050
#33 0xf6ffcb25 in TDirectoryFile::WriteTObject (this=<optimized out>, obj=<optimized out>, name=<optimized out>, option=<optimized out>, bufsize=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TDirectoryFile.cxx:1970
#34 0xf7bd847a in TObject::Write (this=0x58ac5e90, name=0x0, option=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/src/TObject.cxx:869
#35 0xe4203329 in TTree::Write (this=0x58ac5e90, name=0x0, option=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TTree.cxx:9737
#36 TTree::Write (this=0x58ac5e90, name=0x0, option=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TTree.cxx:9746
#37 0xf6ffa511 in TDirectoryFile::Write (this=0x5822ab00, opt=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TDirectoryFile.cxx:1849
#38 0xf701e667 in TFile::Write (this=0x5822ab00, opt=0, bufsiz=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TFile.cxx:2455
#39 0xe4ba17e0 in ?? ()
#40 0xe4ba401e in ?? ()
#41 0xf11db85c in cling::IncrementalExecutor::executeWrapper () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp:217
#42 0xf1160628 in cling::Interpreter::RunFunction () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/Interpreter.cpp:1180
#43 0xf11639fe in cling::Interpreter::EvaluateInternal () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/Interpreter.cpp:1432
#44 0xf116431c in cling::Interpreter::echo () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/Interpreter.cpp:1082
#45 0xf1246c9d in operator() () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaSema.cpp:141
#46 cling::MetaSema::actOnxCommand () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaSema.cpp:158
#47 0xf1258358 in cling::MetaParser::isXCommand () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:321
#48 0xf12586cf in cling::MetaParser::isCommand () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:120
#49 0xf1240484 in cling::MetaProcessor::process () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:317
#50 0xf1058c2f in HandleInterpreterException (metaProcessor=0x581f2be0, input_line=<optimized out>, compRes=
0xffefe348: cling::Interpreter::kSuccess, result=0xffefe350) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/metacling/src/TCling.cxx:2438
#51 0xf108107b in TCling::ProcessLine (this=<optimized out>, line=<optimized out>, error=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/metacling/src/TCling.cxx:2611
#52 0xf10816f8 in TCling::ProcessLineSynch (this=0x578739c0, line=0x585e37e0 ".X  /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/redhat-linux-build/tutorials/./hsimple.C", error=0xffeff0bc) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/metacling/src/TCling.cxx:3578
#53 0xf7b971cb in TApplication::ExecuteFile (file=<optimized out>, error=<optimized out>, keep=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/src/TApplication.cxx:1863
#54 0xf7b97562 in TApplication::ProcessFile (this=0x5784e320, file=0xffeff0cd "hsimple.C", error=0xffeff0bc, keep=false) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/src/TApplication.cxx:1735
#55 0xf7ee0cbe in TRint::ProcessLineNr (this=0x5784e320, filestem=0xf7ef42de "ROOT_cli_", line=0xffeff0ca ".x hsimple.C", error=0xffeff0bc) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/rint/src/TRint.cxx:820
#56 0xf7ee2fbd in TRint::Run (this=0x5784e320, retrn=false) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/rint/src/TRint.cxx:461
#57 0x565db23d in main (argc=<optimized out>, argv=0xfff01224) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/main/src/rmain.cxx:84
===========================================================
The lines below might hint at the cause of the crash. If you see question
marks as part of the stack trace, try to recompile with debugging information
enabled and export CLING_DEBUG=1 environment variable before running.
You may get help by asking at the ROOT forum https://root.cern/forum
preferably using the command (.forum bug) in the ROOT prompt.
Only if you are really convinced it is a bug in ROOT then please submit a
report at https://root.cern/bugs or (preferably) using the command (.gh bug) in
the ROOT prompt. Please post the ENTIRE stack trace
from above as an attachment in addition to anything else
that might help us fixing this issue.
===========================================================
#10 0xf6f9e92e in bswapcpy32 (to=0x59098bb2, from=0x0, n=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/inc/Bswapcpy.h:61
#11 TBufferFile::WriteFastArray (this=0x58d8e800, ii=0x0, n=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2071
#12 0xf7c419b2 in TArrayI::Streamer (this=0x58ac6028, b=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/cont/src/TArrayI.cxx:157
#13 0xf7d7f75c in ROOT::streamer_TArrayI (buf=..., obj=0x58ac6028) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/redhat-linux-build/core/G__Core.cxx:23134
#14 0xf6fa16a0 in TClass::Streamer (this=0x590e5010, obj=0x58ac6028, b=..., onfile_class=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/meta/inc/TClass.h:614
#15 TBufferFile::WriteFastArray (streamer=0x0, this=0x58d8e800, start=0x58ac6028, cl=0x590e5010, n=1) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2354
#16 TBufferFile::WriteFastArray (this=0x58d8e800, start=0x58ac6028, cl=0x590e5010, n=1, streamer=0x0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2336
#17 0xf722eaf7 in TStreamerInfo::WriteBufferAux<char**> (this=0x592155f0, b=..., arr=
0xffefcb48: 0xffefcb44, compinfo=0x594d315c, first=<optimized out>, last=1, narr=1, eoffset=0, arrayMode=2) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoWriteBuffer.cxx:633
#18 0xf7071540 in TStreamerInfoActions::GenericWriteAction (buf=..., addr=0x58ac5e90, config=0x594d3150) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoActions.cxx:202
#19 0xf6f9f36b in TStreamerInfoActions::TConfiguredAction::operator() (this=0x58dbeab4, buffer=..., object=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/inc/TStreamerInfoActions.h:123
#20 TBufferFile::ApplySequence (this=0x58d8e800, sequence=..., obj=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3679
#21 0xf6fa6058 in TBufferFile::WriteClassBuffer (this=<optimized out>, cl=<optimized out>, pointer=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3648
#22 0xe4213daf in TTree::Streamer (this=0x58ac5e90, b=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TTree.cxx:9626
#23 0xe42319ec in ROOT::streamer_TTree (buf=..., obj=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/redhat-linux-build/tree/tree/G__Tree.cxx:4359
#24 0xf7ced0ad in TStreamerBase::WriteBuffer (this=0x590a9640, b=..., pointer=0x58ac5e90 "260360", <incomplete sequence 344>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/meta/src/TStreamerElement.cxx:859
#25 0xf7231bc8 in TStreamerInfo::WriteBufferAux<char**> (this=0x590a94b0, b=..., arr=
0xffefce18: 0xffefce14, compinfo=0x59354f6c, first=<optimized out>, last=1, narr=1, eoffset=0, arrayMode=2) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoWriteBuffer.cxx:660
#26 0xf7071540 in TStreamerInfoActions::GenericWriteAction (buf=..., addr=0x58ac5e90, config=0x59354f60) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TStreamerInfoActions.cxx:202
#27 0xf6f9f36b in TStreamerInfoActions::TConfiguredAction::operator() (this=0x594d4bc0, buffer=..., object=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/inc/TStreamerInfoActions.h:123
#28 TBufferFile::ApplySequence (this=0x58d8e800, sequence=..., obj=0x58ac5e90) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3679
#29 0xf6fa6058 in TBufferFile::WriteClassBuffer (this=<optimized out>, cl=<optimized out>, pointer=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:3648
#30 0xe41e2ac5 in TNtuple::Streamer (this=0x58ac5e90, b=...) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TNtuple.cxx:270
#31 0xf7043ae5 in TKey::TKey (this=0x59097cb0, obj=0x58ac5e90, name=0x58ac5ea1 "ntuple", bufsize=8261, motherDir=0x5822ab00) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TKey.cxx:249
#32 0xf700e052 in TFile::CreateKey (this=0x5822ab00, mother=0x5822ab00, obj=0x58ac5e90, name=0x58ac5ea1 "ntuple", bufsize=8261) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TFile.cxx:1050
#33 0xf6ffcb25 in TDirectoryFile::WriteTObject (this=<optimized out>, obj=<optimized out>, name=<optimized out>, option=<optimized out>, bufsize=<optimized out>) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TDirectoryFile.cxx:1970
#34 0xf7bd847a in TObject::Write (this=0x58ac5e90, name=0x0, option=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/src/TObject.cxx:869
#35 0xe4203329 in TTree::Write (this=0x58ac5e90, name=0x0, option=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TTree.cxx:9737
#36 TTree::Write (this=0x58ac5e90, name=0x0, option=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/tree/tree/src/TTree.cxx:9746
#37 0xf6ffa511 in TDirectoryFile::Write (this=0x5822ab00, opt=0, bufsize=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TDirectoryFile.cxx:1849
#38 0xf701e667 in TFile::Write (this=0x5822ab00, opt=0, bufsiz=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TFile.cxx:2455
#39 0xe4ba17e0 in ?? ()
#40 0xe4ba401e in ?? ()
#41 0xf11db85c in cling::IncrementalExecutor::executeWrapper () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/IncrementalExecutor.cpp:217
#42 0xf1160628 in cling::Interpreter::RunFunction () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/Interpreter.cpp:1180
#43 0xf11639fe in cling::Interpreter::EvaluateInternal () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/Interpreter.cpp:1432
#44 0xf116431c in cling::Interpreter::echo () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/Interpreter/Interpreter.cpp:1082
#45 0xf1246c9d in operator() () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaSema.cpp:141
#46 cling::MetaSema::actOnxCommand () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaSema.cpp:158
#47 0xf1258358 in cling::MetaParser::isXCommand () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:321
#48 0xf12586cf in cling::MetaParser::isCommand () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaParser.cpp:120
#49 0xf1240484 in cling::MetaProcessor::process () at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/interpreter/cling/lib/MetaProcessor/MetaProcessor.cpp:317
#50 0xf1058c2f in HandleInterpreterException (metaProcessor=0x581f2be0, input_line=<optimized out>, compRes=
0xffefe348: cling::Interpreter::kSuccess, result=0xffefe350) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/metacling/src/TCling.cxx:2438
===========================================================
gmake[2]: Leaving directory '/builddir/build/BUILD/root-6.32.00-build/root-6.32.00/redhat-linux-build'
gmake[2]: *** [CMakeFiles/hsimple.dir/build.make:82: tutorials/hsimple.root] Error 129
gmake[2]: *** Deleting file 'tutorials/hsimple.root'
gmake[1]: *** [CMakeFiles/Makefile2:11941: CMakeFiles/hsimple.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....

Looking att the code here:

#if (defined(__linux) || defined(__APPLE__)) && defined(__i386__) && \
defined(__GNUC__)
#define USE_BSWAPCPY
#endif
#ifdef USE_BSWAPCPY
#include "Bswapcpy.h"
#endif

The USE_BSWAPCPY is only used if defined(__i386__), i.e. on 32 bit intel only. The asm code in the Bswapcpy.h header seems to be intented to work for both ix86 and x86_64 though. So I don't know why it is only used for ix86 here.

I have worked around this by replacing linr 40-41 with #if 0, i.e. not using the asm code on ix86 either, which gets rid of the crash. I didn't mak a PR of this change because I don't know if this is the preferred way to fix it.

Reproducer

Build ROOT 6.32.00 on ix86

ROOT version

6.32.00

Installation method

Package build on Fedora ix86 from source

Operating system

Fedora Linux

Additional context

No response

I am confused, what is defined in your case? __i386__ or __i686__ or (literally) __ix86__?

what is defined in your case? __i386__ or __i686__ or (literally) __ix86__?

On ix86:

$ g++ -m32 -E -dM - < /dev/null | sed '/[A-Z]/d' | sort
#define __code_model_32__ 1
#define __gnu_linux__ 1
#define __i386 1
#define __i386__ 1
#define i386 1
#define __i686 1
#define __i686__ 1
#define __linux 1
#define __linux__ 1
#define linux 1
#define __pentiumpro 1
#define __pentiumpro__ 1
#define __unix 1
#define __unix__ 1
#define unix 1

On x86_64:

$ g++ -E -dM - < /dev/null | sed '/[A-Z]/d' | sort
#define __amd64 1
#define __amd64__ 1
#define __code_model_small__ 1
#define __gnu_linux__ 1
#define __k8 1
#define __k8__ 1
#define __linux 1
#define __linux__ 1
#define linux 1
#define __unix 1
#define __unix__ 1
#define unix 1
#define __x86_64 1
#define __x86_64__ 1

Maybe the problem is with pentiumpro:

#if !defined __i486__ && !defined __pentium__ && !defined __pentiumpro__ && \

What happens if you remove !defined __pentiumpro__ there?

Before making any change, I am still trying to understand what is different/new about this platforms. This code had been working for many years on 32bits intel platform. What is 'new' in the environment/hardware you are using?

From the backtrace above:

#10 0xf6f9e92e in bswapcpy32 (to=0x59098bb2, from=0x0, n=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/core/base/inc/Bswapcpy.h:61
#11 TBufferFile::WriteFastArray (this=0x58d8e800, ii=0x0, n=0) at /builddir/build/BUILD/root-6.32.00-build/root-6.32.00/io/io/src/TBufferFile.cxx:2071

I.e. this is called with from = 0. It also has n = 0, so it shouldn't actually read anything from from.

The caller TBufferFile::WriteFastArray has changed between 6.30 and 6.32:

6.30.06:

root/io/io/src/TBufferFile.cxx

Lines 2019 to 2038 in 4f4e716

void TBufferFile::WriteFastArray(const Int_t *ii, Int_t n)
{
if (n <= 0) return;
Int_t l = sizeof(Int_t)*n;
if (fBufCur + l > fBufMax) AutoExpand(fBufSize+l);
#ifdef R__BYTESWAP
# ifdef USE_BSWAPCPY
bswapcpy32(fBufCur, ii, n);
fBufCur += l;
# else
for (int i = 0; i < n; i++)
tobuf(fBufCur, ii[i]);
# endif
#else
memcpy(fBufCur, ii, l);
fBufCur += l;
#endif
}

6.32.00:

root/io/io/src/TBufferFile.cxx

Lines 2055 to 2081 in 22aeb25

void TBufferFile::WriteFastArray(const Int_t *ii, Long64_t n)
{
constexpr Int_t dataWidth = 4;
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Int_t)*n;
if (fBufCur + l > fBufMax) AutoExpand(fBufSize+l);
#ifdef R__BYTESWAP
# ifdef USE_BSWAPCPY
bswapcpy32(fBufCur, ii, n);
fBufCur += l;
# else
for (int i = 0; i < n; i++)
tobuf(fBufCur, ii[i]);
# endif
#else
memcpy(fBufCur, ii, l);
fBufCur += l;
#endif
}

In the old version there is a protection against n = 0: if (n <= 0) return;.

In the new code this has been replaced with generating an error is n < 0.

So the old code did not call bswapcpy32 with n = 0 while the new code does. The crash happens when n = 0.

Hi @vepadulano, @pcanal,

It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise.

Sincerely,
🤖