<div dir="auto">Hi Dimitry, <div><br><div class="gmail_extra"><div class="gmail_quote">14 Мар 2017 г. 21:32 пользователь "Dimitry Andric" <<a href="mailto:dimitry@andric.com">dimitry@andric.com</a>> написал:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Maxim,<br>
<br>
This also doesn't compile on FreeBSD, and actually on any non-glibc >= 2.3.4 platform.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Oh, sorry about that. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Can we just check for the existence of RTLD_DEEPBIND instead?  E.g.:<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Sure, could you please apply the patch? Or should I do it by myself? </div><div dir="auto"><br></div><div dir="auto">-Maxim</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Index: projects/compiler-rt/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc<br>
==============================<wbr>==============================<wbr>=======<br>
--- projects/compiler-rt/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc        (revision 297742)<br>
+++ projects/compiler-rt/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc        (working copy)<br>
@@ -1463,7 +1463,7 @@ void MaybeReexec() {<br>
<div class="quoted-text"> void PrintModuleMap() { }<br>
<br>
 void CheckNoDeepBind(const char *filename, int flag) {<br>
</div>-#if !SANITIZER_ANDROID<br>
+#ifdef RTLD_DEEPBIND<br>
<div class="quoted-text">   if (flag & RTLD_DEEPBIND) {<br>
     Report(<br>
         "You are trying to dlopen a %s shared library with RTLD_DEEPBIND flag"<br>
<br>
</div><font color="#888888">-Dimitry<br>
</font><div class="elided-text"><br>
> On 9 Mar 2017, at 15:40, Maxim Ostapenko via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: chefmax<br>
> Date: Thu Mar  9 08:40:15 2017<br>
> New Revision: 297383<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=297383&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=297383&view=rev</a><br>
> Log:<br>
> [sanitizer] Fix android buildbots after r297370<br>
><br>
> Modified:<br>
>    compiler-rt/trunk/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc<br>
><br>
> Modified: compiler-rt/trunk/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=297383&r1=297382&r2=297383&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/compiler-rt/trunk/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc?rev=297383&r1=297382&<wbr>r2=297383&view=diff</a><br>
> ==============================<wbr>==============================<wbr>==================<br>
> --- compiler-rt/trunk/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc (original)<br>
> +++ compiler-rt/trunk/lib/<wbr>sanitizer_common/sanitizer_<wbr>linux.cc Thu Mar  9 08:40:15 2017<br>
> @@ -1461,6 +1461,7 @@ void MaybeReexec() {<br>
> void PrintModuleMap() { }<br>
><br>
> void CheckNoDeepBind(const char *filename, int flag) {<br>
> +#if !SANITIZER_ANDROID<br>
>   if (flag & RTLD_DEEPBIND) {<br>
>     Report(<br>
>         "You are trying to dlopen a %s shared library with RTLD_DEEPBIND flag"<br>
> @@ -1471,6 +1472,7 @@ void CheckNoDeepBind(const char *filenam<br>
>         filename, filename);<br>
>     Die();<br>
>   }<br>
> +#endif<br>
> }<br>
><br>
> uptr FindAvailableMemoryRange(uptr size, uptr alignment, uptr left_padding) {<br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
<br>
</div></blockquote></div><br></div></div></div>