This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add an additional relocation attempt pass to load_after_fork()


On Wed, Apr 06, 2011 at 12:54:42PM +0100, Jon TURNEY wrote:
>On 05/04/2011 17:21, Christopher Faylor wrote:
>> On Tue, Apr 05, 2011 at 05:03:43PM +0100, Jon TURNEY wrote:
>>> On 04/04/2011 15:39, Christopher Faylor wrote:
>> I'm trying to imagine a scenario where it would screw up to just do the
>> reserve_upto + "reserve the low block" and I can't think of one.  It's
>> potentially a little more work, of course, but I think it may catch the
>> more common failing conditions so it shouldn't be too noticeable.
>> 
>>>> If so, it seems like we're allocating and freeing the space up to the DLL more
>>>> than once.  I think we could avoid doing that.
>>>
>>> For performance reasons, I think you are right.  Or do you mean there is a
>>> correctness issue with that?
>>>
>>> If you indicate your preferences I'll respin the patch.
>>>
>>> 1) Combine passes 2 and 3
>> 
>> I'd prefer this.  If we can get people test the snapshot maybe we an
>> figure out if a separate loop is useful.
>
>Updated patch attached.

>2011-04-06  Jon TURNEY  <jon.turney@dronecode.org.uk>
>
>	* dll_init.cc (reserve_at, release_at): New functions.
>	(load_after_fork): If the DLL was loaded higher than the required
>	address, assume that it loaded at it's base address and also reserve
>	memory there to force it to be relocated.

This looks good except for formatting nits involving spaces before/after
parentheses.  I've checked it in with those very minor changes.

Thanks very much for this patch.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]