Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverity fixes #1879

Closed
wants to merge 2 commits into from
Closed

coverity fixes #1879

wants to merge 2 commits into from

Conversation

tchaikov
Copy link
Contributor

No description provided.

the temp InternalKeyComparator will be destructed after evaluating the
expression of `RangeDelAggregator range_del_agg(...)`, and
RangeDelAggregator is keeping a const reference of it. this put
RangeDelAggregator in danger when dereferencing icmp_ to access the
aleady destroyed InternalKeyComparator temporary variable.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
* CompactionIterator: so initialize "current_user_key_{sequence,snapshot}_" in class.
* RangeTombstone: so initialize seq_ to kMaxSequenceNumber. the default
  value is never be read without being reset with a new value afterwards.
* ThreadData: initialize `next` and `prev` to nullptr
* CompactionJob: initialize `bottommost_level_`, this variable will
  always be set in `CompactionJob::Prepare()`.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@facebook-github-bot
Copy link
Contributor

@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@tchaikov
Copy link
Contributor Author

@siying may i know if this PR is relevant ?

@tchaikov tchaikov closed this Sep 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants