* [PATCH] [libc-test] test sigsetjmp with savesigs=0
@ 2017-11-10 20:59 Bobby Bingham
2018-02-07 21:00 ` Szabolcs Nagy
0 siblings, 1 reply; 2+ messages in thread
From: Bobby Bingham @ 2017-11-10 20:59 UTC (permalink / raw)
To: musl
---
src/functional/setjmp.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/functional/setjmp.c b/src/functional/setjmp.c
index 0a9e4e6..adba1a6 100644
--- a/src/functional/setjmp.c
+++ b/src/functional/setjmp.c
@@ -46,5 +46,20 @@ int main(void)
sigprocmask(SIG_SETMASK, &set, &set);
TEST(sigismember(&set, SIGUSR1)==0, "siglongjmp failed to restore mask\n");
+ sigemptyset(&set);
+ sigaddset(&set, SIGUSR1);
+ sigprocmask(SIG_UNBLOCK, &set, &set);
+ oldset = set;
+
+ if (!sigsetjmp(sjb, 0)) {
+ sigemptyset(&set);
+ sigaddset(&set, SIGUSR1);
+ sigprocmask(SIG_BLOCK, &set, 0);
+ siglongjmp(sjb, 1);
+ }
+ set = oldset;
+ sigprocmask(SIG_SETMASK, &set, &set);
+ TEST(sigismember(&set, SIGUSR1)==1, "siglongjmp incorrectly restored mask\n");
+
return t_status;
}
--
2.15.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [libc-test] test sigsetjmp with savesigs=0
2017-11-10 20:59 [PATCH] [libc-test] test sigsetjmp with savesigs=0 Bobby Bingham
@ 2018-02-07 21:00 ` Szabolcs Nagy
0 siblings, 0 replies; 2+ messages in thread
From: Szabolcs Nagy @ 2018-02-07 21:00 UTC (permalink / raw)
To: musl
* Bobby Bingham <koorogi@koorogi.info> [2017-11-10 14:59:01 -0600]:
> ---
> src/functional/setjmp.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-07 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-10 20:59 [PATCH] [libc-test] test sigsetjmp with savesigs=0 Bobby Bingham
2018-02-07 21:00 ` Szabolcs Nagy
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).