Actions
Cleanup #57938
openrelying on boost flatmap emplace behavior is risky
Status:
Pending Backport
Priority:
Low
Assignee:
-
Target version:
-
% Done:
0%
Tags:
low-hanging-fruit backport_processed
Backport:
pacific quincy reef
Reviewed:
Affected Versions:
Pull request ID:
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 1 year ago
I have opened a PR at https://github.com/ceph/ceph/pull/50346
Updated by Casey Bodley about 1 year ago
- Status changed from New to Fix Under Review
- Pull request ID set to 50346
Updated by Casey Bodley about 1 year ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to pacific quincy reef
Updated by Backport Bot about 1 year ago
- Copied to Backport #59025: quincy: relying on boost flatmap emplace behavior is risky added
Updated by Backport Bot about 1 year ago
- Copied to Backport #59026: pacific: relying on boost flatmap emplace behavior is risky added
Updated by Backport Bot about 1 year ago
- Copied to Backport #59027: pacific: relying on boost flatmap emplace behavior is risky added
Updated by Backport Bot about 1 year ago
- Copied to Backport #59028: reef: relying on boost flatmap emplace behavior is risky added
Updated by Backport Bot about 1 year ago
- Tags changed from low-hanging-fruit to low-hanging-fruit backport_processed
Updated by Backport Bot about 1 year ago
- Copied to Backport #59029: reef: relying on boost flatmap emplace behavior is risky added
Actions