summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_platform_limits_linux.cc
AgeCommit message (Collapse)Author
2016-12-02[sanitizer] Add a bunch of ifdefs for sparc targets to avoid build failures.Maxim Ostapenko
Differential Revision: https://reviews.llvm.org/D27301 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@288488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15[compiler-rt] Do not introduce __sanitizer namespace globallyAnna Zaks
The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@281657 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-02[compiler-rt] adjust platform_limits_linux.cc #include of posix_typesKostya Serebryany
Summary: Hello, Building a recent gcc on a powerpc-linux system advertsing: Red Hat Enterprise Linux Server release 5.10 (Tikanga) we stumbled on a compilation error on a file originating from compiler-rt/lib/sanitizer-common. sanitizer_platform_limits_linux.cc #includes asm/posix_types.h, which, on our system, uses __kernel_fd_set and associated macros. These aren't defined at the point of their use, and the compilation fails with symptoms like: In file included from ../../../../src/libsanitizer/sanitizer_common/sanitizer_platform_limits_linux.cc:29:0: /usr/include/asm/posix_types.h:72:51: error: '__kernel_fd_set' has not been declared static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) ... The attached patch is a suggestion to fix this, by including linux/posix_types.h instead of asm/posix_types.h. linux/posix_types defines the necessary types and macros, then #includes asm/posix_types.h. We have been using it locally for gcc without problems for a couple of years on powerpc, x86 and x86_64-linux platforms. It is still needed for gcc-6 on our powerpc host and applies cleanly on the compiler-rt trunk. Comments ? Thanks much in advance for your feedback, With Kind Regards, Olivier Reviewers: llvm-commits, kcc Subscribers: kcc, kubabrecka Differential Revision: http://reviews.llvm.org/D19799 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@268283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-14[sanitizer] [SystemZ] Add/fix kernel and libc type definitions.Marcin Koscielnicki
This is the first part of upcoming asan support for s390 and s390x. Note that there are bits for 31-bit support in this and subsequent patches - while LLVM itself doesn't support it, gcc should be able to make use of it just fine. Differential Revision: http://reviews.llvm.org/D18888 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@266370 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03[asan] i686-linux-android support.Evgeniy Stepanov
Large part of this change is required due to https://code.google.com/p/android/issues/detail?id=61799 dlsym() crashes when symbol resolution fails, which means we have to limit the interceptor list instead of relying on runtime detection. There are minor differencies in system headers, too. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@212273 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-24[asan] adding support of 32-bit address sanitizer for MIPSDaniel Sanders
Summary: The patch supports both the clang cross-compiler and native compiler Patch by Kumar Sukhani <Kumar.Sukhani@imgtec.com> Test Plan: Kumar had the following asan test results when compiled on a MIPS board: Expected Passes : 96 Expected Failures : 2 Unsupported Tests : 84 Unexpected Passes : 4 Unexpected Failures: 19 The list of unexpected failures can be found in the review. Reviewers: kcc, petarj, dsanders Reviewed By: kcc Subscribers: farazs, kcc, llvm-commits Differential Revision: http://reviews.llvm.org/D4208 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211587 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13[sanitizer] AArch64 sanitizer support; patch by Christophe Lyon and Yvan RouxKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201303 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14[asan] Include <sys/stat.h> if __x86_64__ is definedKostya Serebryany
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 nor x32. This patch includes <sys/stat.h> instead of <asm/stat.h> and comments out size check of struct __old_kernel_stat for x86-64. Patch by H.J. Lu git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@199192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-27asan: fix android buildDmitry Vyukov
android does not seem to have IOCB_CMD_PREADV git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195835 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-27tsan: minor refactoringDmitry Vyukov
use common helper macro git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195832 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-27tsan: support synchronization by means of linux aioDmitry Vyukov
http://llvm-reviews.chandlerc.com/D2269 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22[sanitizer] Fix kernel headers compatibility on powerpc64.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195442 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22[sanitizer] Restore perf_event_attr handling.Evgeniy Stepanov
This time in a forward/backward compatible way. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195434 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22[sanitizer] Fix build.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195433 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22[sanitizer] Change the way we use certain linux kernel headers.Evgeniy Stepanov
Some linux headers are broken on older kernels. Instead of depending on the constants and types from such headers directly, we provide our own definitions and then verify them with compile-time assertions. This makes the dependency on the headers test-only and would allow switching to some other way of testing on older kernels, or even disable the tests as the last resort (after all, kernel interfaces are supposed to be stable). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@195427 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-06[asan] attempting to fix x32 build (see ↵Kostya Serebryany
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59018) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194155 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01[sanitizer] Switch to an older version of struct iocb that is found in the ↵Evgeniy Stepanov
latest Android NDK. They are binary compatible, and we don't use any of the new fields anyway. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193870 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-01[sanitizer] Enhance io_submti syscall handler.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193848 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-30[asan] Fix syscall hooks build on Android.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193670 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-06[sanitizer] A bunch of linux system call handlers.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190157 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-18Revert r188369 (and r188455) which breaks the build on at least someChandler Carruth
Linux systems. I've replied on the original commit thread with details of the problem. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-15[sanitizer] Add missing include.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188455 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-14[sanitizer] Split platform_limits_posix into system- and kernel-dependent parts.Evgeniy Stepanov
This change moves everything depending on kernel headers (mostly ioctl types and ids) into a separate source file. This will reduce the possibility of header conflict on various platforms (most importantly, older glibc versions). This change also removes 2 deprecated ioctls, and symbolic ids for other bunch of ambiguous ioctls (i.e. same id is shared by ioctls with different memory behavior). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188369 91177308-0d34-0410-b5e6-96231b3b80d8