Re: Cygwin 3.6: clang cannot use /usr/include/unistd.h, issue with |setproctitle_init()| ...

2025-03-05 Thread Christian Franke via Cygwin
Roland Mainz via Cygwin wrote: Small issue with Cygwin 3.6 (3.6.0-0.419.g3c1308ed890e.x86_64) system /usr/include/unistd.h and clang: snip $ clang --version clang version 8.0.1 (tags/RELEASE_801/final) Target: x86_64-unknown-windows-cygnus Thread model: posix InstalledDir: /usr/bin $ cl

Re: cygwin 3.6.0: No signals received after swapcontext() is used

2025-03-13 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: On Mar 12 17:06, Corinna Vinschen via Cygwin wrote: On Mar 12 16:30, Corinna Vinschen via Cygwin wrote: On Mar 11 12:32, Christian Franke via Cygwin wrote: The attached testcase should test the following use cases of setcontext: - call from regular user

cygwin-devel vs libbsd-devel: arc4random_stir() macro in stdlib.h breaks bsd/stdlib.h

2025-03-13 Thread Christian Franke via Cygwin
Problem introduced in a8891c93: $ cygcheck -f /usr/include/stdlib.h cygwin-devel-3.6.0-0.430.ga942476236b5 $ cygcheck -f /usr/include/bsd/stdlib.h libbsd-devel-0.12.2-2 $ gcc -c -xc - <<<'#include ' In file included from :1: /usr/include/bsd/stdlib.h:62:26: error: macro "arc4random_stir" passed

coreutils-9.6-1 (TEST): cp: infinite SEEK_SET/DATA/HOLE loop if file is compressed

2025-02-13 Thread Christian Franke via Cygwin
Testcase: $ uname -r 3.5.7-1.x86_64 $ cygcheck -f /bin/cp.exe coreutils-9.6-1 $ for i in 1 2 3; do cat /bin/cygwin1.dll > file$i; done $ compact /C file2 # NTFS compression ... (1.7 : 1) ... $ compact /C /EXE:LZX file3 # Compact OS LZX compression ... (2.8 : 1) ... $ stat -c '%b %s %n' file?

SEEK_DATA should fail at EOF (was: coreutils-9.6-1 (TEST): cp: infinite SEEK_SET/DATA/HOLE loop if file is compressed)

2025-02-14 Thread Christian Franke via Cygwin
Christian Franke via Cygwin wrote: Testcase: $ uname -r 3.5.7-1.x86_64 $ cygcheck -f /bin/cp.exe coreutils-9.6-1 $ for i in 1 2 3; do cat /bin/cygwin1.dll > file$i; done $ compact /C file2 # NTFS compression ... (1.7 : 1) ... $ compact /C /EXE:LZX file3 # Compact OS LZX compression ... (

Re: /bin/cp of sparse files broken in 3.6.0-0.362.g68c13dc92f65.x86_64?

