From owner-freebsd-ports@FreeBSD.ORG Wed Jun 26 20:51:38 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8A762E19 for ; Wed, 26 Jun 2013 20:51:38 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id D11C91C0F for ; Wed, 26 Jun 2013 20:51:37 +0000 (UTC) Received: (qmail 58082 invoked by uid 89); 26 Jun 2013 20:51:36 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@93.215.170.226) by mail.grem.de with ESMTPA; 26 Jun 2013 20:51:36 -0000 Date: Wed, 26 Jun 2013 22:51:37 +0200 From: Michael Gmelin To: Konstantin Belousov Subject: Re: Global destructor order problems (was: Re: Are ports supposed to build and run on 10-CURRENT?) Message-ID: <20130626225137.7b36167f@bsd64.grem.de> In-Reply-To: <20130626204521.GU91021@kib.kiev.ua> References: <20130613031535.4087d7f9@bsd64.grem.de> <20130626015508.426ab5b9@bsd64.grem.de> <51CAADB8.7090603@FreeBSD.org> <20130626133149.4835f14a@bsd64.grem.de> <7CD9075C-F8D6-41C1-8D21-8B10DF866ECE@FreeBSD.org> <20130626204521.GU91021@kib.kiev.ua> X-Mailer: Claws Mail 3.9.1 (GTK+ 2.24.18; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: David Chisnall , Brooks Davis , Dimitry Andric , "freebsd-ports@freebsd.org Ports" , Matthias Andree X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Jun 2013 20:51:38 -0000 On Wed, 26 Jun 2013 23:45:21 +0300 Konstantin Belousov wrote: > On Wed, Jun 26, 2013 at 09:26:09PM +0200, Dimitry Andric wrote: > > This revision is not in 9.1-RELEASE, but it is in 9-STABLE, so the > > problem can also be reproduced there. > ... > > This is roughly gcc 4.3.0 and later. For example, gcc 4.8 > > generates: > I just tested the thing with gcc 4.8 on up to date stable/9 and HEAD. > In both cases, major tom did not fail, at least not in the peculiar > way. The gcc-generated code passed the PLT address of the > corresponding destructor. Could you replicate the problem using clang on stable/9 and HEAD? (I didn't test gcc > 4.2.1 myself). > > The r211706 intent is indeed to prevent a situation when the libc > calls the atexit(3)-registered termination function from dso which is > already unloaded. This is apparently epidemic with PHP and similar > environments. > -- Michael Gmelin