diff options
| author | Rich Felker <dalias@aerifal.cx> | 2013-04-22 10:22:00 -0400 | 
|---|---|---|
| committer | Rich Felker <dalias@aerifal.cx> | 2013-04-22 10:22:00 -0400 | 
| commit | 4dbca0ae3eafb9e21f2cdb2305395e7976feacb4 (patch) | |
| tree | 0944ffb897f9f58eb19236dc634c59ad88c9e6ec | |
| parent | 10bd92db00eb26f6f29b91717f4bf8d0054ba071 (diff) | |
| download | libc-testsuite-4dbca0ae3eafb9e21f2cdb2305395e7976feacb4.tar.gz | |
previously failure to save the signal mask was not being caught due to
the uninitialized buffer containing zero bits (by chance).
| -rw-r--r-- | setjmp.c | 4 | 
1 files changed, 4 insertions, 0 deletions
| @@ -40,6 +40,10 @@ int test_setjmp(void)  	sigprocmask(SIG_UNBLOCK, &set, &set);  	oldset = set; +	/* Improve the chances of catching failure of sigsetjmp to +	 * properly save the signal mask in the sigjmb_buf. */ +	memset(&sjb, -1, sizeof sjb); +  	if (!sigsetjmp(sjb, 1)) {  		sigemptyset(&set);  		sigaddset(&set, SIGUSR1); | 
