Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPINT doesn't work reliably
- X-seq: zsh-users 24286
- From: Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: TRAPINT doesn't work reliably
- Date: Wed, 25 Sep 2019 16:25:38 +0000
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1569428746; bh=HxedB9u1DjLus17pKh4+3WAdT5dEVRVNsEPC01pD/m8=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=MQKIUfZUWME2kAhHR9PEBGeqAYkKDLLJG4DOCaWJGS97oz1jwOoRRmge0gl6If33r AdPwMtFlXN8SGV/U2GtZSEeiUdU7NIDLjfjEB3KixkVe3ORhuwOpA47AmCW+1bf+o8 bZ7Urmw7zw0KIVVFIIUIjCodnp5chqu/0lKWaMLM=
- Feedback-id: 9o-Cl1kmi7SjXhHVTYCKLMaOWEb5sehZHGWJCh5kD69wcWVVeOfY5BYq3wMUF0ymJu-oBC8u1h80JJ91GEz6Og==:Ext:ProtonMail
- In-reply-to: <1394985674.3969083.1569420087673@mail2.virginmedia.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> <1394985674.3969083.1569420087673@mail2.virginmedia.com>
- Reply-to: Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx>
On Wednesday, September 25, 2019 4:01 PM, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> > On 25 September 2019 at 14:02 Dennis Schwartz dennis.schwartz@xxxxxxxxxxxxxx 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author