diff --git a/compiler-rt/lib/asan/asan_linux.cpp b/compiler-rt/lib/asan/asan_linux.cpp index ce5e873dc5180..7fee5e28b5414 100644 --- a/compiler-rt/lib/asan/asan_linux.cpp +++ b/compiler-rt/lib/asan/asan_linux.cpp @@ -214,7 +214,7 @@ void AsanCheckIncompatibleRT() { // the functions in dynamic ASan runtime instead of the functions in // system libraries, causing crashes later in ASan initialization. MemoryMappingLayout proc_maps(/*cache_enabled*/true); - char filename[PATH_MAX]; + char filename[4096]; MemoryMappedSegment segment(filename, sizeof(filename)); while (proc_maps.Next(&segment)) { if (IsDynamicRTName(segment.filename)) { diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp index edbe8402808a8..ccb95e61a7f5e 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp @@ -690,12 +690,8 @@ u32 GetNumberOfCPUs() { } internal_close(fd); return n_cpus; -#elif SANITIZER_SOLARIS - return sysconf(_SC_NPROCESSORS_ONLN); #else - cpu_set_t CPUs; - CHECK_EQ(sched_getaffinity(0, sizeof(cpu_set_t), &CPUs), 0); - return CPU_COUNT(&CPUs); + return sysconf(_SC_NPROCESSORS_ONLN); #endif } diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp index aa845df4dde48..8419d27412390 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp @@ -110,6 +110,7 @@ typedef struct user_fpregs elf_fpregset_t; #endif #if SANITIZER_LINUX && !SANITIZER_ANDROID +#include #include #include #include @@ -1012,9 +1013,9 @@ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level); CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type); #if SANITIZER_LINUX && (__ANDROID_API__ >= 21 || __GLIBC_PREREQ (2, 14)) -CHECK_TYPE_SIZE(mmsghdr); -CHECK_SIZE_AND_OFFSET(mmsghdr, msg_hdr); -CHECK_SIZE_AND_OFFSET(mmsghdr, msg_len); +// CHECK_TYPE_SIZE(mmsghdr); +// CHECK_SIZE_AND_OFFSET(mmsghdr, msg_hdr); +// CHECK_SIZE_AND_OFFSET(mmsghdr, msg_len); #endif COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));