[Bug 928900] [NEW] Segmentation fault with associative arrays

John Valko 928900 at bugs.launchpad.net
Wed Feb 8 15:08:06 UTC 2012


Public bug reported:

If we write code like:

function foo {
    declare -A hash
    declare hash[foo]=bar #bash crashes here
}

Bash crashes when calling this function.  The same exact code works as
expected if it's not in a shell function.

Additional details:

$ lsb_release -rd
Description:	Ubuntu 11.10
Release:	11.10
$ apt-cache policy bash
bash:
  Installed: 4.2-0ubuntu4
  Candidate: 4.2-0ubuntu4
  Version table:
 *** 4.2-0ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: bash (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/928900

Title:
  Segmentation fault with associative arrays

Status in “bash” package in Ubuntu:
  New

Bug description:
  If we write code like:

  function foo {
      declare -A hash
      declare hash[foo]=bar #bash crashes here
  }

  Bash crashes when calling this function.  The same exact code works as
  expected if it's not in a shell function.

  Additional details:

  $ lsb_release -rd
  Description:	Ubuntu 11.10
  Release:	11.10
  $ apt-cache policy bash
  bash:
    Installed: 4.2-0ubuntu4
    Candidate: 4.2-0ubuntu4
    Version table:
   *** 4.2-0ubuntu4 0
          500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
          100 /var/lib/dpkg/status

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/928900/+subscriptions




More information about the foundations-bugs mailing list