Commit Graph

131889 Commits

Author SHA1 Message Date
Alexey Samsonov 5b2c6ea38f [ASan] lit tests: use nm instead of llvm-nm, until llvm-nm becomes usable on Mac. Port output test change in r161948 to lit
llvm-svn: 161951
2012-08-15 14:33:30 +00:00
Dmitry Vyukov 4b5ec3145a tsan: add some more tests for memory allocator
llvm-svn: 161950
2012-08-15 14:25:33 +00:00
Dmitry Vyukov c693689bb1 tsan: fix several integer overflows
llvm-svn: 161949
2012-08-15 14:25:08 +00:00
Alexander Potapenko 6c1de8faa7 Check for filenames and numbers to detect possible problems with asan_symbolize.py on -fPIE binaries.
llvm-svn: 161948
2012-08-15 14:00:09 +00:00
Alexander Potapenko 1800362758 Pass offset of the frame address within the binary to addr2line instead of the absolute address.
Fixes the problem with -PIE binaries.

llvm-svn: 161947
2012-08-15 13:58:24 +00:00
Alexander Potapenko 07ea07c3ca Patch the frame address regardless of the frame number.
llvm-svn: 161946
2012-08-15 13:23:03 +00:00
Alexander Potapenko 20f9fcc285 Move the prototype of __CFInitialize to asan_mac.h so that asan_malloc_mac.cc may use it in the dynamic library mode.
llvm-svn: 161945
2012-08-15 12:23:36 +00:00
Bill Wendling e1c54262f4 Set the branch probability of branching to the 'normal' destination of an invoke
instruction to something absurdly high, while setting the probability of
branching to the 'unwind' destination to the bare minimum. This should set cause
the normal destination's invoke blocks to be moved closer to the invoke.

PR13612

llvm-svn: 161944
2012-08-15 12:22:35 +00:00
Alexander Potapenko 9a168a7405 Use SANITIZER_INTERFACE_ATTRIBUTE instead of __attribute__((visibility("default")))
Export CheckFailed, asan_malloc, asan_free, asan_memalign, AsanStackTrace::CompressStack, AsanStackTrace::UncompressStack from the dynamic runtime library.

llvm-svn: 161943
2012-08-15 11:57:52 +00:00
Alexander Potapenko 55df945db2 Make __asan::asan_{malloc,free,memalign} globally visible, so that the dynamic version of the runtime will export them.
llvm-svn: 161942
2012-08-15 11:32:15 +00:00
Alexey Samsonov 9fe914b099 [ASan] Port (the last one) tricky interface_test to lit, and a *huge* chunks of boilerplate to run tests for 32/64 bits and all optimization levels. Alas, lit doesn't support for loops in RUN-lines...
llvm-svn: 161941
2012-08-15 11:26:57 +00:00
Benjamin Kramer 26b568d9d5 Fix a const violation in the generated disassembler.
llvm-svn: 161940
2012-08-15 10:26:44 +00:00
Alexander Potapenko 81a1ec8ea6 Do not attempt to intercept mlock and friends on Windows.
llvm-svn: 161939
2012-08-15 09:46:45 +00:00
Alexander Potapenko 785f8bc4ec Use the common interception machinery for mlock/munlock/mlockall/munlockall.
llvm-svn: 161938
2012-08-15 09:22:57 +00:00
Kostya Serebryany 1e575ab8b2 [asan] implement --asan-always-slow-path, which is a part of the improvement to handle unaligned partially OOB accesses. See http://code.google.com/p/address-sanitizer/issues/detail?id=100
llvm-svn: 161937
2012-08-15 08:58:58 +00:00
Alexey Samsonov 0e056762ef [ASan] use clangxx_asan instead of clang_asan for C++ lit tests
llvm-svn: 161936
2012-08-15 08:54:14 +00:00
Alexey Samsonov 6016486a16 [ASan] port remaining output and feature tests to lit. TODO: we should in fact run most of the tests for 32/64 bits and for all optimization levels
llvm-svn: 161935
2012-08-15 08:29:17 +00:00
Hans Wennborg 420052640f Check for improper use of 'static' and type qualifiers in array
declarators.

They are only allowed for function parameters, and then only on the
outermost array type derivation.

llvm-svn: 161934
2012-08-15 07:42:30 +00:00
Alexey Samsonov 5717f4c1eb [ASan] port interception and shared library tests to lit
llvm-svn: 161933
2012-08-15 07:13:51 +00:00
Alexey Samsonov 682a07cbe1 [ASan] move declaration of __asan_default_options to interface header
llvm-svn: 161932
2012-08-15 07:11:14 +00:00
Eric Christopher d9401e2e58 Revert this to try to bring the i386 bots back.
llvm-svn: 161931
2012-08-15 06:31:06 +00:00
Tobias Grosser 7a19b31a23 Remove executable bits from html files
llvm-svn: 161930
2012-08-15 05:50:24 +00:00
Owen Anderson 1ff74b0d2d Fix a problem with APFloat::roundToIntegral where it would return incorrect results for negative inputs to trunc. Add unit tests to verify this behavior.
llvm-svn: 161929
2012-08-15 05:39:46 +00:00
Tobias Grosser 1049611070 www documentation for using Polly with dragonegg.
Added a file that explains how to load Polly in dragonegg.
Also fixed a typo in the document for clang.

Committed with a typo fix and a change to make this website available from
the documentation section.

Contributed by: Sameer Sahasrabuddhe  <Sameer.Sahasrabuddhe@amd.com>

