Several coverity reports
Here it is:
** CID 1550143: Concurrent data access violations (MISSING_LOCK)
/src/lib/log/log.c: 929 in init_logging()
________________________________________________________________________________________________________
*** CID 1550143: Concurrent data access violations (MISSING_LOCK)
/src/lib/log/log.c: 929 in init_logging()
923 #endif
924 if (pending_cb_messages == NULL)
925 pending_cb_messages = smartlist_new();
926 if (disable_startup_queue)
927 queue_startup_messages = 0;
928 if (pending_startup_messages == NULL && queue_startup_messages) {
>>> CID 1550143: Concurrent data access violations (MISSING_LOCK)
>>> Accessing "pending_startup_messages" without holding lock "tor_mutex_t.mutex". Elsewhere, "pending_startup_messages" is written to with "tor_mutex_t.mutex" held 3 out of 4 times.
929 pending_startup_messages = smartlist_new();
930 }
931 }
932
933 /** Set whether we report logging domains as a part of our log messages.
934 */
** CID 1550142: Concurrent data access violations (MISSING_LOCK)
/src/test/rng_test_helpers.c: 237 in testing_disable_rng_override()
________________________________________________________________________________________________________
*** CID 1550142: Concurrent data access violations (MISSING_LOCK)
/src/test/rng_test_helpers.c: 237 in testing_disable_rng_override()
231 * yet been replaced.
232 **/
233 void
234 testing_disable_rng_override(void)
235 {
236 crypto_xof_free(rng_xof);
>>> CID 1550142: Concurrent data access violations (MISSING_LOCK)
>>> Accessing "prefilled_rng_buffer" without holding lock "tor_mutex_t.mutex". Elsewhere, "prefilled_rng_buffer" is written to with "tor_mutex_t.mutex" held 1 out of 1 times (1 of these accesses strongly imply that it is necessary).
237 tor_free(prefilled_rng_buffer);
238 UNMOCK(crypto_rand);
239 UNMOCK(crypto_strongest_rand_);
240 tor_mutex_free(rng_mutex);
241
242 crypto_fast_rng_t *rng = crypto_replace_thread_fast_rng(stored_fast_rng);
** CID 1550141: Memory - illegal accesses (UNINIT)
/src/test/test_dir_handle_get.c: 2409 in test_dir_handle_get_status_vote_next_bandwidth()
________________________________________________________________________________________________________
*** CID 1550141: Memory - illegal accesses (UNINIT)
/src/test/test_dir_handle_get.c: 2409 in test_dir_handle_get_status_vote_next_bandwidth()
2403 done:
2404 UNMOCK(get_options);
2405 UNMOCK(connection_write_to_buf_impl_);
2406 connection_free_minimal(TO_CONN(conn));
2407 tor_free(header);
2408 tor_free(body);
>>> CID 1550141: Memory - illegal accesses (UNINIT)
>>> Using uninitialized value "*tor_free__tmpvar" when calling "free".
2409 tor_free(expires);
2410 or_options_free(mock_options);
2411 }
2412
2413 static void
2414 test_dir_handle_get_status_vote_current_authority(void* data)
** CID 1550140: Memory - illegal accesses (STRING_NULL)
/src/app/main/main.c: 773 in do_list_fingerprint()
________________________________________________________________________________________________________
*** CID 1550140: Memory - illegal accesses (STRING_NULL)
/src/app/main/main.c: 773 in do_list_fingerprint()
767 if (show_rsa) {
768 printf("%s %s\n", nickname, rsa);
769 }
770 if (show_ed25519) {
771 char ed25519[ED25519_BASE64_LEN + 1];
772 digest256_to_base64(ed25519, (const char *) edkey->pubkey);
>>> CID 1550140: Memory - illegal accesses (STRING_NULL)
>>> Passing unterminated string "ed25519" to "printf", which expects a null-terminated string. [Note: The source code implementation of the function has been overridden by a builtin model.]
773 printf("%s %s\n", nickname, ed25519);
774 }
775 return 0;
776 }
777
778 /** Entry point for password hashing: take the desired password from
** CID 1550139: Concurrent data access violations (MISSING_LOCK)
/src/test/test_threads.c: 142 in test_threads_basic()
________________________________________________________________________________________________________
*** CID 1550139: Concurrent data access violations (MISSING_LOCK)
/src/test/test_threads.c: 142 in test_threads_basic()
136 strmap_get(thread_test_strmap_, "thread 2")));
137 tt_assert(!strcmp(strmap_get(thread_test_strmap_, "thread 1"),
138 strmap_get(thread_test_strmap_, "last to run")) ||
139 !strcmp(strmap_get(thread_test_strmap_, "thread 2"),
140 strmap_get(thread_test_strmap_, "last to run")));
141
>>> CID 1550139: Concurrent data access violations (MISSING_LOCK)
>>> Accessing "thread_fns_failed" without holding lock "tor_mutex_t.mutex". Elsewhere, "thread_fns_failed" is written to with "tor_mutex_t.mutex" held 1 out of 1 times.
142 tt_int_op(thread_fns_failed, OP_EQ, 0);
143 tt_int_op(thread_fn_tid1, OP_NE, thread_fn_tid2);
144
145 done:
146 tor_free(s1);
147 tor_free(s2);
** CID 1550138: Data race undermines locking (LOCK_EVASION)
/src/feature/control/control_events.c: 533 in queued_events_flush_all()
________________________________________________________________________________________________________
*** CID 1550138: Data race undermines locking (LOCK_EVASION)
/src/feature/control/control_events.c: 533 in queued_events_flush_all()
527 ++*block_event_queue;
528
529 tor_mutex_acquire(queued_control_events_lock);
530 /* No queueing an event while flushing events. */
531 flush_queued_event_pending = 0;
532 queued_events = queued_control_events;
>>> CID 1550138: Data race undermines locking (LOCK_EVASION)
>>> Thread1 sets "queued_control_events" to a new value. Now the two threads have an inconsistent view of "queued_control_events" and updates to fields of "queued_control_events" or fields correlated with "queued_control_events" may be lost.
533 queued_control_events = smartlist_new();
534 tor_mutex_release(queued_control_events_lock);
535
536 /* Gather all the controllers that will care... */
537 SMARTLIST_FOREACH_BEGIN(all_conns, connection_t *, conn) {
538 if (conn->type == CONN_TYPE_CONTROL &&