Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 307563 - media-plugins/ladspa-cmt: strict aliasing issues (was: needs to filter out -O2 optimization)
Summary: media-plugins/ladspa-cmt: strict aliasing issues (was: needs to filter out -O...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Professional Audio Applications Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-03 05:40 UTC by Reuben Martin
Modified: 2013-01-28 03:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Reuben Martin 2010-03-03 05:40:35 UTC
the freeverb element of the ladspa-cmt plugin set will not work correctly when compiled with the -O2 optimization. Currently the ebuild filters out the -O3 option, but the maths in this plugin are rather fragile and even -O2 is too much. 

Have tested it with -O1 and it works fine.

Reproducible: Always
Comment 1 Thomas Sachau gentoo-dev 2010-03-12 15:50:19 UTC
Please add your "emerge --info", "emerge -pv ladspa-cmt" and the exact issues you see or had.
Comment 2 Reuben Martin 2010-03-12 23:41:20 UTC
On a windows machine right now, so can't post emerge info.

This is not a build issue, but a run-time problem. Built with -O2 or higher (amd64) the freeverb ladspa plugin doesn't really do anything. Audio passes through it a little bit distorted, but that's about it. Build with -O1 the plugin processes audio properly.
Comment 3 Thomas Sachau gentoo-dev 2010-03-14 16:15:28 UTC
Just a reminder: Please append "emerge --info" and "emerge -pv ladspa-cmt" to get this bug further processed.
Comment 4 Reuben Martin 2010-03-14 22:59:31 UTC
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop, gcc-4.4.3, glibc-2.11-r1, 2.6.32-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r2-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.0.1
Timestamp of tree: Sat, 13 Mar 2010 21:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p2
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.0-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.0-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1
sys-devel/gcc:       4.3.4, 4.4.3
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="-O2 -march=amdfam10 -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
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/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=amdfam10 -mfpmath=sse -ftree-vectorize -fomit-frame-pointer -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ http://gentoo.osuosl.org/ ftp://mirror.its.uidaho.edu/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirror.its.uidaho.edu/pub/gentoo/ ftp://lug.mtu.edu/gentoo/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo "
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j5"
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="/usr/portage-local/custom /usr/portage-local/layman/pro-audio"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 apache2 audiofile avahi berkdb bluetooth branding bzip2 cairo caps cdda cdparanoia cdr cli clucene consolekit cracklib crypt css cups curl curlwrappers cxx dbus device-mapper dri dssi dts dv dvd dvdr eds emboss encode evo exif fam fbcon fbcondecor ffmpeg fftw firefox flac fontconfig fortran gallium gdbm gif gimp git gnome gnutls gpac gpm gstreamer gtk gtkhtml hal handbook iconv ieee1394 imagemagick imap ipv6 jabber jack jackmidi javascript jbig jingle jpeg jpeg2k kde kdehiddenvisibility kontact kvm ladspa lame lash latex lcms ldap libgda libnotify libsamplerate libwww lm_sensors lv2 lzma lzo mad maildir matroska midi mime mmap mmx mmxext mng modplug modules mp3 mp4 mpeg mpi mplayer mudflap multilib ncurses networkmanager nls nptl nptlonly nsplugin odbc ogg ogm opencl openexr opengl openmp osc pam pango pcre pdf perl phonon plasma png policykit posix ppds pppd pulseaudio python qt3support qt4 quicktime raw readline recode reflection rss rubberband ruby sdl semantic-desktop session sharedmem slp smp sndfile sox speex spell spl sqlite sqlite3 sse sse2 ssl ssse3 startup-notification subversion svg sysfs syslog sysvipc tcpd theora threads thunar tidy tiff truetype unicode usb vdpau vorbis webkit wmf x264 xattr xcb xcomposite xft xine xinerama xml xorg xosd xulrunner xv xvid xvmc yv12 zeroconf zlib" ALSA_CARDS="rme96 loopback virmidi" 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau fbdev" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


[ebuild   R   ] media-libs/ladspa-cmt-1.16  0 kB
Comment 5 Alexis Ballier gentoo-dev 2010-06-25 12:13:41 UTC
most likely due to:
 * QA Notice: Package has poor programming practices which may compile
 *            fine but exhibit random runtime failures.
 * freeverb/Components/allpass.h:36:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/comb.h:41:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/comb.h:44:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/comb.h:41:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/comb.h:44:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/allpass.h:36:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/comb.h:41:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/comb.h:44:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
 * freeverb/Components/allpass.h:36:2: warning: dereferencing type-punned pointer will break strict-aliasing rules



better fixing it (or, at worse, using fno-strict-aliasing) than filtering -O2...
Comment 6 Alexis Ballier gentoo-dev 2012-11-27 12:08:43 UTC
should be fixed in ladspa-cmt-1.16-r2, please test
Comment 7 Reuben Martin 2013-01-28 03:08:30 UTC
Sorry I must have totally blown over the email about this patch. I found today that this completely hoses the freeverb component. With the new patch, it doesn't do anything at all. (Just passes dry signal through, no wet signal)

Built ladspa-cmt-1.16-r2 with "-O1 -march=native pipe" as CXXFLAGS, and it works again.