Date: Thu, 20 Jul 2006 14:01:28 GMT From: Nikos Ntarmos <ntarmos@ceid.upatras.gr> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/100608: fluxkeys from x11-wm/fluxconf drops core when 'Add' is pressed Message-ID: <200607201401.k6KE1SOP086792@www.freebsd.org> Resent-Message-ID: <200607201410.k6KEAFOr002191@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 100608 >Category: ports >Synopsis: fluxkeys from x11-wm/fluxconf drops core when 'Add' is pressed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 20 14:10:15 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Nikos Ntarmos >Release: FreeBSD 7.0-CURRENT i386 >Organization: NetCInS Lab, CEID, UPatras, Greece >Environment: FreeBSD ace.b020.ceid.upatras.gr 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Wed Jul 19 22:51:43 EEST 2006 root@ace.b020.ceid.upatras.gr:/usr/src/sys/i386/compile/ACE i386 >Description: fluxkeys from x11-wm/fluxconf drops core when the Add button is pressed. The error message refers to an assertion gone bad, however the stack is all mangled up. GDB uncovered 'addkey()' -- the corresponding gtk signal handler -- as the culprit. The function accepts only one argument and handles it in an inappropriate way. This is all on a x86 laptop with 7-CURRENT as of July 17 and all ports rebuilt from scratch, glib/gtk version 2.0 and all libraries as in a July 19 snapshot (per portsnap). >How-To-Repeat: Run fluxkeys and Add several entries. The sample 'keys' file supplied with the fluxbox port is enough to trigger the bug. >Fix: Change the prototype of the function from: void addkey(GtkWidget **) to void addkey(GtkButton*, GtkWidget **). Patch attached (and online at http://ntarmos.dyndns.org/Misc/fluxconf-addkey.diff), with a bumped fluxconf's PORTREVISION. I also informed fluxconf's author wrt this change. --- fluxconf/Makefile.orig Thu Jul 20 11:11:52 2006 +++ fluxconf/Makefile Thu Jul 20 11:13:47 2006 @@ -7,6 +7,7 @@ PORTNAME= fluxconf PORTVERSION= 0.9.9 +PORTREVISION= 1 CATEGORIES= x11-wm MASTER_SITES= http://devaux.fabien.free.fr/flux/ --- /dev/null Thu Jul 20 11:14:56 2006 +++ fluxconf/files/patch-src-fluxkeys-addkey.c Thu Jul 20 11:14:49 2006 @@ -0,0 +1,26 @@ +--- src/include/functions.h.orig Thu Jul 20 11:08:52 2006 ++++ src/include/functions.h Thu Jul 20 11:08:52 2006 +@@ -24,7 +24,7 @@ + char * firstword(char * word, int * offset); + + void savekeys(GtkButton *button, GtkBox ** boxes); +-void addkey(GtkWidget ** boxes); ++void addkey(GtkButton *button, GtkWidget ** boxes); + GtkWidget * newkey(int Ctrl, int Alt, int Shift, int Win, + GList * liste, char *value, char *touche, char *execcmd + ); +--- src/fluxkeys.c.orig Thu Jul 20 11:08:30 2006 ++++ src/fluxkeys.c Thu Jul 20 11:08:30 2006 +@@ -430,11 +430,11 @@ + + +-/* void addkey(GtkButton * but, GtkWidget ** boites) */ +-void addkey(GtkWidget ** boites) ++void addkey(GtkButton * button, GtkWidget ** boites) + { + if (nblignes > MAXKEYCOUNT - 2) + return; ++ button = NULL; + nblignes++; + boites[nblignes] = newkey(FALSE, FALSE, FALSE, FALSE, actlist, "", "", ""); + gtk_box_pack_start(GTK_BOX(mainvbox), boites[nblignes], FALSE, FALSE, 0); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607201401.k6KE1SOP086792>