[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:125 std::ostream &operator<<(std::ostream &os, const LoopFunction &x) { - return os << "define void @foo(i32* %a, i32* %b, i32* noalias %c, i64 %s) {\n" -<< "

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:129 +<< "br i1 %5, label %6, label %8\n" +<< "; :6:\n" +<< "br label %9\n" emmettneyman wrote: > morehouse wrote: > > Do

[PATCH] D50342: Changed how LLVM IR was generated to increase vectorization

2018-08-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 +<< "define void @foo(i32* %a, i32* %b, i32* %c, i64 %s) {\n" +<< "%1 = icmp sgt i64 %s, 0\n" +<< "br i1 %1, label %start, label %end

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:90 +getCodeModel(), OLvl); +} + If you have to pass that many parameters to a 3 line function, just inline instead. ==

[PATCH] D50482: Added another optimization pass to make vectorizing possible

2018-08-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:103 + Triple ModuleTriple(M->getTargetTriple()); + const TargetOptions Options = InitTargetOpti

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:141 +<< "!1 = !{!\"llvm.loop.vectorize.enable\", i1 true}\n" +<< "!2 = !{!\"llvm.loop.vectorize.width\", i32 " << kArraySize +<< "}\n"; -

[PATCH] D50530: Added LLVM metadata to generated IR to increase vectorization width

2018-08-09 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. Code LGTM, but let's make sure this actually helps before landing. Repository: rC Clang https://reviews.llvm.org/D50530 ___ cfe-commits

[PATCH] D50670: Implementation of multiple loops in cxx_loop_proto

2018-08-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Does having multiple loops one after another change any coverage in the vectorizer? Repository: rC Clang https://reviews.llvm.org/D50670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi

[PATCH] D50670: Implementation of multiple loops in cxx_loop_proto

2018-08-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D50670#1199556, @emmettneyman wrote: > Should I switch my focus to nested loops instead? I think nested loops will > increase coverage. Yes, I'd recommend doing that. Repository: rC Clang https://reviews.llvm.org/D50670 ___

[PATCH] D50670: Implementation of multiple loops in cxx_loop_proto

2018-08-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Another option would be to allow simple control flow within the loop itself. Repository: rC Clang https://reviews.llvm.org/D50670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Does this hit new coverage in the vectorizer? Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:46 std::string VarRefToString(std::ostream &os, const VarRef &x) { + std::string var = inner_loop ? "inner" : "outer"; std::st

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 } + inner_loop = true; return os; Maybe this fixes the bug, but modifying `inner_loop` from different functions is still error-prone. Please ei

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:127 } + inner_loop = true; return os; emmettneyman wrote: > morehouse wrote: > > Maybe this fixes the bug, but modifying `inner_loop` from different

