Skip to content

msys2-runtime: update to 6183b8336e29b058b63dcf97ff8214b0355f165a #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From 6183b8336e29b058b63dcf97ff8214b0355f165a Mon Sep 17 00:00:00 2001
From: Corinna Vinschen <[email protected]>
Date: Tue, 13 Feb 2024 16:47:51 +0100
Subject: [PATCH 53/N] Cygwin: find_fast_cwd: don't run assembler checking
code on ARM64

https://cygwin.com/pipermail/cygwin/2024-February/255397.html
reports a crash on ARM64 probably related to checking x86_64
code on the x86_64 emulator on AArch64.

At least for testing, pull the code checking the host HW
up to be called before trying to evaluate assembler code.

This fixes https://github.com/git-for-windows/git/issues/4808

Backported from 4e77fa9b8b (Cygwin: find_fast_cwd: don't run assembler
checking code on ARM64, 2024-02-13).

Signed-off-by: Corinna Vinschen <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
---
winsup/cygwin/path.cc | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index d06f3f0..c3623f9 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -4851,29 +4851,27 @@ find_fast_cwd_pointer ()
static fcwd_access_t **
find_fast_cwd ()
{
+ USHORT emulated, hosted;
+ fcwd_access_t **f_cwd_ptr;
+
+ /* First check if we're running in WOW64 on ARM64 emulating AMD64. Skip
+ fetching FAST_CWD pointer as long as there's no solution for finding
+ it on that system. */
+ if (IsWow64Process2 (GetCurrentProcess (), &emulated, &hosted)
+ && hosted == IMAGE_FILE_MACHINE_ARM64)
+ return NULL;
+
/* Fetch the pointer but don't set the global fast_cwd_ptr yet. First
we have to make sure we know the version of the FAST_CWD structure
used on the system. */
- fcwd_access_t **f_cwd_ptr = find_fast_cwd_pointer ();
+ f_cwd_ptr = find_fast_cwd_pointer ();
if (!f_cwd_ptr)
- {
- bool warn = 1;
- USHORT emulated, hosted;
-
- /* Check if we're running in WOW64 on ARM64 emulating AMD64. Skip
- warning as long as there's no solution for finding the FAST_CWD
- pointer on that system. */
- if (IsWow64Process2 (GetCurrentProcess (), &emulated, &hosted)
- && hosted == IMAGE_FILE_MACHINE_ARM64)
- warn = 0;
-
- if (warn)
- small_printf ("Cygwin WARNING:\n"
+ small_printf ("Cygwin WARNING:\n"
" Couldn't compute FAST_CWD pointer. This typically occurs if you're using\n"
" an older Cygwin version on a newer Windows. Please update to the latest\n"
" available Cygwin version from https://cygwin.com/. If the problem persists,\n"
" please see https://cygwin.com/problems.html\n\n");
- }
+
/* Eventually, after we set the version as well, set fast_cwd_ptr. */
return f_cwd_ptr;
}
13 changes: 8 additions & 5 deletions msys2-runtime/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkgbase=msys2-runtime
pkgname=('msys2-runtime' 'msys2-runtime-devel')
pkgver=3.5.4
pkgrel=2
pkgrel=3
pkgdesc="Cygwin POSIX emulation engine"
arch=('x86_64')
url="https://www.cygwin.com/"
Expand Down Expand Up @@ -78,9 +78,10 @@ source=('msys2-runtime'::git+https://github.com/cygwin/cygwin#tag=cygwin-${pkgve
0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch
0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch
0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch
0052-Fix-SSH-hangs.patch)
0052-Fix-SSH-hangs.patch
0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch)
sha256sums=('3812485e2a6ab8360e5b9d566a47b982852ff2b140cea4e332ded19c11c77663'
'46c8f9c0ed7259de78d5dc2edfd9479d873d21b64040fbca3b52045cb6e52c95'
'490f290676fc38e51b5084ed7061c1abb70a462bf3067941b01a52e60662aecc'
'9f9e1b6b05cbc9a715fe9443740b25171e9c1a276a058e6ba7e4f6eada6872c8'
'e5b2095e543a5d702cfce6da26cd17a78f40e17620315b1bcc434b94a007ae9b'
'f13b15dc14aa6ee1dd628a2487564bb484e74ff2f3e4059b9d9d64446a327db1'
Expand Down Expand Up @@ -132,7 +133,8 @@ sha256sums=('3812485e2a6ab8360e5b9d566a47b982852ff2b140cea4e332ded19c11c77663'
'5fb74f788388fcf23b2eab5e74be176c981f5cfcd9f01caf6a9e78cd8fc58e00'
'394229cfa5293e4572dfd7155605343ca7426395429fa47eb38aced11d4f924b'
'590dc0ce9e72a1adf1424c7a4f55bd57d8955eef036776895b3d779d4932d4ce'
'75e22e453011ea15c6cf6b6904c33256530d6f4ba273f03bc6a37d9245064c8c')
'75e22e453011ea15c6cf6b6904c33256530d6f4ba273f03bc6a37d9245064c8c'
'7fe562197a1f3b67b1e794808186c10ff0186b0fcf8d09a8021499b952d04d2c')

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
Expand Down Expand Up @@ -238,7 +240,8 @@ prepare() {
0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch \
0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch \
0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch \
0052-Fix-SSH-hangs.patch
0052-Fix-SSH-hangs.patch \
0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch
}

build() {
Expand Down
2 changes: 1 addition & 1 deletion msys2-runtime/msys2-runtime.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cbe555e054cefeccd65250bb11dc56f82196301f
6183b8336e29b058b63dcf97ff8214b0355f165a