moralismercatus / crete

Open source concolic testing tool for binaries
1 stars 1 forks source link

Ensure crete_capture_end() is registered with atexit. #71

Closed moralismercatus closed 9 years ago

moralismercatus commented 9 years ago

As it may happen that exit() is called during execution, before the typical crete_capture_end() is called, and thus missed, register crete_capture_end() with atexit() to ensure that it's always called - given that the program doesn't crash.

There's no harm in calling crete_capture_end() more than once, under the current implementation.

moralismercatus commented 9 years ago

The new convenience function, void crete_start(void (*f)(void)); automatically sets this. I believe this should be the default way of starting a harness, and sufficiently documents how one should be started.