This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] debug/tst-longjmp_chk2: Make signal handler more conservative [BZ #20248]


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]