[RFC patch] Fix a crash in GC due to thread-local *rctx

Pete Zaitcev zaitcev at redhat.com
Thu Aug 4 20:53:01 UTC 2011


On Thu, 04 Aug 2011 17:28:24 +0200
Jim Meyering <jim at meyering.net> wrote:

> In the extreme, there might be a potential for DoS.
> If that's a real issue, we could use a hash table
> instead of a list.

I meant to write that I find it hazardous to second-guess GC.
If it follows the references and builds a graph, then feeding it a long
list would be bad. But if it just scans memory and marks every piece
where a pointer is found, then it makes absolutely no difference
if pointers form a list, as long they exist at all. Of course using
a hash is just as effective for a mark-and-sweep GC, but the hazard
is to make it worse for no benefit by adding a bug. At least this list
never needs extra memory suddenly, so no error processing is needed.
Do I explain it satisfactorily?

-- Pete


More information about the iwhd-devel mailing list