NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/57214: pthread_sigmask return value wrong when libpthread is not in use



The following reply was made to PR lib/57214; it has been noted by GNATS.

From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: lib/57214: pthread_sigmask return value wrong when libpthread is
 not in use
Date: Sat, 4 Feb 2023 16:27:17 +0300

 On Sat, Feb 04, 2023 at 02:45:01 +0000, bruno%clisp.org@localhost wrote:
 
 > $ gcc -Wall foo.c
 > $ ./a.out
 > 
 > Expected output:
 > sigprocmask -> -1, errno=22
 > pthread_sigmask -> 22
 
 Hmm, this *is* the output I get on a -10'ish system
 
 $ cc -o sigmask sigmask.c
 $ ldd sigmask
 sigmask:
         -lc.12 => /usr/lib/libsparc_v8.so.0
         -lc.12 => /usr/lib/libc.so.12
 $ ./sigmask
 sigprocmask -> -1, errno=22
 pthread_sigmask -> 22
 
 
 This seems to have been fixed by kamil in response to your previous
 reprot but never pulled up.
 
 lib/libc/thread-stub/thread-stub.c 
 
 revision 1.30
 date: 2020-01-14 21:18:59 +0300;  author: kamil;  state: Exp;  lines: +5 -3;  commitid: Ba40xip2Q883DGSB;
 Adjust the error return value of pthread_sigmask for !libpthread usage
 
 Instead of returning -1, return errno on error.
 
 Catch up after the fix in libpthread by Andrew Doran in 2008
 in lib/libpthread/pthread_misc.c r.1.9.
 
 It's an open question whether this function shall be used without linked
 in the POSIX thread library.
 
 Detected by Bruno Haible (GNU) and documented in gnulib in commit
 "pthread_sigmask: Avoid test failure on NetBSD 8.0. " r. 4d16a83b0c1fcb6c.
 
 -uwe
 


Home | Main Index | Thread Index | Old Index