Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264226 - sys-apps/busybox-1.13.3, app-shells/dash-0.5.5.1.2 buggy IFS handling
Summary: sys-apps/busybox-1.13.3, app-shells/dash-0.5.5.1.2 buggy IFS handling
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-30 00:17 UTC by Harald van Dijk (RETIRED)
Modified: 2009-07-24 02:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald van Dijk (RETIRED) gentoo-dev 2009-03-30 00:17:50 UTC
printf 'a\t\tb\tc\n' | $SHELL -c 'IFS="$(printf "\t")" read a b c; echo "-$a- -$b- -$c-"'

The above command is supposed to print -a- -b- -c-. For bash and pdksh, this works as expected, but busybox and dash mishandle it: they return -a- -- -b\tc- because they treat the two consecutive tabs as two separate field separators. According to susv3 2.6.5 Field Splitting p3, IFS whitespace characters are treated differently from IFS non-whitespace characters, and series of whitespace characters form a single field separator, so I believe bash and pdksh are correct, and busybox and dash should be fixed to match.
Comment 1 solar (RETIRED) gentoo-dev 2009-03-30 00:35:18 UTC
Thanks for letting us know that it does not pass your tests, However as you know gentoo does not write the software but rather gets it from it's upstream.

Please file bug reports with the appropriate upstreams.

Bugs for busybox go to http://bugs.busybox.net
Dash bugs look like they go to here http://gondor.apana.org.au/~herbert/dash/
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2009-03-30 00:58:16 UTC
Firstly, you don't have to be a dick about it. Secondly, they're not my tests. This bug breaks glibc's testsuite. If you prefer, next time I'll just report that (since that's definitely an appropriate bug report for here) and let you figure out the rest. I shouldn't have to tell you this, because it's a bug regardless of whether it breaks anything. Thirdly, upstream bugs go here as well as upstream for various reasons. One is that you might disagree that it is a bug. Another is that you might want to keep track of your package's bugs. A third is that you might prefer to handle contact with upstream yourself. A fourth is that you may have patched the Gentoo package to (accidentally) introduce bugs that aren't present in the official release.

I will report this to the busybox folks. @base-system, can you report this upstream yourself, since you probably actually know where dash bugs go?

And either way, please keep the bug open until it's fixed.
Comment 3 SpanKY gentoo-dev 2009-03-30 01:24:12 UTC
glibc forces bash to be used, so how other shells behave shouldnt matter.  if glibc isnt doing that, file a bug for it.
Comment 4 solar (RETIRED) gentoo-dev 2009-03-30 05:42:13 UTC
I think you misunderstood. I'm not trying to be a dick about it. But embedded@gentoo does not have the resources to fix this. For busybox I'd rather see it handled there, as the problem is not likely to cause any major damage which it has not already caused for anybody attempting to use ash as the primary shell.
Comment 5 Harald van Dijk (RETIRED) gentoo-dev 2009-03-30 17:37:09 UTC
I'll take your word for it that I did misunderstand, but I wasn't expecting you to fix this, I was expecting you to first help determine whether this is a bug at all, and if so, whether this is an upstream bug.

Reported as https://bugs.busybox.net/show_bug.cgi?id=235

vapier, I'm building glibc in a chroot to make sure I can give you a clean build log, and I'll get you the log in a new bug when it's done. Either way, could you contact the dash maintainer about this?
Comment 6 solar (RETIRED) gentoo-dev 2009-07-24 02:35:59 UTC
Upstream