First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 110663
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Sparc Porters <sparc@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Paul Forgey <paulf@aphrodite.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
patch unaligned pointer access reading xing headers patch Paul Forgey 2005-12-01 14:02 0000 1.26 KB Details | Diff
mt-daapd-0.2.3-memcpy.patch Unified and cleaned-up patch patch Gustavo Zacarias (RETIRED) 2006-01-03 12:01 0000 927 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 110663 depends on: Show dependency tree
Bug 110663 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-10-27 19:07 0000
I know ~sparc isn't in the keywords probably for a reason, but I actually got
it up and going with a 
patch in "additional information".

I've posted this on mt-daapd's forums so the maintainer is aware.  In the
meantime, you may patch mt-
daapd-0.2.3-r1 to fix two alignment errors.  So far this change allows it to
run on my machine with my 
music files.  Of course there may be other alignment errors lurking in the code
that I am unaware of 
since I don't maintain this software.


Reproducible: Always
Steps to Reproduce:
ebuild mt-daapd-0.2.3-r1.ebuild (since keywords are missing ~sparc I can't
emerge it)
configure it against mp3 files containing xing headers (or at least ones whose
32-bit header data isn't on 
a 4 byte alignment boundary within the file)
run it

Actual Results:  
files containing xing headers cause mt-daapd to crash with a bus error
(alignment exception) due to 
deference of unaligned pointer.


emege info follows patch:

*** mp3-scanner.c.orig  Thu Oct 27 18:34:01 2005
--- mp3-scanner.c   Thu Oct 27 18:32:58 2005
***************
*** 1663,1676 ****
      /* now check for an XING header */
      if(strncasecmp((char*)&buffer[index+fi.xing_offset+4],"XING",4) == 0) {
        DPRINTF(E_DBG,L_SCAN,"Found Xing header\n");
!       xing_flags=*((int*)&buffer[index+fi.xing_offset+4+4]);
        xing_flags=ntohs(xing_flags);

        DPRINTF(E_DBG,L_SCAN,"Xing Flags: %02X\n",xing_flags);

        if(xing_flags & 0x1) {
            /* Frames field is valid... */
!           fi.number_of_frames=*((int*)&buffer[index+fi.xing_offset+4+8]);

            fi.number_of_frames=ntohs(fi.number_of_frames);
        }
--- 1663,1676 ----
      /* now check for an XING header */
      if(strncasecmp((char*)&buffer[index+fi.xing_offset+4],"XING",4) == 0) {
        DPRINTF(E_DBG,L_SCAN,"Found Xing header\n");
!       memcpy (&xing_flags, &buffer[index+fi.xing_offset+4+4], 4);
        xing_flags=ntohs(xing_flags);

        DPRINTF(E_DBG,L_SCAN,"Xing Flags: %02X\n",xing_flags);

        if(xing_flags & 0x1) {
            /* Frames field is valid... */
!             memcpy (&fi.number_of_frames, &buffer[index+fi.xing_offset+4+8], 
);

            fi.number_of_frames=ntohs(fi.number_of_frames);
        }


emerge info:
Portage 2.0.51.22-r3 (default-linux/sparc/sparc64/2005.0, gcc-3.3.5-20050130, 
glibc-2.3.3.20040420-r2, 2.4.31-sparc-r2 sparc64)
===============================================================
==
System uname: 2.4.31-sparc-r2 sparc64 sun4u
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.4.23
ACCEPT_KEYWORDS="sparc"
AUTOCLEAN="yes"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/
qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/
gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="sparc arts avi berkdb bitmap-fonts crypt cups curl dlloader encode esd
fbcon foomaticdb fortran 
gcc64 gdbm gif gnome gtk gtk2 howl imlib jpeg kde libwww mad mikmod motif mpeg
ncurses nls 
oggvorbis opengl oss pam pdflib perl plotutils png python qt readline samba sdl
spell ssl tcpd tiff 
truetype truetype-fonts type1-fonts xml2 xmms xv zlib userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS,
PORTDIR_OVERLAY

------- Comment #1 From Gustavo Zacarias (RETIRED) 2005-11-04 11:42:38 0000 -------
Please attach patches instead of inlining them...

------- Comment #2 From Diego E. 'Flameeyes' Pettenò 2005-12-01 10:56:20 0000 -------
Can you please attach an unified patch? 
 

------- Comment #3 From Paul Forgey 2005-12-01 14:02:36 0000 -------
Created an attachment (id=73909) [details]
unaligned pointer access reading xing headers

------- Comment #4 From Diego E. 'Flameeyes' Pettenò 2005-12-01 14:07:54 0000 -------
Please use diff -ur that's unified diff, simpler to read :) 

------- Comment #5 From Paul Forgey 2005-12-01 14:12:01 0000 -------
I'll do that next time.  In the meantime the only easily accessible record I
have of that diff is what I left in 
this bug report.  Take it or leave it.

------- Comment #6 From Gustavo Zacarias (RETIRED) 2006-01-03 12:01:58 0000 -------
Created an attachment (id=76102) [details]
Unified and cleaned-up patch

Made a clean and unified patch.
Diego: tested here against rhythmbox, if you're ok commit and ~sparc
mt-daapd-0.9.2-r2.

------- Comment #7 From Gustavo Zacarias (RETIRED) 2006-01-03 12:03:13 0000 -------
Oops, i mean 0.2.3-r2 :)
Got that nagging rhythmbox version on my brain.

------- Comment #8 From Diego E. 'Flameeyes' Pettenò 2006-01-04 07:12:11 0000 -------
Committed and ~sparc-ed.

First Last Prev Next    No search results available      Search page      Enter new bug