Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: TRAPINT doesn't work reliably
- X-seq: zsh-users 24291
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Dennis Schwartz <dennis.schwartz@xxxxxxxxxxxxxx>
- Subject: Re: TRAPINT doesn't work reliably
- Date: Thu, 26 Sep 2019 16:25:39 +0100
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190926152541euoutp022d86ebec4d8e422017422516b93e50e0~IBm5jROB02660926609euoutp02U
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1569511541; bh=qE2qoGj6CEgIJ2WNoZa6sWCCZ/D0UkP9MUXpW+6W1w4=; h=Subject:From:To:CC:Date:In-Reply-To:References:From; b=bY4AgIh4QEgRvh4KSr1T2EA7cnFwXVdSfcttKLfjS+r8wyUNMg+f0ml1DlW6x60sR hCGz3LHT/jVcL34cjnFS3HdiORiZhGRxhenO4FVeTlqsC9X6VX4g/UbqGpPn2iA8Mo Fwpaojdxyvv6ZAOBfygrdrkEO0XFbahxeyRjx3ak=
- In-reply-to: <EwtKvyologv1mcP4t0gYc4lnyj-ccruEDWJM6kEh3_-H1P6kvlnSEV_LunkUg4AxuDZkdVcoPHq2KnqTqQ4pOAzRd2bXfkj0tjAvgg2-cQQ=@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> <1394985674.3969083.1569420087673@mail2.virginmedia.com> <22AgAhXQWzavJGhNA8tFbGSMGk8z3KDGGa-pICX0lWszH622z2_nnc1acuvW3OcIbqAaXM_WAGJwmQU5Oph83DGbfQEplu1t3o7F5omeC4w=@protonmail.com> <1569434163.10786.26.camel@samsung.com> <EwtKvyologv1mcP4t0gYc4lnyj-ccruEDWJM6kEh3_-H1P6kvlnSEV_LunkUg4AxuDZkdVcoPHq2KnqTqQ4pOAzRd2bXfkj0tjAvgg2-cQQ=@protonmail.com>
On Thu, 2019-09-26 at 14:48 +0000, Dennis Schwartz wrote:
> However, I can only reproduce the bug if I have the following code in my
> `~/.zshrc`:
>
> # Antigen zsh plugins
> if [ -f "/usr/share/zsh-antigen/antigen.zsh" ]; then
> source "/usr/share/zsh-antigen/antigen.zsh"
>
> # load some plugins here, but they are not relevant to trigger
> # the bug
> fi
>
> So, I conditionally `source` another file. Apparently, this is causing
> *super weird* behavior. Unbelievably, if I open the file `.zshrc` (e.g.,
> vim/gedit) and _save_ the file, I cannot trigger the bug. However, if I
> open the file, but _do not save_ the file, I always trigger the bug.
This is very much the sort of weirdness you get with memory errors,
unfortunately. They're extremely sensitive to what was allocated and
deallocated where --- some piece of memory allocated for one purpose is
presumably being erroneously freed and reused, and as far as the structure of
your zsh code is concerned there's no actual logical relationship between
the places --- they are just getting mixed up in the bowels of the
allocation functions.
It suggests it's going to be quite hard to reproduce elsewhere, though
I'd still be interesting in the logic where you're defining TRAPINT since
clearly that's the memory that's getting mishandled.
It's also still suggesting trying to get valgrind to give a bit more
detail is the best way forward.
cheers
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author