zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: trap handling segfault
Date: Fri, 9 Jun 2000 10:38:35 -0400	[thread overview]
Message-ID: <20000609103835.A22587@scowler.net> (raw)
In-Reply-To: <20000609100241.B21890@scowler.net>; from schizo@debian.org on Fri, Jun 09, 2000 at 10:02:41AM -0400

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 */


  reply	other threads:[~2000-06-09 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-09 14:02 Clint Adams
2000-06-09 14:38 ` Clint Adams [this message]
2000-06-09 14:48 ` Bart Schaefer
2000-06-09 14:54   ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000609103835.A22587@scowler.net \
    --to=schizo@debian.org \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).