This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] debug/tst-longjmp_chk2: Make signal handler more conservative [BZ #20248]
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Mon, 13 Jun 2016 10:32:57 -0400
- Subject: Re: [PATCH] debug/tst-longjmp_chk2: Make signal handler more conservative [BZ #20248]
- Authentication-results: sourceware.org; auth=none
- References: <20160613111111 dot 79B3D4022A42D at oldenburg dot str dot redhat dot com>
On 06/13/2016 07:11 AM, Florian Weimer wrote:
> Currently, printf needs more stack space than what is available with
> SIGSTKSZ. This commit use the the write system call directly instead.
>
> Also use sig_atomic_t for the âpassâ variable (for general
> correctness), and restore signal handlers to their defaults, to avoid
> masking crashes.
>
> 2016-06-13 Florian Weimer <fweimer@redhat.com>
>
> [BZ #20248]
> * debug/tst-longjmp_chk2.c (pass): Use volatile sig_atomic_t.
> (write_message): New function.
> (stackoverflow_handler): Call it instead of printf, to avoid
> excessive stack usage by printf.
> (do_test): Restore SIGSEGV, SIGBUS default handlers.
Looks good to me.
--
Cheers,
Carlos.