https://bugs.kde.org/show_bug.cgi?id=368529

--- Comment #8 from Elliott Hughes <e...@google.com> ---
(In reply to Ivo Raisr from comment #7)
> I am a little worried about this condition in the patch:
> 
> #if defined(ANDROID) && defined(__clang__)
> 
> Nowhere in Valgrind sources we currently base a decision on naked "ANDROID".
> It is always this combo (from vki-linux.h):
> 
> #if defined(VGPV_arm_linux_android) || defined(VGPV_x86_linux_android) \
>     || defined(VGPV_mips32_linux_android) \
>     || defined(VGPV_arm64_linux_android)
>     ...
> #endif /* defined(VGPV_*_linux_android) */

that idiom is kind of insane in most cases. it also leads to bugs like
https://bugs.kde.org/show_bug.cgi?id=339945 or
https://bugs.kde.org/show_bug.cgi?id=379764 where you have to manually maintain
these lists. or other bugs still to be discovered:

#  if defined(VGPV_arm_linux_android) \
      || defined(VGPV_x86_linux_android) \
      || defined(VGPV_mips32_linux_android) \
      || defined(VGPV_arm64_linux_android)
   const HChar*  default_interp_name = "/system/bin/sh";
#  else
   const HChar*  default_interp_name = "/bin/sh";
#  endif

is missing amd64, for example. just using __ANDROID__ would have avoided this.

ah, and looking at more of these i think i'm finding the causes of other
outstanding valgrind bugs on x86-64 Android...

i think you generally want to use __BIONIC__ or __ANDROID__ instead, in the
same way you use __GLIBC__ rather than individually listing each possible
glibc/arch combination.

that said, getting back to this bug...

> If this patch is really arm-android specific,

...yes, this patch is arm-specific, but it's already inside #if
defined(VGP_arm_linux).

> then it should fold inside
> existing
> #if defined(VGP_arm_linux) [at line 2424]
> ...
> #endif [at line 2442]
> 
> with a guard such as:
> 
> #if defined(VGPV_arm_linux_android)
> ...
> #endif
> 
> No need to "defined(__clang__)".
> 
> 
> Let me know what is the case here.
> Please eventually modify the patch and test it on arm.

i'll attach the smallest patch that works.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to