[Gc] [PATCH] Dealing with `.data.rel.ro'

Boehm, Hans hans.boehm at hp.com
Sat Feb 28 17:01:08 PST 2009


Based on just looking at the patch, I'm generally fine with it.

Did you encounter problems without the overlap checking for exclusion ranges?  The checking in the patch is a bit ugly for two reasons:

1) I think this only handles a partial overlap with exactly one other range.  I don't immediately see why it's more important to handle that case than overlaps withmultiple existing exclusion ranges.

2) This only works if the ranges are added in the right order.

If this is only defensive programming, I'd omit it and let the partial error checking in GC_exclude_static_roots handle it.  The usual assumption is that the client should be able to avoid overlaps.  If that's not a reasonable assumption here, it would be great to include a comment.

I have an experimental source tree that replaces GC_exclude_static_roots with a more general declare_no_pointers implementation from the C++0x committee draft.  But that also doesn't support general overlaps, since the expectation is that the "owner" of the memory will make the call, e.g. from a C++ constructor.  So I think that change has surprisingly little bearing here.


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ludovic Courtès
> Sent: Tuesday, February 24, 2009 1:25 PM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] [PATCH] Dealing with `.data.rel.ro'
> Hello,
> Attached is an updated patch to exclude `PT_GNU_RELRO' 
> sections from marking.  The patch applies against CVS HEAD as 
> of 2008-12-03.
> Feedback welcome!
> Thanks,
> Ludo'.

More information about the Gc mailing list