2025-02-12 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: On Feb 12 17:32, Cedric Blancher via Cygwin wrote: Good afternoon! Is copying sparse files broken in 3.6.0-0.362.g68c13dc92f65.x86_64? cp --version cp (GNU coreutils) 9.5 Packaged by Cygwin (9.5-1 Checklist: - Volume has FILE_SUPPORTS_SPARSE_FILES - Cygwin m

Re: coreutils-9.0-1: chmod -R silently returns failure if dir contains a symlink (regression)

2025-02-12 Thread Christian Franke via Cygwin
Brian Inglis via Cygwin wrote: On 2025-02-09 08:01, Christian Franke via Cygwin wrote: Testcase: $ uname -r 3.5.7-1.x86_64 $ cygcheck -f /bin/chmod coreutils-9.0-1 $ mkdir dir $ touch dir/file $ chmod -R -v g-w dir; echo $? mode of 'dir' retained as 0755 (rwxr-xr-x) mode of

Re: cygwin 3.6.0 vs. libbsd 0.11.7-3: -lbsd breaks setproctitle()

2025-02-21 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: ... I just deployed 0.12.2-2 as test. Apart from setproctitle{_init}, it also drops exporting the following symbols already exported from Cygwin: arc4random* explicit_bzero fpurge getprogname reallocarray reallocf setprognam

cygwin 3.6.0: Signals may fail permanently if received after SIGSTOP

2025-02-24 Thread Christian Franke via Cygwin
Found with 'stress-ng --cpu-sched 1': Testcase (attached): $ uname -r 3.6.0-0.387.g8cebbb2b42bf.x86_64 $ gcc -o timersig timersig.c $ ./timersig 638: fork()=639 !...!SIGSTOP: Permission denied     0 [itimer] timersig 639 sig_send: error sending signal 14, pid 639, pipe

Re: cygwin 3.6.0 vs. libbsd 0.11.7-3: -lbsd breaks setproctitle()

2025-02-19 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: On Feb 19 16:37, Corinna Vinschen via Cygwin wrote: On Feb 19 14:40, Corinna Vinschen via Cygwin wrote: On Feb 19 14:25, Christian Franke via Cygwin wrote: Corinna Vinschen via Cygwin wrote: So I think we rather shouldn't supply the libbsd versi

Re: [CALL FOR TESTING] Cygwin-3.6.0

2025-02-25 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: [I sent this on 2024-02-14 to the cygwin-announce mailing list, but forgot to CC the cygwin mailing list. Doing it now...] Hi folks, we're planning the next major release in the next few (hopefully not more than two) weeks. ... Below you'll find a list of c

cygutils 1.4.17-2: lssparse -H does not print hole at offset 0 if more data exists

2025-04-02 Thread Christian Franke via Cygwin
Testcase for a minor issue: $ > sparse_file $ chattr +S sparse_file $ dd if=/dev/zero bs=1M count=1 conv=sparse,notrunc of=sparse_file ... $ lssparse sparse_file # OK $ lssparse -H sparse_file # OK Hole range[0]: offset=0x0,  length=0x10 $ printf X >> sparse_file $ lssparse sparse_fi

strace: infinite exception c0000005 loop on segmentation fault

2025-05-16 Thread Christian Franke via Cygwin
Found during check why SIGSEGV handler could interrupt SIGALRM handler (which does not happen on Linux): https://sourceware.org/pipermail/cygwin-patches/2025q2/013703.html Testcase: $ uname -r # Also occurs with 3.6.1-1.x86_64 3.7.0-0.95.g854150fda310.x86_64 $ cat sigsegv.c int main() {   *(vo

Re: smartmontools 7.5-1

2025-05-20 Thread Christian Franke via Cygwin
Eliot Moss via Cygwin wrote: On 5/19/2025 9:14 AM, Christian Franke wrote: The following package has been uploaded to the Cygwin distribution: * smartmontools-7.5-1 Thank you for this!  It works fine on an attached HDD, but with my built-in NVMe, I get this, in response to /usr/sbin/smartctl

Re: smartmontools 7.5-1

2025-05-20 Thread Christian Franke via Cygwin
Eliot Moss via Cygwin wrote: On 5/20/2025 4:50 AM, Christian Franke via Cygwin wrote: Eliot Moss via Cygwin wrote: On 5/19/2025 9:14 AM, Christian Franke wrote: The following package has been uploaded to the Cygwin distribution: * smartmontools-7.5-1 Thank you for this!  It works fine on

Re: smartmontools 7.5-1

2025-05-20 Thread Christian Franke via Cygwin
Eliot Moss via Cygwin wrote: On 5/20/2025 9:44 AM, Christian Franke via Cygwin wrote: Eliot Moss via Cygwin wrote: On 5/20/2025 4:50 AM, Christian Franke via Cygwin wrote: Eliot Moss via Cygwin wrote: On 5/19/2025 9:14 AM, Christian Franke wrote: The following package has been uploaded to

EBADF from write() if foreign pty is opened via /proc/PID/fd/N symlink

2025-05-21 Thread Christian Franke via Cygwin
Unexpected behavior of an uncommon use case: $ uname -r 3.7.0-0.98.gb39b510c1ce6.x86_64 $ cygstart mintty - # Start second terminal In second terminal: $ echo $$; tty 1219 /dev/pty1 Back to first terminal: $ dd of=/proc/1219/fd/1 <<<"Hello" # errno=EBADF dd: error writing '/proc/1219/fd/1':

Crash or hang if SIGSEGV+SIGALRM are nested

2025-05-19 Thread Christian Franke via Cygwin
The attached testcase was originally intended to investigate why a SIGSEGV from non-signal code could interrupt an already running signal handler. https://sourceware.org/pipermail/cygwin-patches/2025q2/013703.html If run without strace, the testcase may crash silently (with exit status 0): $ u

Re: Segfault if /proc/PID/maps is opened in parallel threads

2025-05-25 Thread Christian Franke via Cygwin
On Sat, 24 May 2025 15:19:10 +0200, Christian Franke wrote: If /proc/PID/maps is opened in parallel threads, the process PID may segfault. Testcase: $ uname -r 3.7.0-0.98.gb39b510c1ce6.x86_64 $ cat thrdopen.c #include #include #include #include static const char * name; static void *wor

Segfault if /proc/PID/maps is opened in parallel threads

2025-05-24 Thread Christian Franke via Cygwin
If /proc/PID/maps is opened in parallel threads, the process PID may segfault. Testcase: $ uname -r 3.7.0-0.98.gb39b510c1ce6.x86_64 $ cat thrdopen.c #include #include #include #include static const char * name; static void *worker(void *arg) {   for (int i = 0; i < 1; i++) {     putc

Re: Segfault if /proc/PID/maps is opened in parallel threads [CAUSE: RtlQueryProcessDebugInformation]

2025-05-27 Thread Christian Franke via Cygwin
On Sun, 25 May 2025 16:46:49 +0200, Christian Franke wrote: On Sat, 24 May 2025 15:19:10 +0200, Christian Franke wrote: If /proc/PID/maps is opened in parallel threads, the process PID may segfault. Testcase: ... Problem is not reproducible with any of the other /proc/PID/* files. A close

Re: Crash or hang if SIGSEGV+SIGALRM are nested

2025-05-29 Thread Christian Franke via Cygwin
Takashi Yano via Cygwin wrote: On Wed, 28 May 2025 21:57:07 +0900 Takashi Yano wrote: Hi Christian, On Mon, 19 May 2025 12:55:46 +0200 Christian Franke wrote: The attached testcase was originally intended to investigate why a SIGSEGV from non-signal code could interrupt an already running sign

Re: Crash or hang if SIGSEGV+SIGALRM are nested

2025-05-29 Thread Christian Franke via Cygwin
Takashi Yano via Cygwin wrote: On Thu, 29 May 2025 17:32:19 +0200 Christian Franke wrote: ... I still don't fully understand why a SIGSEGV triggered by an instruction could interrupt a SIGALRM handler. https://sourceware.org/pipermail/cygwin/2025-May/258145.html I guess such behavior is valid f

Re: readdir() returns inaccessible name if file was created with invalid UTF-8

2025-06-25 Thread Christian Franke via Cygwin
On Sun, 15 Sep 2024 19:47:11 +0200, Christian Franke wrote: If a file name contains an invalid (truncated) UTF-8 sequence, open() does not refuse to create the file. Later readdir() returns a different name which could not be used to access the file. Testcase with U+1F321 (Thermometer): $ una

Re: Crash or hang if SIGSEGV+SIGALRM are nested

2025-05-30 Thread Christian Franke via Cygwin
Takashi Yano via Cygwin wrote: On Thu, 29 May 2025 20:01:31 +0200 Christian Franke wrote: Takashi Yano via Cygwin wrote: On Thu, 29 May 2025 17:32:19 +0200 Christian Franke wrote: ... I still don't fully understand why a SIGSEGV triggered by an instruction could interrupt a SIGALRM handler. ht

Re: readdir() returns inaccessible name if file was created with invalid UTF-8

2025-06-29 Thread Christian Franke via Cygwin
Christian Franke wrote: Corinna Vinschen via Cygwin wrote: On Jun 27 15:32, Christian Franke via Cygwin wrote: $ touch $'t-\xef\x80\x80' The name mapping is: "t-\xEF\x80\x80" -(open, ...)-> L"t-\xDB59" -(readdir)-> "t-" Did you copy/paste thi

Re: readdir() returns inaccessible name if file was created with invalid UTF-8

2025-06-28 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: On Jun 27 15:32, Christian Franke via Cygwin wrote: $ touch $'t-\xef\x80\x80' The name mapping is: "t-\xEF\x80\x80" -(open, ...)-> L"t-\xDB59" -(readdir)-> "t-" Did you copy/paste this from the old mail, by any c

Re: automake1.18-1.18.1-1 (still missing?)

2025-07-07 Thread Christian Franke via Cygwin
On Sun, 06 Jul 2025 08:29:08 +0200, ASSI wrote: Automake is available with the latest upstream version 1.18.1 on Cygwin. This version is apparently still missing on the mirrors. A setup.ini with "setup-timestamp 1751890679" (2025-07-07 12:17 UTC)  does not mention automake1.18-1.18.1-1 but in

Re: readdir() returns inaccessible name if file was created with invalid UTF-8

2025-07-05 Thread Christian Franke via Cygwin
Jon Turney via Cygwin wrote: On 26/06/2025 18:07, Christian Franke via Cygwin wrote: Corinna Vinschen via Cygwin wrote: On Jun 25 16:59, Christian Franke via Cygwin wrote: On Sun, 15 Sep 2024 19:47:11 +0200, Christian Franke wrote: If a file name contains an invalid (truncated) UTF-8

Re: Segfault if /proc/PID/maps is opened in parallel threads [CAUSE: RtlQueryProcessDebugInformation]

2025-07-05 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: On Jul 2 18:28, Corinna Vinschen via Cygwin wrote: On Jul 2 16:18, Christian Franke via Cygwin wrote: On Tue, 27 May 2025 17:44:10 +0200 Christian Franke wrote: On Sun, 25 May 2025 16:46:49 +0200, Christian Franke wrote: On Sat, 24 May 2025 15:19:10 +0200

Re: Segfault if /proc/PID/maps is opened in parallel threads [CAUSE: RtlQueryProcessDebugInformation]

2025-07-02 Thread Christian Franke via Cygwin
On Tue, 27 May 2025 17:44:10 +0200 Christian Franke wrote: On Sun, 25 May 2025 16:46:49 +0200, Christian Franke wrote: On Sat, 24 May 2025 15:19:10 +0200, Christian Franke wrote: If /proc/PID/maps is opened in parallel threads, the process PID may segfault. Testcase: ... Problem is not repr

Re: readdir() returns inaccessible name if file was created with invalid UTF-8

2025-06-26 Thread Christian Franke via Cygwin
Corinna Vinschen via Cygwin wrote: On Jun 25 16:59, Christian Franke via Cygwin wrote: On Sun, 15 Sep 2024 19:47:11 +0200, Christian Franke wrote: If a file name contains an invalid (truncated) UTF-8 sequence, open() does not refuse to create the file. Later readdir() returns a different name

Re: readdir() returns inaccessible name if file was created with invalid UTF-8

2025-06-27 Thread Christian Franke via Cygwin
Hi Corinna, Corinna Vinschen via Cygwin wrote: Hi Christian, On Jun 26 19:07, Christian Franke via Cygwin wrote: Corinna Vinschen via Cygwin wrote: On Jun 25 16:59, Christian Franke via Cygwin wrote: On Sun, 15 Sep 2024 19:47:11 +0200, Christian Franke wrote: If a file name contains an

<    1   2