[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug involving uniform vectors
From: |
Marius Vollmer |
Subject: |
Re: bug involving uniform vectors |
Date: |
12 Mar 2002 00:10:25 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Kyle Cronan <address@hidden> writes:
> Hello,
>
> The following command causes my version of guile (couple months old
> 1.7.0 CVS) to segfault reliably:
>
> guile> (array? (make-uniform-vector 2 #t) #t)
>
> Program received signal SIGSEGV, Segmentation fault.
> singp (obj=0x2374) at unif.c:149
> 149 if (!SCM_SLOPPY_REALP (obj))
Thanks, I've fixed this, but it only turned up a whole shitload of
other bugs... I mean, what kind of code _is_ this:
switch (SCM_TYP7 (v))
{
case scm_tc7_bvect:
protp = (SCM_EQ_P (prot, SCM_BOOL_T));
case scm_tc7_string:
protp = SCM_CHARP(prot) && (SCM_CHAR (prot) != '\0');
case scm_tc7_byvect:
protp = SCM_EQ_P (prot, SCM_MAKE_CHAR ('\0'));
case scm_tc7_uvect:
Also, what about
guile> (array? car)
#t
I'm baffled. How could this happen?
[ The fix for your immediate problem is to replace SCM_SLOPPY_REALP
with SCM_REALP. ]