[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#215448: marked as done (di_mem_chunk_alloc() should return sizeof(long) or better alignment)



Your message dated Mon, 26 Jan 2004 00:19:34 -0500
with message-id <E1Akz9q-0007q5-00@auric.debian.org>
and subject line Bug#215448: fixed in libdebian-installer 0.18
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Oct 2003 21:24:27 +0000
>From rhirst@linuxcare.com Sun Oct 12 16:24:26 2003
Return-path: <rhirst@linuxcare.com>
Received: from pc1-hem11-4-cust109.lutn.cable.ntl.com (thinkpad.home) [80.2.252.109] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1A8nhR-0003Zz-00; Sun, 12 Oct 2003 16:24:25 -0500
Received: by thinkpad.home (Postfix, from userid 1000)
	id C4BB49E718; Sun, 12 Oct 2003 21:58:50 +0100 (BST)
Date: Sun, 12 Oct 2003 21:58:50 +0100
From: Richard Hirst <rhirst@linuxcare.com>
To: submit@bugs.debian.org
Subject: di_mem_chunk_alloc() should return sizeof(long) or better alignment
Message-ID: <20031012205850.GD2243@sleepie.demon.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-6.5 required=4.0
	tests=BAYES_01,HAS_PACKAGE
	version=2.53-bugs.debian.org_2003_10_09
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_09 (1.174.2.15-2003-03-30-exp)

package: libdebian-installer
version: cvs
tags: d-i

di_mem_chunk_alloc() returns 4 byte aligned areas, even on 64 bit
platforms.  This is bad, when the caller is going to lay some struct
containing longs or pointers over the alloc-ed memory.  On ia64 it
results in loads of unaligned access exceptions flooding dmesg.

Alloc-ed memory comes from the mem[] array in the following struct
(from src/mem.c):

struct di_mem_area
{
  di_mem_area *next;           /**< the next mem area */
  di_mem_area *prev;           /**< the previous mem area */
  di_ksize_t index;            /**< the current index into the "mem" array */
  di_ksize_t free;             /**< the number of free bytes in this mem area */
  di_ksize_t allocated;        /**< the number of atoms allocated from this area */
  char mem[MEM_AREA_SIZE];     /**< the mem array from which atoms get allocated
                                *   the actual size of this array is determined by
                                *   the mem chunk "area_size". ANSI says that it
                                *   must be declared to be the maximum size it
                                *   can possibly be (even though the actual size
                                *   may be less).
                                */
};


given:

include/debian-installer/types.h:typedef uint32_t di_ksize_t

the above array comes out at 4 byte alignment.

We need to make mem[] aligned(MEM_ALIGN).

I also wonder about MEM_AREA_SIZE being hardwired at 4, although I
didn't dig in to the code far enough to see if it should be 8 on 64 bit
platforms.


---------------------------------------
Received: (at 215448-close) by bugs.debian.org; 26 Jan 2004 05:21:25 +0000
>From rdonald@auric.debian.org Sun Jan 25 21:21:25 2004
Return-path: <rdonald@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AkzBd-0005Hf-00; Sun, 25 Jan 2004 21:21:25 -0800
Received: from rdonald by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 1Akz9q-0007q5-00; Mon, 26 Jan 2004 00:19:34 -0500
From: Bastian Blank <waldi@debian.org>
To: 215448-close@bugs.debian.org
X-Katie: lisa $Revision: 1.26 $
Subject: Bug#215448: fixed in libdebian-installer 0.18
Message-Id: <E1Akz9q-0007q5-00@auric.debian.org>
Sender: Randall Donald <rdonald@auric.debian.org>
Date: Mon, 26 Jan 2004 00:19:34 -0500
Delivered-To: 215448-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_01_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=no 
	version=2.60-bugs.debian.org_2004_01_25
X-Spam-Level: 

Source: libdebian-installer
Source-Version: 0.18

We believe that the bug you reported is fixed in the latest version of
libdebian-installer, which is due to be installed in the Debian FTP archive:

libdebian-installer-extra4-udeb_0.18_i386.udeb
  to pool/main/libd/libdebian-installer/libdebian-installer-extra4-udeb_0.18_i386.udeb
libdebian-installer-extra4_0.18_i386.deb
  to pool/main/libd/libdebian-installer/libdebian-installer-extra4_0.18_i386.deb
libdebian-installer4-dev_0.18_i386.deb
  to pool/main/libd/libdebian-installer/libdebian-installer4-dev_0.18_i386.deb
libdebian-installer4-udeb_0.18_i386.udeb
  to pool/main/libd/libdebian-installer/libdebian-installer4-udeb_0.18_i386.udeb
libdebian-installer4_0.18_i386.deb
  to pool/main/libd/libdebian-installer/libdebian-installer4_0.18_i386.deb
libdebian-installer_0.18.dsc
  to pool/main/libd/libdebian-installer/libdebian-installer_0.18.dsc
libdebian-installer_0.18.tar.gz
  to pool/main/libd/libdebian-installer/libdebian-installer_0.18.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 215448@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bastian Blank <waldi@debian.org> (supplier of updated libdebian-installer 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.7
Date: Wed, 21 Jan 2004 17:56:11 +0100
Source: libdebian-installer
Binary: libdebian-installer4 libdebian-installer-extra4 libdebian-installer4-udeb libdebian-installer-extra4-udeb libdebian-installer4-dev
Architecture: source i386
Version: 0.18
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Bastian Blank <waldi@debian.org>
Description: 
 libdebian-installer-extra4 - Library of some extra debian-installer functions
 libdebian-installer-extra4-udeb - Library of some extra debian-installer functions (udeb)
 libdebian-installer4 - Library of common debian-installer functions
 libdebian-installer4-dev - Library of common debian-installer functions
 libdebian-installer4-udeb - Library of common debian-installer functions (udeb)
Closes: 215448 219464 219902
Changes: 
 libdebian-installer (0.18) unstable; urgency=low
 .
   * Alastair McKinstry
     - Add di_info(), di_debug() logging macros.
   * Bastian Blank
     - Bump revision to 1.
     - Remove mapping of di_log.
     - Add any symbol to the version script.
     - Use size_t in hash map and mem_chunk allocer. (closes: #215448)
     - Improve and install documentation.
     - Add -extra lib.
     - Fix description parsing. (closes: #219902)
     - Remove some references to the chunk allocator.
     - Add version info to installed headers.
     - Default log handler suppress debug messages.
     - Enable support for Subarchitecure.
     - Correctly terminate argv.
   * Petter Reinholdtsen
     - Define PATH_MAX if it is undefined, to get this building on
       GNU/Hurd.  Patch from Santiago Vila. (Closes: #219464)
   * Matt Kraai
     - Prefer a package that is installed to one that isn't when satisfying
       a dependency on a virtual package.
Files: 
 6d1e004a3aa52842f99e95e837b024ef 873 libs optional libdebian-installer_0.18.dsc
 55f364c1f4eea58d71c8083e6aee528e 337873 libs optional libdebian-installer_0.18.tar.gz
 5985af9c9e0ae1be02459f3d2d9d85d4 18320 libs optional libdebian-installer4_0.18_i386.deb
 047cc0c584ff2ebeea80f46ed789ad86 90652 libdevel optional libdebian-installer4-dev_0.18_i386.deb
 7c0d321f150f7b48d4414983c41514cf 7132 libs optional libdebian-installer-extra4_0.18_i386.deb
 8164fccd850850dc0de7aa06032fd820 14978 debian-installer optional libdebian-installer4-udeb_0.18_i386.udeb
 1b17a60036b729cc73b72b380fa0ba3f 3788 debian-installer optional libdebian-installer-extra4-udeb_0.18_i386.udeb

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

iEYEARECAAYFAkASu8kACgkQLkAIIn9ODhEjXwCgpnKYXsjBMzjyvcRTdcrbNOf0
ZfEAoN1jj2d0/S9kC47skTrTzBvuY3Hu
=afo5
-----END PGP SIGNATURE-----



Reply to: