Debian Bug report logs - #819327
bash: executes statement after "exit"

version graph

Package: bash; Maintainer for bash is Matthias Klose <doko@debian.org>; Source for bash is src:bash (PTS, buildd, popcon).

Reported by: Frank Heckenbach <f.heckenbach@fh-soft.de>

Date: Sat, 26 Mar 2016 18:51:02 UTC

Severity: normal

Found in version bash/4.3-11

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Matthias Klose <doko@debian.org>:
Bug#819327; Package bash. (Sat, 26 Mar 2016 18:51:05 GMT) (full text, mbox, link).


Acknowledgement sent to Frank Heckenbach <f.heckenbach@fh-soft.de>:
New Bug report received and forwarded. Copy sent to Matthias Klose <doko@debian.org>. (Sat, 26 Mar 2016 18:51:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Frank Heckenbach <f.heckenbach@fh-soft.de>
To: submit@bugs.debian.org
Subject: bash: executes statement after "exit"
Date: Sat, 26 Mar 2016 19:47:59 +0100
Package: bash
Version: 4.3-11+b1
Severity: normal

% cat bash-bug
#!/bin/bash

if true; then
  $[()]
  exit
fi

echo "Should not get here."
% ./bash-bug
./bash-bug: line 4: (): syntax error: operand expected (error token is ")")
Should not get here.

The error is correct, but after that it should continue with exit,
or with "set -e", abort immediately. In both cases it goes on to
execute the statement below.

-- System Information:
Debian Release: 8.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bash depends on:
ii  base-files   8+deb8u3
ii  dash         0.5.7-4+b1
ii  debianutils  4.4+b1
ii  libc6        2.19-18+deb8u4
ii  libncurses5  5.9+20140913-1+b1
ii  libtinfo5    5.9+20140913-1+b1

Versions of packages bash recommends:
ii  bash-completion  1:2.1-4

Versions of packages bash suggests:
pn  bash-doc  <none>

-- no debconf information



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Dec 6 08:29:39 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.