chibi-scheme
chibi-scheme copied to clipboard
SRFI 231: array-extract doesn't preserve safety for specialized arrays
The symptom: This should fail, the indices are out of bounds:
> heine:~/programs/chibi-scheme> chibi-scheme
> (import (srfi 231))
> (define A (make-specialized-array (make-interval '#(4 4)) generic-storage-class #t #t))
> (define B (array-extract A (make-interval '#(2 2))))
> (array-ref B 2 2)
#t
I think something is a problem with specialized-array-share or %make-specialized-array, but I don't know where, precisely.
I just sent a pull request to fix this in the sample implementation and test suite.