c4-project / c4f

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

Fuzzer action: surround for-loop #191

Closed MattWindsor91 closed 4 years ago

MattWindsor91 commented 4 years ago

Something like

for (int i = KNOWN_VALUE(x); i <= /* ie iterates once */ atomic_load(x); i++) {
  // surrounded statements go here
}

Depends on #189, and similar to #190 (just changing the < to a <=).

MattWindsor91 commented 4 years ago

One issue here is possible overflow of i if known value is, eg, INT_MAX. (Same for #190). This should be feasible to handle eg. by making i go down if known value is positive and up if negative.

MattWindsor91 commented 4 years ago

Done a while ago.