HELP! Why do I get error message: "Segmentation fault(coredump)" ?
Luke Mewburn
s902113 at minyos.xx.rmit.oz.au
Fri May 24 09:29:50 AEST 1991
rstanton at leland.Stanford.EDU (Richard Stanton) writes:
>The following may be simple, but I'm new to the AIX environment (and to
>programming in C under any UNIX).
>I am trying to run a large C program on an IBM RS/6000. The program has
>run fine on a VAX, but when I try to run it on the IBM, it starts OK, but
>after a certain point I get the error message:
>"Segmentation fault(coredump)"
>This appears to happen at a section of code where memory is being allocated
>using calloc, but I test for failure here, and my own error message is never
>produced. What does this error message mean, and what do I have to do to
>get the program to run properly?
Well, I had a similar problem recently, but not the same (although, since
you mention the use of 'calloc', the problems are probably related :-)
Anyway, make sure that you are not doing something alongs the lines of
this:
malloc/calloc x bytes. Use x bytes __+1__ (I did this by allocating 20
bytes, and strcpying 20. The \0 overwrote the next block).
Anyway, the malloc table info might be getting corrupted, so you are
getting incorrect malloc results and/or seg. faults
>Another program dies at a similar point, but this time it tells me it can't
>allocate the memory I asked for using my own error message. How can I increase
>the amount of memory available to the program?
>Thanks for any help you can give me.
>Richard Stanton
>pstanton at gsb-lira.stanford.edu
--
____________________________________________________________________________
| | |
| Luke Mewburn (Zak) | This side for lease... |
| s902113 at minyos.xx.rmit.oz.au | (No disclaimer, can't afford it:-) |
More information about the Comp.unix.programmer
mailing list