From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#10681: GNU Guile 2.0.5 released Date: Tue, 31 Jan 2012 20:42:55 -0500 Message-ID: <87pqdze3c0.fsf@netris.org> References: <87r4yg3l3e.fsf@gnu.org> <6B207FB0-C631-4DF8-A09D-046E2EB27361@telia.com> <87hazbg341.fsf@netris.org> <0C009B24-5C81-47B1-8C82-97B6DFEC3B68@telia.com> <878vknfywv.fsf@netris.org> <97851F48-92D8-4547-94F0-4945FCE74679@telia.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1328060698 29213 80.91.229.3 (1 Feb 2012 01:44:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2012 01:44:58 +0000 (UTC) Cc: 10681@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= To: Hans Aberg Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Feb 01 02:44:55 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsPFn-0006ER-Jv for guile-bugs@m.gmane.org; Wed, 01 Feb 2012 02:44:55 +0100 Original-Received: from localhost ([::1]:41574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsPFn-00070I-44 for guile-bugs@m.gmane.org; Tue, 31 Jan 2012 20:44:55 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:37743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsPFg-0006zt-0y for bug-guile@gnu.org; Tue, 31 Jan 2012 20:44:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsPFc-0002Ga-6I for bug-guile@gnu.org; Tue, 31 Jan 2012 20:44:47 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsPFc-0002GW-3X for bug-guile@gnu.org; Tue, 31 Jan 2012 20:44:44 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RsPFu-0004mc-4q for bug-guile@gnu.org; Tue, 31 Jan 2012 20:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 01 Feb 2012 01:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10681 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10681-submit@debbugs.gnu.org id=B10681.132806066418325 (code B ref 10681); Wed, 01 Feb 2012 01:45:01 +0000 Original-Received: (at 10681) by debbugs.gnu.org; 1 Feb 2012 01:44:24 +0000 Original-Received: from localhost ([127.0.0.1]:47873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsPFI-0004lV-26 for submit@debbugs.gnu.org; Tue, 31 Jan 2012 20:44:24 -0500 Original-Received: from world.peace.net ([96.39.62.75]:40759 ident=hope4) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RsPFE-0004lM-Eb for 10681@debbugs.gnu.org; Tue, 31 Jan 2012 20:44:21 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=yeeloong) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1RsPEp-0005R2-NT; Tue, 31 Jan 2012 20:43:56 -0500 In-Reply-To: <97851F48-92D8-4547-94F0-4945FCE74679@telia.com> (Hans Aberg's message of "Tue, 31 Jan 2012 23:02:43 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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:6136 Archived-At: --=-=-= Content-Type: text/plain Hans Aberg writes: > With gcc-4.7.0 (from SVN), the test-ffi test now passes (libffi from > GIT) Excellent! I guess that this was a libffi bug. > but I get three other failures. > > The compiler that is normally used on the system, is llvm-gcc-4.2, and > its compile is still running. Please let us know the results of 'make check' when compiling with llvm-gcc-4.2. I'm especially curious to hear whether the bytevector tests fail with that compiler as well. > Running bytevectors.test > FAIL: bytevectors.test: 2.3 Operations on Bytes and Octets: bytevector-sint-ref [small] (eval) > FAIL: bytevectors.test: 2.3 Operations on Bytes and Octets: bytevector-sint-ref [small] (compile) In the directory where you built using GCC-4.7.0 (SVN), can you please apply the following 'patch for bytevectors.test' and then, from the guile-2.0.5 directory, run: ./check-guile bytevectors.test and show us the output? This is a shot in the dark, but I've also attached a patch that _might_ fix the bytevector problem. After applying it, it should be sufficient to simply run "make" again, and it shouldn't take long. Let us know! Thanks, Mark --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=BYTE_SWAP_TEST_HELP.patch Content-Description: Patch for bytevectors.test (to help diagnose) diff --git a/test-suite/tests/bytevectors.test b/test-suite/tests/bytevectors.test index 3007434..b652935 100644 --- a/test-suite/tests/bytevectors.test +++ b/test-suite/tests/bytevectors.test @@ -114,10 +114,14 @@ #xfffffffffffffffffffffffffffffffd))) (pass-if "bytevector-sint-ref [small]" - (let ((b (u8-list->bytevector '(#xff #xf0 #xff)))) - (equal? (bytevector-sint-ref b 0 (endianness big) 2) - (bytevector-sint-ref b 1 (endianness little) 2) - -16))) + (let* ((b (u8-list->bytevector '(#xff #xf0 #xff))) + (be-result (bytevector-sint-ref b 0 (endianness big) 2)) + (le-result (bytevector-sint-ref b 1 (endianness little) 2))) + (or (equal? be-result le-result -16) + (begin (format (current-error-port) + "bytevector-sint-ref [small] failure: ~S ~S~%" + be-result le-result) + #f)))) (pass-if "bytevector-sint-ref [large]" (let ((b (make-bytevector 50))) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=BYTE_SWAP_FIX.patch Content-Description: A shot in the dark (possible fix) diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c index fff5355..8574a36 100644 --- a/libguile/bytevectors.c +++ b/libguile/bytevectors.c @@ -103,7 +103,7 @@ \ memcpy (&c_result, &c_bv[c_index], (_len) / 8); \ if (!scm_is_eq (endianness, scm_i_native_endianness)) \ - c_result = INT_SWAP (_len) (c_result); \ + c_result = (INT_TYPE (_len, _sign)) INT_SWAP (_len) ((INT_TYPE (_len, unsigned)) c_result); \ \ result = SCM_I_MAKINUM (c_result); \ } \ @@ -143,7 +143,7 @@ \ c_value_short = (INT_TYPE (_len, _sign)) c_value; \ if (!scm_is_eq (endianness, scm_i_native_endianness)) \ - c_value_short = INT_SWAP (_len) (c_value_short); \ + c_value_short = (INT_TYPE (_len, _sign)) INT_SWAP (_len) ((INT_TYPE (_len, unsigned)) c_value_short); \ \ memcpy (&c_bv[c_index], &c_value_short, (_len) / 8); \ } \ @@ -918,7 +918,7 @@ bytevector_large_set (char *c_bv, size_t c_size, int signed_p, INT_TYPE (16, _sign) c_value16; \ memcpy (&c_value16, c_bv, 2); \ if (swap) \ - value = (INT_TYPE (16, _sign)) bswap_16 (c_value16); \ + value = (INT_TYPE (16, _sign)) bswap_16 ((scm_t_uint16) c_value16); \ else \ value = c_value16; \ } \ @@ -981,7 +981,7 @@ bytevector_unsigned_ref (const char *c_bv, size_t c_size, SCM endianness) swap = !scm_is_eq (endianness, scm_i_native_endianness); \ \ if (swap) \ - c_value16 = (INT_TYPE (16, _sign)) bswap_16 (c_value); \ + c_value16 = (INT_TYPE (16, _sign)) bswap_16 ((scm_t_uint16) c_value); \ else \ c_value16 = c_value; \ \ --=-=-=--