If an exception is thrown, the lack of a flushed stdout makes it harder to diagnose the issue. Are there any mitigations that can be used? (e.g., termination hooks, compiler flags, etc). I can understand that in a segfault it's probably very difficult to flush, but I would think that it for uncaught exceptions in arbitrary threads, it should be at least theoretically possible.
Note: The situation is complicated slightly by the fact that multiple threads may be used. So catching exceptions in main
will not work for other threads.