llvm-project/clang/lib/Lex
Peter Collingbourne c4122c17b4 Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute
This patch adds the -fsanitize=safe-stack command line argument for clang,
which enables the Safe Stack protection (see http://reviews.llvm.org/D6094
for the detailed description of the Safe Stack).

This patch is our implementation of the safe stack on top of Clang. The
patches make the following changes:

- Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang
  to control safe stack usage (the safe stack is disabled by default).

- Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be
  used to disable the safe stack for individual functions even when enabled
  globally.

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/D6095

llvm-svn: 239762
2015-06-15 21:08:13 +00:00
..
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
HeaderMap.cpp Make VFS and FileManager match the current MemoryBuffer API. 2014-10-26 22:44:13 +00:00
HeaderSearch.cpp [modules] If we see a #include that maps to a module, but use of precompiled modules is disabled, track submodule visibility anyway if -fmodules-local-submodule-visibility is enabled. This, in effect, gives modules semantics but without precompilation. 2015-05-18 03:52:30 +00:00
Lexer.cpp Replace a few std::string& with StringRef. NFC. 2015-06-01 20:00:16 +00:00
LiteralSupport.cpp [lex] Don't read past the end of the buffer 2015-03-29 14:11:37 +00:00
MacroArgs.cpp [modules] Stop trying to fake up a linear MacroDirective history. 2015-04-29 23:20:19 +00:00
MacroInfo.cpp [modules] Add a mechanism to dump information about a macro. 2015-04-30 23:10:40 +00:00
Makefile
ModuleMap.cpp [cleanup] Remove unused default argument and tidy up. 2015-06-10 01:37:59 +00:00
PPCaching.cpp Fix the build break introduced by r195799 by restoring two close 2013-11-27 01:40:12 +00:00
PPCallbacks.cpp
PPConditionalDirectiveRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPDirectives.cpp Revert r237609 for now. 2015-05-19 19:58:11 +00:00
PPExpressions.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
PPLexerChange.cpp Avoid using a C++11 library feature not present in libstdc++4.7. 2015-05-21 01:26:53 +00:00
PPMacroExpansion.cpp Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute 2015-06-15 21:08:13 +00:00
PTHLexer.cpp Replace a few std::string& with StringRef. NFC. 2015-06-01 20:00:16 +00:00
Pragma.cpp Bug fix for PR23577 (https://llvm.org/bugs/show_bug.cgi?id=23577#c0). 2015-05-25 11:21:20 +00:00
PreprocessingRecord.cpp Switch PPCallbacks to take the new MacroDefinition instead of MacroDirective*, in order to preserve full information on module macro expansion. 2015-05-04 03:15:40 +00:00
Preprocessor.cpp [modules] If we re-enter a submodule from within itself (when submodule 2015-05-21 01:20:10 +00:00
PreprocessorLexer.cpp Make Preprocessor::Lex non-recursive. 2013-09-19 00:41:32 +00:00
ScratchBuffer.cpp MSan told me that we actually dump the entire scratch buffer into PCH files, initialize it. 2015-04-06 20:01:49 +00:00
TokenConcatenation.cpp [c++1z] Support for u8 character literals. 2014-11-08 06:08:42 +00:00
TokenLexer.cpp [MSVC] Mimic MSVC whitespace collapse for incompatible token pasting 2015-04-17 12:43:57 +00:00
UnicodeCharSets.h Header guard canonicalization, clang part. 2014-08-13 16:25:19 +00:00