Skip to content

Comments

fix: Miri error on invalidated mut borrow#443

Open
EmilyMatt wants to merge 2 commits intosimd-lite:mainfrom
EmilyMatt:miri-error
Open

fix: Miri error on invalidated mut borrow#443
EmilyMatt wants to merge 2 commits intosimd-lite:mainfrom
EmilyMatt:miri-error

Conversation

@EmilyMatt
Copy link

Because the function continuously mutates the data in the input mut slice, miri's borrow checker invalidates the original mut borrow, so calling input.as_mut_ptr() is not allowed(miri no longer guarantees the validity of input)
This can be fixed by calling input.as_mut_ptr() once and using that var

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.

1 participant