-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Show shorter fuzzer name in stat when user's banner is too long #1868
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
Show shorter fuzzer name in stat when user's banner is too long #1868
Conversation
afl-whatsup startup detection
push to stable
push to stable
push to stable
push to stable
afl-whatsup output fix
|
I do not understand why tests fails... See no error message. BTW for unpatched version on my local machine they fails too... May be the problem is not in the patch |
| if (unlikely(!banner[0])) { | ||
|
|
||
| char *si = ""; | ||
| char *fuzzer_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls make it a global in afl-fuzz.c and set it there, use extern here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry... I did not got the idea...
I do not understand why we should do it. The variable is local, and is not needed outside of this scope...
Also I do not understand where is the proper place for this variable in afl-fuzz.c I did not found similar variables there...
May be it should be added in afl_state structure from afl-fuzz.h? But I still not sure it is good idea...
I am not familiar with AFL++ architecture at all. I guess I need some guidance and explanations here...
|
I do not mind if you rename it to AFL, not just when the banner is too long otherwise. |
If no user banner is set (and it is true in most cases), stat header will look nicer with "american fuzzy lop" I guess. So unless you insist, I would keep both "AFL" and "american fuzzy lop" the way I did in my first patch version... |
|
the banner in the UI is rendered about 2 times per second. so the if() about how to construct the banner takes up unnecessary resources as this is something that never changes. set the banner into a global variable in main() in src/afl-fuzz.c, and import that u8* as extern into the stats source. it is fine to be a global variable because it is not something that would need to be thread safe. |
|
a bit occupied right now O_o Sorry. So will say without code commit.
and it will be reused in all other iterations. It is common C trick, as far as I know. |
|
I've reread the code more carefully. Everything is already done there. There is static variable If it dose not have non-empty value in it then proper content is calculated So all this code (and my new code too) is executed only once, and it is not really important how much CPU is wasted... I guess no more coding is required here, if we speak about CPU efficiency |
|
oh my bad, hadnt seen the if(unlikely(!banner[0])) |
|
Thanks! |
I found -T option setting user's defined banner very handy.
I acquired taste, and tried to put all info I need in the banner, but found that it can't be as long as I'd like to.
I came to conclusion that "american fuzzy lop" text is useless waste of precocious space compared to very important info that I want to put in the banner ;-) , "AFL" should do the same job
So this patch put "AFL" instead of "american fuzzy lop" in the stat screen header if user's banner does not fit into the space. So one can use bigger banners.
Hope I did code styling right (I tried my best), and that this patch will be useful not only to me :-)