Debian Bug report logs - #212570
libsdl-net1.2-dev: bad aligned access considerations on ARM

version graph

Package: libsdl-net1.2-dev; Maintainer for libsdl-net1.2-dev is Debian SDL packages maintainers <pkg-sdl-maintainers@lists.alioth.debian.org>; Source for libsdl-net1.2-dev is src:sdl-net1.2 (PTS, buildd, popcon).

Reported by: Sam Hocevar <sam@zoy.org>

Date: Wed, 24 Sep 2003 13:33:14 UTC

Severity: important

Tags: patch, upstream

Found in version 1.2.5-2

Fixed in version sdl-net1.2/1.2.5-3

Done: Mike Furr <mfurr@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Mike Furr <mfurr@debian.org>:
Bug#212570; Package libsdl-net1.2-dev. (full text, mbox, link).


Acknowledgement sent to Sam Hocevar <sam@zoy.org>:
New Bug report received and forwarded. Copy sent to Mike Furr <mfurr@debian.org>. (full text, mbox, link).


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

From: Sam Hocevar <sam@zoy.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libsdl-net1.2-dev: bad aligned access considerations on ARM
Date: Wed, 24 Sep 2003 15:31:22 +0200
Package: libsdl-net1.2-dev
Version: 1.2.5-2 (not installed)
Severity: important
Tags: upstream patch

   /usr/include/SDL/SDL_net.h has the following code:

/* Warning, some systems have data access alignment restrictions */
#if defined(sparc) || defined(mips)
...

   ARM CPUs like my iPaq's fail on unaligned reads as well. See the
following code for instance:

int main(void) {
   char foo[3] = { 0, 0, 0 }; *(short *)(foo+1) = 0x1234;
   printf("%.2x %.2x %.2x\n", foo[0], foo[1], foo[2]);
}

   On an x86 CPU it outputs the following:

00 34 12

   But on my ARM iPaq I get:

34 12 00

   So the above lines in /usr/include/SDL/SDL_net.h should be changed to
this:

/* Warning, some systems have data access alignment restrictions */
#if defined(sparc) || defined(mips) || defined(__arm__)
...

   Moreover, AFAIK unaligned reads are always decomposed into two
aligned reads on modern CPUs. I think it would be wise to drop them
completely and always set SDL_DATA_ALIGNED to 1.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux c18 2.4.21-rc5 #2 Wed May 28 22:10:14 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=fr_FR




Reply sent to Mike Furr <mfurr@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Sam Hocevar <sam@zoy.org>:
Bug acknowledged by developer. (full text, mbox, link).


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

From: Mike Furr <mfurr@debian.org>
To: 212570-close@bugs.debian.org
Subject: Bug#212570: fixed in sdl-net1.2 1.2.5-3
Date: Tue, 07 Oct 2003 23:32:11 -0400
Source: sdl-net1.2
Source-Version: 1.2.5-3

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

libsdl-net1.2-dev_1.2.5-3_i386.deb
  to pool/main/s/sdl-net1.2/libsdl-net1.2-dev_1.2.5-3_i386.deb
libsdl-net1.2_1.2.5-3_i386.deb
  to pool/main/s/sdl-net1.2/libsdl-net1.2_1.2.5-3_i386.deb
sdl-net1.2_1.2.5-3.diff.gz
  to pool/main/s/sdl-net1.2/sdl-net1.2_1.2.5-3.diff.gz
sdl-net1.2_1.2.5-3.dsc
  to pool/main/s/sdl-net1.2/sdl-net1.2_1.2.5-3.dsc



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

Debian distribution maintenance software
pp.
Mike Furr <mfurr@debian.org> (supplier of updated sdl-net1.2 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: Tue,  7 Oct 2003 23:15:39 -0400
Source: sdl-net1.2
Binary: libsdl-net1.2-dev libsdl-net1.2
Architecture: source i386
Version: 1.2.5-3
Distribution: unstable
Urgency: low
Maintainer: Mike Furr <mfurr@debian.org>
Changed-By: Mike Furr <mfurr@debian.org>
Description: 
 libsdl-net1.2 - network library for Simple DirectMedia Layer
 libsdl-net1.2-dev - Development files for SDL network library
Closes: 209732 212570
Changes: 
 sdl-net1.2 (1.2.5-3) unstable; urgency=low
 .
   * Improved the package description (Closes: 209732)
   * Added ARM to list in SDL_net.h of CPU's that are have data alignment
     issues.  (Closes: 212570) [also forwared this upstream]
Files: 
 8840f08a6006225748f163f469b24cf0 632 libs optional sdl-net1.2_1.2.5-3.dsc
 c0be3fb65f41670182c65ff774b1861e 19995 libs optional sdl-net1.2_1.2.5-3.diff.gz
 66d9925db614790c0b5bba44977748d2 15070 libdevel optional libsdl-net1.2-dev_1.2.5-3_i386.deb
 56809e52307e6df005d7161a18400de5 9832 libs optional libsdl-net1.2_1.2.5-3_i386.deb

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

iD8DBQE/g4Mv7ZPKKRJLJvMRAresAJ97pKhtnBrG6PyVsW9UMnPpwpG0RQCfSsow
0M5v+LTdxnHBe4rMewinqhg=
=25Fo
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 08:33:43 2023; Machine Name: bembo

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.