home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!orcenl!dk.oracle.com!bengsig
- From: bengsig@dk.oracle.com (Bjorn Engsig)
- Newsgroups: comp.unix.aix
- Subject: Re: Debuging Segmentation Violation Fault
- Keywords: Segmentation Violation
- Message-ID: <1992Aug17.102437.21287@dk.oracle.com>
- Date: 17 Aug 92 10:24:37 GMT
- References: <1992Aug14.040021.25316@mcs.kent.edu>
- Sender: news@dk.oracle.com (News Administrator)
- Reply-To: bengsig@dk.oracle.com (Bjorn Engsig)
- Organization: Oracle Denmark
- Lines: 26
- Nntp-Posting-Host: dkunix9.dk.oracle.com
-
- Article <1992Aug14.040021.25316@mcs.kent.edu> by jhuang@Chaos.mcs.kent.edu (Jing Huang) says:
- |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
- In 99% of the cases when you get segmentation violation (or bus error) in
- malloc, it's because you previously malloc'ed less than you actually used.
- In some systems (including AIX 3.1), this was not always harmful, as malloc
- often gave you (much) more than you asked for. In other systems (including
- AIX 3.2), malloc only gives you very little more than you asked for. If you
- are on 3.2, try running your program with the MALLOCTYPE=3.1 environment--
- if that makes your problem disappear, then you surely ask for less than
- you use.
-
- BTW, 78.5% of all statistics are made up.
- |
- | 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?
- It will most likely be very beneficial for you to learn how to use the
- debugger (dbx).
- --
- Bjorn Engsig, Internet: bengsig@oracle.com
- ORACLE Corporation. BANG-net: uunet!oracle!bengsig
- Private : bjorn@login.dkuug.dk.
-