Skip to content

fix(rust/ffi): avoid undefined behavior in exported drivers - #4871

Open
lidavidm wants to merge 1 commit into
apache:mainfrom
lidavidm:unsafe-export
Open

lidavidm wants to merge 1 commit into
apache:mainfrom
lidavidm:unsafe-export

Conversation

@lidavidm

@lidavidm lidavidm commented Oct 7, 2026

Copy link
Copy Markdown
Member
  • Use & instead of &mut to avoid violating borrowing rules
  • Use Mutex to ensure even misbehaved clients don't violate safety
  • Use Mutex to also provide interior mutability
  • Some minor refactoring

Depends on #4861.

Assisted-by: GPT-6 Astra

@lidavidm

lidavidm commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

Note this PR is stacked, you're best off choosing only the last commit for review!

- Use & instead of &mut to avoid violating borrowing rules
- Use Mutex to ensure even misbehaved clients don't violate safety
- Use Mutex to also provide interior mutability
- Some minor refactoring

Depends on apache#4861.

Assisted-by: GPT-6 Astra
@lidavidm
lidavidm marked this pull request as ready for review October 9, 2026 01:59

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.

2 participants