Global destructor order problems

Konstantin Belousov kostikbel at
Thu Jun 27 14:04:32 UTC 2013

On Thu, Jun 27, 2013 at 03:41:48PM +0200, Dimitry Andric wrote:
> On 2013-06-27 01:56, Michael Gmelin wrote:
> > On Thu, 27 Jun 2013 00:28:33 +0300
> > Konstantin Belousov <kostikbel at> wrote:
> >
> >> On Wed, Jun 26, 2013 at 11:17:41PM +0200, Michael Gmelin wrote:
> >>> Are you both on the same architecture?
> >>
> >> I tested both on amd64 and i386. For i386, it was -m32 for clang, and
> >> native 32bit gcc 4.8.1, stock build from the tarball.
> >>
> >
> > For completeness sake I tested once more using various compilers
> > including gcc 4.8.1 on 10-CURRENT amd64 (see below).
> I have now tested the lang/gcc44, 46, 47, 48 and 49 ports, on both i386
> and amd64. All result in the incorrect destructor order.

My build of gcc is stock, not from the ports.  Another detail, I built
the compiler on stable/9, but use it on both stable and current.  I am
very curious what makes the my build to generate the code which uses
PLT instead of direct reference, but have no time to investigate.

I think that we could revert the termination calls to the functions
from the dso being unloaded, but this is quite unfortunate, since it
will restore the endless series of 'segfault at the process termination'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <>

More information about the freebsd-ports mailing list