Hi, With today's CVS using gcc version 3.3.3 on Debian I am finding that rootcint regularly segfaults. See below for auto generated backtrace and some GDB output. The problem is that at cint/src/loadfile.c:2454 2454 G__checkIfOnlyFunction(fentry); fentry has a value of 13 and is used inside G__checkIfOnlyFunction() to index an array that is clearly not that large. I see that fentry gets set 300 lines above this call via: // loadfile.c:2154-2161 if(null_entry == -1) { fentry = G__nfile; G__nfile++; } else { fentry=null_entry; } and (gdb) p G__nfile $3 = 2 So, somewhere in between memory is getting stepped on. Any ideas? -Brett. minos@daedalus:test> root-config --version 4.00/04 minos@daedalus:test> pwd /home/minos/cvs/root/test minos@daedalus:test> rootcint -f EventDict.cxx -c Event.h EventLinkDef.h *** Break *** segmentation violation Generating stack trace... /usr/bin/addr2line: rootcint: No such file or directory /usr/bin/addr2line: rootcint: No such file or directory 0x400ae451 in G__loadfile at cint/src/loadfile.c:2458 from /home/minos/opt/root-debug/lib/libCint.so 0x400aab9d in G__include_file at cint/src/loadfile.c:342 from /home/minos/opt/root-debug/lib/libCint.so 0x400ff557 in G__pragma at cint/src/pragma.c:233 from /home/minos/opt/root-debug/lib/libCint.so 0x400d184d in G__keyword_anytime_7 at cint/src/parse.c:834 from /home/minos/opt/root-debug/lib/libCint.so 0x400d7cdb in G__exec_statement at cint/src/parse.c:3849 from /home/minos/opt/root-debug/lib/libCint.so 0x400ae1a3 in G__loadfile at cint/src/loadfile.c:2322 from /home/minos/opt/root-debug/lib/libCint.so 0x400aab9d in G__include_file at cint/src/loadfile.c:342 from /home/minos/opt/root-debug/lib/libCint.so 0x400da5cb in G__exec_statement at cint/src/parse.c:4397 from /home/minos/opt/root-debug/lib/libCint.so 0x400ae1a3 in G__loadfile at cint/src/loadfile.c:2322 from /home/minos/opt/root-debug/lib/libCint.so 0x400aab46 in G__include_file at cint/src/loadfile.c:328 from /home/minos/opt/root-debug/lib/libCint.so 0x400da5cb in G__exec_statement at cint/src/parse.c:4397 from /home/minos/opt/root-debug/lib/libCint.so 0x400ae1a3 in G__loadfile at cint/src/loadfile.c:2322 from /home/minos/opt/root-debug/lib/libCint.so 0x400aab46 in G__include_file at cint/src/loadfile.c:328 from /home/minos/opt/root-debug/lib/libCint.so 0x400da5cb in G__exec_statement at cint/src/parse.c:4397 from /home/minos/opt/root-debug/lib/libCint.so 0x400ae1a3 in G__loadfile at cint/src/loadfile.c:2322 from /home/minos/opt/root-debug/lib/libCint.so 0x400aab46 in G__include_file at cint/src/loadfile.c:328 from /home/minos/opt/root-debug/lib/libCint.so 0x400da5cb in G__exec_statement at cint/src/parse.c:4397 from /home/minos/opt/root-debug/lib/libCint.so 0x400ae1a3 in G__loadfile at cint/src/loadfile.c:2322 from /home/minos/opt/root-debug/lib/libCint.so 0x400aab46 in G__include_file at cint/src/loadfile.c:328 from /home/minos/opt/root-debug/lib/libCint.so 0x400da5cb in G__exec_statement at cint/src/parse.c:4397 from /home/minos/opt/root-debug/lib/libCint.so 0x400ae1a3 in G__loadfile at cint/src/loadfile.c:2322 from /home/minos/opt/root-debug/lib/libCint.so 0x400a7c62 in G__main at cint/src/init.c:1368 from /home/minos/opt/root-debug/lib/libCint.so 0x080601dc in main + 0x12cc from rootcint 0x40379dc6 in __libc_start_main + 0xc6 from /lib/libc.so.6 0x08050d21 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char) + 0x4d from rootcint Aborted Then in GDB, minos@daedalus:test> gdb rootcint GNU gdb 5.3-debian Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-linux"... (gdb) r -f EventDict.cxx -c Event.h EventLinkDef.h Starting program: /home/minos/opt/root-debug/bin/rootcint -f EventDict.cxx -c Event.h EventLinkDef.h Program received signal SIGSEGV, Segmentation fault. 0x400abc62 in G__checkIfOnlyFunction (fentry=13) at cint/src/loadfile.c:1061 1061 if(dictpos->tagnum == G__struct.alltag) { Current language: auto; currently c (gdb) where #0 0x400abc62 in G__checkIfOnlyFunction (fentry=13) at cint/src/loadfile.c:1061 #1 0x400ae451 in G__loadfile (filenamein=0xbfff16b0 "stdfunc.dll") at cint/src/loadfile.c:2454 #2 0x400aab9d in G__include_file () at cint/src/loadfile.c:342 #3 0x400ff557 in G__pragma () at cint/src/pragma.c:232 #4 0x400d184d in G__keyword_anytime_7 (statement=0xbfff2240 "#pragma") at cint/src/parse.c:833 #5 0x400d7cdb in G__exec_statement () at cint/src/parse.c:3849 #6 0x400ae1a3 in G__loadfile (filenamein=0xbfff2d70 "stdio.h") at cint/src/loadfile.c:2322 #7 0x400aab9d in G__include_file () at cint/src/loadfile.c:342 #8 0x400da5cb in G__exec_statement () at cint/src/parse.c:4396 #9 0x400ae1a3 in G__loadfile (filenamein=0xbfff3e50 "Rtypes.h") at cint/src/loadfile.c:2322 #10 0x400aab46 in G__include_file () at cint/src/loadfile.c:328 #11 0x400da5cb in G__exec_statement () at cint/src/parse.c:4396 #12 0x400ae1a3 in G__loadfile (filenamein=0xbfff4f30 "TObject.h") at cint/src/loadfile.c:2322 #13 0x400aab46 in G__include_file () at cint/src/loadfile.c:328 #14 0x400da5cb in G__exec_statement () at cint/src/parse.c:4396 #15 0x400ae1a3 in G__loadfile (filenamein=0xbfff6010 "TNamed.h") at cint/src/loadfile.c:2322 #16 0x400aab46 in G__include_file () at cint/src/loadfile.c:328 #17 0x400da5cb in G__exec_statement () at cint/src/parse.c:4396 #18 0x400ae1a3 in G__loadfile (filenamein=0xbfff70f0 "TDirectory.h") at cint/src/loadfile.c:2322 #19 0x400aab46 in G__include_file () at cint/src/loadfile.c:328 ---Type <return> to continue, or q <return> to quit---q Quit (gdb) p dictpos $1 = (struct G__dictposition *) 0x0 (gdb) l 1056 struct G__dictposition* dictpos = G__srcfile[fentry].dictpos; 1057 int varflag = 1; 1058 #ifndef G__OLDIMPLEMENTATION2014 1059 int tagflag ; 1060 1061 if(dictpos->tagnum == G__struct.alltag) { 1062 tagflag = 1; 1063 if(dictpos->ptype && (char*)G__PVOID!=dictpos->ptype) { 1064 int i; 1065 for(i=0; i<G__struct.alltag; i++) { (gdb) p fentry $2 = 13 (gdb) p G__srcfile[0] $3 = {fp = 0x88bffc8, hash = 466, filename = 0x88b80c0 "(tmp0)", prepname = 0x0, breakpoint = 0x88c0510 "", maxline = 2, dictpos = 0x88c0138, security = 7, included_from = -1, ispermanentsl = 0, initsl = 0, hasonlyfunc = 0x0, hdrprop = 1 '\001', str = 0x0, vindex = 0, parent_tagnum = -1, slindex = -1} (gdb) p G__srcfile[13] $4 = {fp = 0x0, hash = 0, filename = 0x0, prepname = 0x0, breakpoint = 0x0, maxline = 0, dictpos = 0x0, security = 0, included_from = 12, ispermanentsl = 0, initsl = 0, hasonlyfunc = 0x0, hdrprop = 16 '\020', str = 0x0, vindex = 0, parent_tagnum = -1, slindex = 0}
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET