Your message dated Sun, 11 Sep 2011 18:17:14 +0000
with message-id <[email protected]>
and subject line Bug#614815: fixed in bash 4.2-1~exp1
has caused the Debian Bug report #614815,
regarding bash: Segfaults on some libtool invocations due to sbrk() assumptions
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
614815: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614815
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 4.1-3
Severity: important
Tags: patch
Hello,
I'm having some bash crashes when running libtool. It shows up that
the issue is that bash assumes being the only user of sbrk(), and thus
caches in memtop the assumed value of brk. However, libc can make use
of brk() for its own internal allocations, and thus memtop becomes
outdated. The ((char *)p + binsize(nunits) == memtop) then becomes
bogus. The attached patch fixes the crashes by simply removing the
caching, which is useless anyway since libc already avoids calling the
kernel system call when sbrk is given 0.
Thanks,
Samuel
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.37 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages bash depends on:
ii base-files 6.1 Debian base system miscellaneous f
ii dash 0.5.5.1-7.4 POSIX-compliant shell
ii debianutils 3.4.3 Miscellaneous utilities specific t
ii libc6 2.11.2-11 Embedded GNU C Library: Shared lib
ii libncurses5 5.7+20100313-5 shared libraries for terminal hand
Versions of packages bash recommends:
ii bash-completion 1:1.3-1 programmable completion for the ba
Versions of packages bash suggests:
pn bash-doc <none> (no description available)
-- no debconf information
--
Samuel Thibault <[email protected]>
<P> moo
<N> moo ?
<D> P: keski t'arrive? :))
<P> moooo
<N> moooooo ?
<P> rien le net marche je suis content :)
-+- #ens-mim - accro du net -+-
--- bash/lib/malloc/malloc.c.original 2011-02-23 13:10:48.000000000 +0000
+++ bash/lib/malloc/malloc.c 2011-02-23 13:10:52.000000000 +0000
@@ -227,8 +227,6 @@
static int pagebucket; /* bucket for requests a page in size */
static int maxbuck; /* highest bucket receiving allocation request. */
-static char *memtop; /* top of heap */
-
static const unsigned long binsizes[NBUCKETS] = {
8UL, 16UL, 32UL, 64UL, 128UL, 256UL, 512UL, 1024UL, 2048UL, 4096UL,
8192UL, 16384UL, 32768UL, 65536UL, 131072UL, 262144UL, 524288UL,
@@ -538,7 +536,6 @@
siz = binsize (nu);
/* Should check for errors here, I guess. */
sbrk (-siz);
- memtop -= siz;
#ifdef MALLOC_STATS
_mstats.nsbrk++;
@@ -629,8 +626,6 @@
if ((long)mp == -1)
goto morecore_done;
- memtop += sbrk_amt;
-
/* shouldn't happen, but just in case -- require 8-byte alignment */
if ((long)mp & MALIGN_MASK)
{
@@ -680,7 +675,7 @@
Some of this partial page will be wasted space, but we'll use as
much as we can. Once we figure out how much to advance the break
pointer, go ahead and do it. */
- memtop = curbrk = sbrk (0);
+ curbrk = sbrk (0);
sbrk_needed = pagesz - ((long)curbrk & (pagesz - 1)); /* sbrk(0) %
pagesz */
if (sbrk_needed < 0)
sbrk_needed += pagesz;
@@ -695,7 +690,6 @@
curbrk = sbrk (sbrk_needed);
if ((long)curbrk == -1)
return -1;
- memtop += sbrk_needed;
/* Take the memory which would otherwise be wasted and populate the most
popular bin (2 == 32 bytes) with it. Add whatever we need to curbrk
@@ -902,9 +896,9 @@
xbotch (mem, ERR_ASSERT_FAILED, _("free: start and end chunk sizes
differ"), file, line);
#if 1
- if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop))
+ if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == sbrk(0)))
#else
- if (((char *)p + binsize(nunits) == memtop) && nunits >= LESSCORE_MIN)
+ if (((char *)p + binsize(nunits) == sbrk(0)) && nunits >= LESSCORE_MIN)
#endif
{
/* If above LESSCORE_FRC, give back unconditionally. This should be set
--- End Message ---
--- Begin Message ---
Source: bash
Source-Version: 4.2-1~exp1
We believe that the bug you reported is fixed in the latest version of
bash, which is due to be installed in the Debian FTP archive:
bash-builtins_4.2-1~exp1_amd64.deb
to main/b/bash/bash-builtins_4.2-1~exp1_amd64.deb
bash-doc_4.2-1~exp1_all.deb
to main/b/bash/bash-doc_4.2-1~exp1_all.deb
bash-static_4.2-1~exp1_amd64.deb
to main/b/bash/bash-static_4.2-1~exp1_amd64.deb
bash_4.2-1~exp1.diff.gz
to main/b/bash/bash_4.2-1~exp1.diff.gz
bash_4.2-1~exp1.dsc
to main/b/bash/bash_4.2-1~exp1.dsc
bash_4.2-1~exp1_amd64.deb
to main/b/bash/bash_4.2-1~exp1_amd64.deb
bash_4.2.orig.tar.gz
to main/b/bash/bash_4.2.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <[email protected]> (supplier of updated bash package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 11 Sep 2011 17:52:30 +0200
Source: bash
Binary: bash bash-static bash-builtins bash-doc
Architecture: source all amd64
Version: 4.2-1~exp1
Distribution: experimental
Urgency: low
Maintainer: Matthias Klose <[email protected]>
Changed-By: Matthias Klose <[email protected]>
Description:
bash - GNU Bourne Again SHell
bash-builtins - Bash loadable builtins - headers & examples
bash-doc - Documentation and examples for the The GNU Bourne Again SHell
bash-static - GNU Bourne Again SHell (static version)
Closes: 587185 602244 602456 602483 614815 632177
Changes:
bash (4.2-1~exp1) experimental; urgency=low
.
[ Matthias Klose ]
* New upstream version.
* Apply upstream patches 001 - 010.
* Fix parsing of double doublequotes. LP: #780441.
* /etc/bash.bashrc:
- Fix quoting issue calling command-not-found. LP: #754859. Closes:
#587185.
* Don't cache the value of brk between sbrk calls (Samuel Thibault).
Closes: #614815.
* Remove the bashdb and bash-completion packaging rules and files.
* Just link with libtinfo instead of libncurses if available.
* Make lintian happy.
.
[ Jonathan Nieder ]
* Update copyright file. Many files that were GPL-2+ were relicensed
under GPL-3+ in bash 4.0-rc1. Closes: #632177.
* debian/rules: Use "rm -rf" instead of rmdir to remove usr/share/info
directory in "with_gfdl = no" build. This prevents build failures when
using the unmodified upstream tarball.
* bash.preinst: Tidy up a little.
- Remove codepath that would rename .bash_profile → .profile if .profile
was unmodified from the gutsy → hardy transition. Closes: #602244
- Remove commented experiment from bash-completion transition.
- Remove misleading "dpkg --assert-support-predepends" check.
Closes: #602456.
- Move utility functions to a separate bash.preinst-lib.c and corresponding
declarations to bash.preinst.h.
* Remove /bin/sh symlink and /usr/share/man/man1/sh.1.gz from bash package
contents. Closes: #602483.
- debian/rules: Do not install /bin/sh and sh.1.gz symlinks.
- bash.preinst:
- Make sure /bin/sh is present and points to an executable, forcibly
creating symlinks /bin/sh -> bash and /usr/share/man/man1/sh.1.gz ->
bash.1.gz if not.
- Divert /bin/sh and sh.1.gz on behalf of dash if we are upgrading from
a bash version with /bin/sh in the files list and bash's copy of
/bin/sh is not already diverted. This ensures unpacking bash will not
cause /bin/sh to go missing.
* bash.postinst: Simplify comment that contained an implementation detail
about how /bin/sh is provided.
Checksums-Sha1:
80136dda8737e33630b783d36f5a83bf4f920043 1201 bash_4.2-1~exp1.dsc
7846bf9f2f2878ad83db407c40858a230def03b9 2796351 bash_4.2.orig.tar.gz
ed560aacbb29222815a3379a62f17502cc6ffa03 73719 bash_4.2-1~exp1.diff.gz
63ffa28b11c8c5d5cc03a1a8dda53bf5d2481b1d 697228 bash-doc_4.2-1~exp1_all.deb
0c29b083a533f87a8354eba3c6e32b63fb76cdc3 1489982 bash_4.2-1~exp1_amd64.deb
4e0688196846a7226f6af034283d37b8908cf45f 111892
bash-builtins_4.2-1~exp1_amd64.deb
2cee5220850ff2c7fbfa4d8611fca0c9710604ed 918650
bash-static_4.2-1~exp1_amd64.deb
Checksums-Sha256:
8a917e8e0f7f4614e270083aa6677bb54561ac55f73fe7aa51ef4534d0a20577 1201
bash_4.2-1~exp1.dsc
70037fbd9c428207d9daec9267f30eb0f26f3ba82ef5a9b5c923542d00de14de 2796351
bash_4.2.orig.tar.gz
d98df9694a143cb12b02c01df3fc0532d7f704039209ca6723345ad626a8a40b 73719
bash_4.2-1~exp1.diff.gz
852c31991d824a7c144459a47206ca01dd81ab1c5ca734063325ceabf5559851 697228
bash-doc_4.2-1~exp1_all.deb
441ab0d4236da481dd53feeaef7e26bf1a3da984ef7f483cd7eedd5ac0801ff4 1489982
bash_4.2-1~exp1_amd64.deb
b56181d5bb416ec00646547517b77fc573637d42404a5a7455d39d2de7a8cb79 111892
bash-builtins_4.2-1~exp1_amd64.deb
0bad27ff8308641af5a20d94bbdadf0ac50dfbb391dd4c72dd72edb6372e434f 918650
bash-static_4.2-1~exp1_amd64.deb
Files:
e71211898107673d2f1d0624c478b06c 1201 base required bash_4.2-1~exp1.dsc
02bed321ac495a42dee4b6ee1b24cb21 2796351 base required bash_4.2.orig.tar.gz
bf98375d1149e9e5b4799e3224415331 73719 base required bash_4.2-1~exp1.diff.gz
938c07e55d50c92408c7adac6409230b 697228 doc optional
bash-doc_4.2-1~exp1_all.deb
4a6454598d6ec953cccc2cc476df00da 1489982 shells required
bash_4.2-1~exp1_amd64.deb
415cddf6952b7b1ebc7dd8baf1cc47eb 111892 utils optional
bash-builtins_4.2-1~exp1_amd64.deb
b397a76d0a586275d26a8754a02f9e16 918650 shells optional
bash-static_4.2-1~exp1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk5s+EEACgkQStlRaw+TLJzEpQCgpHWreb5NpcmB+OoX9WxO1xKL
mLYAoMC84jl8bqsAjmIvB4v6ukJozzKm
=dPBD
-----END PGP SIGNATURE-----
--- End Message ---