Memory Management bug with let?


#1

Hello,

I think I found a bug in the gc subsystem. To produce type:

(defun tst () (let ((a '()) (b (gc))) (print (append (a '(1 2 3))))))

(tst)

Space: 4 Bytes, Time: 2620 µS
Error: ‘a’ undefined

Remove the (gc) call and it works. I think that (gc) removes the local variable a because at this time it is not referenced.

Any suggestions?

Regards,
Kaef


#3

Yes, that is a bug - thank you for finding it.


#4

This was fixed in uLisp 1.9.


#5