c4-project / c4f

The C4 Concurrent C Fuzzer
MIT License
13 stars 1 forks source link

Idea: check availability before running an action #194

Closed MattWindsor91 closed 3 years ago

MattWindsor91 commented 4 years ago

Currently, availability checks happen as follows:

This means that all availability checks of all actions fire once per fuzzing iteration. Availability checks aren't as lightweight as they used to be, and so I would argue that this is a bad idea.

This issue proposes changing the flow to:

This then means that there are only as many availability checks as needed to find a valid action; this is at worst case all actions, but the average case will be much better.

Doing this paves the way for replacing availability checks with 'payload construction failure is not an error' type situations later on, if needed.

There might be some issues with doing availability this way, so I'll need to discuss it with everyone else on the project.