<html><head></head><body>You can't use asan without some custom flags. We definitely don't want to enable it by default.<br>
<br>
(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.)<br>
<br>
So I don't think that there is an answer to that question.<br><br><div class="gmail_quote">Le 19 juin 2017 15:35:14 GMT+03:00, "Hugo Beauzée-Luyssen" <hugo@beauzee.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On Mon, Jun 19, 2017, at 02:31 PM, Marvin Scholz wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> On 15 Mar 2017, at 19:31, Marvin Scholz wrote:<br /> <br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> On 15 Mar 2017, at 15:46, Rémi Denis-Courmont wrote:<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"> On March 15, 2017 4:42:34 PM GMT+02:00, "Filip Roséen" <br /> <filip@atch.se> wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #fcaf3e; padding-left: 1ex;"> Hi Rémi,<br /><br /> On 2017-03-15 16:28, Rémi Denis-Courmont wrote:<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> On mercredi 15 mars 2017 15:24:06 EET Filip Roséen wrote:<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> A developer should know his/her platform well enough to be able to<br /> manually specify the sanitizer flags, which<br /></blockquote></blockquote> `--disable-no-undefined`<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ccc; padding-left: 1ex;"> allows.<br /></blockquote><br /> A developer should know his/her platform well enough to handle<br /></blockquote> sanitizers with<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> the --no-undefined option.<br /></blockquote><br /> So you are saying that those who wants to use the sanitizer with a<br /> shall manually patch `<a href="http://configure.ac">configure.ac</a>` and the relevant `<a href="http://Makefile.am">Makefile.am</a>` <br /> in<br /> order to remove the usage of `-Wl,-z,defs` and `-no-undefined` in<br /> order to achieve satisfying sanitizer usage?<br /><br /> Or specify complicated flags just to circumvent the fact that we now<br /> unconditionally add flags on platform where they apply, but silently<br /> ignore them on platforms that says they do not.<br /><br /> If we want to have developers to really fight in order<br /> to use a sanitizer, or prevent `-Wl,-z,defs` and `-no-undefined` <br /> from<br /> being able to easily test functions from out-of-tree objects (which<br /> greatly simplies things such as benchmarks of individual functions, <br /> at<br /> least in my opinion), I guess one also **could** replace the linker<br /> with a wrapper that pretends that it does not understand the <br /> relevant<br /> flags, and have a "clean" build without `-Wl,-z,defs`.<br /><br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> I agree that an option for sanitizers is not very useful insofar as<br /></blockquote> it will be<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> disabled by default. Afterall, those who know about it, would also<br /></blockquote> know how to<br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #e9b96e; padding-left: 1ex;"> do it manually. Well then there are no needs to change anything at<br /></blockquote> all. Easy.<br /><br /> I did not say that the option for sanitizer would not be very <br /> useful.<br /> My fear is that it will be more complex to implement than to allow<br /> developers to specify `--disable-no-undefined` and setting the<br /> *simple* flags themselves.<br /><br /> Also, as mentioned, if `--enable-sanitizer=...` is allowed to <br /> disable<br /> the usage of `-Wl,-z,defs` and `-no-undefined` I cannot understand <br /> why<br /> such would be allowed, but not this patch.<br /><br /> Best Regards,\<br /> Filip<br /></blockquote><br /> To be clear, I have no problems using all 3 sanitizers with both GCC <br /> and clang and without patching the build system. So I am unable to <br /> answer your question.<br /></blockquote><br /> I am not sure about other operating systems, but at least on macOS I <br /> am not aware of an easy way of using the address<br /> sanitizer without the flag introduced by this patch.</blockquote><br /> <br /> This patch is still relevant, could I please get a reply? If there is <br /> another way to build with asan on macOS, please let me know.<br /> <br /> The asan documentation states:<br /> <br /><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> When linking shared libraries, the AddressSanitizer run-time is not <br /> linked, so -Wl,-z,defs may cause link errors (don’t use it with <br /> AddressSanitizer)<br /></blockquote> <br /> and I currently know of no way to do this, without these patches.<br /> <br /> Regards,<br /> Marvin Scholz<br /></blockquote><br />I'm having a similar issue with thread sanitizer, and would really like<br />to know how to build correctly without the mentioned flags.<br /><br />Regards,<br /></pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>