llvm-svn: 161928
2012-08-15 05:02:25 +00:00
NAKAMURA Takumi 19f29cfc14 clang/lib/Sema/SemaStmt.cpp: Include MCAsmLexer.h to appease msvc to define llvm::AsmToken.
llvm-svn: 161927
2012-08-15 04:19:08 +00:00
Michael Liao 69e172a6f0 fix infinite loop in instcombine with more than 4GB memcpy
- memcpy size is wrongly truncated into 32-bit and treat 8GB memcpy is
  0-sized memcpy
- as 0-sized memcpy/memset is already removed before SimplifyMemTransfer
  and SimplifyMemSet in visitCallInst, replace 0 checking with
  assertions.
- replace getZExtValue() with getLimitedValue() according to
  Eli Friedman

llvm-svn: 161923
2012-08-15 03:49:59 +00:00
Nick Lewycky 58564d5aa6 Fix a typo that led to a failure to correctly verify bitcast instructions.
Patch by Stephen Hines!

llvm-svn: 161921
2012-08-15 02:37:07 +00:00
Richard Smith beb386aba8 Use the right alignment when allocating NestedNameSpecifier objects.
llvm-svn: 161920
2012-08-15 01:41:43 +00:00
Richard Smith 8f3447c032 Fix undefined behavior: don't perform array indexing through a potentially null
pointer.

llvm-svn: 161919
2012-08-15 01:39:31 +00:00
Richard Smith f3bb0b2a9b Fix overallocation and underalignment of ASTTemplateArgumentListInfo objects.
llvm-svn: 161918
2012-08-15 01:22:58 +00:00
Jordan Rose 3e45307564 [analyzer] Doxygen comments in ObjCMethodCall.
No functionality change.

llvm-svn: 161917
2012-08-15 00:52:03 +00:00
Jordan Rose 5132aaeb04 [analyzer] Don't inline dynamic-dispatch methods unless -analyzer-ipa=dynamic.
Previously we were checking -analyzer-ipa=dynamic-bifurcate only, and
unconditionally inlining everything else that had an available definition,
even under -analyzer-ipa=inlining (but not under -analyzer-ipa=none).

llvm-svn: 161916
2012-08-15 00:52:00 +00:00
Jordan Rose 0f6d63be06 [analyzer] Correctly devirtualize virtual method calls in destructors.
C++11 [class.cdtor]p4: When a virtual function is called directly or
  indirectly from a constructor or from a destructor, including during
  the construction or destruction of the class’s non-static data members,
  and the object to which the call applies is the object under
  construction or destruction, the function called is the final overrider
  in the constructor's or destructor's class and not one overriding it in
  a more-derived class.

llvm-svn: 161915
2012-08-15 00:51:56 +00:00
Chad Rosier 2d5d1327c4 [ms-inline asm] Add support for clobbers in CodeGen.
llvm-svn: 161914
2012-08-15 00:43:09 +00:00
Chad Rosier 222ed4b53a [ms-inline asm] Have MC start parsing the asms.
llvm-svn: 161913
2012-08-15 00:42:47 +00:00
Chad Rosier 068e4775f8 [ms-inline asm] Mark getClobber() const.
llvm-svn: 161912
2012-08-15 00:41:20 +00:00
Jordan Rose 95c841eaa0 [analyzer] A base class needs a complete definition to provide offsets.
No test case yet; trying to reduce one from a failing internal buildbot.

llvm-svn: 161911
2012-08-15 00:36:44 +00:00
Sean Callanan be3c5dab76 Fixed a typo.
<rdar://problem/12090979>

llvm-svn: 161910
2012-08-15 00:26:32 +00:00
Richard Trieu b7ed89eb94 Check local static variables for self reference on initialization.
llvm-svn: 161909
2012-08-14 23:50:52 +00:00
Chad Rosier a078a5e405 [ms-inline asm] More test cases to make sure buildMSAsmString() doesn't regress.
llvm-svn: 161908
2012-08-14 23:48:41 +00:00
Anton Korobeynikov c6d945b11a The names of VFP variants of half-to-float conversion instructions were
reversed. This leads to wrong codegen for float-to-half conversion
intrinsics which are used to support storage-only fp16 type.
NEON variants of same instructions are fine.

llvm-svn: 161907
2012-08-14 23:36:01 +00:00
Eric Christopher 5f61a7498b This needs braces. Spotted by Bill.
llvm-svn: 161906
2012-08-14 23:32:15 +00:00
Chad Rosier 767a7b9ed0 [ms-inline asm] Remove the last bits of LineEnds.
llvm-svn: 161904
2012-08-14 23:14:45 +00:00
Johnny Chen 6cf6f89005 A little bit of refactoring.
llvm-svn: 161903
2012-08-14 23:09:48 +00:00
Michael Liao 06f6fe875a minor fix of X86ISD::VSEXT_MOVL dump
llvm-svn: 161902
2012-08-14 22:53:17 +00:00
Richard Smith 1226c60593 Remove trailing return flag from FunctionTypeLoc, since we now carry that
information on FunctionProtoType. (This also fixes one of *many* misalignment
problems in the TypeLoc hierarchy...)

llvm-svn: 161901
2012-08-14 22:51:13 +00:00
Michael J. Spencer 8da8b3a2b0 [yaml2obj] Fix incorrect use of signed values.
llvm-svn: 161900
2012-08-14 22:42:31 +00:00
Richard Smith 8a0527d54e Fix undefined behavior: reference bound to dereferenced null pointer.
llvm-svn: 161899
2012-08-14 22:37:22 +00:00
Chad Rosier a6e89aac91 [ms-inline asm] Simplify more logic by using the Token::hasLeadingSpace() and
Token::isAtStartOfLine() APIs.

llvm-svn: 161898
2012-08-14 22:11:17 +00:00
Rafael Espindola 1af8aadf11 Small change to avoid confusion on what "used by" means for a compiler.
Patch by Jonathan Sauer.

llvm-svn: 161897
2012-08-14 21:58:29 +00:00