Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soundness of Affix allocators #13

Open
nico-abram opened this issue Feb 14, 2021 · 0 comments
Open

Soundness of Affix allocators #13

nico-abram opened this issue Feb 14, 2021 · 0 comments

Comments

@nico-abram
Copy link

As I understand it, under stacked borrows Affix allocators are UB (In the deallocation part) if the pointer that comes in came through a &/&mut (See rust-lang/unsafe-code-guidelines#243, specifically rust-lang/unsafe-code-guidelines#243 (comment) . Related: rust-lang/unsafe-code-guidelines#256)

Note that the default windows allocator already does this: rust-lang/unsafe-code-guidelines#243 (comment) so while this is cause for concern, as far as I know it is possible this will have to be allowed (But is technically UB under the current stacked borrows)

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

No branches or pull requests

1 participant