hdspmixer no longer runs - is terminated due to buffer overflow - may be related to recent gcc-4.5.0 upgrade Reproducible: Always Steps to Reproduce: 1.hdspmixer 2. 3. Actual Results: HDSPMixer 1.6 - Copyright (C) 2003 Thomas Charbonnel <thomas@undata.org> This program comes with ABSOLUTELY NO WARRANTY HDSPMixer is free software, see the file COPYING for details Looking for HDSP cards : Card 0 : HDA Intel at 0xe5100000 irq 30 Card 1 : RME Hammerfall HDSP 9632 at 0xe2000000, irq 21 HDSP 9632 found ! 1 Hammerfall DSP card found. *** buffer overflow detected ***: hdspmixer terminated ======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x37)[0x7fb20bf61a17] /lib/libc.so.6(+0xe4830)[0x7fb20bf5f830] /lib/libc.so.6(+0xe3ba9)[0x7fb20bf5eba9] /lib/libc.so.6(_IO_default_xsputn+0x85)[0x7fb20beeb465] /lib/libc.so.6(_IO_vfprintf+0xfb0)[0x7fb20bebdce0] /lib/libc.so.6(__vsprintf_chk+0x9d)[0x7fb20bf5ec4d] /lib/libc.so.6(__sprintf_chk+0x7f)[0x7fb20bf5eb8f] hdspmixer[0x408c0d] hdspmixer[0x4081e0] hdspmixer[0x407329] hdspmixer[0x403c01] /lib/libc.so.6(__libc_start_main+0xfd)[0x7fb20be99b6d] hdspmixer[0x403969] ======= Memory map: ======== 00400000-00449000 r-xp 00000000 08:31 36115 /usr/bin/hdspmixer 00648000-00649000 r--p 00048000 08:31 36115 /usr/bin/hdspmixer 00649000-0065a000 rw-p 00049000 08:31 36115 /usr/bin/hdspmixer 01713000-01797000 rw-p 00000000 00:00 0 [heap] 7fb20b64b000-7fb20b650000 r-xp 00000000 08:31 3198 /usr/lib64/libXdmcp.so.6.0.0 7fb20b650000-7fb20b84f000 ---p 00005000 08:31 3198 /usr/lib64/libXdmcp.so.6.0.0 7fb20b84f000-7fb20b850000 r--p 00004000 08:31 3198 /usr/lib64/libXdmcp.so.6.0.0 7fb20b850000-7fb20b851000 rw-p 00005000 08:31 3198 /usr/lib64/libXdmcp.so.6.0.0 7fb20b851000-7fb20b853000 r-xp 00000000 08:31 4216 /usr/lib64/libXau.so.6.0.0 7fb20b853000-7fb20ba53000 ---p 00002000 08:31 4216 /usr/lib64/libXau.so.6.0.0 7fb20ba53000-7fb20ba54000 r--p 00002000 08:31 4216 /usr/lib64/libXau.so.6.0.0 7fb20ba54000-7fb20ba55000 rw-p 00003000 08:31 4216 /usr/lib64/libXau.so.6.0.0 7fb20ba55000-7fb20ba71000 r-xp 00000000 08:31 33722 /usr/lib64/libxcb.so.1.1.0 7fb20ba71000-7fb20bc70000 ---p 0001c000 08:31 33722 /usr/lib64/libxcb.so.1.1.0 7fb20bc70000-7fb20bc71000 r--p 0001b000 08:31 33722 /usr/lib64/libxcb.so.1.1.0 7fb20bc71000-7fb20bc72000 rw-p 0001c000 08:31 33722 /usr/lib64/libxcb.so.1.1.0 7fb20bc72000-7fb20bc7a000 r-xp 00000000 08:02 786945 /lib64/librt-2.11.1.so 7fb20bc7a000-7fb20be79000 ---p 00008000 08:02 786945 /lib64/librt-2.11.1.so 7fb20be79000-7fb20be7a000 r--p 00007000 08:02 786945 /lib64/librt-2.11.1.so 7fb20be7a000-7fb20be7b000 rw-p 00008000 08:02 786945 /lib64/librt-2.11.1.so 7fb20be7b000-7fb20bfd0000 r-xp 00000000 08:02 787350 /lib64/libc-2.11.1.so 7fb20bfd0000-7fb20c1d0000 ---p 00155000 08:02 787350 /lib64/libc-2.11.1.so 7fb20c1d0000-7fb20c1d4000 r--p 00155000 08:02 787350 /lib64/libc-2.11.1.so 7fb20c1d4000-7fb20c1d5000 rw-p 00159000 08:02 787350 /lib64/libc-2.11.1.so 7fb20c1d5000-7fb20c1da000 rw-p 00000000 00:00 0 7fb20c1da000-7fb20c1ef000 r-xp 00000000 08:02 655743 /lib64/libgcc_s.so.1 7fb20c1ef000-7fb20c3ee000 ---p 00015000 08:02 655743 /lib64/libgcc_s.so.1 7fb20c3ee000-7fb20c3ef000 r--p 00014000 08:02 655743 /lib64/libgcc_s.so.1 7fb20c3ef000-7fb20c3f0000 rw-p 00015000 08:02 655743 /lib64/libgcc_s.so.1 7fb20c3f0000-7fb20c4dc000 r-xp 00000000 08:31 655523 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/libstdc++.so.6.0.14 7fb20c4dc000-7fb20c6dc000 ---p 000ec000 08:31 655523 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/libstdc++.so.6.0.14 7fb20c6dc000-7fb20c6e4000 r--p 000ec000 08:31 655523 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/libstdc++.so.6.0.14 7fb20c6e4000-7fb20c6e6000 rw-p 000f4000 08:31 655523 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.5.0/libstdc++.so.6.0.14 7fb20c6e6000-7fb20c6fb000 rw-p 00000000 00:00 0 7fb20c6fb000-7fb20c834000 r-xp 00000000 08:31 4599 /usr/lib64/libX11.so.6.3.0 7fb20c834000-7fb20ca34000 ---p 00139000 08:31 4599 /usr/lib64/libX11.so.6.3.0 7fb20ca34000-7fb20ca35000 r--p 00139000 08:31 4599 /usr/lib64/libX11.so.6.3.0 7fb20ca35000-7fb20ca3a000 rw-p 0013a000 08:31 4599 /usr/lib64/libX11.so.6.3.0 7fb20ca3a000-7fb20ca4b000 r-xp 00000000 08:31 4137 /usr/lib64/libXext.so.6.4.0 7fb20ca4b000-7fb20cc4b000 ---p 00011000 08:31 4137 /usr/lib64/libXext.so.6.4.0 7fb20cc4b000-7fb20cc4c000 r--p 00011000 08:31 4137 /usr/lib64/libXext.so.6.4.0 7fb20cc4c000-7fb20cc4d000 rw-p 00012000 08:31 4137 /usr/lib64/libXext.so.6.4.0 7fb20cc4d000-7fb20ccee000 r-xp 00000000 08:31 6470 /usr/lib64/fltk-1.1/libfltk.so.1.1 7fb20ccee000-7fb20ceed000 ---p 000a1000 08:31 6470 /usr/lib64/fltk-1.1/libfltk.so.1.1 7fb20ceed000-7fb20cef1000 r--p 000a0000 08:31 6470 /usr/lib64/fltk-1.1/libfltk.so.1.1 7fb20cef1000-7fb20cef6000 rw-p 000a4000 08:31 6470 /usr/lib64/fltk-1.1/libfltk.so.1.1 7fb20cef6000-7fb20cefb000 rw-p 00000000 00:00 0 7fb20cefb000-7fb20cf7c000 r-xp 00000000 08:02 786617 /lib64/libm-2.11.1.so 7fb20cf7c000-7fb20d17b000 ---p 00081000 08:02 786617 /lib64/libm-2.11.1.so 7fb20d17b000-7fb20d17c000 r--p 00080000 08:02 786617 /lib64/libm-2.11.1.so 7fb20d17c000-7fb20d17d000 rw-p 00081000 08:02 786617 /lib64/libm-2.11.1.so 7fb20d17d000-7fb20d194000 r-xp 00000000 08:02 786675 /lib64/libpthread-2.11.1.so 7fb20d194000-7fb20d394000 ---p 00017000 08:02 786675 /lib64/libpthread-2.11.1.so 7fb20d394000-7fb20d395000 r--p 00017000 08:02 786675 /lib64/libpthread-2.11.1.so 7fb20d395000-7fb20d396000 rw-p 00018000 08:02 786675 /lib64/libpthread-2.11.1.so 7fb20d396000-7fb20d39a000 rw-p 00000000 00:00 0 7fb20d39a000-7fb20d39c000 r-xp 00000000 08:02 786956 /lib64/libdl-2.11.1.so 7fb20d39c000-7fb20d59c000 ---p 00002000 08:02 786956 /lib64/libdl-2.11.1.so 7fb20d59c000-7fb20d59d000 r--p 00002000 08:02 786956 /lib64/libdl-2.11.1.so 7fb20d59d000-7fb20d59e000 rw-p 00003000 08:02 786956 /lib64/libdl-2.11.1.so 7fb20d59e000-7fb20d66d000 r-xp 00000000 08:31 8524 /usr/lib64/libasound.so.2.0.0 7fb20d66d000-7fb20d86c000 ---p 000cf000 08:31 8524 /usr/lib64/libasound.so.2.0.0 7fb20d86c000-7fb20d872000 r--p 000ce000 08:31 8524 /usr/lib64/libasound.so.2.0.0 7fb20d872000-7fb20d874000 rw-p 000d4000 08:31 8524 /usr/lib64/libasound.so.2.0.0 7fb20d874000-7fb20d892000 r-xp 00000000 08:02 786937 /lib64/ld-2.11.1.soAborted Expected Results: normal operation emerge --info Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.5.0, glibc-2.11.1-r0, 2.6.33-gentoo-r1 x86_64) ================================================================= System uname: Linux-2.6.33-gentoo-r1-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-gentoo-2.0.1 Timestamp of tree: Thu, 29 Apr 2010 22:45:01 +0000 app-shells/bash: 4.1_p5 dev-java/java-config: 2.1.11 dev-lang/python: 2.6.5-r1, 3.1.2-r2 dev-util/cmake: 2.8.1-r1 sys-apps/baselayout: 2.0.1 sys-apps/openrc: 0.6.1-r1 sys-apps/sandbox: 2.2 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.20.51.0.8 sys-devel/gcc: 4.5.0 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.33 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -O2 -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://gentoo.mirrors.tds.net/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://gentoo.chem.wisc.edu/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,--as-needed" LINGUAS="en_US en" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/gnome /var/lib/layman/gcc-porting /usr/local/portage" SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage" USE="X a52 aac aalib acl acpi addressbook alsa amd64 amr apache2 audiofile avahi avi bash-completion berkdb bzip2 cairo caps cdaudio cddb cdparanoia cdr chm cli consolekit cracklib crypt cups curl cxx dbus designer-plugin devicekit djvu dri dts dv dvb dvd dvdr dvdread ebook encode exif fam ffmpeg flac fortran gdbm gif glitz gmp gnome gphoto2 gpm gps graphite gstreamer gtk gtk2 htmlhandbook iconv icu ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k kpathsea lame lcd lcms ldap libffi libnotify mad marble midi mmap mmx modules mozcalendar mozilla mp3 mudflap multilib musicbrainz ncurses nepomuk nls nodrm nptl nptlonly nsplugin nvidia ofx ogg oggvorbis opencore-amr openexr opengl openmp pam pcre pdf perl png policykit pppd pulseaudio python qt3 qt3support qt4 quicktime readline reflection samba sasl scanner sdl semantic-desktop session slp smp sndfile spell spl sse sse2 ssl subversion svg sysfs tcltk theora threads tiff tk transparency truetype unicode usb utf8 v4l v4l2 vcd vim-syntax vorbis wav wavpack wmf x264 xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="*" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Adding that hdspmixer is built from media-sound/alsa-tools using the fltk USE flag and ALSA_CARDS="hdsp".
Please paste your "emerge -pv media-sound/alsa-tools" output. Also try to recompile alsa-tools with CFLAGS="-march=native -O2 -pipe" only.
emerge -pv media-sound/alsa-tools These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] media-sound/alsa-tools-1.0.23 USE="fltk gtk" ALSA_CARDS="hdsp -darla20 -darla24 -echo3g -emu10k1 -emu10k1x -gina20 -gina24 -hdspm -ice1712 -indigo -indigoio -layla20 -layla24 -mia -mixart -mona -pcxhr -rme32 -rme96 -sb16 -sbawe -sscape -usb-usx2y -vx222" 0 kB
(In reply to comment #2) > recompile alsa-tools with CFLAGS="-march=native -O2 -pipe" only. No change. Actually am conservative in this area - only use: CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
The RME card is totally unusable without hdspmixer (no output).
Unless you have a patch, this really should be reported upstream. If you want me to take a look at it, then I'll need a proper backtrace (using gdb, no -fomit-frame-pointer and at least -ggdb -g, with -ggdb -g2 preferred) as I don't have the hardware.
Created attachment 233547 [details, diff] patch to fix this bug Seems upstream had a patch. alsa-tools-1.0.23-hdspmixer.patch
Created attachment 233549 [details, diff] ebuild diff to apply patch
link to upstream bug: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5006
reported version in comment #3 media-sound/alsa-tools-1.0.23 this appears to be applied upstream but cannot browse a cvs to confirm current version of alsa-tools ~amd64 is 1.0.24.1 Not sure I have the hardware to test this though. Maybe the reporter could test 1.0.24.1 and inform if fixed?
This bug as well as bug #358765 are fixed in 1.0.24.2 which is not released yet. I tossed together an ebuild to build from the git repository and all seems to work fine. It appears the only difference in the current git repository (which hopefully will be released soon as 1.0.24.2) and 1.0.24.1 are the hdspconf and hdspmixer fixes. See: http://git.alsa-project.org/?p=alsa-tools.git;a=summary
This relates most likely to a recent glibc update. Even 2.0.24.1 does not work for me - no buffer overflow but hdspmixer can`t initialize the RME card. For me personally i fixed the issue with the git version. Pls also see here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=641351 Regards Martin
I had this issue on 2 machines and I can confirm, that this is caused by the recent gcc-4.5 upgrade. On my 2nd computer I did not recompile -e world at fist and hdspmixer still worked. After recompiling the whole system (without any package changes) hdspmixer ran into the buffer overflow. Because this is a showstopper, which makes RME hardware useless, I compiled a git version of hdspmixer as a workaround. The git version fixes the problem.
+*alsa-tools-1.0.25 (08 Feb 2012) + + 08 Feb 2012; Tony Vroon <chainsaw@gentoo.org> +alsa-tools-1.0.25.ebuild: + Version bump. Contains major hdspmixer fixes, among which a buffer overflow + and a failure to detect some RME hardware. Closes bug #317919 & #358765, both + by Chris Smith.