Skip to content

Commit

Permalink
Fix uninitialized members
Browse files Browse the repository at this point in the history
Merged pull request #5532 from
Benny Halevy:

Initialize bool members in row_level_repair and _storage_service causing
ubsan errors.

Fixes #5531
  • Loading branch information
nyh committed Dec 31, 2019
2 parents aa87169 + 8aa5d84 commit 48a914c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion repair/row_level.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ class row_level_repair {

// If the total size of the `_row_buf` on either of the nodes is zero,
// we set this flag, which is an indication that rows are not synced.
bool _zero_rows;
bool _zero_rows = false;

// Sum of estimated_partitions on all peers
uint64_t _estimated_partitions = 0;
Expand Down
4 changes: 2 additions & 2 deletions service/storage_service.hh
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ private:
std::optional<inet_address> _removing_node;

/* Are we starting this node in bootstrap mode? */
bool _is_bootstrap_mode;
bool _is_bootstrap_mode = false;

bool _initialized;
bool _initialized = false;

bool _joined = false;

Expand Down

0 comments on commit 48a914c

Please sign in to comment.