public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug nptl/27304] New: pthread_cond_destroy does not pass private flag to futex system calls Date: Mon, 01 Feb 2021 08:22:41 +0000 [thread overview] Message-ID: <bug-27304-131@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=27304 Bug ID: 27304 Summary: pthread_cond_destroy does not pass private flag to futex system calls Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: nptl Assignee: unassigned at sourceware dot org Reporter: fweimer at redhat dot com CC: drepper.fsp at gmail dot com Target Milestone: --- Commit dc6cfdc934db9997c33728082d63552b9eee4563 ("nptl: Move pthread_cond_destroy implementation into libc") dropped use of the process-shared flag because of this optimization in sysdeps/nptl/lowlevellock-futex.h: # if IS_IN (libc) || IS_IN (rtld) /* In libc.so or ld.so all futexes are private. */ # define __lll_private_flag(fl, private) \ ({ \ /* Prevent warnings in callers of this macro. */ \ int __lll_private_flag_priv __attribute__ ((unused)); \ __lll_private_flag_priv = (private); \ ((fl) | FUTEX_PRIVATE_FLAG); \ }) # else # define __lll_private_flag(fl, private) \ (((fl) | FUTEX_PRIVATE_FLAG) ^ (private)) # endif I think the fix is to remove the optimization because it is unused. The internal locks are always private, so the optimization does not matter to them. On x86-64, pthread_cond_destroy is the only place where the alternative macro definition results in changed machine code, but we do not actually want this change there (because it probably breaks process-shared condition variables). -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2021-02-01 8:22 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-01 8:22 fweimer at redhat dot com [this message] 2021-02-01 8:22 ` [Bug nptl/27304] " fweimer at redhat dot com 2021-02-01 8:47 ` fweimer at redhat dot com 2021-02-01 8:48 ` fweimer at redhat dot com 2021-02-04 14:33 ` cvs-commit at gcc dot gnu.org 2021-02-04 14:35 ` fweimer at redhat dot com 2021-02-07 15:24 ` fweimer at redhat dot com 2021-03-16 9:22 ` fweimer at redhat dot com 2021-03-16 9:55 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-27304-131@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).