Chinaunix

标题: help!!! redhat 下C++ "Segmentation fault "的原因? [打印本页]

作者: calfordli    时间: 2004-07-01 16:29
标题: help!!! redhat 下C++ "Segmentation fault "的原因?
我的一个应用程序,在我装的一台redhat 9.0和一台redhat 7.2下面运行一段时间后便会core dump,但在另外一台别人装的redhat 7.2机器下运行正常。

运行正常的机器不是我装的,所以不知道是不是我少装了补丁什么的,哪位大侠知道为什么啊。

下面是gdb看到的内容,fram 4以后是我自己写的内容
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 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 "i386-redhat-linux"...
Core was generated by `./GSMGateWay'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/i686/libpthread.so.0...done.

warning: Unable to set global thread event mask: generic error
[New Thread 1024 (LWP 5339)]
Error while reading shared library symbols:
Can't attach LWP 5339: No such process
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libstdc++-libc6.2-2.so.3...done.
Loaded symbols for /usr/lib/libstdc++-libc6.2-2.so.3
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0 chunk_free (ar_ptr=0x401e8620, p=0x809a85 at malloc.c:3180
3180 malloc.c: No such file or directory.
in malloc.c
(gdb) bt
#0 chunk_free (ar_ptr=0x401e8620, p=0x809a85 at malloc.c:3180
#1 0x40134bf4 in __libc_free (mem=0x809a860) at malloc.c:3154
#2 0x400761f6 in __builtin_delete (ptr=0x809a860) from /usr/lib/libstdc++-libc6.2-2.so.3
#3 0x4007621f in __builtin_vec_delete (ptr=0x809a860) from /usr/lib/libstdc++-libc6.2-2.so.3
#4 0x080559f9 in RTCS_CTstring::~RTCS_CTstring (this=0x8099fec, __in_chrg=2) at ../source/RTCSCString.cpp:58
.......




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2