Thread View: comp.unix.programmer
3 messages
3 total messages
Started by cal
Wed, 14 Nov 2001 15:07
program crashes
Author: cal
Date: Wed, 14 Nov 2001 15:07
Date: Wed, 14 Nov 2001 15:07
33 lines
2587 bytes
2587 bytes
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
Re: program crashes
Author: 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)
Re: program crashes
Author: Rishad Omar
Date: Thu, 15 Nov 2001 08:16
Date: Thu, 15 Nov 2001 08:16
68 lines
4131 bytes
4131 bytes
I agree with the previous writer that you have probably corrupted your heap. This can also be caused as a side effect of corrupting your stack and then any pointers on it. (I've found that corrupting the stack is a more common problem.) One way of finding the region of code which is responsible for your problem is to comment 'chunks' of code until your code works and then uncommenting smaller chunks until you home into the problem area. Start with newly written source and hopefully you will find your problem. Good luck. Rishad Fletcher Glenn wrote: > > 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) -- -------------------------------------------------- Rishad Omar Philips Research Building: WAY Prof. Holstlaan 4 Phone: +31 (0)40 27 45195 5656 AA Eindhoven Fax: +31 (0)84 22 09385 The Netherlands mailto:omar@natlab.research.philips.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads