X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6816386D61B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1708024426;
	bh=kDXcxBlPkfxxtww2gCbBQTVRhn51evzgNx3deut1Yeo=;
	h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=du/Dlr8iOcAmJctmdEbHZ1GJaAOWQXXAcn25J7Ug7Kzxu1ZywMV4SpDtXA2sm0LJr
	 VEA2tYn9n5eENePibcfgepR/4ff7wnSY2dR2fZQjb9JX4oyux/YrUwpCjaaUYMHo5K
	 15W83xkeXuT9uYGWpfPWJ8LCCBSHaxnwvE3zBaNE=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D67AA386C5AB
Date: Thu, 15 Feb 2024 20:13:21 +0100
To: Kevin Ushey <kevinushey@gmail.com>
Subject: Re: Cygwin installer hangs when running post-install scripts
Message-ID: <Zc5iUXClY6IS77si@calimero.vinschen.de>
Mail-Followup-To: Kevin Ushey <kevinushey@gmail.com>, cygwin@cygwin.com
References: <Zcs_54Sakt48iAUd@calimero.vinschen.de>
 <ZcuYBL3D2rSjlhNu@calimero.vinschen.de>
 <CAJXgQP3YzDiomDUvOG30JfSAbe5d3EgLDRvbsT8yN73aAswPLA@mail.gmail.com>
 <Zcu761ZXudxviCKv@calimero.vinschen.de>
 <CAJXgQP3L5Wq9ZmVUJ2K+wt04Nh15QTjt2e9SF07TYwS8Bg15rg@mail.gmail.com>
 <ZcyNTIuY728RhUTg@calimero.vinschen.de>
 <ZczAeBlaEk7Syuwd@calimero.vinschen.de>
 <CAJXgQP2ueV4tuTvW5Axm_R6PFX_yHKUuYRwvTy98aPsZCdj8uQ@mail.gmail.com>
 <Zc3ggLcaKHjtDjLD@calimero.vinschen.de>
 <CAJXgQP3ru1OLyw+fg0Oyy1XmsaDyBbedKQgwzpMmJoaX5nLanQ@mail.gmail.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <CAJXgQP3ru1OLyw+fg0Oyy1XmsaDyBbedKQgwzpMmJoaX5nLanQ@mail.gmail.com>
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>, cygwin@cygwin.com
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Feb 15 09:46, Kevin Ushey via Cygwin wrote:
> Thanks -- I've put the associated WinDbg output up at
> https://gist.github.com/kevinushey/cdbd15cdf22e5cdcd094b0ad80347dce.
> (Sharing it externally just because it's relatively large.)

Thank you!

> The important thing to note is that #RtlGetCurrentDirectory_U appears
> to be valid ARM assembly, but not x86_64 assembly. My hypothesis here
> is that the stub is used to allow emulated x86_64 processes to call
> back into native ARM code... which would further confirm that
> disabling the find_fast_cwd_pointer checks for ARM is the correct
> choice.

I guess so, but I'm quite puzzled how the emulator is supposed
to know that it just left the x86_64 assembler code.  Magic!!!

Checking the ARM code, it might even be possible to come up with
a real solution, given this line in the first few bytes of
ntdll!#RtlGetCurrentDirectory_U:

  00000001`802b7054 db030094 bl      ntdll!#RtlpReferenceCurrentDirectory (1802b7fc0)

This seems to fetch the address of the pointer we're interested in.
It's unlikely (but not impossible) that the structure differs from the
same struct as on x86_64.

We may have a chance there, but I would feel better if I could debug my
code by myself.


Thanks,
Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
