Closed gnbon closed 8 months ago
Block deletion in the tmin stage is a time-consuming task that scales with the size of the file.
https://github.com/googleprojectzero/winafl/blob/25d5840799b628c8ef7750cd07ef2e30b299b156/afl-tmin.c#L911-L923 As del_len, the unit for reducing unnecessary blocks, decreases by powers of two, the operation takes longer. However, there are instances where speed is more critical than achieving minimal minimization.
del_len
https://github.com/googleprojectzero/winafl/blob/25d5840799b628c8ef7750cd07ef2e30b299b156/afl-tmin.c#L968-L971 Currently, the minimum value of del_len is 1. However, increasing the minimum value would result in faster speeds.
Therefore, I propose allowing del_len to be specified as an option.
Alternatively, a method could be implemented to terminate the process if there is no reduction of even 1 byte, or if the reduction is less than n bytes, in a given cycle.
Hi, if this is something you'd like to fix, please go ahead and and submit a pull request.
Okey. I implemented the feature and submitted the pull request. How does it look?
Issue
Block deletion in the tmin stage is a time-consuming task that scales with the size of the file.
Background
https://github.com/googleprojectzero/winafl/blob/25d5840799b628c8ef7750cd07ef2e30b299b156/afl-tmin.c#L911-L923 As
del_len
, the unit for reducing unnecessary blocks, decreases by powers of two, the operation takes longer. However, there are instances where speed is more critical than achieving minimal minimization.https://github.com/googleprojectzero/winafl/blob/25d5840799b628c8ef7750cd07ef2e30b299b156/afl-tmin.c#L968-L971 Currently, the minimum value of del_len is 1. However, increasing the minimum value would result in faster speeds.
proposal
Therefore, I propose allowing
del_len
to be specified as an option.Alternatively, a method could be implemented to terminate the process if there is no reduction of even 1 byte, or if the reduction is less than n bytes, in a given cycle.