Age | Commit message (Collapse) | Author | Files | Lines |
|
This simple testcase:
locale_t st = newlocale(LC_ALL_MASK, "C", (locale_t)0);
locale_t st2 = newlocale(LC_CTYPE_MASK, "en_US.UTF-8", st);
is sufficient to reproduce a crash in _newlocale_r. After the first call
to newlocale, `st' points to __C_locale, which is const. When using `st'
as locale base in the second call, _newlocale_r tries to set pointers
inside base to NULL. This is bad if base is __C_locale, obviously.
Add a test to avoid trying to overwrite pointer values inside base if
base is __C_locale.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
Currently it is possible for symlink_info::check to return -1 in case
we're searching for foo and find foo.lnk that is not a Cygwin symlink.
This contradicts the new meaning attached to a negative return value
in commit 19d59ce75d. Fix this by setting "res" to 0 at the beginning
of the main loop and not seting it to -1 later.
Also fix the commentary preceding the function definition to reflect
the current behavior.
Addresses: https://cygwin.com/pipermail/cygwin/2022-August/252030.html
|
|
- Previsouly, there was potential risk of buffer over run in
is_console_app(). This patch fixes the issue.
|
|
- Previously, some symbolic links to /cygdrive/* (e.g. /cygdrive/C,
/cygdrive/./c, /cygdrive//c, etc.) did not work. This patch fixes
the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-July/251994.html
|
|
- Previously, LoadLibraryA() is hooked for ConEmu cygwin connector.
With this patch, GetProcAddress() for "RequestTermConnector" is
hooked instead which is more essential for ConEmu cygwin connector.
|
|
- If *.bat or *.cmd is executed directly from cygwin shell, pty
failed to switch I/O pipe to that for native apps. This patch
fixes the issue.
|
|
- Recent commit "Cygwin: console: Add missing input_mutex guard."
has a problem that causes NULL pointer access if cygheap->ctty
is NULL. This patch fixes the issue.
|
|
- ConEmu cygwin connector conflicts with cons_master_thread since
it does not use read() to read console input. With this patch,
cons_master_thread is disabled in ConEmu cygwin connector.
|
|
- Setting con.disable_master_thread flag should be guarded by
input_mutex, however, it was not. This patch fixes that.
|
|
- OpenClipboard() just after CloseClipboard() sometimes fails. Due
to this, /dev/clipboard sometimes fails to set CF_UNICODETEXT
data. This patch add a workaround for this issue.
|
|
|
|
- The recent commit "Cygwin: console: Allow pasting very long text
input." did not fix the issue enough. This patch adds fixes for
that.
|
|
- The previous commit for console introduced new bugs in error
handling in cons_master_thread(). This patch fixes that.
|
|
- Currently, if the text longer than 1024 byte is pasted in console,
some of the text is discarded. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251764.html
|
|
- poll() has a bug that it returns event which is not inquired if
events are inquired in multiple pollfd entries on the same fd at
the same time. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251732.html
|
|
- Previously, the console code could not handle escape sequence
setting window title longer than 256 byte correctly. This patch
fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-June/251662.html
|
|
- Currently, ENABLE_VIRTUAL_TERMINAL_PROCESSING flag is disabled
unconditionally when exiting from cygwin. This causes ANSI escape
sequence disabled in Windows Terminal where it is enables by
default. This patch retains that flag if it is originally enabled.
|
|
|
|
- After the commit 6d898f43, cygwin fails to start if cygwin1.dll
is placed in the root directory. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-May/251548.html
|
|
The current definition of mknod in syscalls.cc has a third argument of
type __dev16_t instead of dev_t. Fix this on 64-bit Cygwin by making
the existing mknod 32-bit only and then exporting mknod as an alias
for mknod32. (No fix is needed on 32-bit because mknod is redirected
to mknod32 via NEW_FUNCTIONS in Makefile.am.)
Addresses: https://cygwin.com/pipermail/cygwin-developers/2022-May/012589.html
|
|
killpg(pgid, 0) (or kill_pgrp(pgid, si_signo=0), in signal.cc)
fails (returns -1) even when there is a process in the process
group pgid, if the process is in the middle of spawnve(), see
https://cygwin.com/pipermail/cygwin/2022-May/251479.html
When exec'ing a process the assumption is that the exec'ed process creates its
own symlink (in pinfo::thisproc() in pinfo.cc). If the exec'ing process
calls NtClose on it's own winpid symlink, but the exec'ed process didn't
progress enough into initialization, there's a slim chance that neither
the exec'ing process, nor the exec'ed process has a winpid symlink
attached.
Always create the winpid symlink in spawn.cc, even for exec'ed Cygwin
processes. Make sure to dup the handle into the new process, and stop
creating the winpid symlink in exec'ed processes.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
|
|
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
- Previously, the command "cmd /c script -c cmd" in console of Win7
crashes. This seems to be due to a bug (?) of AttachConsole().
This patch adds workaround for this issue.
Currently, pty reattaches to the console of the process which is
predetermined by ConsoleProcessList() after temporarily attaching
to another console. After that, the console output handle opened
with the name "CONOUT$" may not be accessible in Win7 or Vista.
This seems to happen when the attached process does not have the
same handle even if the console attached is the same. With this
patch, cygwin-console-helper which is started when pty master is
opened in console, is utilized to be a target process to which
pty reattaches if the OS is Win7 or Vista.
|
|
- Previously, script command sometimes crashes by Ctrl-C in Win 7
if it is running in console, and non-cygwin app is foreground.
This patch fixes the issue.
|
|
- The recent commit "Cygwin: pty: Fix timing of creating invisible
console." breaks the feature added by commit 72770148, which
prevents pty from changing code page of parent console. This patch
restores that.
|
|
|
|
- Previously, "env SHELL=cmd script" command in console caused
deadlock when starting cmd.exe. This patch fixes the issue.
|
|
- Previously, non-cygwin app started by "script -c <non-cygwin app>"
receives Ctrl-C twice. This patch fixes the issue.
|
|
- Previously, invisible console was created in fixup_after_exec().
However, actually this should be done in fixup_after_fork(). this
patch fixes the issue.
|
|
- When temporarily attaching a console, the timing of acquiring
attach_mutex was not appropriate. This sometimes caused master
forwarding thread to crash on Ctrl-C in Windows 7. This patch
fixes the issue.
|
|
- The commit "Cygwin: always add sigmask to child info" also tries
to fix this issue, however, did not fix enough. This patch fixes
that.
|
|
Even after fork, we might need the parent sigmask without having
access to the real _main_tls. There's a short time at process startup,
when _main_tls points to the system-allocated stack, but wait_sig is
already running. If we can't lock _main_tls, because find_tls can't
find it yet, we now access the parent's sigmask via child_info.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
|
|
(cherry picked from commit 01c734b0d7c1ce0f848f7efc091856c58a6ef55e)
|
|
> ../../../../src/winsup/cygwin/sec_auth.cc:1240:16: error: redefinition of ‘struct _MSV1_0_S4U_LOGON’
> 1240 | typedef struct _MSV1_0_S4U_LOGON
> | ^~~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
> from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1425:18: note: previous definition of ‘struct _MSV1_0_S4U_LOGON’
> 1425 | typedef struct _MSV1_0_S4U_LOGON {
> | ^~~~~~~~~~~~~~~~~
> ../../../../src/winsup/cygwin/sec_auth.cc:1246:3: error: conflicting declaration ‘typedef int MSV1_0_S4U_LOGON’
> 1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
> | ^~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
> from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1430:5: note: previous declaration as ‘typedef struct _MSV1_0_S4U_LOGON MSV1_0_S4U_LOGON’
> 1430 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
> | ^~~~~~~~~~~~~~~~
> ../../../../src/winsup/cygwin/sec_auth.cc:1246:22: error: conflicting declaration ‘typedef int* PMSV1_0_S4U_LOGON’
> 1246 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
> | ^~~~~~~~~~~~~~~~~
> In file included from ../../../../src/winsup/cygwin/ntsecapi.h:10,
> from ../../../../src/winsup/cygwin/sec_auth.cc:13:
> /usr/include/w32api/ntsecapi.h:1430:24: note: previous declaration as ‘typedef struct _MSV1_0_S4U_LOGON* PMSV1_0_S4U_LOGON’
> 1430 | } MSV1_0_S4U_LOGON, *PMSV1_0_S4U_LOGON;
(cherry picked from commit 0b44b06b0544511bc22352dcff95a216f766f582)
|
|
A recent patch fixed gmondump to stop printing "0x0x" as an address
prefix. It turns out the Cygwin User's Guide and the gmondump and
ssp man pages (all from utils.xml) have examples of the same error.
|
|
- In the latest GDB (11.2-1), Ctrl-C behaviour is broken a bit for
non-cygwin inferior. For example, Ctrl-C on GDB prompt is not sent
to GDB but to the inferior. This patch fixes the issue.
|
|
- If Ctrl-C is pressed just after setup_pseudoconsole() is called,
mintty stops to respond a while when CPU load is high. This patch
fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-April/251272.html
|
|
- The internal handles in HPCON should not be inheritable, however,
the current code duplicates them as inheritable when handing over
ownership of the pseudo console. This patch fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-April/251222.html
|
|
- Currently, close_pseudoconsole() is called unconditionally from
fhandler_termios::process_sigs() on Ctrl-C. This causes deadlock
if Ctrl-C is pressed while setup_pseudoconsole() is called. With
this patch, close_pseudoconsole() is called only if the master
process is the owner of the nat-pipe to avoid the deadlock.
|
|
- As mentioned in commit message of the commit b531d6b0, if multiple
writers including non-cygwin app exist, the non-cygwin app cannot
detect pipe closure on the read side when the pipe is created by
system account or the the pipe creator is running as service.
This is because query_hdl which is held in write side also is a
read end of the pipe, so the pipe is still alive for the non-cygwin
app even after the reader is closed.
To avoid this problem, this patch lets all processes in the same
process group close query_hdl using newly introduced internal signal
__SIGNONCYGCHLD when non-cygwin app is started.
Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251097.html
|
|
- The 4th parameter of WriteFile() cannot be NULL especially in
Windows 7 as mentioned in Microsoft documentation. This patch
fixes that.
Addresses: https://cygwin.com/pipermail/cygwin/2022-March/251162.html
|
|
- Using memcmp() to compare structure such as INPUT_RECORD is not
correct manner because padding may not be initialized. This patch
stops to use memcmp() for comparison of INPUT_RECORD.
|
|
- dwControlKeyState also may be null'ed on WriteConsoleInputW().
Therefore ignore it in event comparison as well as wVirtualKeyCode
and wVirtualScanCode.
|
|
|
|
- The commit "Cygwin: console: Improve the code to avoid typeahead
key swapping." did not solve the problem enough. Two unexpected
things happen.
(1) wVirtualKeyCode and wVirtualScanCode of readback key event may
be null'ed even if they are not zero on WriteConsoleInputW().
Therefore, memcmp() may report the event sequence is not equal.
(2) WriteConsoleInputW() may not be atomic. The event sequence
which is written by WriteConsoleInputW() may be inserted by
key input in the middle of the sequence. Current code gives
up to fix in this situation.
This patch should fix that issue.
|
|
|
|
The rewrite of %X to %p was malhandled. Fix that/them.
|
|
|
|
- If UNC path for DFS is mounted to a drive with drive letter, the
error "Too many levels of symbolic links" occurs when accessing
to that drive. This is because GetDosDeviceW() returns unexpected
string such as "\Device\Mup\DfsClient\;Z:000000000003fb89\dfsserver
\dfs\linkname" for the mounted UNC path "\??\UNC\fileserver\share".
This patch adds a workaround for this issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-March/250979.html
|