On RHEL 6.3 (gcc 4.4.6) and Ubuntu 12.04 (gcc 4.6.3), when not using --enable-debug, this fixes many tests that were failing, but I think there could still be problems that I don't know what to do about. In main.cc's terminate_bro() there is:
log_mgr->Terminate();
thread_mgr->Terminate();
mgr.Drain();
Is it possible anywhere in those Terminate() calls for an event to be raised for which a handler exists that tries to use the logging framework (i.e. cause an attempt to write after logging/threading terminates) ? If so, threading::Manager::Terminate() seems like it's `delete`ing backend threads without the WriterFrontend being aware, which then tries to access it later during those final log writes. Do events need to also be drained periodically during/inside those Terminate() calls?
Jon