Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ftarget.txt is incorrect #11

Closed
legend-issue opened this issue Nov 23, 2017 · 1 comment
Closed

Ftarget.txt is incorrect #11

legend-issue opened this issue Nov 23, 2017 · 1 comment

Comments

@legend-issue
Copy link

When I use libtiff to have a try,I set location manually and as the rule.But I found the Ftarget.txt is incorrect,because I choose an alone function,but it's always main.I don't know why.

@mboehme
Copy link
Collaborator

mboehme commented Nov 24, 2017

The problem is that AFLGo's LLVM-pass cannot identify the basic block corresponding to the specified program location (and therefore the function containing that basic block). This can have two reasons:

  1. the format how you specify the target is incorrect (e.g., "file.c:123" would be correct if it is executable)
  2. LLVM may not carry line number information for all instructions.
    LLVM encodes the location (file / line number) corresponding to an instruction in a basic block. We access the location information of an instruction via getDebugLoc (https://github.com/aflgo/aflgo/blob/master/llvm_mode/afl-llvm-pass.so.cc#L288). It seems not all instruction carry such debug information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants