unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Alexey Voinov <voins@voins.program.ru>
Subject: segfault in guile 1.6.7
Date: Thu, 24 Mar 2005 20:11:52 +0300	[thread overview]
Message-ID: <20050324171151.GA2647@voins.local> (raw)


[-- Attachment #1.1.1: Type: text/plain, Size: 463 bytes --]

hi.

There's a bug in guile srfi-13 implementation. 

Steps to reproduce are:
$ guile
guile> (use-modules (srfi srfi-13))
guile> (string-index (string #\a) char-numeric?)
#f
guile> (string-index (string (integer->char 209)) char-numeric?)
zsh: 2760 segmentation fault  guile

I haven't checked if this bug is still present in cvs HEAD.
Patch attached.

-- 
Best Regards!
Alexey Voinov
             
voins@voins.program.ru
voins@altlinux.ru


[-- Attachment #1.1.2: guile-1.6.7-alt-unsigned.patch --]
[-- Type: text/plain, Size: 7439 bytes --]

--- guile-1.6.7/srfi/srfi-13.c.orig	2004-12-14 08:21:39 +0300
+++ guile-1.6.7/srfi/srfi-13.c	2005-03-23 21:57:37 +0300
@@ -61,7 +61,7 @@
 	    "successful application of @var{pred}.")
 #define FUNC_NAME s_scm_string_any
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM res;
 
@@ -108,7 +108,7 @@
 	    "application of @var{pred} to the last character of @var{s}.")
 #define FUNC_NAME s_scm_string_every
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM res;
 
@@ -189,7 +189,7 @@
 	    "Convert the string @var{str} into a list of characters.")
 #define FUNC_NAME s_scm_string_to_listS
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM result = SCM_EOL;
 
@@ -645,7 +645,7 @@
 	    "trimmed.")
 #define FUNC_NAME s_scm_string_trim
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -720,7 +720,7 @@
 	    "trimmed.")
 #define FUNC_NAME s_scm_string_trim_right
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -795,7 +795,7 @@
 	    "trimmed.")
 #define FUNC_NAME s_scm_string_trim_both
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -906,7 +906,7 @@
 	    "@var{i} is the first position that does not match.")
 #define FUNC_NAME s_scm_string_compare
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -949,7 +949,7 @@
 	    "character comparison is done case-insensitively.")
 #define FUNC_NAME s_scm_string_compare_ci
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -987,7 +987,7 @@
 	    "value otherwise.")
 #define FUNC_NAME s_scm_string_eq
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1022,7 +1022,7 @@
 	    "value otherwise.")
 #define FUNC_NAME s_scm_string_neq
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1057,7 +1057,7 @@
 	    "true value otherwise.")
 #define FUNC_NAME s_scm_string_lt
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1092,7 +1092,7 @@
 	    "true value otherwise.")
 #define FUNC_NAME s_scm_string_gt
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1127,7 +1127,7 @@
 	    "value otherwise.")
 #define FUNC_NAME s_scm_string_le
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1162,7 +1162,7 @@
 	    "otherwise.")
 #define FUNC_NAME s_scm_string_ge
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1198,7 +1198,7 @@
 	    "case-insensitively.")
 #define FUNC_NAME s_scm_string_ci_eq
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1234,7 +1234,7 @@
 	    "case-insensitively.")
 #define FUNC_NAME s_scm_string_ci_neq
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1270,7 +1270,7 @@
 	    "case-insensitively.")
 #define FUNC_NAME s_scm_string_ci_lt
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1306,7 +1306,7 @@
 	    "case-insensitively.")
 #define FUNC_NAME s_scm_string_ci_gt
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1342,7 +1342,7 @@
 	    "case-insensitively.")
 #define FUNC_NAME s_scm_string_ci_le
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1378,7 +1378,7 @@
 	    "case-insensitively.")
 #define FUNC_NAME s_scm_string_ci_ge
 {
-  char * cstr1, * cstr2;
+  unsigned char * cstr1, * cstr2;
   int cstart1, cend1, cstart2, cend2;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1,
@@ -1658,7 +1658,7 @@
 	    "@end itemize")
 #define FUNC_NAME s_scm_string_indexS
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -1717,7 +1717,7 @@
 	    "@end itemize")
 #define FUNC_NAME s_scm_string_index_right
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -1777,7 +1777,7 @@
 	    "@end itemize")
 #define FUNC_NAME s_scm_string_skip
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -1837,7 +1837,7 @@
 	    "@end itemize")
 #define FUNC_NAME s_scm_string_skip_right
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_SUBSTRING_SPEC_COPY (1, s, cstr,
@@ -1896,7 +1896,7 @@
 	    "@end itemize")
 #define FUNC_NAME s_scm_string_count
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   int count = 0;
 
@@ -2442,7 +2442,7 @@
 	    "string elements is not specified.")
 #define FUNC_NAME s_scm_string_map
 {
-  char * cstr, *p;
+  unsigned char * cstr, *p;
   int cstart, cend;
   SCM result;
 
@@ -2473,7 +2473,7 @@
 	    "modified in-place, the return value is not specified.")
 #define FUNC_NAME s_scm_string_map_x
 {
-  char * cstr, *p;
+  unsigned char * cstr, *p;
   int cstart, cend;
 
   SCM_VALIDATE_PROC (1, proc);
@@ -2502,7 +2502,7 @@
 	    "result of @var{kons}' application.")
 #define FUNC_NAME s_scm_string_fold
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM result;
 
@@ -2529,7 +2529,7 @@
 	    "result of @var{kons}' application.")
 #define FUNC_NAME s_scm_string_fold_right
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM result;
 
@@ -2678,7 +2678,7 @@
 	    "return value is not specified.")
 #define FUNC_NAME s_scm_string_for_each
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
 
   SCM_VALIDATE_PROC (1, proc);
@@ -2914,7 +2914,7 @@
 	    "character set, it is tested for membership.")
 #define FUNC_NAME s_scm_string_filter
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM result;
   int idx;
@@ -2980,7 +2980,7 @@
 	    "character set, it is tested for membership.")
 #define FUNC_NAME s_scm_string_delete
 {
-  char * cstr;
+  unsigned char * cstr;
   int cstart, cend;
   SCM result;
   int idx;

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

             reply	other threads:[~2005-03-24 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-24 17:11 Alexey Voinov [this message]
2005-03-25 20:37 ` segfault in guile 1.6.7 Kevin Ryde
2005-03-25 20:47   ` Kevin Ryde
2005-05-22 18:59 ` Marius Vollmer
2005-05-23  1:34   ` Kevin Ryde
2005-06-06 19:20     ` Marius Vollmer
2005-06-06 22:07       ` Kevin Ryde

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=20050324171151.GA2647@voins.local \
    --to=voins@voins.program.ru \
    /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).