From: Dennis Schwartz <dennis.schwartz@protonmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: TRAPINT doesn't work reliably
Date: Wed, 25 Sep 2019 16:25:38 +0000 [thread overview]
Message-ID: <22AgAhXQWzavJGhNA8tFbGSMGk8z3KDGGa-pICX0lWszH622z2_nnc1acuvW3OcIbqAaXM_WAGJwmQU5Oph83DGbfQEplu1t3o7F5omeC4w=@protonmail.com> (raw)
In-Reply-To: <1394985674.3969083.1569420087673@mail2.virginmedia.com>
On Wednesday, September 25, 2019 4:01 PM, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> > On 25 September 2019 at 14:02 Dennis Schwartz dennis.schwartz@protonmail.com wrote:
> >
> > 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.
Okay, thanks.
> 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 run valgrind on zsh and captured the error. Unfortunately, I am
inexperienced with C programming so I do not know how to interpret the
output. I've copied the part of the output that I believed is relevant
below. Please let me know if I could help in debugging it further.
==1896== Invalid read of size 1
==1896== at 0x483BC62: strlen (vg_replace_strmem.c:460)
==1896== by 0x19755E: dupstring (in /usr/bin/zsh)
==1896== by 0x138F3B: ??? (in /usr/bin/zsh)
==1896== by 0x144663: ??? (in /usr/bin/zsh)
==1896== by 0x141A72: execlist (in /usr/bin/zsh)
==1896== by 0x141D83: execode (in /usr/bin/zsh)
==1896== by 0x142C8B: runshfunc (in /usr/bin/zsh)
==1896== by 0x1431C8: doshfunc (in /usr/bin/zsh)
==1896== by 0x1963C2: ??? (in /usr/bin/zsh)
==1896== by 0x19413B: dotrap (in /usr/bin/zsh)
==1896== by 0x194247: ??? (in /usr/bin/zsh)
==1896== by 0x194661: zhandler (in /usr/bin/zsh)
==1896== Address 0x5fc8488 is 264 bytes inside a block of size 328 free'd
==1896== at 0x48399AB: free (vg_replace_malloc.c:530)
==1896== by 0x136C8E: zcontext_restore_partial (in /usr/bin/zsh)
==1896== by 0x1656C3: parse_subscript (in /usr/bin/zsh)
==1896== by 0x17A446: getindex (in /usr/bin/zsh)
==1896== by 0x17ABCF: fetchvalue (in /usr/bin/zsh)
==1896== by 0x19BDB0: ??? (in /usr/bin/zsh)
==1896== by 0x1A0C87: prefork (in /usr/bin/zsh)
==1896== by 0x13ABE6: execsubst (in /usr/bin/zsh)
==1896== by 0x1674CB: execfor (in /usr/bin/zsh)
==1896== by 0x13E44C: ??? (in /usr/bin/zsh)
==1896== by 0x13FB6E: ??? (in /usr/bin/zsh)
==1896== by 0x13FF11: ??? (in /usr/bin/zsh)
==1896== Block was alloc'd at
==1896== at 0x483877F: malloc (vg_replace_malloc.c:299)
==1896== by 0x136A13: zcontext_save_partial (in /usr/bin/zsh)
==1896== by 0x165622: parse_subscript (in /usr/bin/zsh)
==1896== by 0x17A446: getindex (in /usr/bin/zsh)
==1896== by 0x17ABCF: fetchvalue (in /usr/bin/zsh)
==1896== by 0x19BDB0: ??? (in /usr/bin/zsh)
==1896== by 0x1A0C87: prefork (in /usr/bin/zsh)
==1896== by 0x13ABE6: execsubst (in /usr/bin/zsh)
==1896== by 0x1674CB: execfor (in /usr/bin/zsh)
==1896== by 0x13E44C: ??? (in /usr/bin/zsh)
==1896== by 0x13FB6E: ??? (in /usr/bin/zsh)
==1896== by 0x13FF11: ??? (in /usr/bin/zsh)
==1896==
==1896== Invalid read of size 1
[... repetition 4 more times ...]
==2144==
==2144== HEAP SUMMARY:
==2144== in use at exit: 1,583,276 bytes in 35,151 blocks
==2144== total heap usage: 78,390 allocs, 43,239 frees, 12,292,102 bytes allocated
==2144==
==2144== LEAK SUMMARY:
==2144== definitely lost: 0 bytes in 0 blocks
==2144== indirectly lost: 0 bytes in 0 blocks
==2144== possibly lost: 0 bytes in 0 blocks
==2144== still reachable: 1,583,276 bytes in 35,151 blocks
==2144== suppressed: 0 bytes in 0 blocks
==2144== Reachable blocks (those to which a pointer was found) are not shown.
==2144== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==2144==
==2144== For counts of detected and suppressed errors, rerun with: -v
==2144== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
> 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).
I haven't tried compiling from the latest source code yet. If this is
desired I could try this again at a later point in time.
- Dennis
next prev parent reply other threads:[~2019-09-25 16:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190917164905epcas1p4ad458ffcd504501780d522880c81de3e@epcas1p4.samsung.com>
2019-09-17 16:47 ` Dennis Schwartz
2019-09-24 8:44 ` Peter Stephenson
2019-09-25 13:02 ` Dennis Schwartz
2019-09-25 14:01 ` Peter Stephenson
2019-09-25 16:25 ` Dennis Schwartz [this message]
2019-09-25 17:04 ` Peter Stephenson
2019-09-25 18:46 ` Daniel Shahaf
2019-09-26 15:27 ` Peter Stephenson
2019-09-27 13:43 ` Daniel Shahaf
2019-09-25 17:56 ` Peter Stephenson
2019-09-26 14:48 ` Dennis Schwartz
2019-09-26 15:25 ` Peter Stephenson
2019-09-26 17:10 ` Dennis Schwartz
2019-09-27 13:46 ` Daniel Shahaf
2019-09-28 11:16 ` Dennis Schwartz
2019-09-28 14:29 ` Daniel Shahaf
2019-09-28 18:21 ` Dennis Schwartz
2019-09-28 18:58 ` Dennis Schwartz
2019-09-28 16:00 ` Bart Schaefer
2019-09-29 16:54 ` Peter Stephenson
2019-09-27 19:05 ` Peter Stephenson
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='22AgAhXQWzavJGhNA8tFbGSMGk8z3KDGGa-pICX0lWszH622z2_nnc1acuvW3OcIbqAaXM_WAGJwmQU5Oph83DGbfQEplu1t3o7F5omeC4w=@protonmail.com' \
--to=dennis.schwartz@protonmail.com \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-users@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).