DASH Shell discussions
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Harald van Dijk <harald@gigawatt.nl>, dash@vger.kernel.org
Subject: Re: [Partial patch] IFS and read builtin
Date: Sat, 16 Oct 2010 14:15:48 -0500	[thread overview]
Message-ID: <20101016191548.GA10626@burratino> (raw)
In-Reply-To: <20100908120849.GA17121@gondor.apana.org.au>

Hi Herbert,

Herbert Xu wrote:

> commit f42e443bb511ed3224f09b4fcf0772438ebdbbfa
> Author: Herbert Xu <herbert@gondor.apana.org.au>
> Date:   Wed Sep 8 20:07:26 2010 +0800
> 
>     [EXPAND] Fix ifsfirst/ifslastp leak
>     
>     As it stands expandarg may return with a non-NULL ifslastp which
>     then confuses any subsequent ifsbreakup user that doesn't clear
>     it directly.
>     
>     What's worse, if we get interrupted before we hit ifsfree in
>     expandarg we will leak memory.
>     
>     This patch fixes this by always calling ifsfree in expandarg
>     thus ensuring that ifslastp is always NULL on the normal path.
>     It also adds an ifsfree call to the RESET path to ensure that
>     memory isn't leaked.

I was experiencing weird symptoms with a local test script (for another
program):

	$ sh -x t5523-push-upstream.sh -i -v
	[...]
	+ test_terminal git push -u upstream master
	+ die
	+ code=2
	+ test -n
	+ echo FATAL: Unexpected exit with code 2
	FATAL: Unexpected exit with code 2
	+ exit 1
	$ cat trash\ directory.t5523-push-upstream/err
	+ test_declared_prereq TTY
	+ return 1
	+ test_declared_prereq TTYREDIR
	+ return :T�    D�      \�      K�      l�      M�      1 �     D�      \�      K�      l�      M�      1 1
	return: 1: Illegal number: :T�  D�      \�      K�      l�      M�      1

The strange text there is supposed to be 127, I think, and it is not
supposed to be redirected to err.

Bisects to f42e443bb.  Reverting it avoids the problem.  Any ideas
before I investigate further?

Jonathan

  reply	other threads:[~2010-10-16 19:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-22 22:20 [Partial patch] IFS and read builtin Harald van Dijk
2010-08-22 23:00 ` Jilles Tjoelker
2010-08-23  0:03   ` Harald van Dijk
2010-08-23 19:35     ` Jilles Tjoelker
2010-08-23 22:51       ` Harald van Dijk
2010-08-24 22:51         ` Jilles Tjoelker
2010-08-24 23:40           ` Harald van Dijk
2010-09-08  9:10           ` Herbert Xu
2010-09-08 11:53 ` Herbert Xu
2010-09-08 12:08   ` Herbert Xu
2010-10-16 19:15     ` Jonathan Nieder [this message]
2010-10-18  2:54       ` Herbert Xu
2010-10-18  3:03         ` Jonathan Nieder
2010-11-07 22:04     ` Jonathan Nieder
2010-11-28 13:10       ` Herbert Xu
  -- strict thread matches above, loose matches on Subject: below --
2010-08-21 19:19 Harald van Dijk

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=20101016191548.GA10626@burratino \
    --to=jrnieder@gmail.com \
    --cc=dash@vger.kernel.org \
    --cc=harald@gigawatt.nl \
    --cc=herbert@gondor.apana.org.au \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox