From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22262 invoked by alias); 27 Feb 2012 10:40:21 -0000 Received: (qmail 22158 invoked by uid 22791); 27 Feb 2012 10:40:19 -0000 X-SWARE-Spam-Status: No, hits=2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,TW_BF,TW_MX,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 27 Feb 2012 10:40:04 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1S1xzv-0007Xa-S5 for libffi-discuss@sourceware.org; Mon, 27 Feb 2012 02:40:03 -0800 Message-ID: <33398886.post@talk.nabble.com> Date: Mon, 27 Feb 2012 10:40:00 -0000 From: chennam To: libffi-discuss@sourceware.org Subject: libffi on PowerPC/AIX: aix_closure.S failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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 X-SW-Source: 2012/txt/msg00069.txt.bz2 Hi all, I am running libffi 3.0.11 on PowerPC/AIX 6.1.=20 The host is 64 bits, but the targeted libffi.a to generate is 32 bits (as for our need). The downloaded package has been compiled with GCC v4.6.2 with the following options: <--------------------------------------------------------------------------= ------------------------------------ export CFLAGS=3D"-DAIX -DPOWERPC_AIX -maix32 -maix-struct-return -mxl-compa= t" export LDFLAGS=3D"-lc128 -lc -lm -lpthread -g" export AR=3D"ar -X32_64" ./configure --enable-debug --disable-shared --with-pic --enable-threads make make check =E2=80=A6=E2=80=A6 =3D=3D=3D libffi Summary =3D=3D=3D # of expected passes 813 # of unexpected failures 423 # of unsupported tests 55 ---------------------------------------------------------------------------= -----------------------------------> After some investigation of the failed tests, it appears that all failures are related to closure calls of a function. I have isolated the test case =E2=80=9Ctestclosure.c=E2=80=9D by adding in some trace messages to trace t= he related function calls. Here is the result: <--------------------------------------------------------------------------= ------------------------------------ PASS: libffi.call/testclosure.c -O0 -W -Wall (test for excess errors) Setting LD_LIBRARY_PATH to .:: /freeware/libffi/powerpc-ibm-aix6.1.0.0/testsuite/../.libs :.:: /freeware/libffi/powerpc-ibm-aix6.1.0.0/testsuite/../.libs spawn [open ...] main: calling ffi_closure_alloc() main: FFI_TRAMPOLINE_SIZE=3D12, ffi_aix_trampoline_struct size=3D12 main: calling ffi_prep_cif() main: calling ffi_prep_closure_loc() ffi_prep_closure_loc(): FFI_AIX: main: calling code() ffi_closure_helper_DARWIN(): avn=3D1, arg_types[0]=3D13 ffi_closure_helper_DARWIN(): calling closure->fun cls_strcut_combined_gn: calling cls_struct_combined_fn() 4 5 1 8 cls_strcut_combined_gn: exit ffi_closure_helper_DARWIN(): return from closure->fun. rtype=3D0 FAIL: libffi.call/testclosure.c -O0 -W -Wall execution test ---------------------------------------------------------------------------= -----------------------------------> i.e. In testclosure.c =E2=80=A6. fprintf(stdout, "main: calling code() \n"); fflush(stdout); ((void(*)(cls_struct_combined)) (code))(g_dbl); fprintf(stdout, "main: exit \n"); fflush(stdout); exit(0); (code) has the assembly code to call ffi_closure_helper_DARWIN(), which calls cls_struct_combined_gn() cls_struct_combined_gn() runs correctly and returns to ffi_closure_helper_DARWIN(), which then returns to the calling assembly code. Then the failure occurs. So I presume the failure occurs within the aix_closure.S I know nothing about PowerPC assembly code, so this is the lowest level of tracing I can have. Has anybody ever run successfully all test cases on PowerPC/AIX ? Thanks for your attention. P.S BTW, it appear that aix.S works perfectly, since all ffi_call_AIX run without any problem. The behaviour is the same when I use libffi 3.0.10 --=20 View this message in context: http://old.nabble.com/libffi-on-PowerPC-AIX%3= A-aix_closure.S-failure-tp33398886p33398886.html Sent from the Sourceware - libffi-discuss mailing list archive at Nabble.co= m.