Fix win32 crash in bench.c
On the mailing lists, Gisle Vanem reported a crash while running bench.exe
on a windows system. On first sight, it appeared to be possibly related to calling options_new()
from bench.c
's main()
, but Gisle provided a patch which reportedly fixes the crash by calling init_protocol_warning_severity_level()
which instead suggests that the crash was due to calling init_logging()
(which calls tor_mutex_init()
, which then calls InitializeCriticalSection()
). The MSDN documentation for InitializeCriticalSection()
states that has slightly different behaviours during edge cases for different windows flavours, so that could possibly have been the cause of the issue?