From owner-freebsd-current@FreeBSD.ORG Mon May 21 09:03:19 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B062E1065673; Mon, 21 May 2012 09:03:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from springbank.echomania.com (andric.com [IPv6:2001:888:2003:1001:230:48ff:fe51:76b6]) by mx1.freebsd.org (Postfix) with ESMTP id 426E28FC0A; Mon, 21 May 2012 09:03:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at springbank.echomania.com Received: from [192.168.1.6] (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by springbank.echomania.com (Postfix) with ESMTPSA id 1B7D7A7071; Mon, 21 May 2012 11:02:53 +0200 (CEST) Message-ID: <4FBA04D1.2010100@FreeBSD.org> Date: Mon, 21 May 2012 11:03:13 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120512 Thunderbird/13.0 MIME-Version: 1.0 To: David Xu References: <4F9E9E06.4070004@entel.upc.edu> <4FB88925.4070008@gmail.com> <20120520172419.GQ2358@deviant.kiev.zoral.com.ua> <4FB9AE7E.6090109@gmail.com> In-Reply-To: <4FB9AE7E.6090109@gmail.com> X-Enigmail-Version: 1.5a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , Alberto Villa , =?UTF-8?B?R3VzdGF1IFDDqXJleiBpIFF1ZXJvbA==?= , FreeBSD current Subject: Re: RFC: jemalloc: qdbus sigsegv in malloc_init X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2012 09:03:19 -0000 On 2012-05-21 04:54, David Xu wrote: ... > As I said, it depends on ordering the global objects are destructed, if > the object which deleting > the current_thread_data_key is destructed lastly, the problem wont > happen, but now > it is destructed too early. I believe there is no specification said > that which C++ object should be > destructed first if they are in different compiled module and then are > linked together to generated > a shared object, .so file. Indeed, the order in which global constructors or destructors are called is undefined. Depending on the order is a bug (a.k.a. the "static initialization order fiasco").