[PATCH] D50670: Implementation of nested loops in cxx_loop_proto

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/proto-to-cxx/loop_proto_to_cxx.cpp:124 +void SingleLoopToString(std::ostream &os, const LoopFunction &x) { + inner_loop = false; + os << "void foo(int *a, int *b, int *__restrict__ c, size_t s) {\n" -

[PATCH] D50829: Update README and Dockerfile to include llvm-proto-fuzzer

2018-08-15 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/README.txt:104 +To translate a cxx_loop_proto file into LLVM IR do: + bin/clang-loop-proto-to-llvm +To translate a cxx_loop_proto file into C++ do: `bin/clang-loop-proto-to-llvm CORPUS_OUTPUT_

[PATCH] D51008: Enable -fsanitize=fuzzer and -fsanitize=fuzzer-no-link on Windows.

2018-08-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. LGTM Comment at: lib/Driver/ToolChains/MSVC.cpp:373 + TC.getCompilerRTArgString(Args, "fuzzer", false))); +CmdArgs.push_back(Args.MakeArgString("-debug")); +// Prevent the linker from padding sections we use for in

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added a subscriber: mgorny. Build with DummyClangFuzzer.cpp as entry point when coverage instrumentation isn't present. https://reviews.llvm.org/D38642 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ClangFuzzer.cpp clang/too

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D38642#890963, @kcc wrote: > It's not about coverage instrumentation (not) being present, but about > libFuzzer's main() being present, right? Yes. > Will we be able to reuse some of Justin's code instead of creating one more > main() fu

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D38642#890969, @kcc wrote: > I'd like to know more. > At least simple cases work fine: You're right. I was trying to add `-fsanitize=fuzzer` to `CMAKE_CXX_FLAGS` right before the link command, which was causing a later compilation to gi

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 118087. morehouse added a comment. - Remove dummy main and link with -fsantize=fuzzer. https://reviews.llvm.org/D38642 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/proto-to-cxx/CMakeLists.txt Index: clang/tools/clang-fuzzer

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 118097. morehouse added a comment. - Revert "Remove dummy main and link with -fsantize=fuzzer." https://reviews.llvm.org/D38642 Files: clang/tools/clang-fuzzer/CMakeLists.txt clang/tools/clang-fuzzer/ClangFuzzer.cpp clang/tools/clang-fuzzer/DummyCla

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D38642#891074, @kcc wrote: > If you can *easily* share main() with the one in LLVM -- do it, otherwise > don't bother. Does the fuzzer main come from LLVM or compiler-rt now? There's still FuzzerMain.cpp, but I'm not sure if we should be

[PATCH] D38642: [clang-fuzzer] Allow building without coverage instrumentation.

2017-10-10 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315336: [clang-fuzzer] Allow building without coverage instrumentation. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D38642?vs=118097&id=118420#toc Repository: rL LLVM

[PATCH] D38812: [clang-fuzzer] Allow linking with any fuzzing engine.

2017-10-11 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added a subscriber: mgorny. Makes clang-[proto-]fuzzer compatible with flags specified by OSS-Fuzz. https://llvm.org/pr34314 https://reviews.llvm.org/D38812 Files: clang/tools/clang-fuzzer/CMakeLists.txt Index: clang/tools/clang-fuzzer/CMakeLists.txt

[PATCH] D38812: [clang-fuzzer] Allow linking with any fuzzing engine.

2017-10-11 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315486: [clang-fuzzer] Allow linking with any fuzzing engine. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D38812?vs=118651&id=118655#toc Repository: rL LLVM https://re

[PATCH] D38853: [clang-format] Allow building fuzzer with OSS-Fuzz flags.

2017-10-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added a subscriber: mgorny. https://reviews.llvm.org/D38853 Files: clang/tools/clang-format/CMakeLists.txt clang/tools/clang-format/fuzzer/CMakeLists.txt Index: clang/tools/clang-format/fuzzer/CMakeLists.txt ===

[PATCH] D38853: [clang-format] Allow building fuzzer with OSS-Fuzz flags.

2017-10-12 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315603: [clang-format] Allow building fuzzer with OSS-Fuzz flags. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D38853?vs=118805&id=118819#toc Repository: rL LLVM https:

[PATCH] D51022: [libFuzzer] Port to Windows

2018-08-30 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341082: [libFuzzer] Port to Windows (authored by morehouse, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/D51022?vs=163338&id=163348#toc Repo

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. You can probably get rid of the llvm-objcopy code and make this a lot simpler with something like: 1. Call `getSection()` on the Binary object to get the text section. 2. Read the `sh_offset` and `sh_size` of that section. 3. Copy `sh_size` bytes from the start of the

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt:21 + set(handle_llvm_deps) +endif() How are you doing your diff? Some of these changes are already upstream. Please rebase Comment at: clang

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/CMakeLists.txt:17 -# Depend on LLVM IR intrinsic generation. +# Depend on LLVM IR instrinsic generation. set(handle_llvm_deps intrinsics_gen) Typo introduced here.

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); emmettneyman wrote: > morehouse wrote: > > These 3 lines can b

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); emmettneyman wrote: > morehouse wrote: > > emmettneyman wrote:

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:190 + builder.setMCJITMemoryManager( + std::unique_ptr(RTDyldMM)); + builder.setOptLevel(OLvl); emmettneyman wrote: > morehouse wrote: > > emmettneyman wrote:

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/fuzzer-initialize/fuzzer_initialize.cpp:44 + + PassRegistry &Registry = *llvm::PassRegistry::getPassRegistry(); + initializeCore(Registry); Unnecessary `llvm::` Comment a

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:115 + make_unique(M.get()); + FPasses->add(createTargetTransformInfoWrapperPass(TargetIRAnalysis())); + emmettneyman wrote: > morehouse wrote: > > morehouse wr

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Do we need to parse the arguments for opt-level, or can we just hardcode `-O2` and remove the argument parsing code? Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:144 + Context); + Module

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:125 + Context); + Module *M = Owner.get(); + if (!M) We should be able to get rid of this line now, and rename Owner again

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-26 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:152 + typedef void (*func)(int*, int*, int*, int); + func f = (func) EE->getPointerToFunction(EntryFunc); + Can we use `reinterpret_cast` here? Repository: rC

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} Why do we need to copy the function somewhere else? Looks very error-prone and unnecessa

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-02 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:173 + int s = getSize((char *) func_ptr); + memcpy(mem, func_ptr, s); +} emmettneyman wrote: > morehouse wrote: > > Why do we need to copy the function somewhere e

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:75 +// Helper function to print error message and stop the fuzzer void ErrorAndExit(std::string message) { Unnecessary comment. The naming and implementation of

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D50194#1187756, @emmettneyman wrote: > An unrelated question: > Right now I have a mix of `static` and non-`static` functions in > `handle_llvm.cpp`. Should they all be `static`? Any functions that are only used in the same file can and s

[PATCH] D50194: LLVM Proto Fuzzer - Run Functions on Suite of Inputs

2018-08-03 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:132 +// Takes a string of IR and compiles it using LLVM's JIT Engine +static void CreateJITFunc(con

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-16 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. morehouse added a reviewer: kcc. Herald added a subscriber: hiraditya. When building with libFuzzer, simplifyCFG reduces the coverage signal available to libFuzzer when trying to find new inputs. This patch provides a way to disable simplifyCFG when building with

[PATCH] D43423: [SimplifyCFG] Create flag to disable simplifyCFG.

2018-02-21 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D43423#1011170, @davide wrote: > Some high level comments: > > 1. This is something that GCC does relatively frequently (adding frontend > options to control optimization passes), but LLVM tends to not expose these > details. FWIW, I'd very

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2018-01-10 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 129318. morehouse added a comment. - Enable use-after-dtor instrumentation by default. - Make sanitize-no-dtor-callback.cpp test fail with UAD instrumentation. - Update test cases to reflect new default. https://reviews.llvm.org/D37860 Files: clang/incl

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2018-01-10 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. PTAL. Patch has been updated. https://reviews.llvm.org/D37860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2018-01-10 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCRT31: [MSan] Enable use-after-dtor instrumentation by default. (authored by morehouse, committed by ). Herald added a subscriber: Sanitizers. Changed prior to commit: https://reviews.llvm.org/D37860

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/CMakeLists.txt:48 ExampleClangProtoFuzzer.cpp +FuzzerInitialize.cpp ) Rather than compiling `FuzzerInitialize.cpp` into the binary, can we make it a library like `handle-cxx` or `proto

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/ExampleClangProtoFuzzer.cpp:23 #include I think `cstring` is no longer used after this change. So we can probably remove this include. Comment at: tools/clang-fuzzer/fuzzer

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. LGTM. Repository: rC Clang https://reviews.llvm.org/D47666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47666: Refactored clang-fuzzer and added new (copy) files

2018-06-04 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333969: [clang-proto-fuzzer] Refactored LLVMFuzzerInitialize into its own file. (authored by morehouse, committed by ). Changed prior to commit: https://reviews.llvm.org/D47666?vs=149872&id=149876#toc

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. This contains changes from previous patch. Please rebase. Repository: rC Clang https://reviews.llvm.org/D47843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/cxx_loop_proto.proto:93 + +message Function { + required StatementSeq statements = 1; Maybe call this `LoopFunction` to distinguish from the other protobuf. Comment at: tools/clan

[PATCH] D47843: Introducing single for loop into clang_proto_fuzzer

2018-06-06 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/CMakeLists.txt:28 protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS cxx_proto.proto) + protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS cxx_loop_proto.proto) set(LLVM_OPTIONAL_SOURCES ${LLVM_OPTIONAL_SOURCES} ${PROTO_SRC

[PATCH] D47920: Made loop_proto more "vectorizable"

2018-06-07 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. Looks like a good start. Repository: rC Clang https://reviews.llvm.org/D47920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D47920: Made loop_proto more "vectorizable"

2018-06-07 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC334252: [clang-fuzzer] Made loop_proto more "vectorizable". (authored by morehouse, committed by ). Changed prior to commit: https://reviews.llvm.org/D47920?vs=150435&id=150436#toc Repository: rC Cla

[PATCH] D47964: Modified protobuf and converter to add new signature, remove conditionals.

2018-06-11 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/cxx_loop_proto.proto:67 -AssignmentStatement assignment = 1; -IfElse ifelse = 2; - } Do you really want to get rid of if-else? Comment at: tools/clang-fuz

[PATCH] D47964: Modified protobuf and converter to add new signature, remove conditionals.

2018-06-11 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334421: [clang-fuzzer] Modified protobuf and converter to add new signature, removeā€¦ (authored by morehouse, committed by ). Repository: rL LLVM https://reviews.llvm.org/D47964 Files: cfe/trunk/tool

[PATCH] D48106: implemented proto to llvm

2018-06-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Where is the fuzz target? Comment at: tools/clang-fuzzer/proto-to-llvm/loop_proto_to_llvm.cpp:33 +int ptr_ctr = 0; +int val_ctr = 0; + I'd suggest wrapper functions that return unused variable names, so your code below won't need to

[PATCH] D48106: implemented proto to llvm

2018-06-13 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D48106#1131625, @emmettneyman wrote: > I wanted to implement the proto_to_llvm converter before the fuzz target. The fuzz target should make testing your converter way easier. I'd recommend adding it to this patch so that you're less like

[PATCH] D48106: implemented proto to llvm

2018-06-18 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse requested changes to this revision. morehouse added inline comments. This revision now requires changes to proceed. Comment at: tools/clang-fuzzer/CMakeLists.txt:72 + # Build the lllvm protobuf fuzzer + add_clang_executable(clang-llvm-proto-fuzzer l

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: tools/clang-fuzzer/handle-llvm/CMakeLists.txt:5 + handle_llvm.cpp + ) emmettneyman wrote: > morehouse wrote: > > There's fewer libraries linked here than in `handle-cxx/` (not saying this > > is wrong, but it could

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. If you haven't already, please apply for commit access: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access. That way you can land this after it's accepted. Comment at: tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:23 +#include "llv

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added inline comments. This revision is now accepted and ready to land. Comment at: tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:50 + errs() << "error: opt level must be between 0 and 3.\n"; + std::exit(0); + }

