zsh-workers
 help / color / mirror / code / Atom feed
* trap handling segfault
@ 2000-06-09 14:02 Clint Adams
  2000-06-09 14:38 ` PATCH: " Clint Adams
  2000-06-09 14:48 ` Bart Schaefer
  0 siblings, 2 replies; 4+ messages in thread
From: Clint Adams @ 2000-06-09 14:02 UTC (permalink / raw)
  To: zsh-workers


The following snippet will cause 3.1.9 to die with a SEGV (in gdb it dumps
at the blank line just before the declaration of periodic(), without gdb
it dumps when periodic is actually called).

I haven't looked at this in depth, but it's dying in endtrapscope()
when it tries to dereference st->list->funcdef (when st->list happens to
be NULL).  Reversing 11736 smoothes things out.


----8<----
function TRAPEXIT ()
{
  /bin/rm -f /tmp/jobs$HOST$$
}


function set-title ()
{
  if [[ "$1" = "-k" ]]
  then
    shift
    KEPT_TITLE="$* "
  else
    TITLE=$*
  fi
  [[ "$TERM" = "xterm" ]] && print -n -D -P "\033]2;${KEPT_TITLE}${TITLE}\007"
}

function accept-line {
  local cmd=${BUFFER%%" "*}
  local oldtitle=$TITLE

  [[ -n "$cmd" ]] && set-title $TITLE "->" $cmd
  TITLE=$oldtitle
  zle .accept-line
}
zle -N accept-line

function periodic () { }
----8<----


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-06-09 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-09 14:02 trap handling segfault Clint Adams
2000-06-09 14:38 ` PATCH: " Clint Adams
2000-06-09 14:48 ` Bart Schaefer
2000-06-09 14:54   ` Clint Adams

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).