[compiler-rt] r297383 - [sanitizer] Fix android buildbots after r297370
Dimitry Andric via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 10:32:21 PDT 2017
Hi Maxim,
This also doesn't compile on FreeBSD, and actually on any non-glibc >= 2.3.4 platform.
Can we just check for the existence of RTLD_DEEPBIND instead? E.g.:
Index: projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc
===================================================================
--- projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc (revision 297742)
+++ projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc (working copy)
@@ -1463,7 +1463,7 @@ void MaybeReexec() {
void PrintModuleMap() { }
void CheckNoDeepBind(const char *filename, int flag) {
-#if !SANITIZER_ANDROID
+#ifdef RTLD_DEEPBIND
if (flag & RTLD_DEEPBIND) {
Report(
"You are trying to dlopen a %s shared library with RTLD_DEEPBIND flag"
-Dimitry
> On 9 Mar 2017, at 15:40, Maxim Ostapenko via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: chefmax
> Date: Thu Mar 9 08:40:15 2017
> New Revision: 297383
>
> URL: http://llvm.org/viewvc/llvm-project?rev=297383&view=rev
> Log:
> [sanitizer] Fix android buildbots after r297370
>
> Modified:
> compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
>
> Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=297383&r1=297382&r2=297383&view=diff
> ==============================================================================
> --- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
> +++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Thu Mar 9 08:40:15 2017
> @@ -1461,6 +1461,7 @@ void MaybeReexec() {
> void PrintModuleMap() { }
>
> void CheckNoDeepBind(const char *filename, int flag) {
> +#if !SANITIZER_ANDROID
> if (flag & RTLD_DEEPBIND) {
> Report(
> "You are trying to dlopen a %s shared library with RTLD_DEEPBIND flag"
> @@ -1471,6 +1472,7 @@ void CheckNoDeepBind(const char *filenam
> filename, filename);
> Die();
> }
> +#endif
> }
>
> uptr FindAvailableMemoryRange(uptr size, uptr alignment, uptr left_padding) {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170314/5eaf94ac/attachment.sig>
More information about the llvm-commits
mailing list