Actions
Bug #57938
closedrelying on boost flatmap emplace behavior is risky
Status:
Resolved
Priority:
Low
Assignee:
-
Target version:
-
% Done:
100%
Source:
Development
Backport:
pacific quincy reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
v18.0.0-2943-gf0a3f733cf1
Released In:
v19.2.0~2700
Upkeep Timestamp:
2025-07-12T22:09:05+00:00
Description
see coverity issue: http://folio07.front.sepia.ceph.com/main/ceph-main-98d41855/cov-main-html/3/2253rgw_trim_bilog.cc.html#error
in "BucketTrimWatcher" we emplace a pointer into a boost flatmap without checking whether the operation was successful.
in case of boost flatmap, the ctor is called even if the emplace fails, so the operation does not leak. however, in std::map this is not the case and memory would leak.
see: https://godbolt.org/z/6nzP4T5fb
Updated by Vedansh Bhartia about 3 years ago
I would like to take up this issue.
Updated by Vedansh Bhartia about 3 years ago
I have opened a PR at https://github.com/ceph/ceph/pull/50346
Updated by Casey Bodley about 3 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 50346
Updated by Casey Bodley about 3 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to pacific quincy reef
Updated by Upkeep Bot about 3 years ago
- Copied to Backport #59025: quincy: relying on boost flatmap emplace behavior is risky added
Updated by Upkeep Bot about 3 years ago
- Copied to Backport #59026: pacific: relying on boost flatmap emplace behavior is risky added
Updated by Upkeep Bot about 3 years ago
- Copied to Backport #59027: pacific: relying on boost flatmap emplace behavior is risky added
Updated by Upkeep Bot about 3 years ago
- Copied to Backport #59028: reef: relying on boost flatmap emplace behavior is risky added
Updated by Upkeep Bot about 3 years ago
- Copied to Backport #59029: reef: relying on boost flatmap emplace behavior is risky added
Updated by Konstantin Shalygin over 1 year ago
- Tracker changed from Cleanup to Bug
- Status changed from Pending Backport to Resolved
- % Done changed from 0 to 100
- Source set to Development
- Regression set to No
- Severity set to 3 - minor
Updated by Upkeep Bot 8 months ago
- Merge Commit set to f0a3f733cf154a533939098a2bce6be4a5515718
- Fixed In set to v18.0.0-2943-gf0a3f733cf1
- Released In set to v19.2.0~2700
- Upkeep Timestamp set to 2025-07-12T22:09:05+00:00
Actions