From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Schaefer, Frank" Newsgroups: gmane.lisp.guile.bugs Subject: bug#20567: guile 2.0.11 - test failures on mips64 big-endian with n32 ABI Date: Wed, 13 May 2015 18:31:12 +0000 Message-ID: <14E7D810D073F84195C3EE3EBF1E9C35746EB81C@US-PLNO-EXM01-P.global.tektronix.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="_002_14E7D810D073F84195C3EE3EBF1E9C35746EB81CUSPLNOEXM01Pglo_" X-Trace: ger.gmane.org 1431548041 24951 80.91.229.3 (13 May 2015 20:14:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 May 2015 20:14:01 +0000 (UTC) To: 20567@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed May 13 22:13:47 2015 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ysd2H-0005de-Uj for guile-bugs@m.gmane.org; Wed, 13 May 2015 22:13:46 +0200 Original-Received: from localhost ([::1]:51163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysd2H-0001nR-81 for guile-bugs@m.gmane.org; Wed, 13 May 2015 16:13:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysbyo-0004L7-Gk for bug-guile@gnu.org; Wed, 13 May 2015 15:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ysbyl-0006xc-9K for bug-guile@gnu.org; Wed, 13 May 2015 15:06:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysbyl-0006xW-6X for bug-guile@gnu.org; Wed, 13 May 2015 15:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Ysbyk-0002Zc-SA for bug-guile@gnu.org; Wed, 13 May 2015 15:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Schaefer, Frank" Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 13 May 2015 19:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20567 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: "bug-guile@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.14315439479864 (code B ref -1); Wed, 13 May 2015 19:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 May 2015 19:05:47 +0000 Original-Received: from localhost ([127.0.0.1]:44064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsbyU-0002Z0-4u for submit@debbugs.gnu.org; Wed, 13 May 2015 15:05:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55278) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YsbxF-0002We-Tl for submit@debbugs.gnu.org; Wed, 13 May 2015 15:04:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ysbx9-0006AD-QM for submit@debbugs.gnu.org; Wed, 13 May 2015 15:04:24 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysbx9-0006A8-Nt for submit@debbugs.gnu.org; Wed, 13 May 2015 15:04:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysbx8-0002jD-FY for bug-guile@gnu.org; Wed, 13 May 2015 15:04:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ysbx3-00067p-PI for bug-guile@gnu.org; Wed, 13 May 2015 15:04:22 -0400 Original-Received: from mail-bn1on0112.outbound.protection.outlook.com ([157.56.110.112]:25876 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysbx3-00067U-JN for bug-guile@gnu.org; Wed, 13 May 2015 15:04:17 -0400 Original-Received: from CO2PR05CA052.namprd05.prod.outlook.com (10.141.241.180) by DM2PR05MB975.namprd05.prod.outlook.com (10.141.176.28) with Microsoft SMTP Server (TLS) id 15.1.154.19; Wed, 13 May 2015 18:31:54 +0000 Original-Received: from BY2FFO11FD030.protection.gbl (2a01:111:f400:7c0c::151) by CO2PR05CA052.outlook.office365.com (2a01:111:e400:1429::52) with Microsoft SMTP Server (TLS) id 15.1.160.19 via Frontend Transport; Wed, 13 May 2015 18:31:54 +0000 Authentication-Results: spf=pass (sender IP is 192.65.42.19) smtp.mailfrom=tekcomms.com; gnu.org; dkim=none (message not signed) header.d=none; Received-SPF: Pass (protection.outlook.com: domain of tekcomms.com designates 192.65.42.19 as permitted sender) receiver=protection.outlook.com; client-ip=192.65.42.19; helo=mx.danahertm.com; Original-Received: from mx.danahertm.com (192.65.42.19) by BY2FFO11FD030.mail.protection.outlook.com (10.1.14.211) with Microsoft SMTP Server (TLS) id 15.1.160.8 via Frontend Transport; Wed, 13 May 2015 18:31:53 +0000 Original-Received: from US-BV-EXH02-P.global.tektronix.net (128.181.11.23) by US-BV-EXE02-P.global.tektronix.net (128.181.15.52) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 13 May 2015 11:31:36 -0700 Original-Received: from US-PLNO-EXC01-P.global.tektronix.net (192.158.164.7) by US-BV-EXH02-P.global.tektronix.net (128.181.11.23) with Microsoft SMTP Server (TLS) id 14.3.224.2; Wed, 13 May 2015 11:31:38 -0700 Original-Received: from US-PLNO-EXM01-P.global.tektronix.net ([fe80::3cd2:4426:c7d3:c119]) by US-PLNO-EXC01-P.global.tektronix.net ([fe80::469:bc6d:ec1d:6c37%12]) with mapi id 14.03.0224.002; Wed, 13 May 2015 13:31:14 -0500 Thread-Topic: guile 2.0.11 - test failures on mips64 big-endian with n32 ABI Thread-Index: AdCNpfr1iJrxPnbQSRGDd3S3pMkLSw== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [134.64.81.228] X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD030; 1:qTnmSUc++151Nst1+FQq1GlgPp4OE/A3+u+O229Uw95v7KAVwRuf483Q/iMLakpsNq4JO4cb6Mt34CSj0nOWgsB8ilcH9iy4rOSYzwx0BFGtwrWfytQ3me+54wSXyXjmJx6JNvxUOfLCYOkOkOg4AT2iMKg5K9BQWEbP/2am8stU7AEX4Ja/Ax5nHJ3S4Ode9GXShC+rZzZXBTGk5368coa7FeM7RKfLS95ulphPP+xrJAukPQ2oxqOrD+FXDvL4MZgxw5uRp9HZ7MHTCuwTzw== X-Forefront-Antispam-Report: CIP:192.65.42.19; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(438002)(199003)(189002)(5423002)(6806004)(110136002)(54356999)(568964001)(84326002)(189998001)(2656002)(87936001)(46102003)(2900100001)(4610100001)(5260100001)(55846006)(92566002)(450100001)(2930100002)(86362001)(62966003)(2920100001)(77156002)(99936001)(107886002)(50986999)(5001970100001)(5890100001)(2501003)(5250100002)(19580395003)(33656002)(106466001)(102836002)(66066001)(512954002)(22756005)(2351001)(229853001)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR05MB975; H:mx.danahertm.com; FPR:; SPF:Pass; MLV:ovrnspm; A:1; MX:1; PTR:mx2.danahertm.com; LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR05MB975; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:DM2PR05MB975; BCL:0; PCL:0; RULEID:; SRVR:DM2PR05MB975; X-Forefront-PRVS: 0575F81B58 X-OriginatorOrg: tekcomms.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2015 18:31:53.3585 (UTC) X-MS-Exchange-CrossTenant-Id: 937985d5-3f80-4fc9-be29-0bccc11e8b77 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=937985d5-3f80-4fc9-be29-0bccc11e8b77; Ip=[192.65.42.19]; Helo=[mx.danahertm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR05MB975 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Wed, 13 May 2015 15:05:44 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-Mailman-Approved-At: Wed, 13 May 2015 16:13:42 -0400 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7785 Archived-At: --_002_14E7D810D073F84195C3EE3EBF1E9C35746EB81CUSPLNOEXM01Pglo_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I've encountered two test failures with guile 2.0.11 on mips64 big-endian, = whenever I build with -mabi=3Dn32 (these test failures do not occur with -m= abi=3D64). At least one of them I have resolved with the attached patch. First testcase failure: test-ffi (fixed by my patch). The guile code appar= ently assumes that sizeof(ffi_arg)<=3Dsizeof(void **). This is a faulty as= sumption; it holds on *most* platforms, but with the mips64 n32 ABI, sizeof= (void **)=3D=3D4, and sizeof(ffi_arg)=3D=3D8. So every foreign function th= at returns a pointer is liable to corrupt data, and anyone retrieving the r= eturn value as a simple void * is only going to get sign-extension garbage = on big-endian (usually NULL). Second testcase failure: check-guile fails due to 'ERROR: foreign.test: pro= cedure->pointer: qsort - arguments: ((null-pointer-error "pointer->bytevect= or" "null pointer dereference" () ()))'. I strongly suspect it's related t= o the ffi_arg issue mentioned above, but I'm still peeling away macro uglin= ess to track it down. If anyone wants to pitch in with additional guidance= or patchwork, I'd be happy to listen and test. (The patch applies against 2.0.11 release or against current HEAD, where it= also fixes the new testcases for test-foreign-object-scm and test-foreign-= object-c. HEAD also fails the test-out-of-memory case, though, which precl= udes further unit tests.) --_002_14E7D810D073F84195C3EE3EBF1E9C35746EB81CUSPLNOEXM01Pglo_ Content-Type: application/octet-stream; name="0001-use-ffi_arg-instead-of-void-to-hold-FFI-call-return-.patch" Content-Description: 0001-use-ffi_arg-instead-of-void-to-hold-FFI-call-return-.patch Content-Disposition: attachment; filename="0001-use-ffi_arg-instead-of-void-to-hold-FFI-call-return-.patch"; size=1414; creation-date="Wed, 13 May 2015 18:29:56 GMT"; modification-date="Wed, 13 May 2015 18:29:09 GMT" Content-Transfer-Encoding: base64 RnJvbSA3OGNhNzFiMzE0ZjRhZDYyZDM5ZDlhY2M1M2ZhYmYwYzQxZmE3NTIxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGcmFuayBTY2hhZWZlciA8ZnJhbmsuc2NoYWVmZXJAdGVrY29t bXMuY29tPgpEYXRlOiBXZWQsIDEzIE1heSAyMDE1IDE3OjQ5OjI5ICswMDAwClN1YmplY3Q6IFtQ QVRDSF0gdXNlIGZmaV9hcmcgaW5zdGVhZCBvZiB2b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