unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* guile segfaults
@ 2004-01-05  4:01 Rouben Rostamian
  2004-01-06 22:10 ` Kevin Ryde
  0 siblings, 1 reply; 2+ messages in thread
From: Rouben Rostamian @ 2004-01-05  4:01 UTC (permalink / raw)


Version: guile--1.6.4

Guile segfaults when given the following code:

   (define a (make-uniform-array 1/3 3 3))
   (uniform-array-set1! a 5.0 (cons 0 0))

This was during my attempt to set the (0, 0) entry of the two-dimensional
array a to 5.0.

As it happens, the syntax is incorrect.  The second line should
have been:

   (uniform-array-set1! a 5.0 '(0 0))
    
Nevertheless, guile shouldn't have segfaulted on wrong input.

Just wanted to let you know.

-- 
Rouben Rostamian


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: guile segfaults
  2004-01-05  4:01 guile segfaults Rouben Rostamian
@ 2004-01-06 22:10 ` Kevin Ryde
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Ryde @ 2004-01-06 22:10 UTC (permalink / raw)
  Cc: bug-guile

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

"Rouben Rostamian" <rostamian@umbc.edu> writes:
>
> Guile segfaults when given the following code:
>
>    (define a (make-uniform-array 1/3 3 3))
>    (uniform-array-set1! a 5.0 (cons 0 0))

Thanks, a dodgy argument check.


[-- Attachment #2: unif.c.aind.diff --]
[-- Type: text/plain, Size: 357 bytes --]

--- unif.c.~1.137.~	2003-09-13 09:34:18.000000000 +1000
+++ unif.c	2004-01-06 15:34:23.000000000 +1000
@@ -473,7 +473,7 @@
 	scm_error_num_args_subr (what);
       return pos + (SCM_INUM (args) - s->lbnd) * (s->inc);
     }
-  while (k && !SCM_NULLP (args))
+  while (k && SCM_CONSP (args))
     {
       ind = SCM_CAR (args);
       args = SCM_CDR (args);

[-- Attachment #3: Type: text/plain, Size: 136 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-06 22:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-05  4:01 guile segfaults Rouben Rostamian
2004-01-06 22:10 ` Kevin Ryde

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).