[vlc-devel] [PATCH] configure.ac: unbreak AM_ICONV tests with -lasan

Hugo Beauzée-Luyssen hugo at beauzee.fr
Tue Nov 14 18:05:33 CET 2017


On Tue, Nov 14, 2017, at 05:54 PM, Rémi Denis-Courmont wrote:
> Le tiistaina 14. marraskuuta 2017, 17.37.50 EET Hugo Beauzée-Luyssen a
> écrit :
> > On Tue, Nov 14, 2017, at 05:08 PM, Rémi Denis-Courmont wrote:
> > > Le tiistaina 14. marraskuuta 2017, 16.58.36 EET Thomas Guillem a écrit :
> > > > On Tue, Nov 14, 2017, at 16:52, Rémi Denis-Courmont wrote:
> > > > > Le tiistaina 14. marraskuuta 2017, 16.38.54 EET Francois Cartegnie a
> > > > > 
> > > > > écrit :
> > > > > > if -lasan needs to go through LDFLAGS because
> > > > > > of -zdefs then iconv test cannot survive again
> > > > > 
> > > > > Sorry but this is utter BS.
> > > > > 
> > > > > The iconv test is performed before sanitizers are enabled, so it
> > > > > cannot
> > > > > be
> > > > > affected by asan linking issues.
> > > > 
> > > > If you have a broken libtool (like almost everyone since there is no
> > > > release since the fix was pushed), you have to force extra flags:
> > > > LDFLAGS="-lasan" when running configure.
> > > 
> > > That bug has nothing to do with the iconv test whatsoever, and thus this
> > > patch
> > > does *not* work around that bug.
> > > 
> > > BTW, I only have the libtool issue with linking C++ (Debian Sid), and the
> > > iconv test is pure C...
> > 
> > That's irrelevan.
> 
> > The test fails because a leak is found, not because of
> > a compilation error.
> 
> I think that is another problem altogether. To fix that, you need to
> patch the 
> M4 iconv test inside GNU/gettext, and update gettext (although running 
> compiled code inside configure is a idea anyway).
> 

Fair point, that's also an option.
I'm worried we could have more tests to fix, but I can live with that
for now

> > AFAICS, our options include:
> > - Having a new libtool version released (have fun)
> 
> That makes no sense. Updating libtool will not fix a memory leak.

It would however allow us to enable the sanitizer properly and not by
enforcing some LDFLAGS, as it was intended by --with-sanitizer

> 
> > - Having no subtitles in asan builds (unacceptable IMHO)
> 
> Obviously not an option.
> 
> > - Specifying ASAN_OPTIONS=exitcode=0 for the entire configure process
> 
> That is what I have always done. Otherwise, make check also fails due to
> bugs 
> in external libraries.
> 
> But the simpler work-around to *both* missing symbols and memory leaks,
> as 
> well as to any other hypothetical sanitizer interference during
> configure, 
> consists of enabling sanitizers later in the process - after all the link
> and 
> run configure tests are done.
> 
> -- 
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list