2009/2/23 Jesús Guerrero <[email protected]>:
> #0 0x000000000040d909 in alloc_buttonlist (ub=0x65e360, num=<value
> optimized out>) at button.c:507
Well, it seems as the the value of "old" is never assigned to
anything. At line 507, we see this:
for(i=0;i<old;i++) bb[i]=ub->c->buttons[i];
Hence it's clear that's causing an access violation.
Does the following work for you?
Index: modules/FvwmButtons/button.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmButtons/button.c,v
retrieving revision 1.40
diff -u -r1.40 button.c
--- modules/FvwmButtons/button.c 22 Feb 2009 21:24:48 -0000 1.40
+++ modules/FvwmButtons/button.c 23 Feb 2009 11:51:06 -0000
@@ -489,6 +489,7 @@
/* needed to prevent a gcc -O3 bug */
volatile int old;
+ old = ub->c->allocated_buttons;
if(num>=ub->c->allocated_buttons)
{
if(num<old || old>(old+32)) /* test for num<old or for signed overflow */
I'm not making any more judgements other than that (my analysis could
be flawed, but it seems odd that "old" is not a volatile int, but
nothing is seemingly assigned to it.
Dominik?
-- Thomas Adam