Tests for minimal signal handler functionality in MINSIGSTKSZ space

System Internals / glibc - Zack Weinberg [panix.com] - 16 January 2019 14:04 EST

There is general agreement that the very short list of things that ISO C says you can do in an async signal handler should all work when the handler is running on an alternate signal stack with only MINSIGSTKSZ space. This patch adds tests to make sure those things do work.

To facilitate this, there is a new set of test support routines for setting up alternate signal stacks; see support/xsignal.h for the API.

- support/xsignal.h (xalloc_sigstack, xfree_sigstack) (xget_sigstack_location): New test support functions.
- support/xsigstack.c: New file, implementing them.
- support/tst-xsigstack.c: New test for them.
- support/Makefile: Update.

- signal/tst-minsigstksz-1.c
- signal/tst-minsigstksz-2.c
- signal/tst-minsigstksz-3.c
- signal/tst-minsigstksz-3a.c
- signal/tst-minsigstksz-4.c: New tests.
- signal/Makefile: Run them.

fbbc9a4e34 Tests for minimal signal handler functionality in MINSIGSTKSZ space.
ChangeLog | 15 +++++
signal/Makefile | 2 +
signal/tst-minsigstksz-1.c | 131 ++++++++++++++++++++++++++++++++++++++++++++
signal/tst-minsigstksz-2.c | 66 ++++++++++++++++++++++
signal/tst-minsigstksz-3.c | 64 ++++++++++++++++++++++
signal/tst-minsigstksz-3a.c | 69 +++++++++++++++++++++++
signal/tst-minsigstksz-4.c | 65 ++++++++++++++++++++++
support/Makefile | 2 +
support/tst-xsigstack.c | 64 ++++++++++++++++++++++
support/xsignal.h | 17 ++++++
support/xsigstack.c | 107 ++++++++++++++++++++++++++++++++++++
11 files changed, 602 insertions(+)

Upstream: sourceware.org


  • Share