-
Notifications
You must be signed in to change notification settings - Fork 80
Fix dotdot native symlink #100
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After inherited permissons were removed, apparently there were no permissions left allowing access, and GHA recently started failing on actions/checkout with EPERM. Signed-off-by: Jeremy Drake <cygwin@jdrake.com>
(cherry picked from commit 2029784e05d9805aa074dcadb99c31311790b7ac)
When the thread is suspended and Rip (instruction pointer) points to an instruction that causes an exception, modifying Rip and calling ResumeThread() may sometimes result in a crash. To prevent this, advance execution by a single instruction by setting the trap flag (TF) before calling ResumeThread() as a workaround. This will trigger either STATUS_SINGLE_STEP or the exception caused by the instruction that Rip originally pointed to. By suspending the targeted thread within exception::handle(), Rip no longer points to the problematic instruction, allowing safe handling of the interrupt. As a result, Rip can be adjusted appropriately, and the thread can resume execution without unexpected crashes. Addresses: https://cygwin.com/pipermail/cygwin/2025-May/258153.html Fixes: 1fd5e00 ("import winsup-2000-02-17 snapshot") Reported-by: Christian Franke <Christian.Franke@t-online.de> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> (cherry picked from commit f305ca916ad25870fb010334e4fcaf93057c78b9)
This patch partially reverts the commit b7097ab because it seems to cause issues when longjmp is used within a signal handler. The problem that the commit addressed no longer occurs even if this change is reverted. Fixes: b7097ab ("Cygwin: signal: Revive toggling incyg flag in call_signal_handler()") Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> (cherry picked from commit 9c3e1e9ea9d2d930fef1ae6a62e61b101c1e047c)
Currently, _cygtls::sigmask is set in call_signal_handler(), but this is too late to effectively prevent a masked signal from being armed. With this patch, deltamask, which is set in _cygtls::interrupt_setup() in advance, is also checked as well as sigmask to determine if the signal can be armed. Fixes: 0d675c5 ("* exceptions.cc (interrupt_setup): Don't set signal mask here or races occur with main thread. Set it in sigdelayed instead.") Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp> (cherry picked from commit 364226a4caaa277d86fcc0c58ef862cb23a50603)
(cherry picked from commit 83af2fd6d1018bfe1c08c0028f65076f57684474) Signed-off-by: Radek Bartoň <radek.barton@microsoft.com>
In order to avoid a restriction on any reinterpret_cast-like behavior in constinit expressions, use assembly and the linker to define symbols with the not-valid-address addresses. Due to being built with -mcmodel=small, this linker trick does not always work in the Cygwin DLL, specifically in the cases where they are used in comparisons (==). As a result, leave the case where the symbols would have had to have been classes rather than structs as casts of integers. If Cygwin ever needs these to be constinit compliant, it may need to move to the medium code model or add some other workaround. Signed-off-by: Jeremy Drake <cygwin@jdrake.com> (cherry picked from commit 5be6ebd4d5c3492c539e662cc8849c284a456e7d)
When running CYGWIN=winsymlinks:nativestrict ln -s .. abc the counter-intuitive result is _not_ a symbolic link to `..`, but instead to `../../$(basename "$PWD")`. The reason for this is that the search for the longest common prefix assumes that the link target is not a strict prefix of the parent directory of the link itself. Let's fix that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Duplicate of #101 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.