From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/933 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Possible ARM struct stat problem. Date: Sun, 27 May 2012 15:43:19 -0400 Message-ID: <20120527194319.GF163@brightrain.aerifal.cx> References: <2314318.NDqLURy4mK@main.pennware.com> 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: dough.gmane.org 1338148104 16180 80.91.229.3 (27 May 2012 19:48:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 May 2012 19:48:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-934-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 27 21:48:23 2012 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 1SYjRu-0005Nq-ML for gllmg-musl@plane.gmane.org; Sun, 27 May 2012 21:48:22 +0200 Original-Received: (qmail 6027 invoked by uid 550); 27 May 2012 19:48:22 -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 6019 invoked from network); 27 May 2012 19:48:22 -0000 Content-Disposition: inline In-Reply-To: <2314318.NDqLURy4mK@main.pennware.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:933 Archived-At: On Sun, May 27, 2012 at 01:35:07PM -0500, Richard Pennington wrote: > Hi, > > I think a found a problem with the struct stat definition for the ARM. It > needed a bit more padding. I've attached a diff and wrote about it on my blog > if you'd like more information. > > http://ellcc.org/blog/?p=121 This looks like a clang bug. Per the ABI, long long has 8-byte alignment on ARM. Thus, the structure definition musl has right now will give the right layout to match the ABI, and in fact it works perfectly when compiled with GCC. I'm not entirely opposed to putting the explicit padding in there, since this is an arch-specific structure anyway, but I think you should check your compiler. The same issue might come up elsewhere and might not be so easy to work around. Let me know what you find. Rich