Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPINT doesn't work reliably
- X-seq: zsh-users 24285
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx>
- Subject: Re: TRAPINT doesn't work reliably
- Date: Wed, 25 Sep 2019 15:01:27 +0100 (BST)
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com; s=meg.feb2017; t=1569420087; bh=GFD/r0aymJzb6droLotA0ENdj8daWbs7f5DrgW/tDq8=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=vyzBqmzzN8QronQUzlA+u/W+P+bDKmOlr/qWi/GdpotDNHtcOkyVbMFVw/6tE0YjM LPWuUGDKBimtLx7Yjjw22AGa7moNxE3Ecx2uvEFCIzWw6s2GBVjoNaDRlAEj3XoQXT z8IdlhL8NDcHGt7dPmEsOPy3CTL4cUERc0VnUurmi6N3l14gg6RwgQkzEzhy1ajCJq qezQw7A08b+jvIZRJMFw9Fshwy07chkKeme7AcnAl4++JUcGCwREpTvnta5a6jzHlA JBgyIQn6KGsDyANb3EK9uf9bwvnyruH2m85x4FLdIqekAzv+/s6nEbc03hqLUzLXeF 6NY2FzP4I+lVg==
- Importance: Medium
- In-reply-to: <Bczpjmkq93UC9ogVXedAec4MSWn1xm79AtK56m7J7_XKU3g1oWkhoUeoj9_CjqM_bdhDM3WFcb0IWT04yMJctdhKDGj_fiAyOLAfaMatz5k=@protonmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CGME20190917164905epcas1p4ad458ffcd504501780d522880c81de3e@epcas1p4.samsung.com> <XwKNAg1qGlWEVe6teZMU0FhD554sBKMAVDblWDoIFxZeOktj1B6qY4Jl7BESBBQFtRKy8SeAa7UzBcB5vShOqFQTgNcZoWShxyjeLaLrCKI=@protonmail.com> <1569314663.5531.4.camel@samsung.com> <Bczpjmkq93UC9ogVXedAec4MSWn1xm79AtK56m7J7_XKU3g1oWkhoUeoj9_CjqM_bdhDM3WFcb0IWT04yMJctdhKDGj_fiAyOLAfaMatz5k=@protonmail.com>
> On 25 September 2019 at 14:02 Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx> wrote:
> On Tuesday, September 24, 2019 10:44 AM, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
>> On Tue, 2019-09-17 at 16:47 +0000, Dennis Schwartz wrote:
>>> I have a function on TRAPINT in my .zshrc like described as in the Zsh manual [1].
>>>
>>> TRAPINT() {
>>> echo "trap: $1"
>>> return $(( 128 + $1 ))
>>> }
>>>
>>>
>>> This works unreliably. Usually this works a first few times, but
>>> after a while this doesn’t work anymore and throws the following
>>> error.
>>>
>>> TRAPINT:1: command not found: \M-^A^A
>>> TRAPINT:2: command not found: F^\V
>
> It almost looks like the function gets replaced with random memory.
> `functions TRAPINT` just shows random bytes, for example:
>
> $ xxd <(functions TRAPINT)
> 00000000: 5452 4150 494e 5420 2829 207b 0a09 0701 TRAPINT () {....
> 00000010: 200a 0950 200a 7d0a ..P .}.
>
> I am now more convinced it's a bug in Zsh. Any advice on how to debug this?
> And where can I best submit a bug report to?
You don't need to submit a further separate bug report.
Memory errors are tricky, and often hard to reproduce since allocation
is heavily OS specific, but probably your best bet is to run with
valgrind --leak-check=full zsh
which should produce sensible results --- the shell shouldn't leak
memory and anything that looks anomalous is probably a real bug ("still
reachable" memory is OK).
I'd also suggest trying the latest firmware from git or sourceforge,
since there have been some memory fixes (and a release is probably
overdue).
cheers
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author