SIGSEGV and other signals could lead to a 100% CPU loop

This commit is contained in:
Gerhard Rieger 2016-05-11 20:34:33 +02:00
parent d34493c18d
commit 6b596b8852
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,7 @@
corrections:
SIGSEGV and other signals could lead to a 100% CPU loop
testing: testing:
socks4echo.sh and socks4a-echo.sh hung with new bash with read -n socks4echo.sh and socks4a-echo.sh hung with new bash with read -n

View file

@ -1422,12 +1422,13 @@ void socat_signal(int signum) {
diag_in_handler = 1; diag_in_handler = 1;
Notice1("socat_signal(): handling signal %d", signum); Notice1("socat_signal(): handling signal %d", signum);
switch (signum) { switch (signum) {
case SIGQUIT:
case SIGILL: case SIGILL:
case SIGABRT: case SIGABRT:
case SIGBUS: case SIGBUS:
case SIGFPE: case SIGFPE:
case SIGSEGV: case SIGSEGV:
diag_immediate_exit = 1;
case SIGQUIT:
case SIGPIPE: case SIGPIPE:
diag_set_int('x', 128+signum); /* in case Error exits for us */ diag_set_int('x', 128+signum); /* in case Error exits for us */
Error1("exiting on signal %d", signum); Error1("exiting on signal %d", signum);