Skip to content

[Bug] iterator need to be validate after find of map #33612

@Vallishp

Description

@Vallishp

Search before asking

  • I had searched in the issues and found no similar issues.

Version

master

What's Wrong?

Based on the bug #32489 , reviewed master code.

After iterator returned by using find must be validated with map.end() before use.
CloudTxnDeleteBitmapCache::remove_expired_tablet_txn_info
auto txn_iter = _txn_map.find(iter->second);
if (iter->first == txn_iter->second.txn_expiration) {

What You Expected?

code should not have a access of iterator without checking map.end()

How to Reproduce?

No response

Anything Else?

fixed similar problems.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions