This revision was automatically updated to reflect the committed changes.
Closed by commit rC338943: LLVM Proto Fuzzer - Run Functions on Suite of Inputs
(authored by emmettneyman, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50194?vs=159151&id=159152#toc
Repository:
rC
emmettneyman updated this revision to Diff 159151.
emmettneyman added a comment.
ready to land
Repository:
rC Clang
https://reviews.llvm.org/D50194
Files:
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.h
clang/tools/clang-fuzzer/ha
emmettneyman updated this revision to Diff 159146.
emmettneyman added a comment.
New input arrays and minor fixes
Repository:
rC Clang
https://reviews.llvm.org/D50194
Files:
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.h
clang/to
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
emmettneyman updated this revision to Diff 159100.
emmettneyman added a comment.
Added static to some functions, made small fixes
Repository:
rC Clang
https://reviews.llvm.org/D50194
Files:
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
clang/tools/clang-fuzzer/handle-llvm/handle_l
emmettneyman added inline comments.
Comment at: clang/tools/clang-fuzzer/handle-llvm/input_arrays.h:36
+ {1, 1, 2, 3, 2, 3, 0, 11, 10, 0, 7, 5, 3, 1, 18, 18, 18, 18, 0, 18, 18, 18,
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18,
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
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
kcc added inline comments.
Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:128
+void RunFuncOnInputs(LLVMFunc f, int x) {
+ if (x) {
+for (int i = 0; i < NumArrays; i++)
looks like code duplication, also strange name for a variable: 'x'.
Ca
emmettneyman updated this revision to Diff 159083.
emmettneyman added a comment.
Refactored code to avoid memcpy-ing function
Repository:
rC Clang
https://reviews.llvm.org/D50194
Files:
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp
clang/tools/clang-fuzzer/handle-llvm/handle_llvm.
emmettneyman added a comment.
An unrelated question:
Right now I have a mix of `static` and non-`static` functions in
`handle_llvm.cpp`. Should they all be `static`?
Repository:
rC Clang
https://reviews.llvm.org/D50194
___
cfe-commits mailing li
emmettneyman 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);
+}
morehouse wrote:
> emmettneyman wrote:
> > morehouse wrote:
> > > Why do we need to cop
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
emmettneyman updated this revision to Diff 158800.
emmettneyman added a comment.
Replaced hardcoded numbers with variables
Repository:
rC Clang
https://reviews.llvm.org/D50194
Files:
clang/tools/clang-fuzzer/CMakeLists.txt
clang/tools/clang-fuzzer/ExampleClangLLVMProtoFuzzer.cpp
clang/
emmettneyman 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);
+}
morehouse wrote:
> Why do we need to copy the function somewhere else? Looks very erro
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
emmettneyman created this revision.
emmettneyman added reviewers: kcc, morehouse.
Herald added subscribers: cfe-commits, mgorny.
Added corpus of arrays to use as inputs for the functions. Check that the two
functions modify the inputted arrays in the same way.
Repository:
rC Clang
https://rev
17 matches
Mail list logo