Subject: CVS commit: syssrc/sys/compat/irix
To: None <source-changes@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: source-changes
Date: 09/25/2002 22:39:16
Module Name: syssrc
Committed By: manu
Date: Wed Sep 25 19:39:16 UTC 2002
Modified Files:
syssrc/sys/compat/irix: irix_signal.c
Log Message:
Fill BADVADDR and CAUSE in sigcontext. We still don't restore them, but
it actually fixes a problem:
When /bin/sh gets a SIGSEGV, its signal handler calls brk and the offending
instruction is retried. Usually it gets another SIGSEGV, and things loops
until it pases without the SIGSEGV. This is the normal mode of operation, and
it can be reproduced on IRIX by a 10kB shell script starting by echo /*
However... the signal handler checks for BADVADDR in the saved registers
in struct sigcontext. If it does not find it, it gives up and exit instead
of retrying. Filling the field enables us to carry on normal operation
(which is to get dozens of SIGSEGV) instead of getting a failure at the
first SIGSEGV.
To generate a diff of this commit:
cvs rdiff -r1.21 -r1.22 syssrc/sys/compat/irix/irix_signal.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.