Skip to content

Fix double deletion in local CPU allocator#1631

Merged
lockshaw merged 1 commit intoflexflow:masterfrom
elliottslaughter:fix-local-cpu-deallocation
Feb 25, 2026
Merged

Fix double deletion in local CPU allocator#1631
lockshaw merged 1 commit intoflexflow:masterfrom
elliottslaughter:fix-local-cpu-deallocation

Conversation

@elliottslaughter
Copy link
Contributor

@elliottslaughter elliottslaughter commented Feb 24, 2026

Pointers in the LocalCPUAllocator are tracked via std::unique_ptr<void, decltype(&free)> and therefore do not need an explicit free. In fact, if the user attempts to explicitly free pointers, they will be deleted twice, resulting in a crash. This fixes the bug to allow users to explicitly free pointers if they so desire.


This change is Reviewable

@lockshaw lockshaw merged commit 25a6482 into flexflow:master Feb 25, 2026
3 checks passed
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (5f3a990) to head (0cafd44).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@      Coverage Diff       @@
##   master   #1631   +/-   ##
==============================
==============================
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants