[PATCH 0/2] Fix libsanitizer for x32
H.J. Lu
hjl.tools at gmail.com
Mon Jan 13 09:30:44 PST 2014
struct stat defined in <asm/stat.h> is incorrect for x32. <asm/stat.h>
is included to get struct __old_kernel_stat. But struct __old_kernel_stat
isn't used for x86-64 and x32. The first patch includes <sys/stat.h>
instead of <asm/stat.h> and comments out size check of struct __old_kernel_stat
for x86-64.
X32 uses 64-bit integer for time_t and clock_t. X32 defines __x86_64__,
but not _LP64. The second patch uses u64 for time_t and long long for
clock_t when compiling for x32.
H.J. Lu (2):
Use 64-bit integer on time_t and clock_t for x32
Include <sys/stat.h> if __x86_64__ is defined
lib/sanitizer_common/sanitizer_platform_limits_linux.cc | 6 +++++-
lib/sanitizer_common/sanitizer_platform_limits_posix.h | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
More information about the llvm-commits
mailing list