[PATCH v2 0/4] Fix ESRCH issues in pthread_cancel, pthread_kill

Florian Weimer fweimer@redhat.com
Fri Aug 20 16:11:56 GMT 2021


The new version fixes the support/Makefile update and puts the generic
“give me a non-reusable TID” functionality into a generic helper
function.

Tested on i686-linux-gnu and x86_64-linux-gnu.  Built with
build-many-glibcs.py.

Thanks,
Florian

Florian Weimer (4):
  support: Add support_wait_for_thread_exit
  nptl: pthread_kill, pthread_cancel should fail after exit (bug 19193)
  nptl: Add internal __pthread_call_with_tid function
  nptl: Fix race between pthread_kill and thread exit (bug 12889)

 nptl/Makefile                                 |   5 +-
 nptl/allocatestack.c                          |   1 +
 nptl/descr.h                                  |  11 ++
 nptl/pthread_call_with_tid.c                  |  66 +++++++
 nptl/pthread_cancel.c                         |   9 +-
 nptl/pthread_create.c                         |  18 ++
 nptl/pthread_kill.c                           |  44 +++--
 nptl/tst-pthread_call_with_tid.c              | 165 ++++++++++++++++++
 support/Makefile                              |   3 +-
 support/support.h                             |   4 +
 support/support_wait_for_thread_exit.c        |  72 ++++++++
 sysdeps/nptl/pthreadP.h                       |  20 +++
 sysdeps/pthread/Makefile                      |   7 +-
 sysdeps/pthread/tst-kill4.c                   |  90 ----------
 sysdeps/pthread/tst-pthread_cancel-exited.c   |  45 +++++
 .../pthread/tst-pthread_cancel-select-loop.c  |  87 +++++++++
 sysdeps/pthread/tst-pthread_kill-exited.c     |  46 +++++
 sysdeps/pthread/tst-pthread_kill-exiting.c    | 110 ++++++++++++
 18 files changed, 682 insertions(+), 121 deletions(-)
 create mode 100644 nptl/pthread_call_with_tid.c
 create mode 100644 nptl/tst-pthread_call_with_tid.c
 create mode 100644 support/support_wait_for_thread_exit.c
 delete mode 100644 sysdeps/pthread/tst-kill4.c
 create mode 100644 sysdeps/pthread/tst-pthread_cancel-exited.c
 create mode 100644 sysdeps/pthread/tst-pthread_cancel-select-loop.c
 create mode 100644 sysdeps/pthread/tst-pthread_kill-exited.c
 create mode 100644 sysdeps/pthread/tst-pthread_kill-exiting.c

-- 
2.31.1



More information about the Libc-alpha mailing list