panda-re / lava

LAVA: Large-scale Automated Vulnerability Addition
Other
371 stars 60 forks source link

How to get the instrumented source code #44

Closed DanielGuoVT closed 4 years ago

DanielGuoVT commented 4 years ago

Hi there, I am using LAVA to inject bugs into some benchmarks. After LAVA finishes, I can find the buggy binary and some inputs that can trigger seg-faults in the binary. My question is: is there a way to get the instrumented source code of the buggy binary? I tried to grep "lava_get" but find nothing in the target_injection directory.

Thanks, Daniel.

AndrewFasano commented 4 years ago

Hi Daniel,

LAVA creates a local git repository in the directory with the buggy source. Each time LAVA injects bugs, they're added to a new branch. The master branch will contain the bug-free code. So if you do a git branch -a in your source directory, you should see a list of branches. If you check out another one, you'll have the buggy version of the code.

Hope that helps!