Project

General

Profile

Actions

Bug #69862

closed

interval_sets can be corrupted by some overlapping insertions.

Added by Alex Ainscow about 1 year ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Tags (freeform):
Fixed In:
v19.3.0-7819-g290894cc76
Released In:
v20.2.0~1038
Upkeep Timestamp:
2025-11-01T01:14:37+00:00

Description

The following code demonstrates the problem.

    interval_set<int> iset1;
    iset1.insert(2, 4);
    iset1.insert(8, 4);

    iset1.insert(6, 4);

With insert (as opposed to union_insert), this should panic, since the third insertion overlaps with the second. However, it does not assert. Worse still the result is a corrupt interval set.

The resulting interval set has length 12, with intervals 2~8 and 8~4 - these to intervals overlap, which is illegal in an interval set.

The new union_insert call will produce 2~10, with size 10, which is a valid interval_set.

I already have a fix for this and will raise a PR, but I want to have a tracker for future record.

Actions #1

Updated by Laura Flores about 1 year ago

  • Status changed from New to In Progress
Actions #2

Updated by Radoslaw Zarzynski about 1 year ago

Thanks for finding it.

Actions #3

Updated by Alex Ainscow about 1 year ago

  • Pull request ID set to 61693
Actions #4

Updated by Radoslaw Zarzynski about 1 year ago

scrub note: Adam approved it and took into his own QA branch.

Actions #5

Updated by Laura Flores about 1 year ago

  • Status changed from In Progress to Resolved
Actions #6

Updated by Upkeep Bot 9 months ago

  • Merge Commit set to 290894cc762024be7774bdda6a02815a1e08555e
  • Fixed In set to v19.3.0-7819-g290894cc762
  • Upkeep Timestamp set to 2025-07-09T22:40:43+00:00
Actions #7

Updated by Upkeep Bot 8 months ago

  • Fixed In changed from v19.3.0-7819-g290894cc762 to v19.3.0-7819-g290894cc76
  • Upkeep Timestamp changed from 2025-07-09T22:40:43+00:00 to 2025-07-14T19:37:17+00:00
Actions #8

Updated by Upkeep Bot 5 months ago

  • Released In set to v20.2.0~1038
  • Upkeep Timestamp changed from 2025-07-14T19:37:17+00:00 to 2025-11-01T01:14:37+00:00
Actions

Also available in: Atom PDF