llvm-project/clang/include/clang
Dokyung Song 831ae45e3d Recommit "[libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked."
Summary: libFuzzer intercepts certain library functions such as memcmp/strcmp by defining weak hooks. Weak hooks, however, are called only when other runtimes such as ASan is linked. This patch defines libFuzzer's own interceptors, which is linked into the libFuzzer executable when other runtimes are not linked, i.e., when -fsanitize=fuzzer is given, but not others.

The patch once landed but was reverted in 8ef9e2bf35 due to an assertion failure caused by calling an intercepted function, strncmp, while initializing the interceptors in fuzzerInit(). This issue is now fixed by calling libFuzzer's own implementation of library functions (i.e., internal_*) when the fuzzer has not been initialized yet, instead of recursively calling fuzzerInit() again.

Reviewers: kcc, morehouse, hctim

Subscribers: #sanitizers, krytarowski, mgorny, cfe-commits

Tags: #clang, #sanitizers

Differential Revision: https://reviews.llvm.org/D83494
2020-07-23 15:59:07 +00:00
..
ARCMigrate Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AST Merge some of the PCH object support with modular codegen 2020-07-22 12:46:12 -07:00
ASTMatchers [OpenMP] Add firstprivate as a default data-sharing attribute to clang 2020-07-12 23:01:40 -05:00
Analysis DomTree: remove explicit use of DomTreeNodeBase::iterator 2020-07-08 18:18:49 +02:00
Basic [PowerPC][Power10] Fix vins*vlx instructions to have i32 arguments. 2020-07-22 17:58:14 -05:00
CodeGen [CodeGen] Add public function to emit C++ destructor call. 2020-07-01 11:01:23 -07:00
Config Fix comment for CLANG_SYSTEMZ_DEFAULT_ARCH 2020-03-30 21:36:18 +02:00
CrossTU [analyzer] On-demand parsing capability for CTU 2020-06-11 10:56:59 +02:00
DirectoryWatcher [clang][DirectoryWatcher][NFC] Swapping asserts for llvm fatal_error in create 2019-08-06 23:25:34 +00:00
Driver Recommit "[libFuzzer] Link libFuzzer's own interceptors when other compiler runtimes are not linked." 2020-07-23 15:59:07 +00:00
Edit Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Format [clang-format] Add BitFieldColonSpacing option 2020-07-20 20:55:51 +02:00
Frontend [clang][NFC] Removed unused parameters in InitializeSourceManager 2020-07-03 16:16:20 +01:00
FrontendTool Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Index Add missing forward decl to unbreak the modular build 2020-05-26 09:08:27 -07:00
Lex Revert abd45154b "[Coverage] Add comment to skipped regions" 2020-07-22 17:09:20 +02:00
Parse Summary: [clang] Provide a way for WhileStmt to report the location of its LParen and RParen. 2020-07-10 21:31:16 -04:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema For PR46800, implement the GCC __builtin_complex builtin. 2020-07-22 13:43:10 -07:00
Serialization Merge some of the PCH object support with modular codegen 2020-07-22 12:46:12 -07:00
StaticAnalyzer [analyzer][solver] Track symbol equivalence 2020-07-22 13:02:39 +03:00
Testing Use TestClangConfig in AST Matchers tests and run them in more configurations 2020-07-16 18:36:53 +02:00
Tooling [libTooling] In Clang Transformer, change `Metadata` field to deferred evaluation. 2020-07-21 18:05:49 +00:00
CMakeLists.txt
module.modulemap Reland D81869 "Modify FPFeatures to use delta not absolute settings" 2020-06-27 01:34:57 -07:00