From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23812 invoked by alias); 25 Jul 2014 09:03:01 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 23727 invoked by uid 89); 25 Jul 2014 09:02:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f50.google.com Received: from mail-la0-f50.google.com (HELO mail-la0-f50.google.com) (209.85.215.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 25 Jul 2014 09:02:54 +0000 Received: by mail-la0-f50.google.com with SMTP id gf5so2777321lab.23 for ; Fri, 25 Jul 2014 02:02:51 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.181.74 with SMTP id du10mr14397272lbc.40.1406278970911; Fri, 25 Jul 2014 02:02:50 -0700 (PDT) Received: by 10.152.8.46 with HTTP; Fri, 25 Jul 2014 02:02:50 -0700 (PDT) In-Reply-To: References: Date: Fri, 25 Jul 2014 09:03:00 -0000 Message-ID: Subject: Re: [PATCH, libffi, alpha]: Use FFI_ASSERT in ffi_closure_osf_inner From: Uros Bizjak To: libffi-discuss@sourceware.org, "gcc-patches@gcc.gnu.org" Cc: Anthony Green , Richard Henderson , Ian Lance Taylor Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014/txt/msg00076.txt.bz2 On Mon, Jul 21, 2014 at 8:21 PM, Uros Bizjak wrote: > Attached patch fixes libgo reflect test failure with libffi closures. > The gccgo compiler started to use FFI closures recently; the compiler > passes ffi_type_void for structures with zero members. > > ffi_call form src/alpha/ffi.c allows FFI_TYPE_VOID arguments in > non-debug mode through the default: case, but ffi_closure_osf_inner > aborts with this type of argument. > > The patch changes the default case in ffi_closure_osf_inner from abort > to FFI_ASSERT, an this way synchronizes argument handling in both > cases. > > 2014-07-21 Uros Bizjak > > * src/alpha/ffi.c: Do not include stdlib.h. > (ffi_closure_osf_inner) : Use FFI_ASSERT instead of abort. > > Patch was tested with libffi testsuite on alphaev6-linux-gnu. > Additionally, the patch fixed reflect test from the libgo testsuite > and go.test/test/recover.go test from the gcc testsuite. I have installed the patch in gcc mainline SVN as r213049. Uros.