Skip to content

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

Merged
lidavidm merged 1 commit into
apache:mainfrom
lidavidm:unsafe-export
Oct 11, 2026
Merged

lidavidm merged 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
@lidavidm
lidavidm merged commit 8cc3971 into apache:main Oct 11, 2026
24 of 26 checks passed
@lidavidm
lidavidm deleted the unsafe-export branch October 11, 2026 23:36
lidavidm added a commit that referenced this pull request Oct 12, 2026
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