alloc-compose
alloc-compose copied to clipboard
Soundness of Affix allocators
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 https://github.com/rust-lang/unsafe-code-guidelines/issues/243, specifically https://github.com/rust-lang/unsafe-code-guidelines/issues/243#issuecomment-669905393 . Related: https://github.com/rust-lang/unsafe-code-guidelines/issues/256)
Note that the default windows allocator already does this: https://github.com/rust-lang/unsafe-code-guidelines/issues/243#issuecomment-726238141 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)