Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  1 Sep 2003 00:57:54 +0200
From:      Clement Laforet <sheepkiller@cultdeadsheep.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Clement Laforet <sheepkiller@cultdeadsheep.org>
Subject:   ports/56252: [patch] databases/mysql{323,40,41}-server: fix possible infinite loop if USE_MYSQL is accidently defined
Message-ID:  <20030831225852.5342243FEC@mx1.FreeBSD.org>
Resent-Message-ID: <200308312300.h7VN0ZXv040234@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         56252
>Category:       ports
>Synopsis:       [patch] databases/mysql{323,40,41}-server: fix possible infinite loop if USE_MYSQL is accidently defined
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 31 16:00:35 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Clement Laforet
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
cotds.org
>Environment:
System: FreeBSD lucifer.cultdeadsheep.org 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Sun Aug 24 15:37:26 CEST 2003 root@lucifer.cultdeadsheep.org:/usr/obj/usr/src/sys/LUCIFER i386

	
>Description:
	When USE_MYSQL is defined out of a port, it can cause infinite loop.
	These patches (read "copy and paste"), obtained from openldap and gmake ports,
	avoid infinite loops which can kill your system.

>How-To-Repeat:
	On a fresh system:
	# cd /usr/ports/devel/libtool13
	# echo "USE_MYSQL=I_wanna_see_my_freebsd_box_out_of_memory" >> /etc/make.conf
	# make all-depends-list
	Wait a couple of minutes until all your memory is exhausted.

>Fix:

mysql323-server
-------------------------------
--- mysql323-server/Makefile.orig	Mon Sep  1 00:27:54 2003
+++ mysql323-server/Makefile	Mon Sep  1 00:28:11 2003
@@ -39,6 +39,10 @@
 		--program-prefix='' \
 		--with-innodb
 
+.ifdef USE_MYSQL
+.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${MACHINE_ARCH} == "i386"

mysql40-server
-------------------------------
--- mysql40-server/Makefile.orig	Mon Sep  1 00:33:32 2003
+++ mysql40-server/Makefile	Mon Sep  1 00:33:40 2003
@@ -46,6 +46,10 @@
 		--with-comment='FreeBSD port: ${PKGNAME}' \
 		--enable-thread-safe-client
 
+.ifdef USE_MYSQL
+.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${MACHINE_ARCH} == "i386"

mysql41-server
-------------------------------
--- mysql41-server/Makefile.orig	Mon Sep  1 00:24:47 2003
+++ mysql41-server/Makefile	Mon Sep  1 00:26:31 2003
@@ -48,6 +48,10 @@
 		--with-comment='FreeBSD port: ${PKGNAME}' \
 		--enable-thread-safe-client
 
+.ifdef USE_MYSQL
+.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
+.endif
+
 .include <bsd.port.pre.mk>
 
 .if ${MACHINE_ARCH} == "i386"
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030831225852.5342243FEC>