| Summary: | Patch: replace #if !defined (VGPV_*_linux_android) with #ifndef AT_FPUCW | ||
|---|---|---|---|
| Product: | [Developer tools] valgrind | Reporter: | dimitry <dimitry> |
| Component: | general | Assignee: | Julian Seward <jseward> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | enh |
| Priority: | NOR | ||
| Version First Reported In: | 3.10 SVN | ||
| Target Milestone: | --- | ||
| Platform: | Android | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
https://android-review.googlesource.com/375892 adds AT_FPUCW (and other historical arch-specific cruft) to bionic, available via <elf.h> and <sys/auxv.h>. until an NDK with that is released, guarding the AT_FPUCW reference with #if defined(AT_FPUCW) would be less error-prone than listing all the Android targets here. (what about x86-64, for example?) |
It looks like Android is not really unique is this respect; most of other platforms do not use AT_FPUCW also, the only difference is that bionic's elf.h does not define this symbol. kernel defines this only for sh platform in it's headers... Reproducible: Always Patch: Index: coregrind/m_initimg/initimg-linux.c =================================================================== --- coregrind/m_initimg/initimg-linux.c (revision 14617) +++ coregrind/m_initimg/initimg-linux.c (working copy) @@ -246,6 +246,10 @@ /*=== Setting up the client's stack ===*/ /*====================================================================*/ +#ifndef AT_FPUCW +#define AT_FPUCW 18 +#endif /* AT_FPUCW */ + #ifndef AT_ICACHEBSIZE #define AT_ICACHEBSIZE 20 #endif /* AT_ICACHEBSIZE */ @@ -633,11 +637,7 @@ case AT_GID: case AT_EGID: case AT_CLKTCK: -# if !defined(VGPV_arm_linux_android) \ - && !defined(VGPV_x86_linux_android) \ - && !defined(VGPV_mips32_linux_android) - case AT_FPUCW: /* missing on android */ -# endif + case AT_FPUCW: /* All these are pointerless, so we don't need to do anything about them. */ break;