Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
A serious bug in execution – where to debug?
- X-seq: zsh-workers 44592
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: A serious bug in execution – where to debug?
- Date: Tue, 30 Jul 2019 19:00:55 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=dIQSG715cCmexjlTtXykakOrp5QMyh6uxzgsATQcgRU=; b=evqNfjTj9eWYCV1D6BMiL0ZgJRhbtknmVbpTiDep9S92yIWSUVjAU4mZj2X7pPf4d3 Zr84Knms48yBYfVMUeoEXIwBZB4zZAoNCU7ieFvVyHWQ+AH263ZGFHE2WmWL79K4fNjV +bh8bRF+A1S9YXbgHZ9fWNFHLfdBTWYJBd3LssJGnSwepC8H6ZjUBbnXetmumEGGrFA4 9zAKOy+v4FiOwqrFDZBkDNjPxz7RDflVKug9pPH01D+t1al7K4g5w2EcUr/NF1ORp/20 1TBWPvGPnUR3CdHdx9D3Fv2sUUA233HOGwWfCLNj3QRkWVYNwHDQI0ig1VkPTl4n1p6I Y8ig==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello,
I have a zle function that shadows the zle builtin. The bug is: the
function exits after a certain function get's called, if the arguments
are: -F {descriptor-#} _gitstatus_process_response_POWERLEVEL9K (I
didn't yet eliminate the second argument's so I'm pasting it as is).
The symptoms are:
- print before the call does output, after the call – doesn't (as
arranged as in here: http://psprint.blinkenshell.org/zle-exit-fun.png)
- the plugin's following zle -F {descriptor-#} call reports error:
--zplg-shadow-zle:zle:64: No handler installed for fd 21
meaning that the execution didn't really reach the point where an
actual builtin zle is being called by the shadowing function.
Now, what's interesting is the certain function that causes the exit
(https://github.com/zdharma/zplugin/blob/1ddc4a2c69adec7895b4acf53e3db837720663ac/zplugin.zsh#L1261-L1264).
If I remove the conditional from its third line, i.e. change the line
to:
ZPLG_REPORTS[_dtrace/_dtrace]+="$2"$'\n'
then the problem disappears. Not that this practically eliminates that
the bug report is something wrong with some other area of the code.
I find this impossible to narrow down, because e.g. doing the zle -F
call from some other, short plugin doesn't cause the problem. This
must be a lucky set of circumstances.
But I can debug it. Where to add debug printfs / breakpoints, what to
check in them?
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author