Skip to content

Fix Windows GNU unwinding bindings for Rust 2024#1640

Merged
oferchen merged 1 commit into
masterfrom
fix-unsafe-function-usage-in-code
Oct 30, 2025
Merged

Fix Windows GNU unwinding bindings for Rust 2024#1640
oferchen merged 1 commit into
masterfrom
fix-unsafe-function-usage-in-code

Conversation

@oferchen
Copy link
Copy Markdown
Owner

Summary

  • update the Windows GNU libunwind shims for Rust 2024 safety requirements
  • explicitly mark no_mangle uses and unsafe calls to satisfy the new lints

Testing

  • cargo check -p rsync-windows-gnu-eh

https://chatgpt.com/codex/tasks/task_e_6902d5f7c7b48323b924f789a6e425b6

@oferchen oferchen merged commit 94535ac into master Oct 30, 2025
@oferchen oferchen deleted the fix-unsafe-function-usage-in-code branch October 30, 2025 03:09
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 22 to +27
/// Forwards `rsbegin`'s registration hook to libunwind.
#[no_mangle]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ___register_frame_info(eh_frame: *const u8, object: *mut c_void) {
__register_frame_info(eh_frame, object);
unsafe {
__register_frame_info(eh_frame, object);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Document new unsafe blocks to satisfy Clippy

The new unsafe { __register_frame_info(...) } block was added to satisfy Rust‑2024’s unsafe‑op requirements, but this crate has #![deny(clippy::undocumented_unsafe_blocks)]. Without a // SAFETY: justification the lint will emit an error and cargo clippy --workspace --all-targets -- -D warnings will fail. The block in ___deregister_frame_info below has the same issue. Please add brief safety comments or restructure to avoid the block.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant