Subject: 2 purify problems in fvwm itself

From: Brad Giaccio <[email-masked]>
Date: Mon, 31 Jan 2000 08:48:10 -0500

I just ran purify on fvwm and I found a couple of things some I fixed the
following log depicts 2 problems that remain.

1. ABR: Array bounds read:
is occuring during startup while parsing my config.  Obviouslly its on a
AddToDecor AddButtonStyle call.  

Here is my config for buttons. These same buttons get created for two 
decor names.

AddToDecor default-decor ButtonStyle All Simple -- UseTitleStyle
AddToDecor default-decor AddButtonStyle 1  Default
# 2 stacked rectangular panels like stills of a window being maximized
AddToDecor default-decor AddButtonStyle 2  \
    Vector 11  \
       95x10@0 95x75@0 25x75@0 65x75@0 65x90@0 10x90@0  \
       10x55@1 25x55@1 25x75@1 25x10@1 95x10@1
AddToDecor default-decor AddButtonStyle 7  \
    Vector 11  \
       95x10@0 95x75@0 25x75@0 65x75@0 65x90@0 10x90@0  \
       10x55@1 25x55@1 25x75@1 25x10@1 95x10@1
# an X
AddToDecor default-decor AddButtonStyle 3 \
    Vector 16 \
       20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x80@0 \
       70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1

#down arrow
AddToDecor default-decor AddButtonStyle 5 4 50x65@1 35x35@1 65x35@1 50x65@0
AddToDecor default-decor AddButtonStyle 4 4 50x65@1 35x35@1 65x35@1 50x65@0

2. UMR: Uninitialized memory read:
is not as serious but this occurs the first time I popup a menu.  It
only occurs on menus bound to keystrokes and/or titles, but not to menus
bound to the root window.

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 31 Jan 2000 15:37:54 +0100

> following log depicts 2 problems that remain.

2.

> ****  Purify instrumented /home/bgiaccio/fvwm23/bin/fvwm2.bgiaccio (pid 14249)  ****
> UMR: Uninitialized memory read:
>   * This is occurring while in:
> 	pop_menu_up    [menus.c:2207]
> 	do_menu        [menus.c:739]
> 	menu_func      [menus.c:5019]
> 	popup_func     [menus.c:5029]
> 	ExecuteFunction [functions.c:829]
> 	HandleButtonPress [events.c:1563]
> 	DispatchEvent  [events.c:210]
> 	HandleEvents   [events.c:246]
> 	main           [fvwm.c:708]
> 	_start         [crt1.o]
>   * Reading 4 bytes from 0xffbeeb14 on the stack.
>   * Address 0xffbeeb14 is      172 bytes below frame pointer in function do_menu.
> 
> ****  Purify instrumented /home/bgiaccio/fvwm23/bin/fvwm2.bgiaccio (pid 14249)  ****
> UMR: Uninitialized memory read:
>   * This is occurring while in:
> 	pop_menu_up    [menus.c:2207]
> 	do_menu        [menus.c:739]
> 	do_windowList  [windowlist.c:512]
> 	ExecuteFunction [functions.c:829]
> 	HandleKeyPress [events.c:504]
> 	DispatchEvent  [events.c:210]
> 	HandleEvents   [events.c:246]
> 	main           [fvwm.c:708]
> 	_start         [crt1.o]
>   * Reading 4 bytes from 0xffbeea4c on the stack.
>   * Address 0xffbeea4c is      172 bytes below frame pointer in function do_menu.

menus.c, line 739:

    if (!pop_menu_up(&(pmp->menu), pmp->parent_menu, pmp->pTmp_win,
		     pmp->pcontext, x, y, prefer_left_submenus,
		     key_press /*warp*/, pmp->pops, NULL, &do_warp_to_title))

Brad, can you isolate which of the parts of *pmp points to the
stack?  Perhaps purify gives better output if you put lines like

  { void *foo = (void *)(pmp->menu); }

before the if-clause? (make sure the optimizer is turned off).

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]