From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2768 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 1/3] protect some clobbered variables with volatile Date: Sun, 10 Feb 2013 20:14:34 -0500 Message-ID: <20130211011434.GQ20323@brightrain.aerifal.cx> References: <1360535421.23424.467.camel@eris.loria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1360545289 13305 80.91.229.3 (11 Feb 2013 01:14:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 01:14:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2769-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 11 02:15:10 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U4hz7-0004Yv-V4 for gllmg-musl@plane.gmane.org; Mon, 11 Feb 2013 02:15:06 +0100 Original-Received: (qmail 32348 invoked by uid 550); 11 Feb 2013 01:14:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 32340 invoked from network); 11 Feb 2013 01:14:46 -0000 Content-Disposition: inline In-Reply-To: <1360535421.23424.467.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2768 Archived-At: On Sun, Feb 10, 2013 at 11:31:41PM +0100, Jens Gustedt wrote: > When switching optimization to higher levels (-O3) and enable link time > optimization (-flto) gcc finds two variables that might be clobbered > accross longjmp (orig_tail in dynlink) or vfork (f in popen): This patch looks correct. BTW, popen is about to be replaced to avoid vfork (using the new posix_spawn instead), but I don't mind applying this patch first anyway as motivation for why vfork is a bad idea. :-) Rich