GNU bug report logs -
#12182
guile 2.0.6: "Value out of range: 0" when compiling a procedure
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 24 Nov 2012 00:19:32 +0100
with message-id <87mwy7ewl7.fsf <at> gnu.org>
and subject line Re: bug#12182: guile 2.0.6: "Value out of range: 0" when compiling a procedure
has caused the debbugs.gnu.org bug report #12182,
regarding guile 2.0.6: "Value out of range: 0" when compiling a procedure
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
12182: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12182
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello,
guile 2.0.6 fails to compile the following procedure with the error "Value out of range: 0".
~~~~~~~
;; get all points inside a distance of the half-line starting from (x0 . y0) and containing (x1 . y1)
;; the argument dist is the square of the distance we want to reach
(define (get-half-line-points x0 y0 x1 y1 dist)
(if (and (eq? x0 x1) (eq? y0 y1))
(list (cons x0 y0))
(letrec*
((steep? (> (abs (- y1 y0)) (abs (- x1 x0))))
(x-orig (if steep? y0 x0))
(y-orig (if steep? x0 y0))
(x-dest (if steep? y1 x1))
(y-dest (if steep? x1 y1))
(delta-x (abs (- x-dest x-orig)))
(delta-y (abs (- y-dest y-orig)))
(delta-err (/ delta-y delta-x))
(x-step (if (< x-orig x-dest) 1 -1))
(y-step (if (< y-orig y-dest) 1 -1))
(plot
(lambda (x y error points)
(if (< dist (+ (expt (- x x-orig) 2) (expt (- y y-orig) 2)))
(reverse points)
(let ((new-error (+ error delta-err)))
(plot
(+ x-step x)
(if (>= new-error 0.5) (+ y y-step) y)
(if (>= new-error 0.5) (- new-error 1) new-error)
(cons (if steep? (cons y x) (cons x y)) points)))))))
(plot x-orig y-orig 0 '()) )))
~~~~~~~
The backtrace I have with guild compile :
$ guild compile test.scm
Backtrace:
In language/tree-il/optimize.scm:
44: 19 [optimize! #<tree-il (lambda () #)> #<module (#{ g40}#) 2097ab0> ...]
In language/tree-il/cse.scm:
537: 18 [visit #<tree-il (lambda () (lambda-case #))> #<vlist ()> ...]
543: 17 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf540 1 pairs> ...]
483: 16 [visit #<tree-il #> #<vhash 22cf540 1 pairs> #<vlist ()> ...]
537: 15 [visit #<tree-il (lambda (#) (lambda-case #))> #<vhash 22cf540 1 pairs> ...]
543: 14 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf4a0 2 pairs> ...]
429: 13 [visit #<tree-il (let # # # ...)> #<vhash 22cf4a0 2 pairs> #<vlist ()> ...]
370: 12 [lp (#<tree-il (lambda () #)>) () #<vlist ()>]
537: 11 [visit #<tree-il (lambda () (lambda-case #))> #<vhash 22cf4a0 2 pairs> ...]
543: 10 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf400 3 pairs> ...]
437: 9 [visit #<tree-il (letrec* # # ...)> #<vhash 22cf400 3 pairs> ...]
533: 8 [visit #<tree-il (apply # # ...)> #<vhash 23250e0 19 pairs> ...]
370: 7 [lp (#<tree-il #> #<tree-il #> #<tree-il #> #<tree-il #>) () #<vlist ()>]
533: 6 [visit #<tree-il (apply # #)> #<vhash 23250e0 19 pairs> ...]
370: 5 [lp (#<tree-il (if # # #)>) () #<vlist ()>]
403: 4 [return #<tree-il (if # # #)> #<vlist ()>]
333: 3 [find-dominating-lexical #<tree-il (if # # ...)> 0 ...]
315: 2 [unroll #<vhash 23250e0 19 pairs> 19 13]
In ice-9/vlist.scm:
303: 1 [vlist-ref #<vhash 23250e0 19 pairs> 19]
In ice-9/boot-9.scm:
106: 0 [#<procedure 204f280 at ice-9/boot-9.scm:97:6 (thrown-k . args)> out-of-range ...]
ice-9/boot-9.scm:106:20: In procedure #<procedure 204f280 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: Value out of range: 0
Feufochmar
[Message part 3 (message/rfc822, inline)]
Hi,
Sorry for the late reply.
Feufochmar <guill.delacourt <at> gmail.com> skribis:
> $ guild compile test.scm
> Backtrace:
> In language/tree-il/optimize.scm:
> 44: 19 [optimize! #<tree-il (lambda () #)> #<module (#{ g40}#) 2097ab0> ...]
> In language/tree-il/cse.scm:
> 537: 18 [visit #<tree-il (lambda () (lambda-case #))> #<vlist ()> ...]
> 543: 17 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf540 1 pairs> ...]
> 483: 16 [visit #<tree-il #> #<vhash 22cf540 1 pairs> #<vlist ()> ...]
> 537: 15 [visit #<tree-il (lambda (#) (lambda-case #))> #<vhash 22cf540 1 pairs> ...]
> 543: 14 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf4a0 2 pairs> ...]
> 429: 13 [visit #<tree-il (let # # # ...)> #<vhash 22cf4a0 2 pairs> #<vlist ()> ...]
> 370: 12 [lp (#<tree-il (lambda () #)>) () #<vlist ()>]
> 537: 11 [visit #<tree-il (lambda () (lambda-case #))> #<vhash 22cf4a0 2 pairs> ...]
> 543: 10 [visit #<tree-il (lambda-case (# #))> #<vhash 22cf400 3 pairs> ...]
> 437: 9 [visit #<tree-il (letrec* # # ...)> #<vhash 22cf400 3 pairs> ...]
> 533: 8 [visit #<tree-il (apply # # ...)> #<vhash 23250e0 19 pairs> ...]
> 370: 7 [lp (#<tree-il #> #<tree-il #> #<tree-il #> #<tree-il #>) () #<vlist ()>]
> 533: 6 [visit #<tree-il (apply # #)> #<vhash 23250e0 19 pairs> ...]
> 370: 5 [lp (#<tree-il (if # # #)>) () #<vlist ()>]
> 403: 4 [return #<tree-il (if # # #)> #<vlist ()>]
> 333: 3 [find-dominating-lexical #<tree-il (if # # ...)> 0 ...]
> 315: 2 [unroll #<vhash 23250e0 19 pairs> 19 13]
> In ice-9/vlist.scm:
> 303: 1 [vlist-ref #<vhash 23250e0 19 pairs> 19]
> In ice-9/boot-9.scm:
> 106: 0 [#<procedure 204f280 at ice-9/boot-9.scm:97:6 (thrown-k . args)> out-of-range ...]
>
> ice-9/boot-9.scm:106:20: In procedure #<procedure 204f280 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
> ice-9/boot-9.scm:106:20: Value out of range: 0
This is the same issue as 12883, which is now fixed in the stable-2.0
branch (will be in 2.0.7):
http://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=2c7b7e0f214be5ec5184949a94209668775f60bc
Thanks,
Ludo’.
This bug report was last modified 12 years and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.