From: Stafford Horne <shorne@gmail.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] nptl: Fix issue unwinding through sem_wait futex
Date: Thu, 12 Nov 2020 06:46:45 +0900 [thread overview]
Message-ID: <20201111214645.1506645-1-shorne@gmail.com> (raw)
Calls to sem_wait may use the __futex_abstimed_wait_cancelable64
function that is built in futex-internal. If we get a C++ exception,
i.e. thread cancel when we are waiting on a semaphore thread unwinding
fails. Example test: nptl/tst-cancel24
Adding -fexceptions flag when building futex-internal fixes this.
---
nptl/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/nptl/Makefile b/nptl/Makefile
index b30d263ca4..a1ffb6258a 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -220,6 +220,7 @@ CFLAGS-pthread_cond_wait.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-sem_wait.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-sem_timedwait.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-sem_clockwait.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-futex-internal.c += -fexceptions -fasynchronous-unwind-tables
# These are the function wrappers we have to duplicate here.
CFLAGS-fcntl.c += -fexceptions -fasynchronous-unwind-tables
--
2.26.2
next reply other threads:[~2020-11-11 21:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 21:46 Stafford Horne [this message]
2020-11-12 11:38 ` Adhemerval Zanella
2020-11-12 23:03 ` Stafford Horne
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=20201111214645.1506645-1-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=libc-alpha@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: link
Be 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).