PR/59784 CVS commit: [netbsd-9] src
"Martin Husemann" <[email protected]>
| Newsgroups | gmane.os.netbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR lib/59784; it has been noted by GNATS. From: "Martin Husemann" <[email protected]> To: [email protected] Cc: Subject: PR/59784 CVS commit: [netbsd-9] src Date: Sat, 27 Jun 2026 18:59:53 +0000 Module Name: src Committed By: martin Date: Sat Jun 27 18:59:53 UTC 2026 Modified Files: src/lib/libpthread [netbsd-9]: Makefile shlib_version src/tests/lib/libpthread/dlopen [netbsd-9]: t_dlopen.c t_dso_pthread_create.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #2017): lib/libpthread/Makefile: revision 1.103 tests/lib/libpthread/dlopen/t_dso_pthread_create.c: revision 1.2 tests/lib/libpthread/dlopen/t_dlopen.c: revision 1.2 tests/lib/libpthread/dlopen/t_dlopen.c: revision 1.3 lib/libpthread/shlib_version: revision 1.24 tests/lib/libpthread: Test unloading libpthread after lazy binding. If you dlopen libpthread and dlclose it again, the thread stubs like pthread_mutex_lock need to continue working -- a library might have calls to it in order to support thread-safety for threaded applications, but that library needs to continue working even in non-threaded applications after lazy binding of the libpthread symbol instead of the libc stub. PR lib/59784: dlopening and dlclosing libpthread is broken tests/lib/libpthread: Don't abuse xfail. Use a signal handler to check for SIGABRT, rather than atf_tc_expect_signal. xfail is for when there is a bug that we haven't fixed yet and the test manifests a symptom of that bug -- a list of xfails is a list of open bugs to be fixed. In this case, we are verifying that pthread_create _correctly_ raises SIGABRT (or fails with nonzero return code -- both are acceptable outcomes, really), and there is no bug here at the moment. Prompted by (but unrelated to): PR lib/59784: dlopening and dlclosing libpthread is broken libpthread: Link with -Wl,-z,nodelete. Can't safely unload libpthread because of the interaction with libc thread stubs. PR lib/59784: dlopening and dlclosing libpthread is broken libpthread: Touch comment in shlib_version for recent LDADD. This provokes relinking libpthread.so with the new arguments, without needing manual intervention to follow a note in UPDATING. PR lib/59784: dlopening and dlclosing libpthread is broken To generate a diff of this commit: cvs rdiff -u -r1.94.2.1 -r1.94.2.2 src/lib/libpthread/Makefile cvs rdiff -u -r1.19 -r1.19.2.1 src/lib/libpthread/shlib_version cvs rdiff -u -r1.1 -r1.1.36.1 src/tests/lib/libpthread/dlopen/t_dlopen.c \ src/tests/lib/libpthread/dlopen/t_dso_pthread_create.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.