[295] in SIPB bug reports

home help back first fref pref prev next nref lref last post

X, xdvi core dumps on RT

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sun Jan 29 04:08:37 1989

To: bugs@ATHENA.MIT.EDU, bug-sipb@ATHENA.MIT.EDU
Date: Sun, 29 Jan 89 04:02:47 EST
From: John Carr <jfc@ATHENA.MIT.EDU>

xdvi does not fail gracefully when it runs out of memory: it receives a
segmentation violation and core dumps.  The failure seems to occur in an
Xlib function (which is why I also send to bugs):

% dbx /mit/sipb/rtbin/xdvi core.xdvi
dbx version 3.5 of 5/31/88 23:11 (minos).
Type 'help' for help.
reading symbolic information ...
[using memory image in core.xdvi]
(dbx) where
XCreateImage() at 0x5c18
put_bitmap(0x0, 0x1057bffc, 0x1057c7fc, 0x10000000) at 0x3ec9
set_char(0x0) at 0x31a3
do_pages() at 0x277d
main(0x0, 0x1057bffc) at 0x1a43
(dbx) 

The file I was viewing was /mit/gnu/src/gcc/gcc.dvi, which is 470K.
The resulting core file is 5773312 bytes.  This implies that something
is not being freed after use (the crash came after about 20 pages).

This is another example of the lack of error checking within Xlib:
XCreateImage is not alone in ignoring lack of memory; several other
functions will cause a segmentation fault rather than return an error.

The core dump is in snorkelwacker:u2, "core.xdvi".  Do not access this
file over the network unless you want to spend close to 20 minutes 
waiting for it to be read (it took that long to copy over NFS at 3 AM 
without going through a gateway).


  --John Carr

home help back first fref pref prev next nref lref last post