Re: operator<< segfault

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Wed, 25 Oct 2006 14:04:09 -0500


Hi Bob,

this is a side effect of an effort to decrease the memory footprint of CINT. Right now we can only offer you a workaround; the underlying problem will be fixed in the coming months. Until then, please load libPhysics before loading your script.

Cheers, Axel.

Bob McElrath wrote:
> I have had the following macro defined for several years (it worked through
> root versions 3 and 4), but with recent releases (5.13) it causes root to
> crash.
>
> ostream& operator<<(ostream& out, const TLorentzVector v) {
> out << "(" << v.X() << ", " << v.Y() << ", " << v.Z() << "; " << v.T() << ")";
> out.flush();
> }
>
> root [0] .L Physics/root/macros-autoload/cout.C
>
> *** Break *** segmentation violation
> Generating stack trace...
> 0xb6676549 in __libc_free + 0x49 from /lib/tls/i686/cmov/libc.so.6
> 0xb73ca64f in G__savestring + 0x2b from /usr/lib/root/libCint.so.5.13
> 0xb73fa477 in G__memfunc_setup + 0x95 from /usr/lib/root/libCint.so.5.13
> 0xb5c413b0 in <unknown> from /usr/lib/root/5.13/libPhysics.so
> 0xb5c41eee in G__cpp_setup_funcG__Physics + 0x1a from /usr/lib/root/5.13/libPhysics.so
> 0xb5c443aa in G__cpp_setupG__Physics + 0x50 from /usr/lib/root/5.13/libPhysics.so
> 0xb73db2f4 in G__call_setup_funcs + 0x52 from /usr/lib/root/libCint.so.5.13
> 0xb5c4b70f in G__cpp_setup_initG__Physics::G__cpp_setup_initG__Physics() + 0x2f from /usr/lib/root/5.13/libPhysics.so
> 0xb5c15567 in <unknown> from /usr/lib/root/5.13/libPhysics.so
> 0xb5c155a3 in <unknown> from /usr/lib/root/5.13/libPhysics.so
> 0xb5c4ed85 in <unknown> from /usr/lib/root/5.13/libPhysics.so
> 0xb5bf64b5 in <unknown> from /usr/lib/root/5.13/libPhysics.so
> 0xb7f317f5 in <unknown> from /lib/ld-linux.so.2
> 0xb7f31921 in <unknown> from /lib/ld-linux.so.2
> 0xb67115b7 in <unknown> from /lib/tls/i686/cmov/libc.so.6
> 0xb7f3144f in <unknown> from /lib/ld-linux.so.2
> 0xb6710c4f in _dl_open + 0x8f from /lib/tls/i686/cmov/libc.so.6
> 0xb68658ee in <unknown> from /lib/tls/i686/cmov/libdl.so.2
> 0xb7f3144f in <unknown> from /lib/ld-linux.so.2
> 0xb686542d in <unknown> from /lib/tls/i686/cmov/libdl.so.2
> 0xb6865888 in dlopen + 0x48 from /lib/tls/i686/cmov/libdl.so.2
> 0xb742de52 in G__dlopen + 0x2c from /usr/lib/root/libCint.so.5.13
> 0xb742defb in G__shl_load + 0x73 from /usr/lib/root/libCint.so.5.13
> 0xb73e17b0 in G__loadfile + 0x13f0 from /usr/lib/root/libCint.so.5.13
> 0xb742d400 in G__loadsystemfile + 0x170 from /usr/lib/root/libCint.so.5.13
> 0xb78a142c in TCint::Load(char const*, bool) + 0xbc from /usr/lib/root/libCore.so.5.13
> 0xb7852e99 in TSystem::Load(char const*, char const*, bool) + 0x475 from /usr/lib/root/libCore.so.5.13
> 0xb792e46d in TUnixSystem::Load(char const*, char const*, bool) + 0x33 from /usr/lib/root/libCore.so.5.13
> 0xb78341db in TROOT::LoadClass(char const*, char const*, bool) + 0x125 from /usr/lib/root/libCore.so.5.13
> 0xb789ed57 in TCint::AutoLoadCallback(char const*, char const*) + 0x19f from /usr/lib/root/libCore.so.5.13
> 0xb789fe18 in TCint_AutoLoadCallback + 0x62 from /usr/lib/root/libCore.so.5.13
> 0xb7432609 in G__class_autoloading + 0x9b from /usr/lib/root/libCint.so.5.13
> 0xb7432a62 in G__defined_tagname + 0x3f0 from /usr/lib/root/libCint.so.5.13
> 0xb73d06c6 in G__readansiproto + 0xbde from /usr/lib/root/libCint.so.5.13
> 0xb73d694b in G__make_ifunctable + 0x1205 from /usr/lib/root/libCint.so.5.13
> 0xb739c6a8 in G__define_var + 0xefc from /usr/lib/root/libCint.so.5.13
> 0xb743fc85 in G__defined_type + 0x633 from /usr/lib/root/libCint.so.5.13
> 0xb7408b19 in G__exec_statement + 0x25e5 from /usr/lib/root/libCint.so.5.13
> 0xb73e1c03 in G__loadfile + 0x1843 from /usr/lib/root/libCint.so.5.13
> 0xb740f524 in G__reloadfile + 0x1da from /usr/lib/root/libCint.so.5.13
> 0xb74129a5 in G__process_cmd + 0x2853 from /usr/lib/root/libCint.so.5.13
> 0xb78a16c6 in TCint::ProcessLine(char const*, TInterpreter::EErrorCode*) + 0x13a from /usr/lib/root/libCore.so.5.13
> 0xb77cd2c9 in TApplication::ProcessLine(char const*, bool, int*) + 0x56b from /usr/lib/root/libCore.so.5.13
> 0xb6874152 in TRint::HandleTermInput() + 0x250 from /usr/lib/root/libRint.so.5.13
> 0xb68737ad in TTermInputHandler::Notify() + 0x25 from /usr/lib/root/libRint.so.5.13
> 0xb68754f0 in TTermInputHandler::ReadNotify() + 0x14 from /usr/lib/root/libRint.so.5.13
> 0xb79309eb in TUnixSystem::CheckDescriptors() + 0x13b from /usr/lib/root/libCore.so.5.13
> 0xb793158e in TUnixSystem::DispatchOneEvent(bool) + 0x13e from /usr/lib/root/libCore.so.5.13
> 0xb784fb12 in TSystem::InnerLoop() + 0x20 from /usr/lib/root/libCore.so.5.13
> 0xb7850f5d in TSystem::Run() + 0x71 from /usr/lib/root/libCore.so.5.13
> 0xb77cc58c in TApplication::Run(bool) + 0x38 from /usr/lib/root/libCore.so.5.13
> 0xb68752ff in TRint::Run(bool) + 0x3a5 from /usr/lib/root/libRint.so.5.13
> 0x08048d80 in main + 0x9c from /usr/bin/root.exe
> 0xb6625ea8 in __libc_start_main + 0xc8 from /lib/tls/i686/cmov/libc.so.6
> 0x08048c61 in TApplicationImp::ShowMembers(TMemberInspector&, char*) + 0x49 from /usr/bin/root.exe
> Root >
>
> --
> Cheers,
> Bob McElrath [Univ. of California at Davis, Department of Physics]
>
> A people that values its privileges above its principles soon loses both.
> - Dwight Eisenhower
Received on Wed Oct 25 2006 - 21:04:21 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET