Bug 239296

Summary: bash core-dumps on ${b##${$a}}
Product: [Fedora] Fedora Reporter: Jan Hutař <jhutar>
Component: bashAssignee: Tomas Janousek <tjanouse>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: atkac, tjanouse
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 3.2-18.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-29 18:30:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 207681    
Attachments:
Description Flags
bash-3.1-16.1 backtrace (I don't have direct access to rawhide, but it behaves same way there) none

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