Article View: comp.unix.programmer
Article #3370Re: program crashes
From: Fletcher Glenn
Date: Wed, 14 Nov 2001 16:35
Date: Wed, 14 Nov 2001 16:35
46 lines
3494 bytes
3494 bytes
cal wrote: > > Hi there, > My program crashes with a core. and I check it with debugger. I got the > following. > > Copyright 1998 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 "sparc-sun-solaris2.7"... > Core was generated by `cybAgent'. > Program terminated with signal 9, Killed. > Reading symbols from /usr/lib/libsocket.so.1...done. > Reading symbols from /usr/lib/libnsl.so.1...done. > Reading symbols from /usr/lib/libpthread.so.1...done. > Reading symbols from > /export/home/ccheung/agent/v3/dev/bin/./libstdc++.so.3... done. > Reading symbols from /usr/lib/libm.so.1...done. > Reading symbols from > /export/home/ccheung/agent/v3/dev/bin/./libgcc_s.so.1... done. > Reading symbols from /usr/lib/libc.so.1...done. > Reading symbols from /usr/lib/libdl.so.1...done. > Reading symbols from /usr/lib/libmp.so.2...done. > Reading symbols from /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1...done. > Reading symbols from /usr/lib/libthread.so.1...done. > Reading symbols from /usr/lib/nss_files.so.1...done. > #0 0xff1456c8 in _smalloc () from /usr/lib/libc.so.1 > (gdb) bt > #0 0xff1456c8 in _smalloc () from /usr/lib/libc.so.1 > Segmentation Fault(coredump) > > Anyone know what is smalloc? I'm using g++ 301 compiler. thx smalloc is probably a sub-function of malloc(). You have probably corrupted your heap. This sort of problem is notoriously difficult to troubleshoot as the crash is usually nowhere near the event that causes the corruption. You need to use a heap checker like Rational's Purify, or Electric Fence. -- Fletcher Glenn email f-g-l-e-n-n@quest.com (remove the dashes)
Technical Details
Message-ID:
<3BF29E69.E20C3958@quest.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr21.news.prodigy.com.POSTED!not-for-mailReferences:
<HQvI7.58567$Z2.869852@nnrp1.uunet.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,424856d1b364992b X-Google-Attributes: gid11318c,public X-Google-Thread: fc89c,424856d1b364992b X-Google-Attributes: gidfc89c,public X-Google-Thread: 10ba33,424856d1b364992b X-Google-Attributes: gid10ba33,public X-Google-ArrivalTime: 2001-11-14 08:41:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!newscon02.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr21.news.prodigy.com.POSTED!not-for-mail Message-ID: <3BF29E69.E20C3958@quest.com> From: Fletcher Glenn <f-g-l-e-n-n@quest.com> Organization: Quest Software X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.programmer,gnu.g++.help,gnu.gcc.help Subject: Re: program crashes References: <HQvI7.58567$Z2.869852@nnrp1.uunet.ca> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 46 NNTP-Posting-Host: 209.157.43.194 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr21.news.prodigy.com 1005755702 ST000 209.157.43.194 (Wed, 14 Nov 2001 11:35:02 EST) NNTP-Posting-Date: Wed, 14 Nov 2001 11:35:02 EST X-UserInfo1: OXXQBYWEXZWARRH]^JKBOW@@YJ_ZTB\MV@BD]\YIJYWZUYICD^RAQBKZQTZTX\_I[^G_KGFNON[ZOE_AZNVO^\XGGNTCIRPIJH[@RQKBXLRZ@CD^HKANYVW@RLGEZEJN@\_WZJBNZYYKVIOR]T]MNMG_Z[YVWSCH_Q[GPC_A@CARQVXDSDA^M]@DRVUM@RBM Date: Wed, 14 Nov 2001 16:35:02 GMT