Replies: 3 comments 7 replies
-
Great idea.
You'll see it eventually starts running iterations with comments like Now, I've got another branch of work that I think will make this better, though not exactly in the way you're proposing.
In the ideal world, both systems can help the other get past difficult parts of the logic. One blocker here is that there aren't prebuilt Atheris packages. But there is a fair amount of engineering needed to make get this strategy from concept to reality. |
Beta Was this translation helpful? Give feedback.
-
Here's a variation of the idea: on timeout, instead of realizing all inputs and running the function to completion, realize only the inputs that appear in the most-recently-added constraint and continue symbolic execution. This might help get out of loops without realizing more variables than necessary. Or maybe those inputs are realized and also added to a set of inputs that are subject to coverage-driven random mutation. I guess the "coverage" of a realization of a subset of inputs would be the overall |
Beta Was this translation helpful? Give feedback.
-
Consider the following function:
CrossHair can find and add the constraint
10_000 == n
, but thereafter it merely iterates through the loop a few times, adding superfluous constraints, and eventually times out and doesn't notice it found a refutation. How about, when a path execution timeout is reached, CrossHair generate a few concrete realizations of the inputs consistent with current constraints and just run the function on them to completion and test the postcondition?Of course when running the function on concrete values we'll still want to impose a timeout (and block I/O) but it should be able to get much further.
Addendum: I now see this as less important since this method is good for getting through loops.
Beta Was this translation helpful? Give feedback.
All reactions