Debian Bug report logs - #489297
valgrind: the 'impossible' happened: VG_(arena_memalign)

version graph

Package: valgrind; Maintainer for valgrind is Alessandro Ghedini <ghedo@debian.org>; Source for valgrind is src:valgrind (PTS, buildd, popcon).

Reported by: Robert Edmonds <edmonds@debian.org>

Date: Fri, 4 Jul 2008 18:57:01 UTC

Severity: important

Tags: fixed-upstream

Found in version valgrind/1:3.3.1-2

Fixed in version valgrind/1:3.8.0-1

Done: Alessandro Ghedini <ghedo@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://bugs.kde.org/show_bug.cgi?id=272940, merged-upstream: http://bugs.kde.org/show_bug.cgi?id=203877

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Andrés Roldán <aroldan@debian.org>:
Bug#489297; Package valgrind. (full text, mbox, link).


Acknowledgement sent to Robert Edmonds <edmonds@debian.org>:
New Bug report received and forwarded. Copy sent to Andrés Roldán <aroldan@debian.org>. (full text, mbox, link).


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

From: Robert Edmonds <edmonds@debian.org>
To: submit@bugs.debian.org
Subject: valgrind: the 'impossible' happened: VG_(arena_memalign)
Date: Fri, 4 Jul 2008 14:55:25 -0400
[Message part 1 (text/plain, inline)]
Package: valgrind
Version: 1:3.3.1-2
Severity: important

valgrind is incapable of debugging programs which use memalign(3) to
allocate aligned memory blocks >= 2 MB in size:

    edmonds@chase{0}:~/code/test$ cat memalign.c
    #include <stdlib.h>

    #define size (1 << 21)

    int main(void) {
            void *ptr;
            posix_memalign(&ptr, size, size);
            free(ptr);
            return 0;
    }
    edmonds@chase{0}:~/code/test$ gcc -O0 -ggdb -Wall -o memalign memalign.c
    edmonds@chase{0}:~/code/test$ valgrind ./memalign                       
    ==31507== Memcheck, a memory error detector.
    ==31507== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
    ==31507== Using LibVEX rev 1854, a library for dynamic binary translation.
    ==31507== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
    ==31507== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
    ==31507== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
    ==31507== For more details, rerun with: -v
    ==31507== 
    VG_(arena_memalign)(0x3879AB60, 2097152, 2097152)
    bad alignment
    valgrind: the 'impossible' happened:
       VG_(arena_memalign)
    ==31507==    at 0x380194CC: report_and_quit (m_libcassert.c:140)
    ==31507==    by 0x380195E4: panic (m_libcassert.c:210)
    ==31507==    by 0x38019652: vgPlain_core_panic_at (m_libcassert.c:215)
    ==31507==    by 0x38019671: vgPlain_core_panic (m_libcassert.c:220)
    ==31507==    by 0x380228BE: vgPlain_arena_memalign (m_mallocfree.c:1392)
    ==31507==    by 0x38002909: vgMemCheck_new_block (mc_malloc_wrappers.c:195)
    ==31507==    by 0x38002BEA: vgMemCheck_memalign (mc_malloc_wrappers.c:259)
    ==31507==    by 0x38033F08: vgPlain_scheduler (scheduler.c:1277)
    ==31507==    by 0x380448D3: run_a_thread_NORETURN (syswrap-linux.c:89)

    sched status:
      running_tid=1

    Thread 1: status = VgTs_Runnable
    ==31507==    at 0x4C1FFCF: memalign (vg_replace_malloc.c:460)
    ==31507==    by 0x4C20068: posix_memalign (vg_replace_malloc.c:569)
    ==31507==    by 0x400536: main (memalign.c:7)


    Note: see also the FAQ.txt in the source distribution.
    It contains workarounds to several common problems.

    If that doesn't help, please report this bug to: www.valgrind.org

    In the bug report, send all the above text, the valgrind
    version, and what Linux distro you are using.  Thanks.

    edmonds@chase{1}:~/code/test$ 

there is a check in coregrind/m_mallocfree.c:1385 which reads,

   // Check that the requested alignment seems reasonable; that is, is
   // a power of 2.
   if (req_alignB < VG_MIN_MALLOC_SZB
       || req_alignB > 1048576
       || VG_(log2)( req_alignB ) == -1 /* not a power of 2 */) {
      VG_(printf)("VG_(arena_memalign)(%p, %lu, %lu)\nbad alignment",
                  a, req_alignB, req_pszB );
      VG_(core_panic)("VG_(arena_memalign)");
      /*NOTREACHED*/
   }

the comment or the code is wrong, as there are certainly powers of 2
larger than 1048576.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.25-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages valgrind depends on:
ii  libc6                         2.7-12     GNU C Library: Shared libraries

Versions of packages valgrind recommends:
ii  gdb                           6.8-3      The GNU Debugger

-- no debconf information

-- 
Robert Edmonds
edmonds@debian.org
[signature.asc (application/pgp-signature, inline)]

Set Bug forwarded-to-address to 'https://bugs.kde.org/show_bug.cgi?id=272940'. Request was from Pierre Habouzit <madcoder@debian.org> to control@bugs.debian.org. (Tue, 10 May 2011 13:06:07 GMT) (full text, mbox, link).


Changed Bug forwarded-to-address to 'https://bugs.kde.org/show_bug.cgi?id=272940, merged-upstream: http://bugs.kde.org/show_bug.cgi?id=203877' from 'https://bugs.kde.org/show_bug.cgi?id=272940' Request was from bts-link-upstream@lists.alioth.debian.org to control@bugs.debian.org. (Thu, 25 Aug 2011 16:42:16 GMT) (full text, mbox, link).


Added tag(s) fixed-upstream. Request was from bts-link-upstream@lists.alioth.debian.org to control@bugs.debian.org. (Mon, 18 Jun 2012 16:42:27 GMT) (full text, mbox, link).


Reply sent to Alessandro Ghedini <ghedo@debian.org>:
You have taken responsibility. (Sat, 11 Aug 2012 14:36:03 GMT) (full text, mbox, link).


Notification sent to Robert Edmonds <edmonds@debian.org>:
Bug acknowledged by developer. (Sat, 11 Aug 2012 14:36:03 GMT) (full text, mbox, link).


Message #16 received at 489297-close@bugs.debian.org (full text, mbox, reply):

From: Alessandro Ghedini <ghedo@debian.org>
To: 489297-close@bugs.debian.org
Subject: Bug#489297: fixed in valgrind 1:3.8.0-1
Date: Sat, 11 Aug 2012 14:32:40 +0000
Source: valgrind
Source-Version: 1:3.8.0-1

