[comp.windows.x] malloc/free bug in server?

rpd@CS.CMU.EDU (Richard Draves) (03/20/88)

My server (Xibm, configured to support AEDs and APA-16s) has aborted several
times with the following

error message: Malloc arena corruption discovered  at - Program error.   Free
non-malloc'ed block.

I hate to submit an official bug report about something I can't reproduce.
Has anyone else run into this or

have any ideas?  In particular I am wondering if it is RT specific.


Rich

lori@hpcvlx.HP.COM (Lori Cook) (03/23/88)

	I have 'run' into a similar problem. If your message is correct about
freeing non-malloc'ed memory, then I suggest you start looking closely at all
calls to 'free' and 'XFree'. I know that in R1 version of the X11 code, the
'XFree' routine had a bug. If you passed a NULL pointer to 'XFree' it would
core dump on our machines. The same is true (appears true) with 'free'. While
in R2, the bug has been fixed in 'XFree' so that it does nothing if passed a
null pointer, the safest bet is to check the pointer that is to be passed to
either of these routine, and only calling the routine if the pointer is
non-NULL.
	Hope this helps!


						Regards
						Lori A. Cook