chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] segfault bug in string->number


From: Robin Lee Powell
Subject: [Chicken-users] segfault bug in string->number
Date: Thu, 1 Feb 2007 10:53:28 -0800
User-agent: Mutt/1.5.13 (2006-08-11)

Given the following code (with giant strings snipped):

- -------------------------------

(use srfi-1)
(use srfi-13)

(define bigstring SNIP
(define bigstring2 SNIP

(write (string-length bigstring))
(display "\n")
(write (string->number bigstring))
(display "\n")
(write (string-length bigstring2))
(display "\n")
(write (string->number bigstring2))
(display "\n")

- -------------------------------

The strings most certainly do not encode numbers, and that *should*
be obvious from the first few characters, which are "le i mi cu nu
do la se lo lu li'u".

The following output occurs:

address@hidden> csc -O2 -d0 /tmp/stn.scm ; /tmp/stn
4107
#f
5065
zsh: segmentation fault  /tmp/stn

I'm not going to try to patch it, because I *loathe* C.  In fact,
I'm using Scheme largely *because* I loathe C (I'm replacing bits of
C in the project I'm working on with it).

-Robin

-- 
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/
Reason #237 To Learn Lojban: "Homonyms: Their Grate!"
Proud Supporter of the Singularity Institute - http://singinst.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]