X-Recipient: archive-cygwin@delorie.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:date:from:to:subject:message-id:in-reply-to
	:references:mime-version:content-type:content-transfer-encoding;
	 q=dns; s=default; b=VAwcFLrH08xz9btJGtlGS0H0v+sjENiLmVVnJsCLiLd
	tbUnTYzjLRt8yKsaLYKnJCOO10OYsUGkq8DBEohhc/HIHwz0m72BxweabAo0ujkH
	Vjwq+Q4EWDJ3HrpfWhZXghTzxhW6H2ez50GjNMJWI0P2oXORLXUtlQF7P+kfO8cY
	=
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:date:from:to:subject:message-id:in-reply-to
	:references:mime-version:content-type:content-transfer-encoding;
	 s=default; bh=X3BsDiexdXeFbCOORk0ZyBU5W64=; b=pSSsWdQXmnRPyIQZa
	U5Z70kzxH4rD6glBMdvOzeHcn2+ZDHoclE5g7boqurkZDdtdmTrnjnsxl1StQ8ey
	hi+HAbSPn8amL0aaKOuZE8eFKYUxRDSxzWc3XR5in5xXJ7m1ew67TZr1gKcWbILV
	FiX/u5Eg1cb9jrDAXJIr2copJc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-24.3 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=D*8
X-HELO: conssluserg-06.nifty.com
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w63JHcQf030786
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp;	s=dec2015msa; t=1530645458;	bh=qkKgi6NH+STbarrvDBlq5Ck0jaSeetEdHIeSFvL31ig=;	h=Date:From:To:Subject:In-Reply-To:References:From;	b=rLTdV7XUHGbTQiOT91f6DrPqMQv31sagPG+CeHl7mZ12UGNGfk8fo5wyIsJxW3WAG	 swTzfKownFO0RbnC96NRCqYeTgid/FoEax1p8aLcYqioa17GN/k/dIezJAzyPUg+Dx	 wty28AufZWYRZdpsOIt7q1F4/sgBnLuQxjzDMgRCUqfC416pkWPosH05CdUPSXORP1	 ng8P+FmhPSycVEB6+1rLgY3xRYp1ve/dlON6PVU2yokHHeeRW3EoukVaOQ4CQnhdlT	 7mkxo1/LQ+bqz28Sg9q3H5xIRlX8wHT5MIrkMukKnnPNZQtKv8aXvZutPrbyuyEHg6	 LGu8in7kjkaNA==
Date: Wed, 4 Jul 2018 04:17:40 +0900
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: Named AF_UNIX socket not working in cygwin1.dll of git HEAD.
Message-Id: <20180704041740.82e2bae6c8cd016a3c303c94@nifty.ne.jp>
In-Reply-To: <20180704020108.a1aa8188429a83986b5a19d7@nifty.ne.jp>
References: <20180703194429.6aeab3cb1041fe475ecde834@nifty.ne.jp>	<20180703130558.GI3111@calimero.vinschen.de>	<20180704020108.a1aa8188429a83986b5a19d7@nifty.ne.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hi Corinna,

On Wed, 4 Jul 2018 02:01:08 +0900
Takashi Yano wrote:
> I have check and found this happens only in 32 bit version. I mean
> 32 bit cygwin on 64 bit windows 10. 64 bit version work as expected.

I have looked into this problem, and found calling af_local_set_secret()
in fhandler_socket_local::bind() causes exception 0xc0000005.

Calling RtlGenRandom() in af_local_set_secret() may not be as expected.

While building cygwin1.dll in 32 bit environment, following warning is
shown. This is probably the cause.

Warning: resolving _SystemFunction036 by linking to _SystemFunction036@8

I am not sure why, but the following patch seems to be able solve this
problem.

diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc
index 2e01f30a2..68786f3a4 100644
--- a/winsup/cygwin/fhandler_socket_local.cc
+++ b/winsup/cygwin/fhandler_socket_local.cc
@@ -21,7 +21,7 @@
 #undef u_long
 #define u_long __ms_u_long
 #endif
-#include <w32api/ntsecapi.h>
+#include <ntsecapi.h>
 #include <w32api/ws2tcpip.h>
 #include <w32api/mswsock.h>
 #include <unistd.h>

Thank you.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

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

