From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3792 invoked by alias); 14 Feb 2014 09:55:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 3778 invoked by uid 89); 14 Feb 2014 09:55:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: mail-pa0-f51.google.com Received: from mail-pa0-f51.google.com (HELO mail-pa0-f51.google.com) (209.85.220.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 14 Feb 2014 09:55:13 +0000 Received: by mail-pa0-f51.google.com with SMTP id ld10so12145305pab.10 for ; Fri, 14 Feb 2014 01:55:11 -0800 (PST) X-Received: by 10.66.182.199 with SMTP id eg7mr7865448pac.135.1392371711844; Fri, 14 Feb 2014 01:55:11 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id hb10sm15396906pbd.1.2014.02.14.01.55.09 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 01:55:10 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 19CF2EA00D7; Fri, 14 Feb 2014 20:25:05 +1030 (CST) Date: Fri, 14 Feb 2014 09:55:00 -0000 From: Alan Modra To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: Fix PR libffi/60073 Message-ID: <20140214095504.GS3386@bubble.grove.modra.org> Mail-Followup-To: Eric Botcazou , gcc-patches@gcc.gnu.org References: <8194381.ZP0W66Vpab@polaris> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8194381.ZP0W66Vpab@polaris> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00892.txt.bz2 On Thu, Feb 13, 2014 at 05:18:10PM +0100, Eric Botcazou wrote: > This adds proper variadic support to the SPARC port of libffi, thus fixing a > regression in the testsuite in 64-bit mode, and fixes a small inaccuracy in > the documentation. > > Tested on SPARC/Solaris and SPARC64/Solaris, applied on the mainline. > +ffi_status ffi_prep_cif_machdep(ffi_cif *cif) > +{ > + cif->nfixedargs = cif->nargs; > + return ffi_prep_cif_machdep_core (cif); > +} Eric, sorry to rain on your parade, but you're making the same mistake I did at first when adding powerpc64le support to libffi. libffi is built as a shared library. You can't add a field to ffi_cif like this and uncondionally write to it: An application linked against an older version of libffi will only allocate the old size ffi_cif. Your new shared library will trash some random location in the old user app.. I worked around this problem on powerpc by defining new enum ffi_abi values so that you can recognize an old app. -- Alan Modra Australia Development Lab, IBM