We believe that the bug you reported is fixed in the latest version of
valgrind, which is due to be installed in the Debian FTP archive.

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 489297@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Alessandro Ghedini <ghedo@debian.org> (supplier of updated valgrind 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 11 Aug 2012 14:24:56 +0200
Source: valgrind
Binary: valgrind valgrind-dbg valgrind-mpi
Architecture: source amd64
Version: 1:3.8.0-1
Distribution: unstable
Urgency: low
Maintainer: Alessandro Ghedini <ghedo@debian.org>
Changed-By: Alessandro Ghedini <ghedo@debian.org>
Description: 
 valgrind   - instrumentation framework for building dynamic analysis tools
 valgrind-dbg - instrumentation framework for building dynamic analysis tools (de
 valgrind-mpi - instrumentation framework for building dynamic analysis tools (MP
Closes: 489297 493284 655468 661523
Changes: 
 valgrind (1:3.8.0-1) unstable; urgency=low
 .
   * New upstream release
     - Increase maximum allowed alignment for memalign (Closes: #489297)
     - Support for Intel AVX instructions (Closes: #655468)
     - Fix some C++ template symbols demangling (Closes: #493284)
   * Fix debian.supp madness (Closes: #661523):
     - Remove python suppressions from debian.supp
       (already provided by the python package)
     - Remove outdated suppressions from debian.supp
       (i.e. those matching old libraries)
     - Remove useless suppressions and clean-up remaining
   * Update upstream copyright
   * Enable support for mips
   * Drop 06_fix-configure.patch (fixed upstream)
   * Refresh patches
   * Update 07_fix-spelling-in-binary.patch
Checksums-Sha1: 
 d3dd250b2980af2170619c0e27734dd8b8949198 2173 valgrind_3.8.0-1.dsc
 074b09e99b09634f1efa6f7f0f87c7a541fb9b0d 7961355 valgrind_3.8.0.orig.tar.bz2
 01d48c5334aff9e39d16b59a40be6675d7a03c27 30160 valgrind_3.8.0-1.debian.tar.gz
 e2f0126b2796522ed06ef1b1ac7d8e933784fafd 32132436 valgrind_3.8.0-1_amd64.deb
 1e6c4f2e63a7afbac2ed53256c4b6100d6620a78 83727120 valgrind-dbg_3.8.0-1_amd64.deb
 8d029630f56a996526a1cd7f2d94d000b6f1bb62 100094 valgrind-mpi_3.8.0-1_amd64.deb
Checksums-Sha256: 
 0e32c11464decf22c53b3297ae2ed67daf1a68a8c2754e03155fe2d425b06c31 2173 valgrind_3.8.0-1.dsc
 fd16585f209712642ab6baa2b5c57ec1b879ab2ac4653828d82bb7f86ba7208c 7961355 valgrind_3.8.0.orig.tar.bz2
 a036f6dea51e4525f1810915a10c7a54acca2d22354de8e17adbf3d7c45a4cb7 30160 valgrind_3.8.0-1.debian.tar.gz
 50d69b6857b951dbfcaa757f0244fdcb10eed16a024d6cd593079625c7780c1a 32132436 valgrind_3.8.0-1_amd64.deb
 721ce1203d88b068bcabeb015e79fa1a35e3db0761db29f94239dc0127f81220 83727120 valgrind-dbg_3.8.0-1_amd64.deb
 d6c83df52d0b7baaa74904a276cb96d836ffe7a28aac5f9ad0e8b2fd06f59875 100094 valgrind-mpi_3.8.0-1_amd64.deb
Files: 
 24273ffe02d285109f5116d46d36dacd 2173 devel optional valgrind_3.8.0-1.dsc
 ec04dfd1256307432b2a7b520398c526 7961355 devel optional valgrind_3.8.0.orig.tar.bz2
 54ec6ed7ea446618e641638de073ca61 30160 devel optional valgrind_3.8.0-1.debian.tar.gz
 d20ef9ba58fb4a67b60cd1caae00368f 32132436 devel optional valgrind_3.8.0-1_amd64.deb
 9bf41f885c627aa84a9f251bb94be317 83727120 debug extra valgrind-dbg_3.8.0-1_amd64.deb
 d999ed413942dd277f8b94341f111c4b 100094 devel optional valgrind-mpi_3.8.0-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBAgAGBQJQJmHcAAoJEK+lG9bN5XPLuUIP/0GIYd5TzTbU0DQf0ZLCQonD
R+SqxXa/zMGaZyhu4uTAD53n+JZe20CmPnC3wZ9+T3x8jVH+oJR6gFRPyY+gklGw
nqrr1zxso0ooLeA4Hvceu6BOrEFhbe6jjbXmYg54eZg77XVnJmMCxpxuCcGJ0Vyv
pBI5IWY05wrr0qhxMEdzljHlMFJrKuUbSIpl8tTEq4gxgiu/o/T71Z6NQMTe8xue
JQhf1sqQ8Lc4DiuD6eJx4QGxu31FFmad3zcOvM36TDOIggSC6vkCSidcWooEa7ar
HHFFK/bRD4hUVcAmHJmK3p20kj96szMI1rbGU+28TkiOkFkQ8yOFF5yg5mPISU2w
BtDbfdxAqC/RB68zXG/T2oCKsspXSl0du3SsGUGAuCXO6mpweiyB2+Ly9oXB6qsq
HAzYcObz5SndDn+HK2/PTJEZfhw77QM722WhC2mEoOymTzZ2J4S8cVG7nBJSdjTV
edOXuxoEkl/YqbGKPj8++tJAiMCq8AXhgs3VG3gY6dqA4/jXQyY/qZh+oMbeDV1w
7N/AljETubgO8ACuhGRJarqeevOap/7WzYW2ySv2MX78A2SX77BONMnCQsj+oR2f
TjFau1eDyAQ3i5JRRwK3Zu7MMM3/DJ3Q5zS/wyRwdpijiyt3AegQmwi3mbr1ugM4
J1W8CkE7UmUnFYYzpWZx
=bnCq
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 03 Jun 2013 09:30:07 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Mar 7 09:47:40 2024; 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.