Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: trap handling segfault
- X-seq: zsh-workers 11839
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: trap handling segfault
- Date: Fri, 9 Jun 2000 10:38:35 -0400
- In-reply-to: <20000609100241.B21890@xxxxxxxxxxx>; from schizo@xxxxxxxxxx on Fri, Jun 09, 2000 at 10:02:41AM -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <20000609100241.B21890@xxxxxxxxxxx>
This patch doesn't crash the snippet I posted, and it prints
BYE after the script in 11735. I'm going to commit this under the
assumption that someone with a better understanding will reverse it
if there are horrible side effects.
Index: signals.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/signals.c,v
retrieving revision 1.6
diff -u -r1.6 signals.c
--- signals.c 2000/06/03 16:26:47 1.6
+++ signals.c 2000/06/09 14:35:34
@@ -853,7 +853,7 @@
if (sigtrapped[sig])
unsettrap(sig);
sigtrapped[sig] = st->flags;
- if (st->flags) {
+ if (st->flags && (st->list != NULL)) {
Eprog prog = (st->flags & ZSIG_FUNC) ?
((Shfunc) st->list)->funcdef : (Eprog) st->list;
/* prevent settrap from saving this */
Messages sorted by:
Reverse Date,
Date,
Thread,
Author