From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 31 20:42:13 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 61FB216A41B for ; Mon, 31 Dec 2007 20:42:13 +0000 (UTC) (envelope-from markus.hoenicka@mhoenicka.de) Received: from rrzmta2.rz.uni-regensburg.de (rrzmta2.rz.uni-regensburg.de [194.94.155.53]) by mx1.freebsd.org (Postfix) with ESMTP id 252D213C44B for ; Mon, 31 Dec 2007 20:42:12 +0000 (UTC) (envelope-from markus.hoenicka@mhoenicka.de) Received: from rrzmta2.rz.uni-regensburg.de (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 398AB55506 for ; Mon, 31 Dec 2007 21:42:18 +0100 (CET) Received: from yeti.mininet (rrzras1-21.rz.uni-regensburg.de [132.199.208.31]) by rrzmta2.rz.uni-regensburg.de (Postfix) with ESMTP id 5E74D55526 for ; Mon, 31 Dec 2007 21:42:06 +0100 (CET) X-Mailer: emacs 21.3.1 (via feedmail 8 Q); VM 7.19 under Emacs 21.3.1 From: "Markus Hoenicka" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18297.20596.564077.568365@yeti.mininet> Date: Mon, 31 Dec 2007 21:26:28 +0100 To: freebsd-hackers@freebsd.org In-Reply-To: <20071231142620.39f2fbd2@kan.dnsalias.net> References: <18297.6718.750894.937199@yeti.mininet> <20071231142620.39f2fbd2@kan.dnsalias.net> X-Mailman-Approved-At: Mon, 31 Dec 2007 22:15:41 +0000 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 20:42:13 -0000 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. regards, Markus -- Markus Hoenicka markus.hoenicka@cats.de (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de