Empty extglob patterns hang bash

Bug #1683923 reported by John Valko
10
This bug affects 2 people
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://mirrors.linode.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://mirrors.linode.com/ubuntu/ trusty-security/main amd64 Packages
                                                                                        100 /var/lib/dpkg/status
     4.3-6ubuntu1 0
        500 http://mirrors.linode.com/ubuntu/ trusty/main amd64 Packages

Tags: trusty
Revision history for this message
John Valko (jvalko-gmail) wrote :

Also, I built the vanilla bash 4.3 and 4.4 sources and they do not appear to be affected by this bug.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash (Ubuntu):
status: New → Confirmed
xhienne (xhienne)
tags: added: trusty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.