Your message dated Tue, 27 Aug 2019 23:11:40 +0200 with message-id <20190827211140.GA3856@ramacher.at> and subject line Re: Bug#898330: vlc: Building package with address sanitizer fails has caused the Debian Bug report #898330, regarding vlc: Building package with address sanitizer fails to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 898330: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898330 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: vlc: Building package with address sanitizer fails
- From: Vincas Dargis <vindrg@gmail.com>
- Date: Thu, 10 May 2018 06:43:34 -0400
- Message-id: <152594901433.4237.4169961872195598268.reportbug@debian.admin1>
Package: src:vlc Version: 2.2.7-1~deb9u1 Severity: normal Dear Maintainer, I wanted to build vlc with address sanitizer enabled to catch some strange crashes, but strangely ASAN interferes with build process. If I export these variables: export DEB_BUILD_MAINT_OPTIONS=sanitize=+address,+undefined export DEB_GUILD_OPTIONS=nocheck and run: dpkg-buildpackage -rfakeroot -uc -us -j4 I get this: ``` libtool: link: gcc -DTOP_BUILDDIR=\"/home/admin1/Desktop/vlc/vlc-2.2.7\" -DTOP_SRCDIR=\"/home/admin1/Desktop/vlc/vlc-2.2.7\" -g -O2 -fdebug-prefix-map=/home/admin1/Desk top/vlc/vlc-2.2.7=. -fsanitize=address -fno-omit-frame-pointer -fsanitize=undefined -fstack-protector-strong -Wformat -Werror=format-security -Wall -Wextra -Wsign-compa re -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hid den -O4 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -funroll-loops -fomit-frame-pointer -fsanitize=address -fs anitize=undefined -Wl,-z -Wl,relro -o vlc-static vlc_static-vlc.o vlc_static-override.o -Wl,--as-needed ../lib/.libs/libvlc.so /home/admin1/Desktop/vlc/vlc-2.2.7/src/. libs/libvlccore.so -lrt -lidn -ldbus-1 -lm -lpthread -ldl -Wl,-rpath -Wl,/home/admin1/Desktop/vlc/vlc-2.2.7/lib/.libs -Wl,-rpath -Wl,/home/admin1/Desktop/vlc/vlc-2.2.7/ src/.libs ================================================================= ==8337==ERROR: LeakSanitizer: detected memory leaks Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x7fee31fd2d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28) #1 0x7fee15525678 (<unknown module>) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee226ce4df (<unknown module>) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee18adf4df (<unknown module>) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee29dba4df (/usr/lib/x86_64-linux-gnu/libX11.so.6+0x274df) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee173584df (<unknown module>) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee17c794df (<unknown module>) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee250ae4df (/usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5+0x40d4df) Indirect leak of 12384 byte(s) in 6 object(s) allocated from: #0 0x7fee31fd2ed0 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1ed0) #1 0x7fee152c64df (<unknown module>) ``` Then I though I could workaround with: export ASAN_OPTIONS=detect_leaks=0 But then I get "ASan runtime does not come first in initial library list": ``` libtool: install: /usr/bin/install -c .libs/libvlc.lai /home/admin1/Desktop/vlc/vlc-2.2.7/debian/tmp/usr/lib/x86_64-linux-gnu/libvlc.la libtool: warning: remember to run 'libtool --finish /usr/lib/x86_64-linux-gnu' make[5]: Leaving directory '/home/admin1/Desktop/vlc/vlc-2.2.7/lib' make[4]: Leaving directory '/home/admin1/Desktop/vlc/vlc-2.2.7/lib' make[3]: Leaving directory '/home/admin1/Desktop/vlc/vlc-2.2.7/lib' Making install in bin make[3]: Entering directory '/home/admin1/Desktop/vlc/vlc-2.2.7/bin' rm -f ../modules/plugins.dat if test "x86_64-pc-linux-gnu" = "x86_64-pc-linux-gnu"; then \ ./vlc-cache-gen ../modules ; \ else \ echo "Cross-compilation: cache generation skipped!" ; \ fi ==23576==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. Makefile:1527: recipe for target '../modules/plugins.dat' failed make[3]: *** [../modules/plugins.dat] Error 1 make[3]: Leaving directory '/home/admin1/Desktop/vlc/vlc-2.2.7/bin' Makefile:2266: recipe for target 'install-recursive' failed make[2]: *** [install-recursive] Error 1 make[2]: Leaving directory '/home/admin1/Desktop/vlc/vlc-2.2.7' Makefile:2732: recipe for target 'install' failed make[1]: *** [install] Error 2 make[1]: Leaving directory '/home/admin1/Desktop/vlc/vlc-2.2.7' dh_auto_install: make -j5 install DESTDIR=/home/admin1/Desktop/vlc/vlc-2.2.7/debian/tmp AM_UPDATE_INFO_DIR=no returned exit code 2 debian/rules:337: recipe for target 'binary' failed make: *** [binary] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 ``` Then tried: export ASAN_OPTIONS=halt_on_error=0,detect_leaks=0 but with no help. -- System Information: Debian Release: 9.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable-debug'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.16.0-0.bpo.1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages vlc depends on: ii dpkg 1.18.24 ii vlc-bin 2.2.7-1~deb9u1 ii vlc-l10n 2.2.7-1~deb9u1 ii vlc-plugin-base 2.2.7-1~deb9u1 ii vlc-plugin-qt 2.2.7-1~deb9u1 ii vlc-plugin-video-output 2.2.7-1~deb9u1 Versions of packages vlc recommends: ii vlc-plugin-notify 2.2.7-1~deb9u1 ii vlc-plugin-samba 2.2.7-1~deb9u1 ii vlc-plugin-skins2 2.2.7-1~deb9u1 ii vlc-plugin-video-splitter 2.2.7-1~deb9u1 ii vlc-plugin-visualization 2.2.7-1~deb9u1 vlc suggests no packages. Versions of packages libvlc-bin depends on: ii libc6 2.24-11+deb9u3 ii libvlc5 2.2.7-1~deb9u1 Versions of packages libvlc5 depends on: ii dpkg 1.18.24 ii libc6 2.24-11+deb9u3 ii libvlccore8 2.2.7-1~deb9u1 Versions of packages libvlc5 recommends: ii libvlc-bin 2.2.7-1~deb9u1 Versions of packages libvlccore8 depends on: ii dpkg 1.18.24 ii libc6 2.24-11+deb9u3 ii libdbus-1-3 1.10.26-0+deb9u1 ii libidn11 1.33-1 Versions of packages libvlccore8 recommends: ii libproxy-tools 0.4.14-2 Versions of packages vlc-bin depends on: ii libc6 2.24-11+deb9u3 ii libvlc-bin 2.2.7-1~deb9u1 ii libvlc5 2.2.7-1~deb9u1 Versions of packages vlc-plugin-base depends on: ii liba52-0.7.4 0.7.4-19 ii libasound2 1.1.3-5 ii libass5 1:0.13.4-2 ii libavahi-client3 0.6.32-2 ii libavahi-common3 0.6.32-2 ii libavc1394-0 0.5.4-4+b1 ii libbasicusageenvironment1 2016.11.28-1 ii libbluray1 1:0.9.3-3 ii libbz2-1.0 1.0.6-8.1 ii libc6 2.24-11+deb9u3 ii libcairo2 1.14.8-1 ii libcddb2 1.3.2-5 ii libcdio13 0.83-4.3+b1 ii libchromaprint1 1.4.2-1 ii libcrystalhd3 1:0.0~git20110715.fdd2f19-12 ii libdbus-1-3 1.10.26-0+deb9u1 ii libdc1394-22 2.2.5-1 ii libdca0 0.0.5-10 ii libdirectfb-1.2-9 1.2.10.0-8+deb9u1 ii libdvbpsi10 1.3.0-5 ii libdvdnav4 5.0.3-3 ii libdvdread4 5.0.3-2 ii libebml4v5 1.3.4-1 ii libfaad2 2.8.0~cvs20161113-1 ii libflac8 1.3.2-1 ii libfontconfig1 2.11.0-6.7+b1 ii libfreetype6 2.6.3-3.2 ii libfribidi0 0.19.7-1+b1 ii libgcc1 1:6.3.0-18+deb9u1 ii libgcrypt20 1.7.6-2+deb9u2 ii libglib2.0-0 2.50.3-2 ii libgme0 0.6.0-4 ii libgnutls30 3.5.8-5+deb9u3 ii libgpg-error0 1.26-2 ii libgroupsock8 2016.11.28-1 ii libgsm1 1.0.13-4+b2 ii libjpeg62-turbo 1:1.5.1-2 ii libkate1 0.4.1-7+b1 ii liblirc-client0 0.9.4c-9 ii liblivemedia57 2016.11.28-1 ii liblua5.2-0 5.2.4-1.1+b2 ii liblzma5 5.2.2-1.2+b1 ii libmad0 0.15.1b-8+deb9u1 ii libmatroska6v5 1.4.5-2 ii libmp3lame0 3.99.5+repack1-9+b2 ii libmpcdec6 2:0.1~r495-1+b1 ii libmpeg2-4 0.5.1-7+b2 ii libmtp9 1.1.13-1 ii libncursesw5 6.0+20161126-1+deb9u2 ii libogg0 1.3.2-1 ii libopenmpt-modplug1 0.2.7386~beta20.3-3+deb9u2 ii libopus0 1.2~alpha2-1 ii libpng16-16 1.6.28-1 ii libpulse0 10.0-1+deb9u1 ii libraw1394-11 2.1.2-1+b1 ii libresid-builder0c2a 2.1.1-15 ii librsvg2-2 2.40.16-1+b1 ii librtmp1 2.4+20151223.gitfa8646d.1-1+b1 ii libsamplerate0 0.1.8-8+b2 ii libsdl-image1.2 1.2.12-5+deb9u1 ii libsdl1.2debian 1.2.15+dfsg1-4 ii libshine3 3.1.0-5 ii libshout3 2.3.1-3 ii libsidplay2 2.1.1-15 ii libsnappy1v5 1.1.3-3 ii libsndio6.1 1.1.0-3 ii libspeex1 1.2~rc1.2-1+b2 ii libspeexdsp1 1.2~rc1.2-1+b2 ii libssh-gcrypt-4 0.7.3-2 ii libssh2-1 1.7.0-1 ii libstdc++6 6.3.0-18+deb9u1 ii libtag1v5 1.11.1+dfsg.1-0.1 ii libtheora0 1.1.1+dfsg.1-14+b1 ii libtinfo5 6.0+20161126-1+deb9u2 ii libtwolame0 0.3.13-2 ii libudev1 232-25+deb9u3 ii libupnp6 1:1.6.19+git20160116-1.2 ii libusageenvironment3 2016.11.28-1 ii libva-drm1 1.7.3-2 ii libva-x11-1 1.7.3-2 ii libva1 1.7.3-2 ii libvcdinfo0 0.7.24+dfsg-0.2 ii libvlccore8 2.2.7-1~deb9u1 ii libvorbis0a 1.3.5-4+deb9u2 ii libvorbisenc2 1.3.5-4+deb9u2 ii libvpx4 1.6.1-3+deb9u1 ii libwavpack1 5.0.0-2+deb9u2 ii libwebp6 0.5.2-1 ii libwebpmux2 0.5.2-1 ii libx11-6 2:1.6.4-3 ii libx264-148 2:0.148.2748+git97eaef2-1 ii libx265-95 2.1-2+b2 ii libxcb-keysyms1 0.4.0-1+b2 ii libxcb1 1.12-1 ii libxml2 2.9.4+dfsg1-2.2+deb9u2 ii libxvidcore4 2:1.3.4-1+b2 ii libzvbi0 0.2.35-13 ii vlc-data 2.2.7-1~deb9u1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages vlc-plugin-base recommends: ii xdg-utils 1.1.1-1 Versions of packages vlc-plugin-base suggests: pn libdvdcss2 <none> Versions of packages vlc-plugin-notify depends on: ii dpkg 1.18.24 ii libc6 2.24-11+deb9u3 ii libgdk-pixbuf2.0-0 2.36.5-2+deb9u2 ii libglib2.0-0 2.50.3-2 ii libgtk2.0-0 2.24.31-2 ii libnotify4 0.7.7-2 ii libvlccore8 2.2.7-1~deb9u1 Versions of packages vlc-plugin-qt depends on: ii libc6 2.24-11+deb9u3 ii libgcc1 1:6.3.0-18+deb9u1 ii libqt5core5a 5.7.1+dfsg-3+b1 ii libqt5gui5 5.7.1+dfsg-3+b1 ii libqt5widgets5 5.7.1+dfsg-3+b1 ii libqt5x11extras5 5.7.1~20161021-2 ii libstdc++6 6.3.0-18+deb9u1 ii libvlccore8 2.2.7-1~deb9u1 ii libx11-6 2:1.6.4-3 ii libxi6 2:1.7.9-1 Versions of packages vlc-plugin-qt recommends: ii vlc-bin 2.2.7-1~deb9u1 Versions of packages vlc-plugin-skins2 depends on: ii fonts-freefont-ttf 20120503-6 ii libc6 2.24-11+deb9u3 ii libfreetype6 2.6.3-3.2 ii libfribidi0 0.19.7-1+b1 ii libgcc1 1:6.3.0-18+deb9u1 ii libstdc++6 6.3.0-18+deb9u1 ii libvlccore8 2.2.7-1~deb9u1 ii libx11-6 2:1.6.4-3 ii libxext6 2:1.3.3-1+b2 ii libxinerama1 2:1.1.3-1+b3 ii libxpm4 1:3.5.12-1 ii vlc-plugin-qt 2.2.7-1~deb9u1 ii zlib1g 1:1.2.8.dfsg-5 Versions of packages vlc-plugin-skins2 recommends: ii vlc-bin 2.2.7-1~deb9u1 Versions of packages vlc-plugin-video-output depends on: ii libaa1 1.4p5-44+b1 ii libc6 2.24-11+deb9u3 ii libcaca0 0.99.beta19-2+b2 ii libegl1-mesa [libegl1-x11] 13.0.6-1+b2 ii libgl1-mesa-glx [libgl1] 13.0.6-1+b2 ii libgles1-mesa [libgles1] 13.0.6-1+b2 ii libgles2-mesa [libgles2] 13.0.6-1+b2 ii libvlccore8 2.2.7-1~deb9u1 ii libx11-6 2:1.6.4-3 ii libxcb-keysyms1 0.4.0-1+b2 ii libxcb-shm0 1.12-1 ii libxcb-xv0 1.12-1 ii libxcb1 1.12-1 Versions of packages vlc-plugin-video-splitter depends on: ii libc6 2.24-11+deb9u3 ii libvlccore8 2.2.7-1~deb9u1 ii libxcb-randr0 1.12-1 ii libxcb1 1.12-1 Versions of packages vlc-plugin-visualization depends on: ii libc6 2.24-11+deb9u3 ii libgl1-mesa-glx [libgl1] 13.0.6-1+b2 ii libvlccore8 2.2.7-1~deb9u1 -- no debconf information
--- End Message ---
--- Begin Message ---
- To: Vincas Dargis <vindrg@gmail.com>, 898330-done@bugs.debian.org
- Cc: control@bugs.debian.org
- Subject: Re: Bug#898330: vlc: Building package with address sanitizer fails
- From: Sebastian Ramacher <sramacher@debian.org>
- Date: Tue, 27 Aug 2019 23:11:40 +0200
- Message-id: <20190827211140.GA3856@ramacher.at>
- In-reply-to: <CAPNCXk1sSwPVXKSzHQf_L-FzsA_hz4YnQOfYpCFr1gUb=eWOCg@mail.gmail.com>
- References: <152594901433.4237.4169961872195598268.reportbug@debian.admin1> <CAPNCXk1sSwPVXKSzHQf_L-FzsA_hz4YnQOfYpCFr1gUb=eWOCg@mail.gmail.com>
tags 898330 + wontfix thanks On 2018-05-15 09:50:09, Vincas Dargis wrote: > On Fri, 11 May 2018 15:12:55 +0200 Sebastian Ramacher <sramacher@debian.org> > wrote: > > On 2018-05-10 06:43:34, Vincas Dargis wrote: > > > If I export these variables: > > > > > > export DEB_BUILD_MAINT_OPTIONS=sanitize=+address,+undefined > > > > You'll need to pass that via DEB_BUILD_OPTIONS to not interfere with the > > options set in debian/rules. > > Thanks, though I did not help either. > > I had to modify Makefile.am and bin/Makefile.am to prepend LD_PRELOAD to > avoid errors when executing vlc-cache-gen, due to that > "ASan runtime does not come first in initial library list" error: > > ``` > --- vlc-2.2.7.orig/bin/Makefile.am > +++ vlc-2.2.7/bin/Makefile.am > @@ -83,7 +83,7 @@ MOSTLYCLEANFILES = $(noinst_DATA) > ../modules/plugins.dat: vlc-cache-gen$(EXEEXT) > $(AM_V_at)rm -f ../modules/plugins.dat > $(AM_V_GEN)if test "$(build)" = "$(host)"; then \ > - ./vlc-cache-gen$(EXEEXT) ../modules ; \ > + > LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.3:/usr/lib/x86_64-linux-gnu/libubsan.so.0 > ./vlc-cache-gen$(EXEEXT) ../modules ; \ > else \ > echo "Cross-compilation: cache generation skipped!" ; \ > fi > ``` > > ``` > --- vlc-2.2.7.orig/Makefile.am > +++ vlc-2.2.7/Makefile.am > @@ -985,6 +985,7 @@ install-exec-hook: > if test "$(build)" = "$(host)"; then \ > PATH="$(DESTDIR)$(bindir):$$PATH" \ > LD_LIBRARY_PATH="$(DESTDIR)$(libdir):$$LD_LIBRARY_PATH" \ > + > LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.3:/usr/lib/x86_64-linux-gnu/libubsan.so.0 > \ > "$(DESTDIR)$(vlclibdir)/vlc-cache-gen$(EXEEXT)" \ > "$(DESTDIR)$(vlclibdir)/plugins" ; \ > else \ > ``` > > Also, I had to set that ASAN_OPTIONS=detect_leaks=0 when building and when > installing rebuilt package, for > the same issue with vlc-cache-gen + ASAN. > > > If you are tracking down a bug, please try it with 3.0.x first. If it > fails > > there, consider using configure's --with-sanitizier to get a build with > > sanitizers. > > The problem in my use case that wrapper library VLC-QT does not yet support > 3.0.x, I can't do that easily. > > And it seems `--with-sanitizer` is only on vlc >=3 right? . Yes. > Anyway, I found "sanitize" option in `man dpkg-buildflags" and expected for > it to work with VLC package. I'm not convienced that supporting this in the package is worth the effort. Your better off building the upstream source yourself where you can focus on the plugins and components that you want to debug. I'm closing this bug as wontfix. Also, the 2.2.x branch is no longer supported. Cheers -- Sebastian RamacherAttachment: signature.asc
Description: PGP signature
--- End Message ---