From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: Re: Strange reader bug (string->number) Date: Tue, 04 Aug 2009 20:38:02 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1249413798 30992 80.91.229.12 (4 Aug 2009 19:23:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Aug 2009 19:23:18 +0000 (UTC) Cc: bug-guile@gnu.org To: "Kjetil S. Matheussen" Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Aug 04 21:23:11 2009 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MYPbK-0005c9-2F for guile-bugs@m.gmane.org; Tue, 04 Aug 2009 21:23:10 +0200 Original-Received: from localhost ([127.0.0.1]:49614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYPbJ-0006vo-FV for guile-bugs@m.gmane.org; Tue, 04 Aug 2009 15:23:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYPbC-0006rn-BY for bug-guile@gnu.org; Tue, 04 Aug 2009 15:23:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYPb7-0006pP-LH for bug-guile@gnu.org; Tue, 04 Aug 2009 15:23:01 -0400 Original-Received: from [199.232.76.173] (port=50738 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYPb7-0006p9-AG for bug-guile@gnu.org; Tue, 04 Aug 2009 15:22:57 -0400 Original-Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:49703 helo=sasl.smtp.pobox.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYPb6-0003QM-AL for bug-guile@gnu.org; Tue, 04 Aug 2009 15:22:56 -0400 Original-Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id F288520D00; Tue, 4 Aug 2009 15:22:55 -0400 (EDT) Original-Received: from unquote (unknown [82.123.246.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id 7FD4020CFF; Tue, 4 Aug 2009 15:22:54 -0400 (EDT) In-Reply-To: (Kjetil S. Matheussen's message of "Sun, 2 Aug 2009 15:26:16 +0200 (CEST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) X-Pobox-Relay-ID: 36744082-812C-11DE-B30A-F699A5B33865-02397024!a-sasl-quonix.pobox.com X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4293 Archived-At: Hi Kjetil, On Sun 02 Aug 2009 15:26, "Kjetil S. Matheussen" writes: > The following bug causes some problems > with Snd: (At least the realtime extension of Snd) > > > ***************************** > $ echo "'(4194304 262144 1.0f)" >test.scm > $ guile -l test.scm Fixed in 1.9, and backported to 1.8. Thanks for the report! commit ee0ddd21211757664092eaec631c4c76f4aae74f Author: Andy Wingo Date: Tue Aug 4 20:29:09 2009 +0200 fix buffer overrun reading partial numbers: 1.0f, 1.0/, and 1.0+ * libguile/numbers.c (mem2decimal_from_point, mem2ureal, mem2complex): Fix a number of cases where, for invalid numbers, we could read past the end of the buffer. This happened in e.g. "1.0+", "1/" and "1.0f". But I couldn't figure out how to test for these, given that the behavior depended on the contents of uninitialized memory in the reader buffer. We'll just have to be happy with this. Thanks to Kjetil S. Matheussen for the report. Andy -- http://wingolog.org/