dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Harald van Dijk <harald@gigawatt.nl>
Cc: Martijn Dekker <martijn@inlv.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	dash@vger.kernel.org, busybox <busybox@busybox.net>
Subject: Re: [BUG] Interactive (d)ash exits on assigning to readonly from 'command eval'
Date: Sun, 30 Oct 2016 18:32:20 +0100	[thread overview]
Message-ID: <CAK1hOcPrFvLy=C9La+69_N2w22XWp8stGPR9S8+TxyVNOeYe-Q@mail.gmail.com> (raw)
In-Reply-To: <501f83a0-9a46-f4af-dc56-ba8db958bad1@gigawatt.nl>

On Sat, Oct 29, 2016 at 8:22 PM, Harald van Dijk <harald@gigawatt.nl> wrote:
> On 28/10/16 15:55, Denys Vlasenko wrote:
>>
>> This will probably be mangled by gmail, but here is the proposed fix:
>
>
> This looks about the right approach, but it causes problems in subshells, a
> double free:
>
> $ ./busybox ash -c 'readonly x; echo $(command eval x=2)'
> ash: eval: line 1: x: is read only
> *** Error in `./busybox': free(): invalid pointer: 0x000055a784c1c300 ***
> [...]
>
> That's with busybox checked out from git (commit
> 9db74e49e5b462089c6eec0182d819c0d4708e57), where your patch is applied,
> completely unpatched and completely default config.
>
> I omitted the backtrace output, but it's popfile() getting called, after
> popallfiles() has already been called.

Thanks! Hopefully fixed in git, please try it.

      reply	other threads:[~2016-10-30 17:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 21:40 Martijn Dekker
2016-10-28 13:55 ` Denys Vlasenko
2016-10-29 18:22   ` Harald van Dijk
2016-10-30 17:32     ` Denys Vlasenko [this message]

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='CAK1hOcPrFvLy=C9La+69_N2w22XWp8stGPR9S8+TxyVNOeYe-Q@mail.gmail.com' \
    --to=vda.linux@googlemail.com \
    --cc=busybox@busybox.net \
    --cc=dash@vger.kernel.org \
    --cc=harald@gigawatt.nl \
    --cc=herbert@gondor.apana.org.au \
    --cc=martijn@inlv.org \
    --subject='Re: [BUG] Interactive (d)ash exits on assigning to readonly from '\''command eval'\''' \
    /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

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).