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

Questions about Polar instrumentation #5

Open
balckgu1 opened this issue May 28, 2024 · 0 comments
Open

Questions about Polar instrumentation #5

balckgu1 opened this issue May 28, 2024 · 0 comments

Comments

@balckgu1
Copy link

尊敬的作者你好。
关于Polar的插桩我有一些疑问:

  1. 请问插桩代码:’__POLAR_INS((1<<16)+ID); ‘ 是需要自己预先插入在源代码中吗?
    因为我发现对afl-clang-fast.c的修改中似乎是在编译器参数中加入了一段宏,我的理解是自己预先在源代码中插入代码’__POLAR_INS((1<<16)+ID); ‘,然后polar插桩时实际上是生成了一个宏,每当执行到’__POLAR_INS((1<<16)+ID); ‘语句时,都会对(1<<16)+ID处的共享内存+1。
  2. 如果我要为脆弱操作进行插桩,是否需要将ID设置为TARGET_SIZE?例如:'__POLAR_INS((1<<16)+TARGET_SIZE)'。因为我阅读polar源码时发现,脆弱操作的共享内存似乎是这样进行统计的:q->hot_hits = trace_bits[MAP_SIZE + TARGET_SIZE];
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

1 participant