ucsb-seclab / dr_checker

DR.CHECKER : A Soundy Vulnerability Detection Tool for Linux Kernel Drivers
BSD 2-Clause "Simplified" License
329 stars 71 forks source link

setup_drchecker clones LLVM projects in wrong directories #2

Closed ajdlinux closed 7 years ago

ajdlinux commented 7 years ago

setup_drchecker.py clones some LLVM subprojects:

reps_to_setup = {'tools': ['clang'], 'projects': ['compiler-rt', 'libcxx', 'libcxxabi', 'openmp']}

...

for curr_folder in reps_to_setup:
    dst_folder = os.path.join(base_output_dir, curr_folder)
    for curr_rep in reps_to_setup[curr_folder]:
        dst_folder = os.path.join(dst_folder, curr_rep)
        git_clone_cmd = "git clone " + LLVM_GIT_HUB_BASE + str(curr_rep) + " -b " + \
                        str(target_branch) + " " + dst_folder
        log_info("Setting up ", curr_rep, " repo.")
        os.system(git_clone_cmd)

It looks to me like it should be cloning clang in tools/, and compiler-rt, libcxx, libcxxabi and openmp in projects/ - but for the repositories in projects/, it's just appending the new repository name to the existing path string, such that we end up cloning openmp in projects/compiler-rt/libcxx/libcxxabi/openmp.

Machiry commented 7 years ago

You are right @ajdlinux. Fix pushed. Thanks.