Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
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
Please attach patches instead of inlining them...
Can you please attach an unified patch?
Created an attachment (id=73909) [details] unaligned pointer access reading xing headers
Please use diff -ur that's unified diff, simpler to read :)
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.
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.
Oops, i mean 0.2.3-r2 :) Got that nagging rhythmbox version on my brain.
Committed and ~sparc-ed.