status-im / nim-drchaos

A powerful and easy-to-use fuzzing framework in Nim for C/C++/Obj-C targets
Other
68 stars 3 forks source link

Give up and remove strict .noSideEffect requirement? #15

Closed planetis-m closed 2 years ago

planetis-m commented 2 years ago

Reading from a string stream shouldn't imply side effects right? But Nim's std/streams don't distinguish string from a file stream.

arnetheduck commented 2 years ago

whenever dynamic dispatch of any kind is used, one has to plan for the most permissive option in the API - if you want to be able to use both strings and files as a consumer of streams, you have to be prepared for side effects even if a particular concrete implementation doesn't exhibit them (the same goes for exception tracking)

planetis-m commented 2 years ago

Makes total sense, however fuzz targets shouldn't have side effects, so what to do, remove? I will remove it and document instead you should use funcs as targets whenever you can.

planetis-m commented 2 years ago

Nah not 100% correct, let's relax this rule.