From owner-freebsd-stable Mon Jan 13 3:40: 4 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8507A37B40B for ; Mon, 13 Jan 2003 03:40:01 -0800 (PST) Received: from mail.nsu.ru (mx.nsu.ru [193.124.215.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C62B43E4A for ; Mon, 13 Jan 2003 03:40:00 -0800 (PST) (envelope-from fjoe@iclub.nsu.ru) Received: from drweb by mail.nsu.ru with drweb-scanned (Exim 3.20 #1) id 18Y2wS-00059y-00; Mon, 13 Jan 2003 17:39:44 +0600 Received: from iclub.nsu.ru ([193.124.215.97] ident=root) by mail.nsu.ru with esmtp (Exim 3.20 #1) id 18Y2wS-00059m-00; Mon, 13 Jan 2003 17:39:44 +0600 Received: from iclub.nsu.ru (fjoe@localhost [127.0.0.1]) by iclub.nsu.ru (8.12.6/8.12.6) with ESMTP id h0DBdRRV025645; Mon, 13 Jan 2003 17:39:27 +0600 (NS) (envelope-from fjoe@iclub.nsu.ru) Received: (from fjoe@localhost) by iclub.nsu.ru (8.12.6/8.12.6/Submit) id h0DBdRNE025644; Mon, 13 Jan 2003 17:39:27 +0600 (NS) Date: Mon, 13 Jan 2003 17:39:27 +0600 From: Max Khon To: sperber@gmx.at Cc: freebsd-stable@freebsd.org Subject: pthread, ElectricFence Message-ID: <20030113173926.A25147@iclub.nsu.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Spam-Status: No, hits=-0.9 required=5.0 tests=SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_MUTT version=2.43 X-Envelope-To: sperber@gmx.at, freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi, there! try this patch for ElectricFence (just put it into files/ directory and rebuild the port) the problem is that _thread_init() uses malloc() and is called from .init section of libc_r. when malloc() from ElectricFence is first called initialize() function is called which tries to print version. write() is wrapped by libc_r and calling it causes _thread_init() to be called again.. and so on. /fjoe --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-efence.c" --- efence.c.orig Mon Jan 13 17:24:08 2003 +++ efence.c Mon Jan 13 17:22:50 2003 @@ -271,7 +271,9 @@ char * string; Slot * slot; +#if 0 EF_Print(version); +#endif #ifdef USE_SEMAPHORE if (sem_init(&EF_sem, 0, 1) >= 0) { --lrZ03NoBR/3+SXJZ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message