Bug 239296 - bash core-dumps on ${b##${$a}}
Summary: bash core-dumps on ${b##${$a}}
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Tomas Janousek
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: FC6Update
TreeView+ depends on / blocked
 
Reported: 2007-05-07 13:36 UTC by Jan Hutař
Modified: 2007-11-30 22:12 UTC (History)
2 users (show)

Fixed In Version: 3.2-18.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-29 18:30:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
bash-3.1-16.1 backtrace (I don't have direct access to rawhide, but it behaves same way there) (2.22 KB, text/plain)
2007-05-07 13:36 UTC, Jan Hutař
no flags Details

Description Jan Hutař 2007-05-07 13:36:52 UTC
Description of problem:
Bash core-dumps on "echo ${b##${$a}}"


Version-Release number of selected component (if applicable):
bash-3.2-9.fc7


How reproducible:
always


Steps to Reproduce:
1. $ a=/home
2. $ b=/home/pok/bla/ble
3. $ echo ${b#${$a}}


Actual results:
core-dump


Expected results:
only some error (I have mistakenly ran that, when I was searching for "${b#$a}")

Comment 1 Jan Hutař 2007-05-07 13:36:52 UTC
Created attachment 154264 [details]
bash-3.1-16.1 backtrace (I don't have direct access to rawhide, but it behaves same way there)

Comment 2 Tim Waugh 2007-05-08 10:05:12 UTC
I can't reproduce this here on bash-3.2-9.fc7.i386 -- can you provide a complete
test case please?  Should 'a' or 'b' be defined in the environment, for example?

Comment 3 Adam Tkac 2007-05-08 10:09:54 UTC
Hm, typo in reproduce steps :)

Please run this simple script

#!/bin/bash

a=adsf
b=asdf
echo ${b##${$a}}

-A-

Comment 4 Tim Waugh 2007-05-08 10:13:26 UTC
Thanks.  Reproduced on FC-6.

Comment 5 Tomas Janousek 2007-05-08 10:50:33 UTC
echo ${$##${}} is enough as well.

Comment 6 Jan Hutař 2007-10-29 18:30:18 UTC
Great,
seems to be fixed in a current package. I do not see a reason for back-porting 
the patch because of low severity of the bug => closing.

$ a=/home
$ b=/home/pok/bla/ble
$ echo ${b##${$a}}
bash: ${$a}: bad substitution
$ rpm -q bash
bash-3.2-18.fc8

Thanks,
Jan


Note You need to log in before you can comment on or make changes to this bug.