c4-project / c4f

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

Allow sanitiser to return errors #31

Closed MattWindsor91 closed 5 years ago

MattWindsor91 commented 5 years ago

Some sanitiser actions might not just cause warnings, but also irrecoverably fail the entire sanitisation process. Examples include trying to get information about the current program when the sanitiser isn't visiting a program.

Currently, there is no easy way to do this, because the sanitiser lives inside a state monad and the idiom for errors in the rest of act is the Or_error monad.

Adding error return support here is actually quite tricky, involving the following changes:

Until this gets done, I'm mainly just emitting errors as warnings, which is fairly janky.

MattWindsor91 commented 5 years ago

Fixed in 451ee03415127fdfc7e2e751431124b940c392fd (not issue 33, as the commit message mistakenly reports!)