[PATCH] D48106: implemented proto to llvm

2018-06-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Looks like `exit(0)` is still there. Repository: rC Clang https://reviews.llvm.org/D48106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D57474: Update SanitizerCoverage doc regarding the issue with pc-table and gc-sections.

2019-01-31 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: docs/SanitizerCoverage.rst:149 +(``-Wl,-gc-sections``), thus resulting in a significant binary size overhead. +See `Bug 34636 `_ for more info. + Maybe add "for linkers othe

[PATCH] D54805: [Driver] Use --push/pop-state with Sanitizer link deps

2018-11-21 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D54805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D60237: [MS] Add metadata for __declspec(allocator)

2019-04-08 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. This patch caused the Windows sanitizer bot to break: http://lab.llvm.org:8011/builders/sanitizer-windows/builds/44238 Please take a look. FAILED: projects/compiler-rt/lib/fuzzer/tests/FuzzerTestObjects.gtest-all.cc.x86_64.o cmd.exe /C "cd /D C:\b\slave\saniti

[PATCH] D57474: Update SanitizerCoverage doc regarding the issue with pc-table and gc-sections.

2019-02-01 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57474/new/ https://reviews.llvm.org/D57474 ___ cfe-comm

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added a subscriber: hiraditya. - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/test/f

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D37156#852780, @kcc wrote: > Did you check this on something other than the unit tests? > E.g. a couple of benchmarks from fuzzer-test-suite? Just tested on the proj4 and lcms benchmarks and no issues came up. https://reviews.llvm.org/D

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 112739. morehouse added a comment. - Use existing linear scan, and check for InvokeInst. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/test/fuzzer/deep-recursion.test llvm/lib/Transforms/Instrumentation/Saniti

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311801: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D37156?vs=112739&id=112746#toc Repository: rL L

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse reopened this revision. morehouse added a comment. This revision is now accepted and ready to land. Turns out I should have been testing the benchmarks with `FUZZING_ENGINE=fsanitize_fuzzer`. My mistake. After adding the weak reference to SanitizerCoverage.cpp, both lcms and proj4 bu

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 112756. morehouse added a comment. - Add weak reference in SanitizerCoverage.cpp https://reviews.llvm.org/D37156 Files: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-25 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 112759. morehouse added a comment. Full diff. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/test/fuzzer/deep-recursion.test llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp llvm/test/Instrumentation

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-28 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 112923. morehouse added a comment. Herald added a subscriber: kubamracek. - Add weak definition of __sancov_lowest_stack to runtime. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/lib/sanitizer_common/sanitizer_c

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 113129. morehouse added a comment. - Disable stack depth tracking on Mac. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc compiler-rt/lib/sanitizer_common/s

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 113133. morehouse added a comment. - Eliminate "#if". - Replace uintptr_t with uptr. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep_new.cc compiler-rt/lib/sanitiz

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-29 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312026: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D37156?vs=113133&id=113136#toc Repository: rL L

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-29 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 113177. morehouse added a comment. - Only enable stack depth tracking on Linux. - Ignore __sancov_lowest_stack in interface symbols tests. https://reviews.llvm.org/D37156 Files: clang/lib/Driver/SanitizerArgs.cpp compiler-rt/lib/sanitizer_common/sanit

