Commit Graph

6045 Commits

Author SHA1 Message Date
Chris Bieneman b9cca18f11 [CMake] Hand tuning the exclude lists for libclang_rt.10.4.a
llvm-svn: 249888
2015-10-09 19:53:54 +00:00
Chris Bieneman 2c23a80bbf [CMake] [Darwin] [builtins] Need to special case the naming of the OS X cc_kext builtin library.
llvm-svn: 249870
2015-10-09 18:38:34 +00:00
Chris Bieneman 4ebd15726f [CMake] [darwin] [builitins] Don't build x86_64h into the 10.4 builtins library
There is no haswell support in 10.4, so we don't need a 10.4 builtin library.

llvm-svn: 249868
2015-10-09 18:32:34 +00:00
Chris Bieneman 3a1ad39702 [CMake] [Darwin] [Builtins] Fixing a typo that was keeping the OS X 10.4 builtins library from being built properly.
llvm-svn: 249844
2015-10-09 16:47:43 +00:00
Reid Kleckner 8da160173c Remove the XFAIL for the C++ EH test
It works on Windows now.

llvm-svn: 249799
2015-10-09 01:33:15 +00:00
Evgeniy Stepanov 6870dc7311 Fix msan tests build.
CMake build rules listed -I flags for two different libc++ header
locations which broke when libc++ headers started using include_next.

Also change -I to -isystem to avoid compiler warning about
include_next.

llvm-svn: 249759
2015-10-08 22:21:36 +00:00
Evgeniy Stepanov b688a47963 New MSan mapping layout (compiler-rt part).
This is an implementation of
https://github.com/google/sanitizers/issues/579

It has a number of advantages over the current mapping:
* Works for non-PIE executables.
* Does not require ASLR; as a consequence, debugging MSan programs in
  gdb no longer requires "set disable-randomization off".
* Supports linux kernels >=4.1.2.
* The code is marginally faster and smaller.

This is an ABI break. We never really promised ABI stability, but
this patch includes a courtesy escape hatch: a compile-time macro
that reverts back to the old mapping layout.

llvm-svn: 249754
2015-10-08 21:35:34 +00:00
Evgeniy Stepanov 437615639f Revert "[lsan] [aarch64] Add support for AArch64"
This reverts commit ea02fa45225c35613bfecab383fb526e24b74497 (r249337).

Reason: broken "ninja AsanUnitTests" on Android/AArch64.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/20675/steps/build%20compiler-rt%20android%2Faarch64/logs/stdio

llvm-svn: 249730
2015-10-08 20:08:30 +00:00
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