unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: guile-gtk discussions <guile-gtk-general@gnu.org>, guile-devel@gnu.org
Subject: srfi-13 bug [WAS: guile-gnome-glib 2.3.993]
Date: Mon, 13 Sep 2004 20:43:40 +0200	[thread overview]
Message-ID: <87oekam2lf.fsf_-_@peder.flower> (raw)
In-Reply-To: <87isan90sd.fsf@peder.flower> (Jan Nieuwenhuizen's message of "Thu, 09 Sep 2004 12:47:30 +0200")

Jan Nieuwenhuizen writes:

> Andy Wingo writes:
>
>> http://ambient.2y.net/wingo/tmp/guile-gnome-glib-2.3.993.tar.gz
>>
>> Give it a whirl
>
> It doesn't work for me with CVS guile, generate-wrapset hangs during make:

Found it.  It turns out that

    guile -c '(string-contains "" "a")'

hangs with guile CVS.  See fix below.

Greetings,
Jan.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/ChangeLog,v
retrieving revision 1.2146
diff -p -u -r1.2146 ChangeLog
--- ChangeLog	8 Sep 2004 23:04:08 -0000	1.2146
+++ ChangeLog	13 Sep 2004 18:40:58 -0000
@@ -1,3 +1,8 @@
+2004-09-13  Jan Nieuwenhuizen  <janneke@gnu.org>
+
+	* srfi-13.c (scm_string_contains): Bugfix: when subtracting
+	unsigned values, make sure that result does not wrap.
+
 2004-09-09  Kevin Ryde  <user42@zip.com.au>
 
 	* filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it
Index: srfi-13.c
===================================================================
RCS file: /cvsroot/guile/guile/guile-core/libguile/srfi-13.c,v
retrieving revision 1.4
diff -p -u -r1.4 srfi-13.c
--- srfi-13.c	7 Sep 2004 13:48:49 -0000	1.4
+++ srfi-13.c	13 Sep 2004 18:40:59 -0000
@@ -2253,7 +2253,7 @@ SCM_DEFINE (scm_string_contains, "string
 				   5, start2, cstart2,
 				   6, end2, cend2);
   len2 = cend2 - cstart2;
-  while (cstart1 <= cend1 - len2)
+  while (cstart1 <= cend1 - len2 && cend1 >= len2)
     {
       i = cstart1;
       j = cstart2;

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


       reply	other threads:[~2004-09-13 18:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1094681451.3785.368.camel@localhost>
     [not found] ` <87isan90sd.fsf@peder.flower>
2004-09-13 18:43   ` Jan Nieuwenhuizen [this message]
2004-09-13 19:30     ` srfi-13 bug2 Jan Nieuwenhuizen
2004-09-22  1:15     ` srfi-13 bug Marius Vollmer
2004-09-22 20:22       ` Jan Nieuwenhuizen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oekam2lf.fsf_-_@peder.flower \
    --to=janneke@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=guile-gtk-general@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).