Use thread-safe types to store the LOG_PROTOCOL_WARN severity

Fixes a race condition; resolves 23954.
This commit is contained in:
Nick Mathewson
2018-01-24 12:02:44 -05:00
parent 37f26aa470
commit da778f2921
6 changed files with 50 additions and 8 deletions
+2
View File
@@ -152,6 +152,8 @@ main(int argc, char **argv)
}
}
init_protocol_warning_severity_level();
{
log_severity_list_t s;
memset(&s, 0, sizeof(s));
+1
View File
@@ -278,6 +278,7 @@ main(int c, const char **v)
s.masks[LOG_WARN-LOG_ERR] |= LD_BUG;
add_stream_log(&s, "", fileno(stdout));
}
init_protocol_warning_severity_level();
options->command = CMD_RUN_UNITTESTS;
if (crypto_global_init(accel_crypto, NULL, NULL)) {