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

Ludovic Courtès ludo at gnu.org
Tue Apr 28 09:01:21 PDT 2009


Hi,

"Boehm, Hans" <hans.boehm at hp.com> writes:

> My concern here is with the code in the newly added PT_GNU_RELRO case.
> It seems to handle the case in which (start, end) overlaps a single
> existing exclusion range.  In that cases it just adds any additions.
> It doesn't handle the cases in which
>
> - it overlaps multiple such previously registered exclusion ranges, or

Right.

> - the overlapping exclusion range is registered later with an explicit
> call.

I think that the caller has to protect against it anyway.

> Is the only reason for the explicit test for overlap with a previous
> range the fact that
[...]

The reason is that GNU_RELRO segments are subsets of previously
registered LOAD segments.  See
http://permalink.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2576 .

> Another reason I'm worried is that I have pending code that replaces
> the exclusion range data structure with something more intelligent,
> but which still insists on non-overlapping ranges.

We can choose to wait until your changes are committed and update the
patch then.

> How many such GNU_RELRO segments do you expect?

One, since there's essentially a one-to-one mapping between
`.data.rel.ro' and `GNU_RELRO'.

Thanks,
Ludo'.


More information about the Gc mailing list