On Fri, 11 May 2018 15:12:55 +0200 Sebastian Ramacher <sramac...@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? . Anyway, I found "sanitize" option in `man dpkg-buildflags" and expected for it to work with VLC package.