-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
false-positiveswarnings that are actually not warningswarnings that are actually not warningslifetime-contractscontracts inferencecontracts inference
Description
void DeleteRecoveredTransaction(const std::string& name) {
auto it = recovered_transactions_.find(name);
assert(it != recovered_transactions_.end());
auto* trx = it->second;
recovered_transactions_.erase(it);
for (const auto& info : trx->batches_) {
logs_with_prep_tracker_.MarkLogAsHavingPrepSectionFlushed(
info.second.log_number_);
}
delete trx;
}got:
/Users/wuqq/dev/rocksdb-main/db/db_impl/db_impl.h:1045:27: warning: dereferencing a dangling pointer
1045 | for (const auto& info : trx->batches_) {
| ^
/Users/wuqq/dev/rocksdb-main/db/db_impl/db_impl.h:1044:35: note: modified here
1044 | recovered_transactions_.erase(it);
| ^~Metadata
Metadata
Assignees
Labels
false-positiveswarnings that are actually not warningswarnings that are actually not warningslifetime-contractscontracts inferencecontracts inference