Hello,
I have a very puzzling and disturbing problem in ROOT, when filling trees based on a custom event class. Running either ROOT 4.00/02 or 4.02/00 on my Solaris box (compiled from source with CC 5.6) causes a segfault after a few TTree->Fill() calls. The same code on my OSX box with the fink-supplied 4.02/00 distribution runs fine with no crashes. (OSX 10.3, g++ 3.3) Therefore, I believe it must be something ill-configured in my ROOT compilation on the SUN. Here are some details:
The segfault occurs in the TBasket::WriteBuffer method, as illustrated in the following backtrace from dbx:
signal SEGV (no mapping at the fault address) in TBasket::WriteBuffer at 0xfdfb60cc
0xfdfb60cc: WriteBuffer+0x0478: ld [%l3 + 256], %l2
Current function is GSacq
213 gsTree->Fill();
(dbx) where
[1] TBasket::WriteBuffer(0x17037b88, 0x17037d68, 0x17037cc0, 0xfdfd8fa4, 0x16f0c38e, 0xffbdb208), at 0xfdec1294
[2] TBranch::Fill(0x7891, 0x654, 0x0, 0x170376f0, 0x17037b88, 0x17037d68), at 0xfdec2d04
[3] TBranchElement::Fill(0x170376f0, 0x0, 0xfdfdc118, 0xfdfcf720, 0x4, 0x1), at 0xfdecb974
[4] TBranchElement::Fill(0x17003f40, 0xe, 0xfdfdc118, 0xfdfcf720, 0xfe9f4e3c, 0xc), at 0xfdecb940
[5] TBranchElement::Fill(0x16f8cd20, 0x24, 0xfd9edb20, 0xfdfcf720, 0xfe9f4e3c, 0xb), at 0xfdecb940
[6] TTree::Fill(0x16f0e6a0, 0x0, 0x1426fd40, 0xfdfcf720, 0x1, 0xfdfae85e), at 0xfdeec5d8
=>[7] GSacq(ChatFileName = 0xffbfed54 “testchat”), line 211 in “UserEv.h”
[8] main(argc = 3, argv = 0xffbfee4c), line 250 in “GSSort.cxx”
My environment:
11:53am> CC -V
CC: Sun C++ 5.6 2004/07/15
11:53am> uname -a
SunOS wigner 5.9 Generic_118558-02 sun4u sparc SUNW,Sun-Blade-100
I have placed a gObjectTable->Print() in front of the Fill() call and see that the table is identical for all calls, so nothing is obviously wrong there, as I might expect from the fact that it runs fine on my other computer.
Any ideas what may cause this behavior? Are there particular configure options I should en(dis)able?
Thanks,
-Don