bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24321: Guardian fails to protect procedure properties


From: Robin Templeton
Subject: bug#24321: Guardian fails to protect procedure properties
Date: Sat, 27 Aug 2016 15:32:20 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

The following expression produces possibly erroneous results in Guile
2.1.3.104-8f2f8 (with Debian's libgc1c2 version 1:7.4.2-8):

(let ((guardian (make-guardian))
      (foo (eval '(lambda () #f) (interaction-environment))))
  (set-procedure-property! foo 'wibbly 'wobbly)
  (guardian foo)
  (format #t "~S~%" (procedure-properties foo))
  (set! foo #f)
  (gc)
  (do ((foo (guardian) (guardian)))
      ((not foo))
    (format #t "~S~%" (procedure-properties foo))))

First it prints "((wibbly . wobbly))" as expected, but after the
procedure is retrieved from the guardian the list of properties is
empty. The properties are stored in a weak hash table, but shouldn't
they be protected from GC while the procedure is in the guardian?

-- 
Inteligenta persono lernas la lingvon Esperanton rapide kaj facile.
Esperanto estas moderna, kultura lingvo por la mondo. Simpla, fleksebla,
belsona, Esperanto estas la praktika solvo de la problemo de universala
interkompreno. Lernu la interlingvon Esperanton!






reply via email to

[Prev in Thread] Current Thread [Next in Thread]