Alexey Samsonov
d9cc7f884f
Provide missing Internal{Alloc, Free} declarations for libbacktrace symbolizer.
...
Summary:
Since r223145 we don't include sanitizer_allocator_internal.h into
sanitizer_symbolizer.h, so we can have undefined reference to
Internal{Alloc, Free} stuff into sanitizer_symbolizer_libbacktrace.cc under
SANITIZER_CP_DEMANGLE macro.
This patch simply includes appropriate header into
sanitizer_symbolizer_libbacktrace.h to resolve the issue.
Patch by Maxim Ostapenko!
Reviewers: kcc, eugenis, samsonov
Subscribers: llvm-commits, ygribov
Differential Revision: http://reviews.llvm.org/D13429
llvm-svn: 249633
2015-10-07 23:13:28 +00:00
Oliver Stannard
28d2edad5b
Add ARM RTABI aliases for half-precision conversions
...
The ARM RTABI defines these functions as __aeabi_h2f, __aeabi_f2h and
__aeabi_d2h, so we need aliases for them.
llvm-svn: 249559
2015-10-07 16:15:22 +00:00
Saleem Abdulrasool
e597ace1fe
builtins: fix build
...
__GNUC__ indicates the GNU compiler, not __GNU__. This got through due to
building with clang rather than gcc.
llvm-svn: 249516
2015-10-07 03:30:02 +00:00
Saleem Abdulrasool
396e794459
builtins: implement instrinics for cl
...
cl does not support the same intrinsics as clang. Provide implementations for
the intrinsics using MSVC builtins.
Patch by Tee Hao Wei!
llvm-svn: 249515
2015-10-07 02:58:11 +00:00
Saleem Abdulrasool
b0b7c8a8dd
builtins: emulate _Complex for cl
...
cl does not support C99 completely as of VS2015. Emulate _Complex to allow
building with MSVC.
Patch by Tee Hao Wei!
llvm-svn: 249514
2015-10-07 02:58:07 +00:00
Saleem Abdulrasool
71c47e5a86
builtins: use MSVC intrinsics with cl
...
Use MSVCRT functions for floating-point builtins unavailable on MSVC.
Patch by Tee Hao Wei!
llvm-svn: 249513
2015-10-07 02:58:02 +00:00
Renato Golin
814e5caebc
[LSAN] Mark death callback as unstable while we investigate the cause in AArch64
...
llvm-svn: 249398
2015-10-06 13:29:44 +00:00
Vasileios Kalintiris
0943a95f46
[builtins] Enable building of the builtins library for MIPS targets.
...
Reviewers: howard.hinnant, samsonov
Subscribers: samsonov, dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D13098
llvm-svn: 249382
2015-10-06 09:02:38 +00:00
Saleem Abdulrasool
d2eb26c7f0
builtins: fix build
...
Unfortunately, int_utils.h needs to depend on int_lib for the common macro
definitions. However, currently, int_utils.h is included by int_lib.h. Reorder
the inclusion to work around this.
llvm-svn: 249376
2015-10-06 04:33:08 +00:00
Saleem Abdulrasool
e6f9652a22
builtins: Use MSVC-equivalents of attributes
...
This allows us to build the builtins using MSVC. NFC.
Patch by Tee Hao Wei!
llvm-svn: 249375
2015-10-06 04:33:05 +00:00
Saleem Abdulrasool
4c81f0a1be
builtins: tweak constant spelling
...
Use 4294967296.f instead of 0x1p32f to fix MSVC. NFC.
Patch by Tee Hao Wei!
llvm-svn: 249374
2015-10-06 04:33:02 +00:00
Saleem Abdulrasool
89a92b9fb2
builtins: tweak Windows build
...
Include Windows.h instead of winbase.h and windef.h
Patch by Tee Hao Wei!
llvm-svn: 249373
2015-10-06 04:32:59 +00:00
Keno Fischer
e16edb554f
[compiler-rt] Properly detect lack of available system libraries for arch in clang_darwin.mk
...
Summary: This is the Makefile analog of r247833, except that the test also had to be changed such that clang actually attempts to link the program as opposed to just building it. Because of that change, I also switched the order to checking for ld/clang architecture support, because now lack of ld support would make the clang check fail. This fixes PR24776.
Reviewers: beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13425
llvm-svn: 249358
2015-10-05 22:24:12 +00:00
Adhemerval Zanella
5ea8dcb8cf
[lsan] [aarch64] Add support for AArch64
...
This patch add support for leak sanitizer for aarch64. Similar to
MIPS it uses a SizeClassAllocator32 due VMA constraints (aarch64
currently supports 39 and 42-bit VMA).
llvm-svn: 249337
2015-10-05 19:16:09 +00:00
Daniel Sanders
bb9c116165
[asan][mips] Fix ABI incompatibility crash in pthread_create() following r248325.
...
Like i386, Mips needs a versioned interceptor but must select GLIBC_2.2.
llvm-svn: 249307
2015-10-05 12:43:47 +00:00
Chris Bieneman
f9d71a5439
[CMake] [darwin] Removing a line of debug code that I accidentally committed.
...
llvm-svn: 249278
2015-10-04 15:48:16 +00:00
Chris Bieneman
be8b60b602
[CMake] [darwin] [builtins] Add INSTALL_DIR to darwin_lipo_libs
...
The darwin and macho_embedded libraries get installed to different locations, so we need to feed through an INSTALL_PATH.
llvm-svn: 249199
2015-10-02 22:14:25 +00:00
Evgeniy Stepanov
06e338b403
[asan] Disable pthread_create_version test on mips.
...
llvm-svn: 249191
2015-10-02 21:23:53 +00:00
Chris Bieneman
b22351cb18
[CMake] Workaround for the lipo output directory not being created.
...
This should resolve an issue reported by mclow.
llvm-svn: 249158
2015-10-02 17:37:40 +00:00
Chris Bieneman
f0672f1187
[CMake] [builtins] [macho_embedded] Separate out the 64-bit thumb builtins so they don't get included on 'm' architectures. NFC.
...
This should help make the compiler-rt build less noisy.
llvm-svn: 249084
2015-10-01 22:01:06 +00:00
Chris Bieneman
f9e0fe77c7
[CMake] [builtins] [macho_embedded] Don't pass -mfloat-abi=hard flag to x86 because the compiler ignores it and complains.
...
llvm-svn: 249076
2015-10-01 21:21:19 +00:00
Chris Bieneman
55745688c6
[CMake] [builtins] [OS X] Adding all builtins that generate empty object files for OS X to the exclude lists.
...
This should help make the compiler-rt build less noisy.
llvm-svn: 249070
2015-10-01 21:04:17 +00:00
Chris Bieneman
d943670a82
[CMake] [builtins] [iOS Sim] Adding all builtins that generate empty object files for the iOS simulator to the exclude lists.
...
This should help make the compiler-rt build less noisy.
llvm-svn: 249068
2015-10-01 21:03:00 +00:00
Chris Bieneman
f14b3f10a8
[CMake] [iOS] [builtins] Adding all builtins that generate empty object files for iOS to the exclude lists.
...
This should help make the compiler-rt build less noisy.
llvm-svn: 249057
2015-10-01 19:26:29 +00:00
Chris Bieneman
adfe26fdbd
[CMake] Only build the simulator builtins if you're also building the device builtins.
...
This matters because simulator builtins get lipo'd together with the device builtins into a single static archive per-platform.
llvm-svn: 249056
2015-10-01 19:26:26 +00:00
Chris Bieneman
291723353a
[CMake] Only add an OS to the supported OS lists if there are supported architectures for that OS.
...
llvm-svn: 249054
2015-10-01 18:58:59 +00:00
Evgeniy Stepanov
74697714c2
[asan] Tweak gen_dynamic_list.py to work with both Py2 and Py3.
...
llvm-svn: 249051
2015-10-01 18:27:28 +00:00
Evgeniy Stepanov
8adbded6a4
[asan] Tune down SizeClassAllocator tests.
...
This should make the Android/x86 bot (running on a Nexus Player) less
flaky.
llvm-svn: 249044
2015-10-01 17:59:08 +00:00
Vedant Kumar
f7ed23f744
[compiler-rt] Fix build (again) by wrapping lines to 80 chars (NFC)
...
llvm-svn: 248979
2015-10-01 02:15:40 +00:00
Vedant Kumar
f997bd88d7
[compiler-rt] Fix build by wrapping lines to 80 chars (NFC)
...
llvm-svn: 248973
2015-10-01 00:48:07 +00:00
Vedant Kumar
59ba7b8cd1
[compiler-rt] Apply modernize-use-nullptr fixes in sanitizers
...
- Trim spaces.
- Use nullptr in place of 0 for pointer variables.
- Use '!p' in place of 'p == 0' for null pointer checks.
- Add blank lines to separate function definitions.
- Add 'extern "C"' or 'namespace foo' comments after the appropriate
closing brackets
This is a continuation of work from 409b7b82. The focus here is on the
various sanitizers (not sanitizer_common, as before).
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13225
llvm-svn: 248966
2015-10-01 00:22:21 +00:00
Vedant Kumar
552c0111f1
[sanitizer_common] Apply modernize-use-nullptr, other minor fixes
...
- Trim spaces.
- Use nullptr in place of 0 for pointer variables.
- Use '!p' in place of 'p == 0' for null pointer checks.
Patch by Eugene Zelenko!
Differential Revision: http://reviews.llvm.org/D13310
llvm-svn: 248964
2015-09-30 23:52:54 +00:00
Evgeniy Stepanov
25c58d124b
[asan] Fix asan_symbolize.py handling of non-existing paths
...
llvm-svn: 248962
2015-09-30 23:17:39 +00:00
Ivan Krasin
97746d75bb
CFI: add a test from base-to-derived cast from the base destructor.
...
Summary: This adds an interesting bad cast case, originally found in https://crbug.com/537398 .
Reviewers: kcc
Subscribers: pcc
Differential Revision: http://reviews.llvm.org/D13307
llvm-svn: 248958
2015-09-30 23:08:55 +00:00
Chris Bieneman
b1ff6e4260
[CMake] [Darwin] Add and populate PROFILE_SUPPORTED_OS to enable building libclang_rt.profile for iOS.
...
llvm-svn: 248948
2015-09-30 21:23:22 +00:00
Chris Bieneman
7bfe1ee428
[CMake] [Darwin] [macho_embedded] Specify the version min explicitly.
...
We need to set the OS X deployment target on the macho_embedded libraries to match the outputs from the autoconf build system.
llvm-svn: 248944
2015-09-30 21:09:23 +00:00
Chris Bieneman
af01508cc3
[CMake] [Darwin] [builtins] Add support for building libclang_rt.10.4.a
...
This builtin library is used when setting the OS X deployment target to 10.4, which we still support.
llvm-svn: 248940
2015-09-30 20:26:14 +00:00
Chris Bieneman
d823302483
[CMake] [Darwin] [builtins] Change condition for skipping cc_kext to be setting based.
...
This is needed because we need to skip cc_kext generation for more than just the simulator builds.
llvm-svn: 248939
2015-09-30 20:25:10 +00:00
Chris Bieneman
d208e41030
[CMake] [macho_embedded] We need to set some extra flags when building the macho_embedded builtins.
...
If we don't specify the arm target the float ABI compiler flags get ignored.
llvm-svn: 248853
2015-09-29 23:21:09 +00:00
Chris Bieneman
d868fef16c
[CMake] [Darwin] [builtins] Make CMake re-generate if the builtin filter lists change.
...
We need to make sure that if you change the builtin filter lists CMake re-generates its configurations so it includes the right builtins in the generated libraries.
llvm-svn: 248852
2015-09-29 23:21:07 +00:00
Chris Bieneman
6e18e1e39e
[CMake] [Darwin] Support building the macho_embedded builtin libraries.
...
Summary: This ports functionality from the clang_macho_embedded.mk platform makefile over to CMake.
Reviewers: bogner, samsonov, bob.wilson
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13226
llvm-svn: 248850
2015-09-29 23:13:45 +00:00
Evgeniy Stepanov
01e4c87a5a
[msan] Disable allocator_mapping test on mips64 and aarch64.
...
llvm-svn: 248835
2015-09-29 22:24:57 +00:00
Alexey Samsonov
4133c18b1c
[CFI] Make CFI tests require UBSan (for diagnostic mode).
...
CFI itself, on the other hand, doesn't require anything, including
sanitizer_common.
llvm-svn: 248830
2015-09-29 21:43:37 +00:00
Evgeniy Stepanov
7aba3960c7
[msan] Early allocator initialization.
...
Map MSan heap space early (in __msan_init) so that user code can not
accidentally (i.e. w/o MAP_FIXED) create a conflicting mapping.
llvm-svn: 248829
2015-09-29 21:28:54 +00:00
Renato Golin
9be32f6317
Add armhf as unstable runtime temporarily
...
llvm-svn: 248819
2015-09-29 18:35:55 +00:00
Kostya Serebryany
0c3a5767d9
[sanitizer] Fix Clang-tidy modernize-use-nullptr warnings in lib/sanitizer_common headers, unify closing inclusion guards. Patch by Eugene Zelenko
...
llvm-svn: 248816
2015-09-29 18:23:36 +00:00
Chris Bieneman
5def2a8a44
[CMake] [Darwin] [builtins] Apply OS and OS-arch filters to cc_kext builtin libraries.
...
We don't want to filter out the builtins that are present in libSystem like we do for the normal builtins because kexts can't link libSystem, but we should filter out all the builtins that are generally not supported on the OS and architecture.
llvm-svn: 248756
2015-09-28 23:09:46 +00:00
Chris Bieneman
88d8534e87
[CMake] Accidentally committed code that was using a variable only populated in some earlier code. NFC.
...
llvm-svn: 248752
2015-09-28 22:20:25 +00:00
Chris Bieneman
1341472f92
[CMake] [Darwin] [builtins] Fix building builtins for Darwin simulator platforms.
...
For Darwin simulator platforms we shouldn't build the cc_kext builtins at all because they aren't applicable, and we should includ the simulator builtins as slices inside the main platform builtin library.
llvm-svn: 248751
2015-09-28 22:18:31 +00:00
Chris Bieneman
4b16003590
[CMake] [Darwin] [builtins] Exclude aeabi builtins from iOS arm32 architectures since we don't support aeabi on iOS.
...
llvm-svn: 248744
2015-09-28 21:15:46 +00:00