From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 31 22:20:41 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9033F16A418 for ; Mon, 31 Dec 2007 22:20:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outF.internet-mail-service.net (outF.internet-mail-service.net [216.240.47.229]) by mx1.freebsd.org (Postfix) with ESMTP id 781E513C468 for ; Mon, 31 Dec 2007 22:20:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 31 Dec 2007 14:20:40 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id D9255126DCF; Mon, 31 Dec 2007 14:20:39 -0800 (PST) Message-ID: <47796B43.9050704@elischer.org> Date: Mon, 31 Dec 2007 14:20:51 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: Markus Hoenicka References: <18297.6718.750894.937199@yeti.mininet> <20071231142620.39f2fbd2@kan.dnsalias.net> <18297.20596.564077.568365@yeti.mininet> In-Reply-To: <18297.20596.564077.568365@yeti.mininet> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: dlopen(), atexit() crash on FreeBSD (testcase included) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2007 22:20:41 -0000 Markus Hoenicka wrote: > Alexander Kabaev writes: > > As designed. atexit should not be used by shared objects that do not > > expect themselves to live until actual exit() happens. ELF provides > > proper _init/_fini sections to support shared object > > initialization/destruction. > > > > That is, the only real solution to this problem is to convince the > Firebird folks to remove their atexit() calls from the client > libraries? I'll try, but I'm not very confident this is going to > work. Also, I'm wondering how other OSes handle this. I don't see this > code crash on Linux, contrary to its design as you say. > > Thanks anyway to you, and to Jason Evans, for your replies. Not sure but I'd guess that each library calls its at_exit entrypoints as part of its unload handling. > > regards, > Markus >