[Prev][Next][Index]
Bug in SgSymbol constructor
- Date: Thu, 28 Jul 1994 13:54:56 -0600
- From: Diego Novillo <diego@cs.ualberta.ca>
- Subject: Bug in SgSymbol constructor
- To: Sage bug reports <sage-bugs@cica.indiana.edu>
Hi,
I think I hit a bug inside one of the constructors of the
SgSymbol class. I have the following code:
SgSymbol fn(FUNCTION_NAME);
When I run the program it core dumps, the following is the stack
trace for the program:
------------------------------------------------------------------------
Core was generated by `enterprise'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc.so.1.9...done.
Reading symbols from /usr/lib/libdl.so.1.0...done.
#0 0xef77d3c0 in nowalgnd ()
(gdb) where
#0 0xef77d3c0 in nowalgnd ()
#1 0x21738 in newSymbol (code=509, name=0x0, type=0x0) at low_level.c:733
#2 0x1a2dc in SgSymbol::SgSymbol (this=0xeffff5f8, variant=509)
at libSage++.C:1591
#3 0x28e8 in searchAssetCall (st=0x2633a8, numOfCalls=1, fName=0xeffff680)
at enterprise.C:123
#4 0x2838 in compile (file=@0x2632a0) at enterprise.C:69
#5 0x2750 in main (argc=2, argv=0xeffff77c) at enterprise.C:36
(gdb) quit
------------------------------------------------------------------------
I followed it and it turns out that the function newSymbol() in
low_level.c is calling strlen() with a NULL pointer, and strlen() doesn't
like that very much so it goes down in flames.
I could patch it up with an if around it, but I'm not sure if it has been
fixed yet. Thanks for any suggestion. BTW, I'm using Sage++ v1.3.1
Diego.
--
Diego A. Novillo | "We each pay a fabulous price for our
diego@cs.ualberta.ca | visions of paradise. But a spirit with
Computing Science - U of Alberta | a vision is a dream with a mission"
Edmonton, Alberta - Canada | Rush - Mission