I think this must be the survival record for severe Guile bugs.  :)
This one has been there from the (almost) very beginning when the
structs were implemented.

The following code segfaults because the vtable gets freed and the
freed memory reused before all structs using that vtable have been
freed (both calls to `foo' are therefore needed to evoke the bug):

----------------------------------------------------------------------
(define v (make-vtable-vtable "" 0))

(define (foo)
  (do ((i 0 (+ 1 i))
       (ls '() (cons (make-struct v 0) ls)))
      ((= i 5000) ls)))

(foo)

(define v (make-vtable-vtable "" 0))

(foo)
----------------------------------------------------------------------

Reply via email to