Memory allocation problems.

Russell J Fulton;ccc032u russell at ccu1.aukuni.ac.nz
Fri Apr 12 07:24:02 AEST 1991


I am trying to use a program, info.c, which is distributed with the texinfo2
package from GNU. I have tried to compile it with both cc and gcc  but it 
always crashes in a call to malloc with a segment violation. (In fact it 
crashes in a different call to malloc when compiled with the different 
compilers.) I have also tried compiling it under SUNOS with the same results!

BTW this is a 4D/240S running Irix 3.3.2.

Two things I would like to know:
1/ Is there anybody out there who has got this software going under Irix, if
   so I would love to hear how you did it!
2/ In my attempts to debug the problem I have been using dbx to examine the 
dump. Here is what where tells me:

Reading symbolic information of `info' . . .
Process name from core dump: info
Process died at pc 0x40cbf0 of signal : segmentation violation
[using memory image in core]
(dbx) where
>  0 .malloc.malloc(0x0, 0x0, 0x0, 0x7fffc5e0, 0x40a300, 0x0) ["malloc.c":118, 0x40cbec]
   1 xmalloc(bytes = 80) ["info.c":4254, 0x409318]
   2 toploop() ["info.c":3476, 0x4075f4]
   3 begin_info_session() ["info.c":397, 0x400a78]
   4 main(argc = 1, argv = 0x7fffc784) ["info.c":362, 0x40097c]
(dbx) q

What puzzels me is that the call to malloc has a long string of arguments, 
most of which are zero. (all right, 6, 4 of which are zero :-)) but malloc 
only only takes a single parameter. 

Can somebody explain this please? And is it significant to the current problem?

Thanks, Russell
-- 
Russell Fulton, Computer Center, University of Auckland, New Zealand.
<rj_fulton at aukuni.ac.nz>



More information about the Comp.sys.sgi mailing list