Size of sigset_t is 128 bytes (array of _SIGSET_NWORDS unsigned long ints). Functions sigemptyset(), sigfillset() and sigismember() access all the 128 bytes of sigset_t, but using sigprocmask to store the current value of the signal mask in a sigset_t variable, results in writing only the first 64 bits [= sizeof(unsigned long int)]. Consequently, the result of function sigisemptyset() depends on the contents of the remaining (_SIGSET_NWORDS - 1) unsigned long ints. In addition, pthread_sigmask() is also affected, as it is implemented in the same way as sigprocmask(). In the following URL you can find more details about how to reproduce, actual results, system details (including glibc version) etc.: https://unix.stackexchange.com/questions/572172/is-sigprocmask-not-working-correctly
Fixed on 2.32 (566e10aa7292bacd74d229ca6f2cd9e8c8ba8748).