LTL-Fuzzer icon indicating copy to clipboard operation
LTL-Fuzzer copied to clipboard

`opt` not linked

Open jf-li00 opened this issue 2 years ago • 1 comments

in function opt_callgraph in AFLGo/scripts/gen_distance_fast.py, which is need for instrumentation, the opt command is needed however not installed/linked

def opt_callgraph(args, binary):
    print(f"({STEP}) Constructing CG for {binary}..")
    dot_files = args.temporary_directory / DOT_DIR_NAME
    prefix = dot_files / f"{binary.name}"
    cmd = ["opt", "-dot-callgraph", f"{binary}",
           "-callgraph-dot-filename-prefix", prefix,
           "-o", "/dev/null"]
    log_p = args.temporary_directory / f"step{STEP}.log"
    with log_p.open("w") as f:
        try:
            subprocess.run(cmd, stderr=f, check=True, cwd=dot_files)
        except subprocess.CalledProcessError:
            abort(args)

could be resolved by simpliy adding a symbol link for opt in build-llvm-11.sh

jf-li00 avatar Jan 29 '24 18:01 jf-li00

use following command to add opt to PATH

export PATH= /usr/lib/llvm-11/bin: $PATH

MrDalekCaan avatar May 10 '24 09:05 MrDalekCaan