eurecom-s3 / symcc

SymCC: efficient compiler-based symbolic execution
http://www.s3.eurecom.fr/tools/symbolic_execution/symcc.html
GNU General Public License v3.0
776 stars 135 forks source link

Output log and debug messages to stderr #18

Closed hazimeh closed 4 years ago

hazimeh commented 4 years ago

stdout is often parsed by applications and expected to contain specific information.

Example: sqlite3 compiles a tool mksourceid that outputs a unique single-line source ID which is plugged into a sqlite3 header file. If it contains SymCC debug/log information, that tool will not be usable.

I also disabled buffering in tests so that the order of messages is preserved. This goes hand-in-hand with #17.

sebastianpoeplau commented 4 years ago

Good point! Thanks for the fix. (I guess I should have written a log function to make such a change easier...)

Why do you disable buffering of stdout in the tests though? Even if the stream is buffered by default, it should be flushed at the latest when the test program terminates. (On my Linux, this is the case, so the tests work without the call to setbuf.) Have you encountered a system where buffering is an issue?

sebastianpoeplau commented 4 years ago

Sorry, I missed the comment about the order of messages - that's a valid point of course.