[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Fix for extremely obscure error in lolevel
From: |
John Cowan |
Subject: |
Re: [Chicken-hackers] [PATCH] Fix for extremely obscure error in lolevel-tests |
Date: |
Wed, 16 Apr 2014 12:20:30 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Peter Bex scripsit:
> Felix found out that the reason it's failing is because the
> lolevel-tests call object-evict and then object-release on an object
> which is bound to a global variable ev-tstvec. This global variable
> points to *freed memory* after object-release has been called.
Evicted objects have to be treated with even more caution than plain
external memory. They can't be mutated (except by changing the values
of immediates) and you have to do manual management of any references
to them. I cannot think of any safe and significant use cases for them,
except perhaps large immutable data structures that should be kept
out of the GC'd heap, in which case they should never be freed at all.
So perhaps object-release should be deprecated?
Object-unevict also has a misleading name, as it suggests that it undoes
object eviction; I think it should be called evicted-object-copy.
--
John Cowan http://www.ccil.org/~cowan address@hidden
Be yourself. Especially do not feign a working knowledge of RDF where
no such knowledge exists. Neither be cynical about RELAX NG; for in
the face of all aridity and disenchantment in the world of markup,
James Clark is as perennial as the grass. --DeXiderata, Sean McGrath