[31] in bug-owl

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

apparent memory corruption of fmtext?

daemon@ATHENA.MIT.EDU (Erik Nygren)
Wed Jun 26 01:03:19 2002

To: bug-owl@mit.edu
Date: Wed, 26 Jun 2002 01:03:05 -0400
From: Erik Nygren <nygren@MIT.EDU>
Message-Id: <E17N4xO-0007Xa-00@gaia.bay13.org>


When scrolling around in a help message:

(gdb) where
#0  0x4017621f in ?? ()
#1  0x40176074 in ?? ()
#2  0x0805b235 in owl_malloc (size=5) at util.c:301
#3  0x08058a9a in owl_fmtext_init_null (f=0xbfffe16c) at fmtext.c:8
#4  0x080596a1 in owl_fmtext_truncate_cols (in=0xbfffe17c, acol=0, bcol=96, out=0xbfffe16c)
    at fmtext.c:426
#5  0x08062001 in owl_viewwin_redisplay (v=0x8075120, update=1) at viewwin.c:56
#6  0x0805d58d in owl_keys_popless_postalways (j=338) at keys.c:281
#7  0x08066a72 in owl_keyhandler_process (kh=0x80733dc, j=338) at keymap.c:243
#8  0x080532b3 in main (argc=3, argv=0xbffffbf4, env=0xbffffc04) at owl.c:355

It's possible that this is something I introduced, though, as I haven't
been able to reliably reproduce it.

At stack level 4:

(gdb) print *v
$5 = {fmtext = {textlen = 970, 
    textbuff = 0x80c29d8 "OWL HELP\n\nNAME\n\n   show - show information\n\nSYNOPSIS\n   show variables\n   show variable <variable>\n   show filters\n   show filter <filter>\n   show keymaps\n   show keymap <keymap>\n   show commands\n   s"..., fmbuff = 0x80c2db0 '\001' <repeats 16 times>, 
    colorbuff = 0x80c3188 '\b' <repeats 200 times>...}, textlines = 46, topline = 32, rightshift = 0, 
  winlines = 15, wincols = 97, curswin = 0x80c1e14}

My guess is that owl_fmtext_truncate_lines is overwriting something
or double-freeing which is then causing owl_fmtext_truncate_cols to bail.

      Erik


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