#
86e3340f |
| 02-Jul-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Rangify some loops.
Patch by Philip Pfaffe!
llvm-svn: 241279
|
#
ab1243fe |
| 29-Jun-2015 |
Adrian Prantl <aprantl@apple.com> |
Add a DIModule metadata node to the IR. It is meant to be used to record modules @imported by the current compile unit, so a debugger an import the same modules to replicate this environment before d
Add a DIModule metadata node to the IR. It is meant to be used to record modules @imported by the current compile unit, so a debugger an import the same modules to replicate this environment before dropping into the expression evaluator.
DIModule is a sibling to DINamespace and behaves quite similarly. In addition to the name of the module it also records the module configuration details that are necessary to uniquely identify the module. This includes the configuration macros (e.g., -DNDEBUG), the include path where the module.map file is to be found, and the isysroot.
The idea is that the backend will turn this into a DW_TAG_module.
http://reviews.llvm.org/D9614 rdar://problem/20965932
llvm-svn: 241017
show more ...
|
Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
#
f00654e3 |
| 23-Jun-2015 |
Alexander Kornienko <alexfh@google.com> |
Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)
Apparently, the style needs to be agreed upon first.
llvm-svn: 240390
|
#
1c863ca3 |
| 22-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Remove the IsStreamed member variable.
Having different code paths for streamed and regular bitcode reading was a source of bugs in the past and this defines them away.
It has a small but noticeabl
Remove the IsStreamed member variable.
Having different code paths for streamed and regular bitcode reading was a source of bugs in the past and this defines them away.
It has a small but noticeable impact on performance. I timed running "opt -disable-output -disable-verify" on a ltoed clang. It goes from
14.752845231 seconds time elapsed ( +- 0.16% )
to
15.012463721 seconds time elapsed ( +- 0.11% )
Extracted from a patch by Karl Schimpf.
llvm-svn: 240305
show more ...
|
#
70bc5f13 |
| 19-Jun-2015 |
Alexander Kornienko <alexfh@google.com> |
Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-c
Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:
tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/
Thanks to Eugene Kosov for the original patch!
llvm-svn: 240137
show more ...
|
#
7fddeccb |
| 17-Jun-2015 |
David Majnemer <david.majnemer@gmail.com> |
Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.
This isn't desirable because: - All LandingPadInsts in the same function
Move the personality function from LandingPadInst to Function
The personality routine currently lives in the LandingPadInst.
This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information.
- There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function.
Differential Revision: http://reviews.llvm.org/D10429
llvm-svn: 239940
show more ...
|
#
456baad2 |
| 17-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle forward referenced function when streaming bitcode.
Without this the included unit test would assert in
assert(BasicBlockFwdRefs.empty() && "Unresolved blockaddress fwd references");
llvm
Handle forward referenced function when streaming bitcode.
Without this the included unit test would assert in
assert(BasicBlockFwdRefs.empty() && "Unresolved blockaddress fwd references");
llvm-svn: 239871
show more ...
|
#
728074b7 |
| 17-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Handle MaterializeAll in getLazyBitcodeModuleImpl. NFC.
This just handles both cases in the same place.
Extracted from a patch by Karl Schimpf.
llvm-svn: 239870
|
#
1aabf982 |
| 16-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Use std::unique_ptr to manage the DataStreamer in bitcode parsing.
We were already deleting it, this just makes it explicit.
llvm-svn: 239867
|
#
dcd1dca2 |
| 16-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC.
llvm-svn: 239858
|
#
c6afe0d4 |
| 16-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Improve handling of end of file in the bitcode reader.
Before this patch the bitcode reader would read a module from a file that contained in order:
* Any number of non MODULE_BLOCK sub blocks. * O
Improve handling of end of file in the bitcode reader.
Before this patch the bitcode reader would read a module from a file that contained in order:
* Any number of non MODULE_BLOCK sub blocks. * One MODULE_BLOCK * Any number of non MODULE_BLOCK sub blocks. * 4 '\n' characters to handle OS X's ranlib.
Since we support lazy reading of modules, any information that is relevant for the module has to be in the MODULE_BLOCK or before it. We don't gain anything from checking what is after.
This patch then changes the reader to stop once the MODULE_BLOCK has been successfully parsed.
This avoids the ugly special case for .bc files in an archive and makes it easier to embed bitcode files.
llvm-svn: 239845
show more ...
|
#
82437bf7 |
| 15-Jun-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
Protection against stack-based memory corruption errors using SafeStack
This patch adds the safe stack instrumentation pass to LLVM, which separates the program stack into a safe stack, which stores
Protection against stack-based memory corruption errors using SafeStack
This patch adds the safe stack instrumentation pass to LLVM, which separates the program stack into a safe stack, which stores return addresses, register spills, and local variables that are statically verified to be accessed in a safe way, and the unsafe stack, which stores everything else. Such separation makes it much harder for an attacker to corrupt objects on the safe stack, including function pointers stored in spilled registers and return addresses. You can find more information about the safe stack, as well as other parts of or control-flow hijack protection technique in our OSDI paper on code-pointer integrity (http://dslab.epfl.ch/pubs/cpi.pdf) and our project website (http://levee.epfl.ch).
The overhead of our implementation of the safe stack is very close to zero (0.01% on the Phoronix benchmarks). This is lower than the overhead of stack cookies, which are supported by LLVM and are commonly used today, yet the security guarantees of the safe stack are strictly stronger than stack cookies. In some cases, the safe stack improves performance due to better cache locality.
Our current implementation of the safe stack is stable and robust, we used it to recompile multiple projects on Linux including Chromium, and we also recompiled the entire FreeBSD user-space system and more than 100 packages. We ran unit tests on the FreeBSD system and many of the packages and observed no errors caused by the safe stack. The safe stack is also fully binary compatible with non-instrumented code and can be applied to parts of a program selectively.
This patch is our implementation of the safe stack on top of LLVM. The patches make the following changes:
- Add the safestack function attribute, similar to the ssp, sspstrong and sspreq attributes.
- Add the SafeStack instrumentation pass that applies the safe stack to all functions that have the safestack attribute. This pass moves all unsafe local variables to the unsafe stack with a separate stack pointer, whereas all safe variables remain on the regular stack that is managed by LLVM as usual.
- Invoke the pass as the last stage before code generation (at the same time the existing cookie-based stack protector pass is invoked).
- Add unit tests for the safe stack.
Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself.
Differential Revision: http://reviews.llvm.org/D6094
llvm-svn: 239761
show more ...
|
#
64a27fb8 |
| 15-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't indent inside a namespace. NFC.
llvm-svn: 239760
|
#
6ace6855 |
| 15-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Replace @ with the more common \. NFC.
llvm-svn: 239759
|
#
cbdcb505 |
| 15-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Don't repeat names in comments and start functions with a lower case letter.
llvm-svn: 239756
|
#
4223a1f8 |
| 15-Jun-2015 |
Rafael Espindola <rafael.espindola@gmail.com> |
Cleanup the constructor of BitcodeReader. NFC.
Use the same argument names as the members. Use default member initializes.
Extracted from a patch by Karl Schimpf.
llvm-svn: 239749
|
#
ef5e7add |
| 12-Jun-2015 |
Yaron Keren <yaron.keren@gmail.com> |
Rangify two for loops in BitcodeReader.cpp.
llvm-svn: 239627
|
#
a911af0e |
| 06-Jun-2015 |
Filipe Cabecinhas <me@filcab.net> |
Use early return idiom. NFC
llvm-svn: 239228
|
#
da86b6d4 |
| 03-Jun-2015 |
Filipe Cabecinhas <me@filcab.net> |
[BitcodeReader] Diagnose type mismatches with aliases
Bug found with AFL fuzz.
llvm-svn: 238895
|
#
8e42190d |
| 03-Jun-2015 |
Filipe Cabecinhas <me@filcab.net> |
[BitcodeReader] Check vector size before trying to create a VectorType
Bug found with AFL fuzz
llvm-svn: 238891
|
#
14e68677 |
| 30-May-2015 |
Filipe Cabecinhas <me@filcab.net> |
[BitcodeReader] Change an assert to a call to a call to Error()
It's reachable from user input.
Bug found with AFL fuzz.
llvm-svn: 238633
|
#
f5e2fc47 |
| 29-May-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of charact
Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
If the type isn't trivially moveable emplace can skip a potentially expensive move. It also saves a couple of characters.
Call sites were found with the ASTMatcher + some semi-automated cleanup.
memberCallExpr( argumentCountIs(1), callee(methodDecl(hasName("push_back"))), on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))), hasArgument(0, bindTemporaryExpr( hasType(recordDecl(hasNonTrivialDestructor())), has(constructExpr()))), unless(isInTemplateInstantiation()))
No functional change intended.
llvm-svn: 238602
show more ...
|
#
6a92a3fe |
| 27-May-2015 |
Filipe Cabecinhas <me@filcab.net> |
[BitcodeReader] Change assert to report_fatal_error
It can be triggered by user input.
Bug found with AFL fuzz.
llvm-svn: 238272
|
#
85fa7d50 |
| 26-May-2015 |
Owen Anderson <resistor@mac.com> |
Add initial support for the convergent attribute.
llvm-svn: 238264
|
#
0eb8a59a |
| 26-May-2015 |
Filipe Cabecinhas <me@filcab.net> |
[BitcodeReader] Sanity check on Comdat ID
Shouldn't be an assert, since user input can trigger it.
Bug found with AFL fuzz.
llvm-svn: 238261
|