Skip to content

os: Use custom delete operator for raw_combined #64965

Merged
SrinivasaBharath merged 1 commit intoceph:mainfrom
edwinzrodriguez:ceph-wip-72473
Oct 27, 2025
Merged

os: Use custom delete operator for raw_combined #64965
SrinivasaBharath merged 1 commit intoceph:mainfrom
edwinzrodriguez:ceph-wip-72473

Conversation

@edwinzrodriguez
Copy link
Contributor

@edwinzrodriguez edwinzrodriguez commented Aug 11, 2025

Fix UB in raw_combined 'operator delete' to eliminate uninitialized memory access
by using deferred destruction operator option

Fixes: https://tracker.ceph.com/issues/72473

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

@edwinzrodriguez edwinzrodriguez requested review from a team as code owners August 11, 2025 18:32
@edwinzrodriguez edwinzrodriguez changed the title os: Improve custom delete operator for raw_combined to ensure proper … os: Use custom delete operator for raw_combined Aug 11, 2025
@idryomov idryomov removed the rbd label Aug 11, 2025
@idryomov idryomov removed the request for review from a team August 11, 2025 20:09
// 1. Save the data pointer before the object is destroyed
// 2. Explicitly call the destructor to clean up the object's members
// 3. Free the entire combined allocation through the data pointer
// Uses std::destroying_delete_t to prevent automatic destructor call after delete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, perhaps this could explain really weird crashes we've seen under the hypercombined buffers. Very interesting!

@edwinzrodriguez edwinzrodriguez force-pushed the ceph-wip-72473 branch 2 times, most recently from 3cda764 to 56fc7c4 Compare August 20, 2025 13:13
@edwinzrodriguez
Copy link
Contributor Author

jenkins test make check

@edwinzrodriguez
Copy link
Contributor Author

jenkins test make check arm64

@edwinzrodriguez
Copy link
Contributor Author

jenkins test make check arm64

…memory cleanup

Fix UB in raw_combined 'operator delete' to eliminate uninitialized memory access

Fixes: https://tracker.ceph.com/issues/72473
Signed-off-by: Edwin Rodriguez <edwin.rodriguez1@ibm.com>
@ljflores
Copy link
Member

@SrinivasaBharath SrinivasaBharath merged commit 18ea9f3 into ceph:main Oct 27, 2025
13 checks passed
@github-actions
Copy link

This is an automated message by src/script/redmine-upkeep.py.

I found one or more Fixes: tags in the commit messages in

git log 18ea9f33a748ac80d08f21474fe654c8dc59f013^..18ea9f33a748ac80d08f21474fe654c8dc59f013

The referenced tickets are:

Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them.

Update Log: https://github.com/ceph/ceph/actions/runs/18838061841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants