delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/12/09/10:53:49

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:reply-to:message-id
:date:mime-version:in-reply-to:content-type; q=dns; s=default; b=
NurzYsB4QoupC5tc7KND5X0RNApPsKqObyqGi2jeqHPHkYkLPGd87yC25iodPNsU
+InIjMLkIB7I8/rPcmhEVuzuk9nBCTXSHM7bi56Yu7QS8VYtuGJmlYVDCkwrL/fA
MqQSHRHw4aOP/H7sTYy6R551M2vJDRMrimdGYkBpZrw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:reply-to:message-id
:date:mime-version:in-reply-to:content-type; s=default; bh=BAdRD
dxF5SCTm0V7h2MEiS0qZvY=; b=BUsY/duqC9/IMvqq+BhD+plvN2lIc++u43cxL
Vj7AdixHjotS1lGp+qgsAoy15HfGUCKW+xyzlF5XezyX11Henkv5n/SqNMz4wZWS
yMi6nqk6q6CCrVSm2T2f+eeY7LRy+8ptal2V4UVJblsldzzzhPV0kOtcoKPfDE8k
ovFxA0=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: =?ISO-8859-1?Q?No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Greetings, Stphane, st=c3=a9phane, mbape?=
X-HELO: sonic309-24.consmr.mail.ir2.yahoo.com
Subject: Re: fork fails after nmap with hint address in an unmapped memory region
To: cygwin AT cygwin DOT com
References: <b431898c-30f5-2847-c922-0f25a525ef76 AT yahoo DOT fr> <15510444518 DOT 20171209184819 AT yandex DOT ru>
From: "Stéphane Mbape via cygwin" <cygwin AT cygwin DOT com>
Reply-To: =?UTF-8?Q?St=c3=a9phane_Mbape?= <smbape AT yahoo DOT fr>
Message-ID: <42c71a45-e61b-6917-b634-e912fb51d2d5@yahoo.fr>
Date: Sat, 9 Dec 2017 16:53:29 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
MIME-Version: 1.0
In-Reply-To: <15510444518.20171209184819@yandex.ru>

--------------5994953D5576C281B33D1B91
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Sorry,

Cygwin version: 2.9.0
OS: Windows 10
Arch: 64bit

The sample was also attached.

Le 09/12/2017 à 16:48, Andrey Repin a écrit :
> Greetings, Stéphane Mbape!
>
>> While embeding luajit in a c  program, I found myself unable to fork
>> processes.
>> Investigations prove that it was related to nmap.
>> To be accurate, calling nmap with hint address in a unmapped memory
>> region will cause all forks to fail with
>> "fixup_mmaps_after_fork: ReadProcessMemory failed for MAP_PRIVATE
>> address 0x6FFFFFE0000, Win32 error 299"
>> There is a sample code below.
> You forgot to mention Cygwin version you're using, and please provide the
> sample as an attach to save people the copy-pasting issues.
>
>


--------------5994953D5576C281B33D1B91
Content-Type: text/plain; charset=UTF-8;
 name="doscript.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="doscript.c"

I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1
ZGUgPHN5cy9tbWFuLmg+CiNpbmNsd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GlmIChjaGlsZF9waWQgPCAwKSB7CiAg
ICAgICAgcGVycm9yKCJmb3JrIGZhaWxlZCIpOwogICAgfSBlbHNlIGlmIChj
aGlsZF9waWQgPT0gMCkgewogICAgICAgIHByaW50ZigiSSBhbSB3b3JrZXIg
JWRcbiIsIChpbnQpIGdldHBpZCgpKTsKICAgICAgICBzbGVlcCgyKTsKICAg
ICAgICBwcmludGYoIndvcmtlciBleGl0aW5nXG4iKTsKICAgICAgICBleGl0
KDApOwogICAgfQoKICAgIHdhaXQoTlVMTCk7CgogICAgcHJpbnRmKCJtYXN0
ZXIgZXhpdGluZ1xuIik7CiAgICByZXR1cm4gMDsKfQo=


--------------5994953D5576C281B33D1B91
Content-Type: text/plain; charset=us-ascii


--
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
--------------5994953D5576C281B33D1B91--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019