From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Peter Stephenson <p.stephenson@samsung.com>
Cc: zsh-workers@zsh.org
Subject: Re: segfault in completion for configure
Date: Thu, 17 Mar 2016 20:09:48 +0000 [thread overview]
Message-ID: <20160317200948.GA32439@tarsus.local2> (raw)
In-Reply-To: <20160317182406.2cb566ed@pwslap01u.europe.root.pri>
Peter Stephenson wrote on Thu, Mar 17, 2016 at 18:24:06 +0000:
> Or is that if we know we've been int he signal handler at that point
> we already know the place where we needed to queue signals...
We could convert the pattern matching globals to macros that execute
code whenever the globals are accessed:
diff --git a/Src/pattern.c b/Src/pattern.c
index 72c7d97..a4fb24f 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -303,6 +303,12 @@ static long patalloc; /* size allocated for same */
static int patflags; /* flags passed down to patcompile */
static int patglobflags; /* globbing flags & approx */
+#define patflags (f(), patflags)
+void f(void)
+{
+ /* ... */
+}
+
/*
* Increment pointer to metafied multibyte string.
*/
Now, f() can assert() some invariant, or check if SIGWINCH had been
delivered (and if so, drop into a gdb breakpoint), etc...
I'm proposing this just as a means of debugging for this one problem,
not as a permanent change.
Cheers,
Daniel
next prev parent reply other threads:[~2016-03-17 20:09 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 [this message]
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
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=20160317200948.GA32439@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=p.stephenson@samsung.com \
--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).