[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

2017-08-30 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312185: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D37156?vs=113177&id=113329#toc Repository: rL L

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Enable the compile-time flag -fsanitize-memory-use-after-dtor by default. Note that the run-time option MSAN_OPTIONS=poison_in_dtor=1 still needs to be enabled for destructors to be poisoned. https://reviews.llvm.org/D37860 Files: clang/include/clang/Driver/Op

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/include/clang/Driver/Options.td:854 HelpText<"Enable use-after-destroy detection in MemorySanitizer">; +def fno_sanitize_memory_use_after_dtor : Flag<["-"], "fno-sanitize-memory-use-after-d

[PATCH] D37867: [MSan] Add flag to disable use-after-dtor.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Flag is -fno-sanitize-use-after-dtor. https://reviews.llvm.org/D37867 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/SanitizerArgs.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/test/Driver/fsanitize.c Index: clang/test/Driver/fsani

[PATCH] D37867: [MSan] Add flag to disable use-after-dtor.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 115295. morehouse added a comment. - Use hasFlag() in CompilerInvocation.cpp as well. https://reviews.llvm.org/D37867 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/SanitizerArgs.cpp clang/lib/Frontend/CompilerInvocation.cpp clang/t

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 115312. morehouse edited the summary of this revision. morehouse added a comment. - Move the new flag to https://reviews.llvm.org/D37867 - Address Vitaly's comments. https://reviews.llvm.org/D37860 Files: clang/lib/Driver/SanitizerArgs.cpp clang/test/

[PATCH] D37860: [MSan] Enable use-after-dtor instrumentation by default.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. In https://reviews.llvm.org/D37860#871368, @eugenis wrote: > Looking at __sanitizer_dtor_callback implementation, this change will add a > (fast) stack unwind in every destructor. In extreme cases (like a tight loop > doing string operations) it could be bad for perfo

[PATCH] D37867: [MSan] Add flag to disable use-after-dtor.

2017-09-14 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313314: [MSan] Add flag to disable use-after-dtor. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D37867?vs=115295&id=115317#toc Repository: rL LLVM https://reviews.llvm.

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse created this revision. Herald added a subscriber: hiraditya. Eliminate unnecessary instrumentation at __sanitizer_dtor_callback call sites. Fixes https://github.com/google/sanitizers/issues/861. https://reviews.llvm.org/D38063 Files: clang/lib/CodeGen/CGClass.cpp llvm/lib/Transfo

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 116072. morehouse added a comment. - Add test case. - Use SanitizerScope. https://reviews.llvm.org/D38063 Files: clang/lib/CodeGen/CGClass.cpp clang/test/CodeGenCXX/sanitize-dtor-callback.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse updated this revision to Diff 116100. morehouse added a comment. - Add LLVM test. https://reviews.llvm.org/D38063 Files: clang/lib/CodeGen/CGClass.cpp clang/test/CodeGenCXX/sanitize-dtor-callback.cpp llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp llvm/test/Instrumenta

[PATCH] D38063: [MSan] Disable sanitization for __sanitizer_dtor_callback.

2017-09-20 Thread Matt Morehouse via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313831: [MSan] Disable sanitization for __sanitizer_dtor_callback. (authored by morehouse). Changed prior to commit: https://reviews.llvm.org/D38063?vs=116100&id=116103#toc Repository: rL LLVM https

[PATCH] D61923: [GWP-ASan] Mutex implementation [2].

2019-05-30 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61923/new/ https://reviews.llvm.org/D61923 _

[PATCH] D65029: [Driver] Support for disabling sanitizer runtime linking

2019-07-19 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65029/new/ https://reviews.llvm.org/D65029 ___ cfe-comm

[PATCH] D63616: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang

2019-06-24 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. Thanks for the patch! Seems like a useful feature for targeted fuzzing. Comment at: clang/docs/SanitizerCoverage.rst:310 + +In most cases, the whitelist will list the folders or source files for which you want +instrumentation and allow all function

[PATCH] D63616: Implement `-fsanitize-coverage-whitelist` and `-fsanitize-coverage-blacklist` for clang

2019-06-28 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse accepted this revision. morehouse added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63616/new/ https://reviews.llvm.org/D63616 _

[PATCH] D60593: [GwpAsan] Introduce GWP-ASan.

2019-05-10 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added a comment. This diff is helpful to get an overall idea of how things fit together, but it is very difficult to review thoroughly. Let's start splicing off pieces for individual review. I suggest: - Individual reviews for each prereq (mutex, random, etc.) - Review for base GPA

  1   2   3   >