Skip to content

Add safety sections to fxsave/fxrstor intrinsics - #2249

Open
kiana1kaslana wants to merge 1 commit into
rust-lang:mainfrom
kiana1kaslana:safety-doc-fxsr
Open

kiana1kaslana wants to merge 1 commit into
rust-lang:mainfrom
kiana1kaslana:safety-doc-fxsr

Conversation

@kiana1kaslana

@kiana1kaslana kiana1kaslana commented Oct 11, 2026 •

Copy link
Copy Markdown

The _fxsave, _fxrstor, _fxsave64 and _fxrstor64 intrinsics are declared unsafe but carry no # Safety section, unlike most of the other intrinsics in this crate. This adds the missing sections.

_fxsave writes a 512-byte FXSAVE image to memory and _fxrstor reads one back, so the sections state the validity and 16-byte alignment requirements of mem_addr. For the restore side they additionally require the memory to hold a well-formed FXSAVE image written by a prior save, with a legal value in the MXCSR portion.

Doc-only change.

@rustbot

rustbot commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project has assigned @adamgemmell (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks.

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn
  • @Amanieu, @adamgemmell, @davidtwco, @folkertdev, @sayantn expanded to Amanieu, adamgemmell, davidtwco, folkertdev, sayantn
  • Random selection from Amanieu, adamgemmell, davidtwco, folkertdev, sayantn

This branch has not been deployed

No deployments
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.

3 participants