From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12097 invoked by alias); 27 Apr 2015 17:48:35 -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 12044 invoked by uid 89); 27 Apr 2015 17:48:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f41.google.com Received: from mail-wg0-f41.google.com (HELO mail-wg0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 27 Apr 2015 17:48:31 +0000 Received: by wgin8 with SMTP id n8so124294138wgi.0 for ; Mon, 27 Apr 2015 10:48:29 -0700 (PDT) X-Received: by 10.180.75.197 with SMTP id e5mr22512384wiw.94.1430156908993; Mon, 27 Apr 2015 10:48:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.33.135 with HTTP; Mon, 27 Apr 2015 10:48:08 -0700 (PDT) In-Reply-To: References: <553E6D2E.7060403@redhat.com> From: Bruce Korb Date: Mon, 27 Apr 2015 17:48:00 -0000 Message-ID: Subject: Re: pass by value and also snprintf() To: Richard Henderson Cc: libffi-discuss@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015/txt/msg00068.txt.bz2 The GDB result (using snprintf this time): (gdb) 37 if (ffi_prep_cif_var(&cif, FFI_DEFAULT_ABI, 3, 5, (gdb) 41 ffi_call(&cif, fn, &ret_val, values); (gdb) Program received signal SIGSEGV, Segmentation fault. 0x00007ffff787f562 in vsnprintf () from /lib/x86_64-linux-gnu/libc.so.6 (gdb) bt #0 0x00007ffff787f562 in vsnprintf () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ffff7861532 in snprintf () from /lib/x86_64-linux-gnu/libc.so.6 #2 0x00007ffff7bd7adc in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6 #3 0x00007ffff7bd740c in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6 #4 0x0000000000400ac0 in main (argc=1, argv=0x7fffffffe488) at ffi-test.c:41 If I link against the -O0 -ggdb3 version of libffi, what can I do to help diagnose?