Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 11:03:13 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        David Xu <davidxu@FreeBSD.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Alberto Villa <avilla@freebsd.org>, =?UTF-8?B?R3VzdGF1IFDDqXJleiBpIFF1ZXJvbA==?= <gperez@entel.upc.edu>, FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: RFC: jemalloc: qdbus sigsegv in malloc_init
Message-ID:  <4FBA04D1.2010100@FreeBSD.org>
In-Reply-To: <4FB9AE7E.6090109@gmail.com>
References:  <4F9E9E06.4070004@entel.upc.edu> <4FB88925.4070008@gmail.com> <CAJp7RHaOkEzyfD5e6pLMSBxvCBYCn9BWv=9BWu0CYsQHzGyFdg@mail.gmail.com> <20120520172419.GQ2358@deviant.kiev.zoral.com.ua> <4FB9AE7E.6090109@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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").



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