Skip to content
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

Backport fixes to 3.4 #68

Merged
merged 8 commits into from
Jul 9, 2024
Merged

Conversation

dscho
Copy link
Member

@dscho dscho commented Mar 3, 2024

This PR corresponds to msys2/msys2-runtime#205.

@dscho dscho self-assigned this Mar 3, 2024
@dscho
Copy link
Member Author

dscho commented Mar 3, 2024

Sadly, this does not fix the hang I see in the ARM64 runners :-(

After 7 or so years, I got the original `home-env` patch series landed
in Cygwin. This topic branch reverts my original patches and replaces
them with the ones that were backported from Cygwin.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the backport-fixes-to-3.4-gfw branch from 5b547bb to 4d64650 Compare July 9, 2024 14:23
lazka and others added 7 commits July 9, 2024 16:26
We've upgraded our cross compiler to gcc 13 now, so the workaround
can be removed

This is a backport from msys2/msys2-runtime.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
It is used to pass strings/paths to the preprocessor and breaks
for example the CPython build. For example -DPREFIX='"/ucrt64"'.

Fixes msys2/msys2-runtime/#190

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If non-cygwin process is executed in console, the exit code is not
set correctly. This is because the stub process for non-cygwin app
crashes in fhandler_console::set_disable_master_thread() due to NULL
pointer dereference. This bug was introduced by the commit:
3721a75 ("Cygwin: console: Make the console accessible from
other terminals."), that the pointer cons is accessed before fixing
when it is NULL. This patch fixes the issue.

Backported-from: aa73e11 (Cygwin: console: Fix exit code for non-cygwin process., 2024-02-02)
Fixes: 3721a75 ("Cygwin: console: Make the console accessible from other terminals.")
Reported-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If disable_master_thread flag is set between the code checking that
flag not be set and the code acquiring input_mutex, input record is
processed once after setting disable_master_thread flag. This patch
prevents that.

Backported-from: 9bcfd06 (Cygwin: console: Avoid slipping past disable_master_thread check., 2024-02-03)
Fixes: d4aacd5 ("Cygwin: console: Add missing input_mutex guard.")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Non-cygwin app may call ReadFile() for empty pipe, which makes
NtQueryObject() for ObjectNameInformation block in fhandler_pipe::
get_query_hdl_per_process. Therefore, do not to try to get query_hdl
for non-cygwin apps.

Addresses: msys2/msys2-runtime#202

Backported-from: f6be372 (Cygwin: pipe: Give up to use query_hdl for non-cygwin apps., 2024-03-03)
Fixes: b531d6b ("Cygwin: pipe: Introduce temporary query_hdl.")
Reported-by: Alisa Sireneva, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If pipe reader is a non-cygwin app first, and cygwin process reads
the same pipe after that, the pipe has been set to bclocking mode
for the cygwin app. However, the commit 9e4d308 assumes the
pipe for cygwin process always is non-blocking mode. With this patch,
the pipe mode is reset to non-blocking when cygwin app is started.

Backported-from: 55431b4 (Cygwin: pipe: Make sure to set read pipe non-blocking for cygwin apps., 2024-03-11)
Addresses: https://cygwin.com/pipermail/cygwin/2024-March/255644.html
Fixes: 9e4d308 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag for read pipe.")
Reported-by: wh <wh9692@protonmail.com>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This topic branch brings a couple of fixes that only made it into
Cygwin's v3.5 branch but not into the v3.4 branch. However, Git for
Windows is still based on v3.4 (at least until Windows 7 and Windows 8
support is dropped after Git for Windows v2.46). So let's backport the
fixes.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho force-pushed the backport-fixes-to-3.4-gfw branch from 4d64650 to 4eb0db9 Compare July 9, 2024 14:26
@dscho
Copy link
Member Author

dscho commented Jul 9, 2024

/open pr

The workflow run was started

@dscho dscho merged commit 4eb0db9 into git-for-windows:main Jul 9, 2024
2 checks passed
@dscho dscho deleted the backport-fixes-to-3.4-gfw branch July 9, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants