zsh-workers
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: Re: segfault in completion for configure
Date: Tue, 5 Apr 2016 14:49:50 +0200	[thread overview]
Message-ID: <20160405124950.GA29202@cventin.lip.ens-lyon.fr> (raw)
In-Reply-To: <160319190757.ZM28874@torch.brasslantern.com>

On 2016-03-19 19:07:57 -0700, Bart Schaefer wrote:
> The patch below crams all those globals into a struct so they can be
> saved/restored as one, and then tries pushing the signal queue management
> down into patmatch() from pattryrefs().  A side-effect of this patch is
> that the following is no longer guaranteed to work:
> 
>     typeset -i trap_handled;
>     TRAPUSR2() {
>       setopt localoptions extendedglob
>       [[ $somestring = (#b)$~somepattern ]]
>       trap_handled=1
>     }
>     TRAPUSR1() {
>       [[ $TERM = screen ]] && print $something
>     }
>     while true; do
>       if ((trap_handled)); then
>        trap_handled=0
>        print $match[0]	# This may not be the backref from TRAPUSR2
>       fi
>     done
> 
> Specifically, if the signals arrive in order USR1 USR2 such that USR2
> is handled during the [[ ]] expression in TRAPUSR1, then the state from
> TRAPUSR2 will be discarded.  I don't know if/how we ought to document.
> 
> Of course if this DOESN'T solve Vincent's crash, then all of the above
> is moot because I've mis-diagnosed again.

Sorry for the late reply, I was very busy. It seems that it solves
the crash! What I did is:

1. Compile and install zsh 5.2.
2. Check that the crash is still reproducible, and it is.
3. Apply this patch.
4. Recompile and reinstall zsh.
5. Test whether the crash is reproducible, and I couldn't reproduce it.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


  parent reply	other threads:[~2016-04-05 13:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 13:47 Vincent Lefevre
2016-03-11 14:32 ` Peter Stephenson
2016-03-11 23:00   ` Bart Schaefer
2016-03-12  3:11     ` Vincent Lefevre
2016-03-12 16:20       ` Bart Schaefer
2016-03-12 17:34         ` Bart Schaefer
2016-03-13 21:58           ` Vincent Lefevre
2016-03-15  2:43             ` Bart Schaefer
2016-03-17 13:43               ` Vincent Lefevre
2016-03-17 15:15               ` Vincent Lefevre
2016-03-17 18:13                 ` Bart Schaefer
2016-03-17 19:55                   ` Vincent Lefevre
2016-03-17 19:59                   ` Vincent Lefevre
2016-03-17 15:24               ` Vincent Lefevre
2016-03-17 18:15                 ` Bart Schaefer
2016-03-17 18:24                   ` Peter Stephenson
2016-03-17 20:09                     ` Daniel Shahaf
2016-03-17 21:49                       ` Bart Schaefer
2016-03-20  2:07                   ` Bart Schaefer
2016-03-21 10:56                     ` Peter Stephenson
2016-03-21 15:26                       ` Bart Schaefer
2016-04-05 12:49                     ` Vincent Lefevre [this message]
2016-03-13  2:26         ` Vincent Lefevre
2016-03-12  2:56   ` Vincent Lefevre
2016-03-12 16:15     ` Bart Schaefer
2016-03-11 22:13 ` Daniel Shahaf
2016-03-12  2:58   ` Vincent Lefevre

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=20160405124950.GA29202@cventin.lip.ens-lyon.fr \
    --to=vincent@vinc17.net \
    --cc=zsh-workers@zsh.org \
    /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).