Skip to content

Commit 14f7ac4

Browse files
committed
msys2-runtime: update to 6183b8336e29b058b63dcf97ff8214b0355f165a
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 61e24ff commit 14f7ac4

File tree

3 files changed

+80
-6
lines changed

3 files changed

+80
-6
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From 6183b8336e29b058b63dcf97ff8214b0355f165a Mon Sep 17 00:00:00 2001
2+
From: Corinna Vinschen <[email protected]>
3+
Date: Tue, 13 Feb 2024 16:47:51 +0100
4+
Subject: [PATCH 53/N] Cygwin: find_fast_cwd: don't run assembler checking
5+
code on ARM64
6+
7+
https://cygwin.com/pipermail/cygwin/2024-February/255397.html
8+
reports a crash on ARM64 probably related to checking x86_64
9+
code on the x86_64 emulator on AArch64.
10+
11+
At least for testing, pull the code checking the host HW
12+
up to be called before trying to evaluate assembler code.
13+
14+
This fixes https://github.com/git-for-windows/git/issues/4808
15+
16+
Backported from 4e77fa9b8b (Cygwin: find_fast_cwd: don't run assembler
17+
checking code on ARM64, 2024-02-13).
18+
19+
Signed-off-by: Corinna Vinschen <[email protected]>
20+
Signed-off-by: Johannes Schindelin <[email protected]>
21+
---
22+
winsup/cygwin/path.cc | 28 +++++++++++++---------------
23+
1 file changed, 13 insertions(+), 15 deletions(-)
24+
25+
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
26+
index d06f3f0..c3623f9 100644
27+
--- a/winsup/cygwin/path.cc
28+
+++ b/winsup/cygwin/path.cc
29+
@@ -4851,29 +4851,27 @@ find_fast_cwd_pointer ()
30+
static fcwd_access_t **
31+
find_fast_cwd ()
32+
{
33+
+ USHORT emulated, hosted;
34+
+ fcwd_access_t **f_cwd_ptr;
35+
+
36+
+ /* First check if we're running in WOW64 on ARM64 emulating AMD64. Skip
37+
+ fetching FAST_CWD pointer as long as there's no solution for finding
38+
+ it on that system. */
39+
+ if (IsWow64Process2 (GetCurrentProcess (), &emulated, &hosted)
40+
+ && hosted == IMAGE_FILE_MACHINE_ARM64)
41+
+ return NULL;
42+
+
43+
/* Fetch the pointer but don't set the global fast_cwd_ptr yet. First
44+
we have to make sure we know the version of the FAST_CWD structure
45+
used on the system. */
46+
- fcwd_access_t **f_cwd_ptr = find_fast_cwd_pointer ();
47+
+ f_cwd_ptr = find_fast_cwd_pointer ();
48+
if (!f_cwd_ptr)
49+
- {
50+
- bool warn = 1;
51+
- USHORT emulated, hosted;
52+
-
53+
- /* Check if we're running in WOW64 on ARM64 emulating AMD64. Skip
54+
- warning as long as there's no solution for finding the FAST_CWD
55+
- pointer on that system. */
56+
- if (IsWow64Process2 (GetCurrentProcess (), &emulated, &hosted)
57+
- && hosted == IMAGE_FILE_MACHINE_ARM64)
58+
- warn = 0;
59+
-
60+
- if (warn)
61+
- small_printf ("Cygwin WARNING:\n"
62+
+ small_printf ("Cygwin WARNING:\n"
63+
" Couldn't compute FAST_CWD pointer. This typically occurs if you're using\n"
64+
" an older Cygwin version on a newer Windows. Please update to the latest\n"
65+
" available Cygwin version from https://cygwin.com/. If the problem persists,\n"
66+
" please see https://cygwin.com/problems.html\n\n");
67+
- }
68+
+
69+
/* Eventually, after we set the version as well, set fast_cwd_ptr. */
70+
return f_cwd_ptr;
71+
}

msys2-runtime/PKGBUILD

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pkgbase=msys2-runtime
55
pkgname=('msys2-runtime' 'msys2-runtime-devel')
66
pkgver=3.5.4
7-
pkgrel=2
7+
pkgrel=3
88
pkgdesc="Cygwin POSIX emulation engine"
99
arch=('x86_64')
1010
url="https://www.cygwin.com/"
@@ -78,9 +78,10 @@ source=('msys2-runtime'::git+https://github.com/cygwin/cygwin#tag=cygwin-${pkgve
7878
0049-Cygwin-console-Disable-cons_master_thread-in-win32-i.patch
7979
0050-Cygwin-pipe-Fix-a-regression-that-raw_write-slows-do.patch
8080
0051-Cygwin-pipe-Restore-blocking-mode-of-read-pipe-on-cl.patch
81-
0052-Fix-SSH-hangs.patch)
81+
0052-Fix-SSH-hangs.patch
82+
0053-Cygwin-find_fast_cwd-don-t-run-assembler-checking-co.patch)
8283
sha256sums=('3812485e2a6ab8360e5b9d566a47b982852ff2b140cea4e332ded19c11c77663'
83-
'46c8f9c0ed7259de78d5dc2edfd9479d873d21b64040fbca3b52045cb6e52c95'
84+
'490f290676fc38e51b5084ed7061c1abb70a462bf3067941b01a52e60662aecc'
8485
'9f9e1b6b05cbc9a715fe9443740b25171e9c1a276a058e6ba7e4f6eada6872c8'
8586
'e5b2095e543a5d702cfce6da26cd17a78f40e17620315b1bcc434b94a007ae9b'
8687
'f13b15dc14aa6ee1dd628a2487564bb484e74ff2f3e4059b9d9d64446a327db1'
@@ -132,7 +133,8 @@ sha256sums=('3812485e2a6ab8360e5b9d566a47b982852ff2b140cea4e332ded19c11c77663'
132133
'5fb74f788388fcf23b2eab5e74be176c981f5cfcd9f01caf6a9e78cd8fc58e00'
133134
'394229cfa5293e4572dfd7155605343ca7426395429fa47eb38aced11d4f924b'
134135
'590dc0ce9e72a1adf1424c7a4f55bd57d8955eef036776895b3d779d4932d4ce'
135-
'75e22e453011ea15c6cf6b6904c33256530d6f4ba273f03bc6a37d9245064c8c')
136+
'75e22e453011ea15c6cf6b6904c33256530d6f4ba273f03bc6a37d9245064c8c'
137+
'7fe562197a1f3b67b1e794808186c10ff0186b0fcf8d09a8021499b952d04d2c')
136138

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

244247
build() {

msys2-runtime/msys2-runtime.commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cbe555e054cefeccd65250bb11dc56f82196301f
1+
6183b8336e29b058b63dcf97ff8214b0355f165a

0 commit comments

Comments
 (0)