[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#134262: g++-3.0: Use of dynamic_cast makes compiled program segfault

On 2002-02-16 23:01:21, Martin v. Loewis wrote:
> Daniel Sj�ölie <deepone@acc.umu.se> writes:
> > 0x400a9c59 in osgDB::ReaderWriter::ReadResult::getNode() (this=0xbffff2a0)
> >     at /home/source/osg/cvs/include/osgDB/ReaderWriter:64
> > 64                      osg::Node* getNode() { return dynamic_cast<osg::Node*>(_object.get()); }
> > (gdb) s
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> Can you give a precise specification of the source code you have
> compiled to generate this problem?
> Are you sure that you are not invoking undefined behaviour? More
> specifically, are you sure that 0x808f170 really represents an
> osg::Object* to an object that has been allocated but not yet deleted?

We have now verified that everything works using the same compiler in
RedHat 7.2.

andek@localhost:/home/andek>g++ -v
Reading specs from
Configured with: ../../../3.0.3/configure --prefix=/sw/gcc-3.0.3
--disable-shared --disable-libgcj
Thread model: single
gcc version 3.0.3


andersb@goofy:~$ g++-3.0 -v
Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.3/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,proto,objc --prefix=/usr
--infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as
--with-gnu-ld --with-system-zlib --enable-long-long --enable-nls
--without-included-gettext --disable-checking --enable-threads=posix
--enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc
Thread model: posix
gcc version 3.0.3

Does not work.

Some interesting google hits:


Now take a deep breath, smile and don't take life so seriously... :)

Reply to: