P E Jareth Hein <jareth(a)camelot-soft.com> writes:
SL Baur <steve(a)xemacs.org> writes:
> Here's the recipe to reproduce it assuming a copy of Karl's PNG is
> around.
>
> $ xemacs -vanilla
> C-x C-f /tmp/info-display.png
> C-x k
> M-: (garbage-collect)
> --- Boom! ---
> xemacs: Fatal I/O Error 14 (Bad address) on display connection ":0.0"
> after 1719 requests (1712 known processed) with 0 events remaining.
...
And here's the patch... (how's this for speed?)
An `A' for speed, but unfortunately it doesn't cure the bomb. It
seems to be worthwhile so I'll leave it applied.
1998-04-28 P. E. Jareth Hein <jareth(a)camelot-soft.com>
* glyphs-x.c (x_init_image_instance_from_eimage): Make sure
automatic pointers are null...
$ gdb src/xemacs
(gdb) break free-hook.c:235
Breakpoint 1 at 0x81fcff8: file /home/xemacs/xemacs-20.0/src/free-hook.c, line 235.
(gdb) run
Starting program: /usr/src/build20/mule/src/xemacs
C-x C-f /tmp/info-display.png
C-x k
M-: (garbage-collect)
xemacs: Fatal I/O Error 14 (Bad address) on display connection ":0.0"
after 2689 requests (2687 known processed) with 0 events remaining.
Breakpoint 1, check_free (ptr=0x8566008)
at /home/xemacs/xemacs-20.0/src/free-hook.c:235
235 printf("Freeing unmalloc'ed memory at %p\n", ptr);
(gdb) where
#0 check_free (ptr=0x8566008) at /home/xemacs/xemacs-20.0/src/free-hook.c:235
#1 0x4036e008 in __libc_free (mem=Cannot access memory at address 0xe74.
) at malloc.c:2722
Cannot access memory at address 0xe64.
Hmm, you've fixed part of it. There's still memory corruption
somewhere.