Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Ansi C]core dump的訊息看不懂...

0 views
Skip to first unread message

缺水中...

unread,
May 31, 2002, 12:42:12 PM5/31/02
to
救命啊!
工作站上用gcc和ddd來寫程式,
出現的core dump看不懂,
ddd也沒顯示是那一行出錯,
只秀出這一段:
Program terminated with signal 11, Segmentation Fault.
Reading symbols from /usr/lib/libm.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/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1...done.
#0 0xff2c595c in realloc () from /usr/lib/libc.so.1
(gdb)

有沒有哪位先進看得出這是什麼問題?
我換到另一台工作站還是一樣,
救救我吧..謝謝!!
--
※ Origin: 楓橋驛站<bbs.cs.nthu.edu.tw> ◆ From: radomlai.elec.cgu.edu.tw

Sea Horse

unread,
Jun 2, 2002, 9:58:10 PM6/2/02
to
你的程式有問題。

編譯時把 "-g" 打開,用 debuger 檢查你傳進 realloc() 的參數對不對。
realloc() 是 standard C library, 不太可能會有 bug,應該是你的程式有問題。

"缺水中..." <rado...@bbs.cs.nthu.edu.tw> 撰寫於郵件新聞
:40Wl6G$u...@bbs.cs.nthu.edu.tw...

Sea Horse

unread,
Jun 2, 2002, 9:59:59 PM6/2/02
to
如果找不到,你把你的程式 post 上來,我下載後幫你找 bug.


Segmentation Fault 的 bug 很容易找。


"缺水中..." <rado...@bbs.cs.nthu.edu.tw> 撰寫於郵件新聞
:40Wl6G$u...@bbs.cs.nthu.edu.tw...

0 new messages