Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#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     <--

Change History (3)

comment:1 Changed 13 years ago by Christian Kellermann

A patch has been sent to chicken-hackers

comment:2 Changed 13 years ago by sjamaan

Resolution: fixed
Status: newclosed

and was pushed

comment:3 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.