#802 closed defect (fixed)
(make-vector -1) gets optimised into (##core#inline_allocate ("C_i_a_vector" 0))
Reported by: | Christian Kellermann | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | compiler | Version: | 4.7.x |
Keywords: | optimisation, vector, bad input, kaputt | Cc: | |
Estimated difficulty: |
Description
A simple program
(make-vector -1)
compiles into:
[optimized-iteration] (lambda (k6) (let ((k8 (##core#lambda (t1) (let ((k10 (##core#lambda (t2) (let ((t3 (##core#inline_allocate ("C_a_i_vector" 0)))) (let ((k14 (##core#lambda (t4) (k6 (##core#undefined))))) (let ((k16 (##core#lambda (r17) (r17 k14)))) (##sys#implicit-exit-handler k16))))))) (##core#callunit "eval" k10))))) (##core#callunit "library" k8)))
which results in:
$ /tmp/t [panic] out of memory - heap full while resizing - execution terminated ##sys#implicit-exit-handler <--
Note: See
TracTickets for help on using
tickets.
A patch has been sent to chicken-hackers