home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!mcs.kent.edu!Chaos.mcs.kent.edu!jhuang
- From: jhuang@Chaos.mcs.kent.edu (Jing Huang)
- Subject: Debuging Segmentation Violation Fault
- Message-ID: <1992Aug14.040021.25316@mcs.kent.edu>
- Keywords: Segmentation Violation
- Sender: news@mcs.kent.edu (News Administrator)
- Nntp-Posting-Host: chaos.mcs.kent.edu
- Organization: Kent State University
- Date: Fri, 14 Aug 1992 04:00:21 GMT
- Lines: 29
-
- Dear netters, I have always wanted to ask this question. To me, the
- most horrifying error a program can have is "segmentation violation". I never
- have any clear idea about how to debug this kind of fault. Can someone give
- me some advice from his own experience on how to solve this fault?
-
- I have this HUGE C program (20,000 lines). Everything worked fine
- until the other day I added a few (about 10) lines to it. Then all of a sudden,
- it keeps giving me this "segmentation violation". I ran "dbx" to see if I can
- get some clue, it gave me something like:
-
- segmentation violation in malloc_y at 0xd00d43f0
- 0xd00d43f0 (malloc_y+0x2a8) 7c7c45aa stsi r3,r28,0x8
-
- From these two lines, all I can guess is that the fault is related to
- "malloc". But "malloc" is used more than dozens of times throughout the
- program, how am I supposed to know "who steps on whose toe and where".
-
- I am desperate. Could someone tell me what other things I should do
- beyond these two lines? Or maybe what books or manuals should I read to get
- more information? What do those address-like (?) numbers all mean?
-
- Many thanks in advance.
-
- --
- Jing Huang | jhuang@Chaos.mcs.kent.edu
- Department of Physics
- Kent State University
- Kent, OH 44242
-
-