[ROOT] SegV in rootcint when compiled with GCC 3.0

From: Brett Viren (bv@bnl.gov)
Date: Mon Jul 16 2001 - 19:07:59 MEST


Hi,

I sent this to rootdev, but maybe roottalk is a better list to send
things like this?

If others have ROOT + gcc 3.0 on x86 Linux working, can they please
try the quick test below?

I still see this problem with the very latest build.

Thanks,
-Brett.

Brett Viren writes:
 > Hi.
 > 
 > I can trigger a segfault in rootcint as compiled with gcc 3.0 (on x86
 > Debian Gnu/Linux) in classes with templates.  We have several classes
 > in MINOS which fail in the manner described below.  I was able to
 > isolate code to a small class which can trigger the problem:
 > 
 > 
 > // T.h
 > #ifndef T_H
 > #define T_H
 > #include "TObject.h"
 > #include "TString.h"
 > #include <map>
 > class T : public TObject {
 > public:
 >     typedef map<TString,TString> MyMapType
 >     T();
 >     virtual ~T();
 > private:
 >     MyMapType fMyMap;
 >     ClassDef(T,1)
 > };
 > #endif  // T_H
 > 
 > 
 > and the following Linkdef.h:
 > 
 > 
 > // Linkdef.h
 > #pragma link off all globals;
 > #pragma link off all classes;
 > #pragma link off all functions;
 > #pragma link C++ class T;
 > #endif
 > 
 > 
 > Here is what can be learned from gdb:
 > 
 > 
 > gdb rootcint-gcc3.0
 > (gdb) run -f TCint.cc -c -I. T.h Linkdef.h
 > Starting program: /home/bviren/cvs/root/root-gcc3/bin/rootcint -f TCint.cc -c -I. T.h Linkdef.h
 > 
 > Program received signal SIGSEGV, Segmentation fault.
 > 0x0804a645 in TemplateArg(G__DataMemberInfo&, int) (m=@0xbfffa9d4, count=0)
 >     at utils/src/rootcint.cxx:288
 > 288	   static G__TypeInfo ti;
 > Current language:  auto; currently c++
 > (gdb) where
 > #0  0x0804a645 in TemplateArg(G__DataMemberInfo&, int) (m=@0xbfffa9d4, count=0)
 >     at utils/src/rootcint.cxx:288
 > #1  0x0804b3b6 in STLContainerStreamer(G__DataMemberInfo&, int) (
 >     m=@0xbfffa9d4, rwmode=0) at utils/src/rootcint.cxx:472
 > #2  0x0804d78f in WriteStreamer(G__ClassInfo&) (cl=@0xbfffcc84)
 >     at utils/src/rootcint.cxx:968
 > #3  0x0805201b in main (argc=7, argv=0xbffff8dc) at utils/src/rootcint.cxx:1954
 > #4  0x403112eb in __libc_start_main () from /lib/libc.so.6
 > 
 > 
 > I tried understanding the problem more deeply, but I got very confused
 > looking at the G__TypeInfo class.
 > 
 > 
 > When compiling under gcc 2.95, this works fine.  I wonder if this is a
 > problem with gcc3.0 on Debian, with gcc3.0 in general, or with Root.
 > Could someone else test this?
 > 
 > Thanks,
 > -Brett.
 > 
 > PS: please CC: me, I am not on rootdev.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:52 MET