-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Implement *WasmAbi for array #2013
Conversation
5a4521d
to
9ed3400
Compare
src/convert/slices.rs
Outdated
#[inline] | ||
fn into_abi(self) -> Self::Abi { | ||
WasmSlice { | ||
ptr: self.as_ptr().into_abi(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is a use-after-free, right? self
is dropped at the end of this function but we're returning a pointer to it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehehe. I should have paid more attention instead of simply copying and pasting. Thank you
9ed3400
to
44253ba
Compare
@alexcrichton At the time, there were some concerns about the feasibility of this feature. Has anything changed since then? |
Unfortunately, no, not much has changed I believe. |
@alexcrichton Thank you ! With the imminent stabilization of constant generics, it is unfortunate that this feature can't be implemented. |
Sup @alexcrichton Is it still not possible to implement this feature? |
I know I need this functionality. |
WIP
Requesting review because this is a blind attempt to implement
*WasmAbi
for arrays (up to 32). Sincerely, I am not aware of the consequences of these changes, let alone the possible missing places required for this feature.