gcore does not execute, uses /bin/sh but requires bash

Bug #1762320 reported by Trent Lloyd
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdb (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

gcore fails to execute on bionic

$ gcore
/usr/bin/gcore: 28: /usr/bin/gcore: Syntax error: "(" unexpected

Line 28 is:
 28 dump_all_cmds=()

This appears to be bash syntax for arrays (as reinforced further down) which is not compatible with the /bin/sh shebang using dash.

Upstream has a recent commit to move this from /bin/sh to bash (along also making other changes to fix problems with quoting within the same commit):
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=e1e6f073a9f5d7c3183cb8096fb24a42c28ba36b

As a minimum fix we should probably change it from /bin/sh to /bin/bash

Trent Lloyd (lathiat)
Changed in gdb (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Trent Lloyd (lathiat) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "gdb-bionic-gcore-bash.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
tags: added: bionic
Changed in gdb (Ubuntu):
status: Confirmed → Fix Committed
tags: added: rls-bb-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdb - 8.1-0ubuntu3

---------------
gdb (8.1-0ubuntu3) bionic; urgency=medium

  * Update, taken from the gdb-8.1-branch 20180409.
  * Use bash instead of /bin/sh as this script uses arrays which require bash.
    (Trent Lloyd). LP: #1762320.

 -- Matthias Klose <email address hidden> Mon, 09 Apr 2018 11:31:42 +0200

Changed in gdb (Ubuntu):
status: Fix Committed → Fix Released
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.