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").
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to