fix (#703)
This commit is contained in:
parent
321bcfeba1
commit
999eaadc16
@ -619,6 +619,7 @@ bool AutoTokensPass::runOnModule(Module &M) {
|
||||
|
||||
LLVMContext &Ctx = M.getContext();
|
||||
|
||||
if (dictionary.size()) {
|
||||
size_t memlen = 0, count = 0, offset = 0;
|
||||
|
||||
// sort and unique the dictionary
|
||||
@ -631,6 +632,7 @@ bool AutoTokensPass::runOnModule(Module &M) {
|
||||
count++;
|
||||
}
|
||||
|
||||
if (count) {
|
||||
auto ptrhld = std::unique_ptr<char[]>(new char[memlen + count]);
|
||||
|
||||
count = 0;
|
||||
@ -650,9 +652,12 @@ bool AutoTokensPass::runOnModule(Module &M) {
|
||||
// The actual dict
|
||||
GlobalVariable *dict = new GlobalVariable(
|
||||
M, arrayTy, true, GlobalVariable::ExternalLinkage,
|
||||
ConstantDataArray::get(Ctx, *(new ArrayRef<char>(ptrhld.get(), offset))),
|
||||
ConstantDataArray::get(Ctx,
|
||||
*(new ArrayRef<char>(ptrhld.get(), offset))),
|
||||
"libafl_dictionary_" + M.getName());
|
||||
dict->setSection("libafl_token");
|
||||
}
|
||||
}
|
||||
|
||||
#if USE_NEW_PM
|
||||
auto PA = PreservedAnalyses::all();
|
||||
|
@ -11,7 +11,7 @@ cargo fmt
|
||||
|
||||
echo "[*] Formatting C(pp) files"
|
||||
# shellcheck disable=SC2046
|
||||
clang-format-13 -i --style=file $(find . -type f \( -name '*.cpp' -o -iname '*.hpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.cc' -o -name '*.h' \) | grep -v '/target/' | grep -v 'libpng-1\.6\.37' | grep -v 'stb_image\.h' | grep -v 'dlmalloc\.c')
|
||||
clang-format -i --style=file $(find . -type f \( -name '*.cpp' -o -iname '*.hpp' -o -name '*.cc' -o -name '*.cxx' -o -name '*.cc' -o -name '*.h' \) | grep -v '/target/' | grep -v 'libpng-1\.6\.37' | grep -v 'stb_image\.h' | grep -v 'dlmalloc\.c')
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user