From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30358 invoked by alias); 21 Jul 2014 18:21:40 -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 30190 invoked by uid 89); 21 Jul 2014 18:21:39 -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=unavailable version=3.3.2 X-HELO: mail-la0-f41.google.com Received: from mail-la0-f41.google.com (HELO mail-la0-f41.google.com) (209.85.215.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 21 Jul 2014 18:21:38 +0000 Received: by mail-la0-f41.google.com with SMTP id s18so5176267lam.28 for ; Mon, 21 Jul 2014 11:21:34 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.202.8 with SMTP id ke8mr27663629lbc.1.1405966893996; Mon, 21 Jul 2014 11:21:33 -0700 (PDT) Received: by 10.152.8.46 with HTTP; Mon, 21 Jul 2014 11:21:33 -0700 (PDT) Date: Mon, 21 Jul 2014 18:21:00 -0000 Message-ID: Subject: [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: multipart/mixed; boundary=001a11c368e648848304feb82ddc X-SW-Source: 2014/txt/msg00070.txt.bz2 --001a11c368e648848304feb82ddc Content-Type: text/plain; charset=UTF-8 Content-length: 878 Hello! 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. Uros. --001a11c368e648848304feb82ddc Content-Type: text/plain; charset=US-ASCII; name="f.diff.txt" Content-Disposition: attachment; filename="f.diff.txt" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hxw4dg050 Content-length: 793 SW5kZXg6IHNyYy9hbHBoYS9mZmkuYwo9PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 Ci0tLSBzcmMvYWxwaGEvZmZpLmMJKHJldmlzaW9uIDIxMjg4MikKKysrIHNy Yy9hbHBoYS9mZmkuYwkod29ya2luZyBjb3B5KQpAQCAtMjcsNyArMjcsNiBA QAogCiAjaW5jbHVkZSA8ZmZpLmg+CiAjaW5jbHVkZSA8ZmZpX2NvbW1vbi5o PgotI2luY2x1ZGUgPHN0ZGxpYi5oPgogCiAvKiBGb3JjZSBGRklfVFlQRV9M T05HRE9VQkxFIHRvIGJlIGRpZmZlcmVudCB0aGFuIEZGSV9UWVBFX0RPVUJM RTsKICAgIGFsbCBmdXJ0aGVyIHVzZXMgaW4gdGhpcyBmaWxlIHdpbGwgcmVm ZXIgdG8gdGhlIDEyOC1iaXQgdHlwZS4gICovCkBAIC0yNzMsNyArMjcyLDcg QEAgZmZpX2Nsb3N1cmVfb3NmX2lubmVyKGZmaV9jbG9zdXJlICpjbG9zdXJl LCB2b2lkICoKIAkgIGJyZWFrOwogCiAJZGVmYXVsdDoKLQkgIGFib3J0ICgp OworCSAgRkZJX0FTU0VSVCAoMCk7CiAJfQogCiAgICAgICBhcmduICs9IEFM SUdOKHNpemUsIEZGSV9TSVpFT0ZfQVJHKSAvIEZGSV9TSVpFT0ZfQVJHOwo= --001a11c368e648848304feb82ddc--