[llvm-bugs] [Bug 45138] New: libsanitizer fails to build with 64-bit time_t
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 6 08:51:18 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=45138
Bug ID: 45138
Summary: libsanitizer fails to build with 64-bit time_t
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: asan
Assignee: unassignedbugs at nondot.org
Reporter: arnd at linaro.org
CC: llvm-bugs at lists.llvm.org
I tried building libsanitizer as part of gcc with a modified 32-bit ARM glibc
using 64-bit time_t/off_t/ino_t, and saw several failed assertions on 'struct
dirent' and 'struct timeb':
339 | typedef char IMPL_PASTE(assertion_failed_##_,
line)[2*(int)(pred)-1]
|
^
../../../../src/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:333:30:
note: in expansion of macro 'IMPL_COMPILER_ASSERT'
333 | #define COMPILER_CHECK(pred) IMPL_COMPILER_ASSERT(pred, __LINE__)
| ^~~~~~~~~~~~~~~~~~~~
../../../../src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h:1495:3:
note: in expansion of macro 'COMPILER_CHECK'
1495 | COMPILER_CHECK(sizeof(__sanitizer_##TYPE) == sizeof(TYPE))
| ^~~~~~~~~~~~~~
../../../../src/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:1213:1:
note: in expansion of macro 'CHECK_TYPE_SIZE'
1213 | CHECK_TYPE_SIZE(timeb);
| ^~~~~~~~~~~~~~~
../../../../src/libsanitizer/sanitizer_common/sanitizer_internal_defs.h:339:70:
warning: size of array 'assertion_failed__1213' is not an integral
constant-expression [-Wpedantic]
In particular:
CHECK_SIZE_AND_OFFSET(dirent, d_ino);
CHECK_SIZE_AND_OFFSET(dirent, d_off);
CHECK_SIZE_AND_OFFSET(dirent, d_reclen);
CHECK_TYPE_SIZE(timeb);
CHECK_SIZE_AND_OFFSET(timeb, time);
CHECK_SIZE_AND_OFFSET(timeb, millitm);
CHECK_SIZE_AND_OFFSET(timeb, timezone);
CHECK_SIZE_AND_OFFSET(timeb, dstflag);
These 64-bit types are becoming the default for new 32-bit architectures, as
well as for some distros that care about running beyond 2038 when the 32-bit
time_t overflows.
I reported the same issue in the gcc bugzilla as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94076, but was sent here instead
(I hope I got the right place this time).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200306/1fc3eaa9/attachment.html>
More information about the llvm-bugs
mailing list