[Top][All Lists]

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

Bug in make-shared-array.

From: Steve Juranich
Subject: Bug in make-shared-array.
Date: Mon, 27 Feb 2006 11:16:30 -0700
User-agent: KNode/0.9.0

I tried posting this on Friday, but it doesn't look like it went through. 
Here we go again...

I've found a bug in the guile 1.8.0 release such that one of the examples on
the info page about shared arrays doesn't work in guile.  The example in
question is:

(make-shared-array #1(a b c d e f g h i j k l)
                             (lambda (i j) (list (+ (* i 3) j)))
                             4 3)

The expected result is:  #2((a b c) (d e f) (g h i) (j k l)), which is what
I get for guile 1.6.7.  However, running the example in guile 1.8.0, I get
a backtrace.  Specifically:

guile> (make-shared-array #1(a b c d e f g h i j k l)
...                              (lambda (i j) (list (+ (* i 3) j)))
...                              4 3)

In current input:
   1: 0* [make-shared-array #(a b c d e f g h i ...) #<procedure #f (i j)> 4

<unnamed port>:1:1: In procedure make-shared-array in expression
(make-shared-array (quote #) (lambda # #) ...):
<unnamed port>:1:1: mapping out of range
ABORT: (misc-error)

I've done a little poking around and can isolate the problem to a call to
SCM_I_ARRAY_BASE at libguile/unif.c:912.

When SCM_I_ARRAY_BASE gets called on a 1-d array, things seem to work okay,
but when SCM_I_ARRAY_BASE is called on a 2-d array things seem to go

I'd like to be able to patch this myself, but I'm not sure how fast I'd be
able to come up to speed on how the API works to be able to do that.

Any help here would be very much appreciated.

Steve Juranich
Tucson, AZ

reply via email to

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