fixup_mmaps_after_fork failure with cygwin-3.0.0
Ken Brown
kbrown@cornell.edu
Sun Feb 17 16:40:00 GMT 2019
On 2/17/2019 10:07 AM, Corinna Vinschen wrote:
> On Feb 17 14:56, Ken Brown wrote:
>> On 2/17/2019 4:13 AM, Corinna Vinschen wrote:
>>> On Feb 17 10:08, Corinna Vinschen wrote:
>>>> On Feb 17 00:11, Ken Brown wrote:
>>>>> I'm getting a lot of errors like this when building emacs from its git repo:
>>>>>
>>>> Weird. I built at least gawk and openssh with 3.0 already and I
>>>> didn't notice this problem.
>>>>
>>>>> A bisection points to the following as the first bad commit:
>>>>> [...]
>>>>> I'll try to do some debugging and/or provide further information
>>>>> tomorrow, but I thought I'd start with this preliminary report.
>>>>
>>>> That would be nice. It's not clear to me which permission is missing.
>>>> The first part of the patch has been reverted in 3.0.0, so
>>>> child_info_spawn::get_parent_handle opens the parent with
>>>> PROCESS_VM_READ again. The second patch has been reworked as well,m
>>>> the current perms are
>>>>
>>>> PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ | SYNCHRONIZE
>>>>
>>>> If I may place a bet, please try to replace
>>>> PROCESS_QUERY_LIMITED_INFORMATION with PROCESS_QUERY_INFORMATION
>>
>> That didn't change anything. Just to make sure I understood correctly, here's
>> what I tried:
>>
>> --- a/winsup/cygwin/sigproc.cc
>> +++ b/winsup/cygwin/sigproc.cc
>> @@ -814,7 +814,7 @@ child_info::child_info (unsigned in_cb, child_info_types chtype,
>> allow the child to copy cygheap etc. from the parent to itself. If
>> we're forking, we also need handle duplicate access. */
>> parent = NULL;
>> - DWORD perms = PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_VM_READ
>> + DWORD perms = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ
>> | SYNCHRONIZE;
>> if (type == _CH_FORK)
>> {
>>
>>> On second thought, an even better candidate may be PROCESS_VM_OPERATION.
>>
>> That's even worse. With that change, simply invoking 'make' leads to
>> the same error.
>
> PROCESS_VM_OPERATION has to be specified additionally, not replacing
> PROCESS_QUERY_{LIMITED_}INFORMATION. Sorry if that wasn't clear.
Success: Simply adding PROCESS_VM_OPERATION to the existing permissions fixes
the problem.
Thanks.
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list