* Another signal queueing discrepancy
@ 2016-10-04 19:02 Bart Schaefer
2016-10-04 20:07 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2016-10-04 19:02 UTC (permalink / raw)
To: zsh-workers
During completion; appears whenever compstate[nmatches] is referenced.
E.g. in _alternative:
+_alternative:74> [[ nm -ne 'compstate[nmatches]' ]]
74: ../../zsh-5.0/Src/exec.c:1169: BUG: q = 1 != queue_in = 3
+_alternative:74> return 0
And in _complete_debug:
+_complete_debug:23> unsetopt xtrace
29: ../../zsh-5.0/Src/exec.c:1169: BUG: q = 1 != queue_in = 3
Line 29 is:
if [[ $compstate[nmatches] -le 1 && $compstate[list] != *force* ]];
Also occurs at _path_files line 891, etc.
Which is very strange, because there is no signal queue manipulation in
any of the compstate handling, and it doesn't occur with other uses of
[[ ]] expressions in completion (or elsewhere).
--
Barton E. Schaefer
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Another signal queueing discrepancy
2016-10-04 19:02 Another signal queueing discrepancy Bart Schaefer
@ 2016-10-04 20:07 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-10-04 20:07 UTC (permalink / raw)
To: zsh-workers
On Oct 4, 12:02pm, Bart Schaefer wrote:
}
} Which is very strange, because there is no signal queue manipulation in
} any of the compstate handling, and it doesn't occur with other uses of
} [[ ]] expressions in completion (or elsewhere).
Here we go. Only shows up during completion because that's the only
time heaps_saved is true (SWITCHHEAPS), and --enable-zsh-mem-debug.
diff --git a/Src/mem.c b/Src/mem.c
index db311ef..a1744c6 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -918,16 +918,21 @@ memory_validate(Heapid heap_id)
if (heaps_saved) {
for (node = firstnode(heaps_saved); node; incnode(node)) {
for (h = (Heap)getdata(node); h; h = h->next) {
- if (h->heap_id == heap_id)
+ if (h->heap_id == heap_id) {
+ unqueue_signals();
return 0;
+ }
for (hs = heaps->sp; hs; hs = hs->next) {
- if (hs->heap_id == heap_id)
+ if (hs->heap_id == heap_id) {
+ unqueue_signals();
return 0;
+ }
}
}
}
}
+ unqueue_signals();
return 1;
}
/**/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-04 20:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-04 19:02 Another signal queueing discrepancy Bart Schaefer
2016-10-04 20:07 ` Bart Schaefer
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).