From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.bugs Subject: bug#13827: faulty range check in bytevector accessor Date: Wed, 27 Feb 2013 02:02:06 +0000 Message-ID: <87liaay0o1.fsf@Kagami.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1361930620 14358 80.91.229.3 (27 Feb 2013 02:03:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Feb 2013 02:03:40 +0000 (UTC) To: 13827@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Feb 27 03:04:04 2013 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 1UAWNH-0001IX-KC for guile-bugs@m.gmane.org; Wed, 27 Feb 2013 03:04:03 +0100 Original-Received: from localhost ([::1]:38358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWMw-0005aY-PK for guile-bugs@m.gmane.org; Tue, 26 Feb 2013 21:03:42 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWMb-0005Zi-4X for bug-guile@gnu.org; Tue, 26 Feb 2013 21:03:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAWMV-0008Hf-1M for bug-guile@gnu.org; Tue, 26 Feb 2013 21:03:20 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWMU-0008HP-OU for bug-guile@gnu.org; Tue, 26 Feb 2013 21:03:14 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UAWOE-0004ha-55 for bug-guile@gnu.org; Tue, 26 Feb 2013 21:05:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ian Price Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 27 Feb 2013 02:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13827 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.136193065518014 (code B ref -1); Wed, 27 Feb 2013 02:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Feb 2013 02:04:15 +0000 Original-Received: from localhost ([127.0.0.1]:52043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAWNS-0004gV-Vf for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:04:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40566) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAWNQ-0004gM-9e for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:04:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAWLe-00081W-3l for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:02:24 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:46955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWLe-00081S-0H for submit@debbugs.gnu.org; Tue, 26 Feb 2013 21:02:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWLc-0004zx-Og for bug-guile@gnu.org; Tue, 26 Feb 2013 21:02:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAWLa-00080Y-4G for bug-guile@gnu.org; Tue, 26 Feb 2013 21:02:20 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:38560) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAWLZ-00080B-UN for bug-guile@gnu.org; Tue, 26 Feb 2013 21:02:18 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UAWLs-0000mS-JV for bug-guile@gnu.org; Wed, 27 Feb 2013 03:02:36 +0100 Original-Received: from host81-159-31-223.range81-159.btcentralplus.com ([81.159.31.223]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Feb 2013 03:02:36 +0100 Original-Received: from ianprice90 by host81-159-31-223.range81-159.btcentralplus.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Feb 2013 03:02:36 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: host81-159-31-223.range81-159.btcentralplus.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:Z7EvxHKerGD1U0UbfR5d3A+uWbo= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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.x 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:6796 Archived-At: Branch: master Commit: 9b977c836bf147d386944c401113aba32776fa68 System: 32 bit x86 Fedora 16 (use-modules (rnrs bytevectors)) (define not-32-bit (expt 2 32)) (define bv (make-bytevector 4)) (bytevector-u32-set! bv 0 not-32-bit (endianness big)) (pk bv) Running this gives me a core dump. It happens for a wide range of values that don't fit in 32 bits. After some talk on #guile, Mark and I believe it comes down to the range check in INTEGER_ACCESSOR_PROLOGUE in bytevectors.c -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"