* weak-values gc missed a reference [1.6]
@ 2004-08-29 21:55 Kevin Ryde
0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2004-08-29 21:55 UTC (permalink / raw)
In my i386 build of the latest 1.6 cvs or the debian 1.6.4-4, the
program below run as "guile -s foo.scm" gives
ERROR: not-a-record #<freed cell 0x8084f00; GC missed a reference>
I got this in a big program, also using records held as the values in
a weak value hash table. I think the error is from "rec-foo", with
"x" apparently having become a freed cell.
Being a gc thing it might be sensitive to the exact build environment,
I'm using --with-threads=coop and the default CFLAGS.
It doesn't seem to happen if --debug is added (goes into an infinite
loop instead). But my big program bombs with --debug too. I've been
using the cvs head instead mostly, and haven't had any problems there
(build as of a couple of weeks ago for instance).
(define rec-type (make-record-type "foo" '(foo bar quux)))
(define rec-new (record-constructor rec-type))
(define rec-foo (record-accessor rec-type 'foo))
(define h (make-weak-value-hash-table 61))
(hash-set! h "foo" (rec-new (make-vector 1000)
(make-vector 1000)
(make-vector 1000)))
(let more ()
(noop)
(noop)
(noop)
(noop)
(let ((x (hash-ref h "foo")))
(if x
(rec-foo x)))
;; (gc)
(if (hash-ref h "foo")
(more)))
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-29 21:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-29 21:55 weak-values gc missed a reference [1.6] Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).