Empty extglob patterns hang bash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Bash hangs when extglobs with no patterns are specified.
Example:
$ echo !()
should print the contents of the current directory, but actually makes bash hang with 100% CPU usage. Also affects other pattern types, e.g. @() and ?(). Non-empty patterns work correctly.
After executing a command containing such a glob, a SIGKILL is required to terminate the process.
Additional info:
$ lsb_release -rd
Description: Ubuntu 14.04.4 LTS
Release: 14.04
$ apt-cache policy bash
bash:
Installed: 4.3-7ubuntu1.5
Candidate: 4.3-7ubuntu1.5
Version table:
*** 4.3-7ubuntu1.5 0
500 http://
500 http://
4.3-6ubuntu1 0
500 http://
Also, I built the vanilla bash 4.3 and 4.4 sources and they do not appear to be affected by this bug.