[vlc-devel] [PATCH 1/2] configure: allow toggling of -Wl, -z, defs and -no-undefined
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Jun 19 15:54:11 CEST 2017
On Mon, Jun 19, 2017, at 03:39 PM, remi at remlab.net wrote:
> You can't use asan without some custom flags. We definitely don't want to
> enable it by default.
>
> (I also categorically refuse to remove z,defs. With all due respect, this
> community has proven its inability to keep it working unless always
> enabled several times in the past. And even without it, asan would still
> need custom flags anyway.)
>
> So I don't think that there is an answer to that question.
>
> Le 19 juin 2017 15:35:14 GMT+03:00, "Hugo Beauzée-Luyssen"
> <hugo at beauzee.fr> a écrit :
> >On Mon, Jun 19, 2017, at 02:31 PM, Marvin Scholz wrote:
> >> On 15 Mar 2017, at 19:31, Marvin Scholz wrote:
> >>
> >> > On 15 Mar 2017, at 15:46, Rémi Denis-Courmont wrote:
> >> >
> >> >> On March 15, 2017 4:42:34 PM GMT+02:00, "Filip Roséen"
> >> >> <filip at atch.se> wrote:
> >> >>> Hi Rémi,
> >> >>>
> >> >>> On 2017-03-15 16:28, Rémi Denis-Courmont wrote:
> >> >>>
> >> >>>> On mercredi 15 mars 2017 15:24:06 EET Filip Roséen wrote:
> >> >>>>> A developer should know his/her platform well enough to be able
> >to
> >> >>>>> manually specify the sanitizer flags, which
> >> >>> `--disable-no-undefined`
> >> >>>>> allows.
> >> >>>>
> >> >>>> A developer should know his/her platform well enough to handle
> >> >>> sanitizers with
> >> >>>> the --no-undefined option.
> >> >>>
> >> >>> So you are saying that those who wants to use the sanitizer with
> >a
> >> >>> shall manually patch `configure.ac` and the relevant
> >`Makefile.am`
> >> >>> in
> >> >>> order to remove the usage of `-Wl,-z,defs` and `-no-undefined` in
> >> >>> order to achieve satisfying sanitizer usage?
> >> >>>
> >> >>> Or specify complicated flags just to circumvent the fact that we
> >now
> >> >>> unconditionally add flags on platform where they apply, but
> >silently
> >> >>> ignore them on platforms that says they do not.
> >> >>>
> >> >>> If we want to have developers to really fight in order
> >> >>> to use a sanitizer, or prevent `-Wl,-z,defs` and `-no-undefined`
> >> >>> from
> >> >>> being able to easily test functions from out-of-tree objects
> >(which
> >> >>> greatly simplies things such as benchmarks of individual
> >functions,
> >> >>> at
> >> >>> least in my opinion), I guess one also **could** replace the
> >linker
> >> >>> with a wrapper that pretends that it does not understand the
> >> >>> relevant
> >> >>> flags, and have a "clean" build without `-Wl,-z,defs`.
> >> >>>
> >> >>>> I agree that an option for sanitizers is not very useful insofar
> >as
> >> >>> it will be
> >> >>>> disabled by default. Afterall, those who know about it, would
> >also
> >> >>> know how to
> >> >>>> do it manually. Well then there are no needs to change anything
> >at
> >> >>> all. Easy.
> >> >>>
> >> >>> I did not say that the option for sanitizer would not be very
> >> >>> useful.
> >> >>> My fear is that it will be more complex to implement than to
> >allow
> >> >>> developers to specify `--disable-no-undefined` and setting the
> >> >>> *simple* flags themselves.
> >> >>>
> >> >>> Also, as mentioned, if `--enable-sanitizer=...` is allowed to
> >> >>> disable
> >> >>> the usage of `-Wl,-z,defs` and `-no-undefined` I cannot
> >understand
> >> >>> why
> >> >>> such would be allowed, but not this patch.
> >> >>>
> >> >>> Best Regards,\
> >> >>> Filip
> >> >>
> >> >> To be clear, I have no problems using all 3 sanitizers with both
> >GCC
> >> >> and clang and without patching the build system. So I am unable to
> >
> >> >> answer your question.
> >> >
> >> > I am not sure about other operating systems, but at least on macOS
> >I
> >> > am not aware of an easy way of using the address
> >> > sanitizer without the flag introduced by this patch.
> >> >
> >>
> >> This patch is still relevant, could I please get a reply? If there is
> >
> >> another way to build with asan on macOS, please let me know.
> >>
> >> The asan documentation states:
> >>
> >> > When linking shared libraries, the AddressSanitizer run-time is not
> >
> >> > linked, so -Wl,-z,defs may cause link errors (don’t use it with
> >> > AddressSanitizer)
> >>
> >> and I currently know of no way to do this, without these patches.
> >>
> >> Regards,
> >> Marvin Scholz
> >
> >I'm having a similar issue with thread sanitizer, and would really like
> >to know how to build correctly without the mentioned flags.
> >
> >Regards,
> >
> >--
> > Hugo Beauzée-Luyssen
> > hugo at beauzee.fr
> >_______________________________________________
> >vlc-devel mailing list
> >To unsubscribe or modify your subscription options:
> >https://mailman.videolan.org/listinfo/vlc-devel
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser
> ma brièveté.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
Would you ming sharing the settings/flags you use to run TSAN then?
Regards,
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list