c4-project / c4f

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

Fuzzer action: arbitrary for loop in deadcode #206

Open MattWindsor91 opened 4 years ago

MattWindsor91 commented 4 years ago

(not to be confused with #190)

{ // dead code
    for (RANDOM_VAR = RANDOM_AMT; RANDOM_VAR OP RANDOM_AMT; RANDOM_VAR OP) {
      // previous dead code
    }
}

This loop idea comes from GCC bug 52558, where it takes the form

for (l = 0; (l != 4); l++) {
  if (g_1) return l; // this is now dead code
  for (g_2 = 0; (g_2 >= 26); ++g_2);
}