c4-project / c4f

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

Fix early-out-at-end targeting ends of nested blocks in loops #219

Open MattWindsor91 opened 3 years ago

MattWindsor91 commented 3 years ago

I'm a silly billy. I've made the early-out-at-end action target paths on which the In_loop flag is active. This is not the same as 'innermost block is loop'; it is, in fact, 'any block in the path is a loop', and as such it results in things like

while (A) {
  if (B) {
    C;
    // TARGET HERE
  }
  D;
}

Clearly this isn't right; if we insert a continue at the given position, the semantics will be wrong.

This is a fuzzer bug, but, again, it's one where the solution will need some creative thinking. We need a way of doing one of the following: