Re: Relying on exceptions in fuzz tests?

Brendan Bolles <[email protected]>
Newsgroups gmane.comp.video.openexr.devel
Message-ID <[email protected]>
On May 29, 2014, at 12:14 PM, Christopher Horvath wrote:

> I'm compiling OpenEXR with exceptions, but the libraries that I am required to link to beneath OpenEXR have the exception behavior disabled (inconsistently).
> 
> I'm happy with the results that 2.1.0 passes all the regular tests for all the libraries. The fuzz tests don't work, but in my case, that's okay, I think.


Sounds like it should mostly work.  If "new" has been hacked to return NULL instead of throw an exception, you are going to get crashes in those cases.  But that is unlikely to happen so long as you don't ask the library to do too much buffering (like reading tiled images with Imf::InputFile).  You could override the new operator to try to exit the program gracefully instead of returning NULL and crashing.

Yeah, I think the fuzz tests are pretty platform-independant.  It's not really important that they work on your platform.


Brendan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.