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 15/03/2011 23:37, Yaakov (Cygwin/X) wrote:
> On Sun, 2011-03-13 at 15:07 +0000, Jon TURNEY wrote:
>> Attached is a patch which avoids a fork failure due to remap error in the
>> specific circumstances described in my email [1], by adding an additional pass
>> to load_after_fork() which forces the DLL to be relocated by VirtualAlloc()ing
>> a block of memory at the load address as well.
>>
>> Hopefully it can be seen by inspection that this code doesn't change the
>> behaviour of the first two passes, and so will only be changing the behaviour
>> in what was an fatal error case before.
> 
> This patch causes a warning with GCC 4.5:
> 
> cc1plus: warnings being treated as errors
> dll_init.cc: In member function âvoid dll_list::load_after_fork(void*)â:
> dll_init.cc:328:33: error: converting to non-pointer type âDWORDâ from
> NULL

Thanks, I guess that should be a 0 instead.


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