mirror of
https://github.com/deepseek-ai/3FS.git
synced 2026-11-05 00:47:47 +00:00
[PR #385] [MERGED] Document unsafe pointer lifetime constraints in update_chunk() #406
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/3FS#406
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/3FS/pull/385
Author: @Copilot
Created: 1/20/2026
Status: ✅ Merged
Merged: 1/20/2026
Merged by: @SF-Zhou
Base:
main← Head:copilot/fix-memory-safety-update-chunk📝 Commits (3)
574bdbbInitial plan7e3436dAdd SAFETY comments to document unsafe pointer usage in update_chunk()9f0be1eFix line numbers in SAFETY comment to reflect actual code locations📊 Changes
2 files changed (+7 additions, -0 deletions)
View changed files
📝
src/storage/chunk_engine/src/core/engine.rs(+4 -0)📝
src/storage/chunk_engine/src/cxx.rs(+3 -0)📄 Description
The
unsafe { std::slice::from_raw_parts(...) }inupdate_chunk()relies on synchronous data consumption—a constraint that would become a use-after-free hazard if writes ever become asynchronous.Changes
src/storage/chunk_engine/src/core/engine.rs:298: AddedSAFETYcomment documenting thatreq.datapointer must remain valid for function duration, consumed synchronously insafe_write/copy_on_writecalls at lines 386-394, 398-404, 418-424src/storage/chunk_engine/src/cxx.rs:381: AddedSAFETYcomment documenting thatdata: u64field represents a raw pointer valid forupdate_chunk()durationOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.