Update compiler-rt to release_38 branch r261369.

This commit is contained in:
Dimitry Andric 2016-02-21 16:27:55 +00:00
commit ac1ec6334e
3 changed files with 11 additions and 6 deletions

View File

@ -1408,12 +1408,12 @@ int OnExit() {
__msan_unpoison(ptr, size) __msan_unpoison(ptr, size)
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \ #define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
if (msan_init_is_running) return REAL(func)(__VA_ARGS__); \ if (msan_init_is_running) return REAL(func)(__VA_ARGS__); \
ENSURE_MSAN_INITED(); \
MSanInterceptorContext msan_ctx = {IsInInterceptorScope()}; \ MSanInterceptorContext msan_ctx = {IsInInterceptorScope()}; \
ctx = (void *)&msan_ctx; \ ctx = (void *)&msan_ctx; \
(void)ctx; \ (void)ctx; \
InterceptorScope interceptor_scope; \ InterceptorScope interceptor_scope; \
__msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */ \ __msan_unpoison(__errno_location(), sizeof(int)); /* NOLINT */
ENSURE_MSAN_INITED();
#define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \ #define COMMON_INTERCEPTOR_DIR_ACQUIRE(ctx, path) \
do { \ do { \
} while (false) } while (false)

View File

@ -222,6 +222,11 @@ uptr ThreadDescriptorSize() {
char *end; char *end;
int minor = internal_simple_strtoll(buf + 8, &end, 10); int minor = internal_simple_strtoll(buf + 8, &end, 10);
if (end != buf + 8 && (*end == '\0' || *end == '.')) { if (end != buf + 8 && (*end == '\0' || *end == '.')) {
int patch = 0;
if (*end == '.')
// strtoll will return 0 if no valid conversion could be performed
patch = internal_simple_strtoll(end + 1, nullptr, 10);
/* sizeof(struct pthread) values from various glibc versions. */ /* sizeof(struct pthread) values from various glibc versions. */
if (SANITIZER_X32) if (SANITIZER_X32)
val = 1728; // Assume only one particular version for x32. val = 1728; // Assume only one particular version for x32.
@ -235,9 +240,9 @@ uptr ThreadDescriptorSize() {
val = FIRST_32_SECOND_64(1136, 1712); val = FIRST_32_SECOND_64(1136, 1712);
else if (minor == 10) else if (minor == 10)
val = FIRST_32_SECOND_64(1168, 1776); val = FIRST_32_SECOND_64(1168, 1776);
else if (minor <= 12) else if (minor == 11 || (minor == 12 && patch == 1))
val = FIRST_32_SECOND_64(1168, 2288); val = FIRST_32_SECOND_64(1168, 2288);
else if (minor == 13) else if (minor <= 13)
val = FIRST_32_SECOND_64(1168, 2304); val = FIRST_32_SECOND_64(1168, 2304);
else else
val = FIRST_32_SECOND_64(1216, 2304); val = FIRST_32_SECOND_64(1216, 2304);

View File

@ -159,8 +159,8 @@ void PrintMatchedSuppressions() {
Printf("ThreadSanitizer: Matched %d suppressions (pid=%d):\n", hit_count, Printf("ThreadSanitizer: Matched %d suppressions (pid=%d):\n", hit_count,
(int)internal_getpid()); (int)internal_getpid());
for (uptr i = 0; i < matched.size(); i++) { for (uptr i = 0; i < matched.size(); i++) {
Printf("%d %s:%s\n", matched[i]->hit_count, matched[i]->type, Printf("%d %s:%s\n", atomic_load_relaxed(&matched[i]->hit_count),
matched[i]->templ); matched[i]->type, matched[i]->templ);
} }
} }
} // namespace __tsan } // namespace __tsan