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 unnecessary. Also makes this patch larger than it needs to be. ================ Comment at: clang/tools/clang-fuzzer/handle-llvm/input_arrays.cpp:30 + memcpy(b2, InputArrays[b_index], ArraySize * sizeof(int)); + memcpy(c2, InputArrays[c_index], ArraySize * sizeof(int)); +} ---------------- Do the generated functions ever modify arrays a and b, or just c? If just c, we can avoid lots of memcpys here. ================ Comment at: clang/tools/clang-fuzzer/handle-llvm/input_arrays.h:34 +// Define a corpus of possible inputs +static int InputArrays[100][64] = +{ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, ---------------- Use the constants you just defined. Repository: rC Clang https://reviews.llvm.org/D50194 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits