This patch fixes an array-out-of-bounds memory access issue. I stumbled upon this bug by pure chance after constantly getting signal 11s from a WindowMaker built with gcc 4.7 (I used 4.4 until now). gcc 4.4 and previous versions didn't show any obvious issue even though some memory has always been overwritten. Fix: Patch attached with submission follows: How-To-Repeat: The problem has always been there. Try running an x11-wm/windowmaker binary built with gcc-4.7 for instant crashes.
Responsible Changed From-To: freebsd-ports-bugs->hrs Over to maintainer (via the GNATS Auto Assign Tool)
Hello, I successfully applied this patch and it solves the issue I had with WindowMaker 0.95.5. Before applying the patch, WindowMaker would start but crashed every time I tried to launch a program, producing the following error message : /usr/local/bin/wmaker(MonitorLoop(monitor.c:132)): warning: Window Maker exited due to a crash (signal 11) and will be restarted. Environment : FreeBSD gemini.local 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Fri Jan 17 01:46:25 UTC 2014 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386
State Changed From-To: open->closed Committed a fix for this issue. Thank you for your report!
Author: hrs Date: Sat Mar 8 21:23:46 2014 New Revision: 347536 URL: http://svnweb.freebsd.org/changeset/ports/347536 QAT: https://qat.redports.org/buildarchive/r347536/ Log: Fix wrong memory access beyond array boundary. Reported by: Francois Tigeot PR: ports/182279 Added: head/x11-wm/windowmaker/files/patch-src-osdep_bsd.c (contents, props changed) Modified: head/x11-wm/windowmaker/Makefile Modified: head/x11-wm/windowmaker/Makefile ============================================================================== --- head/x11-wm/windowmaker/Makefile Sat Mar 8 20:33:13 2014 (r347535) +++ head/x11-wm/windowmaker/Makefile Sat Mar 8 21:23:46 2014 (r347536) @@ -3,7 +3,7 @@ PORTNAME= windowmaker PORTVERSION= 0.95.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-wm windowmaker MASTER_SITES= http://windowmaker.org/pub/%SUBDIR%/ MASTER_SITE_SUBDIR= source/release Added: head/x11-wm/windowmaker/files/patch-src-osdep_bsd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11-wm/windowmaker/files/patch-src-osdep_bsd.c Sat Mar 8 21:23:46 2014 (r347536) @@ -0,0 +1,11 @@ +--- src/osdep_bsd.c.orig 2014-03-09 06:12:39.000000000 +0900 ++++ src/osdep_bsd.c 2014-03-09 06:14:45.000000000 +0900 +@@ -85,8 +85,6 @@ + if (argmax == 0) { /* it hopefully doesn't change at runtime *g* */ + mib[0] = CTL_KERN; + mib[1] = KERN_ARGMAX; +- mib[2] = 0; +- mib[4] = 0; + + count = sizeof(argmax); + if (sysctl(mib, 2, &argmax, &count, NULL, 0) == -1) _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"