Libfile problem

Alex Waugh ajw498 at ecs.soton.ac.uk
Thu Feb 15 03:12:53 PST 2001


On Wed, 14 Feb 2001, Alex Waugh wrote:

> On 13 Feb 2001, Nick Burrett wrote:
> 
> [Segmentation fault in Libfile]
>  
> > Thanks.  It looks like the SEGV is happening in one of the destructors.
> > You'd need to rebuild Libfile with -O0 and -g2 and see where it crashes.
> > I can't really help on this one, since it doesn't affect my on my i686.
> 
> I'll give this a try tonight.

As far as I could see this didn't give any more information than before.
However adding exit(0) to the end stopped the SEGV and everything seems to
be working now.
I did notice that there were lots of compiler warnings which might be
related:

g++ -fpermissive -DTARGET_RISCOSAOF -DCROSS_COMPILE -O0 -g2  -o /home/riscos/gccsdk/arm-riscos-aof/riscos-aof/libfile/stage1/OflSymt.o -c OflSymt.cc -I. -I../../
BList.h: In method `void List<SymbolInfo *>::freeList()':
BList.h:165:   instantiated from `List<SymbolInfo *>::~List()'
OflSymt.cc:11:   instantiated from here
BList.h:367: warning: `void *' is not a pointer-to-object type
BList.h: In method `void List<BString>::freeList()':
BList.h:165:   instantiated from `List<BString>::~List()'
OflSymt.cc:33:   instantiated from here
BList.h:367: warning: `void *' is not a pointer-to-object type
OflSymt.cc: In method `void OflSymt::set(const List_of_p<Chunk> &, LibDir *)':
OflSymt.cc:45: warning: ANSI C++ forbids cast to non-reference type used as lvalue

g++ -fpermissive -DTARGET_RISCOSAOF -DCROSS_COMPILE -O0 -g2  -o /home/riscos/gccsdk/arm-riscos-aof/riscos-aof/libfile/stage1/ObjFile.o -c ObjFile.cc -I. -I../../
ObjFile.cc: In method `class List<BString> ObjFile::getExternals()':
ObjFile.cc:37: warning: initialization of non-const reference type `class Buffer &'
ObjFile.cc:37: warning: from rvalue of type `Buffer'
Buffer.h:10: warning: in passing argument 1 of `Buffer::Buffer(Buffer &)'
ObjFile.cc:44: warning: initialization of non-const reference type `class Buffer &'
ObjFile.cc:44: warning: from rvalue of type `Buffer'
Buffer.h:10: warning: in passing argument 1 of `Buffer::Buffer(Buffer &)'
BList.h: In method `void List<BString>::freeList()':
BList.h:165:   instantiated from `List<BString>::~List()'
ObjFile.cc:49:   instantiated from here
BList.h:367: warning: `void *' is not a pointer-to-object type

and more of the same.


Cheers

Alex

-- 
Alex Waugh  Electronics student  ajw498 at ecs.soton.ac.uk

RISC OS freeware at http://www.ecs.soton.ac.uk/~ajw498/





More information about the gcc mailing list