-
Notifications
You must be signed in to change notification settings - Fork 31
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
Command got signal SEGV. #118
Comments
I'm wondering if it could be that I implement unsafe impl<'a> ocaml::FromValue<'a> for &$name {
fn from_value(value: ocaml::Value) -> Self {
let x: ocaml::Pointer<Self> = ocaml::FromValue::from_value(value);
x.as_ref()
}
} or if in the last stable version I still need to implement a finalizer to call drop (I was under the impression that we didn't have to do these anymore as it was the default, but maybe that's only in the beta since the tests use a finalizer on this repo at the tag of the latest stable) |
OK so I isolated the exported Rust function that was crashing (using lldb), and I changed the parameter from |
it's kind of weird because to book actually works with references: https://zshipko.github.io/ocaml-rs/02_type_conversion.html (and it doesn't even have to implement |
the examples in the tests seem to only use |
Yeah, in the latest version Line 195 in cae584c
They use |
do you know why I was getting this errors with that implementation? unsafe impl<'a> ocaml::FromValue<'a> for &$name {
fn from_value(value: ocaml::Value) -> Self {
let x: ocaml::Pointer<Self> = ocaml::FromValue::from_value(value);
x.as_ref()
}
} in any case now things work by using |
I'm getting the error in the title at the moment, and I see that I'm the first one talking about that in the issues :D hopefully I'll find some solution that will help the next guy.
The text was updated successfully, but these errors were encountered: