-
Notifications
You must be signed in to change notification settings - Fork 32
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
Issue with nested structs #21
Comments
I'm not sure if the |
The problem is that the Since |
@xtldr Ah, in that case feel free to set up a pull request and I'll include the changes :) |
@yorickpeterse I have set up a pull request. I'm new to GitHub, so if there are any problems with it please let me know. |
@yorickpeterse Yeah, I got confused when Github offered to create a pull request when I used the online editor for creating the patch. I did a new pull request against this repo, and it seems ok. |
Fixed in #23, which has been released on crates.io |
The code below triggers reading freed memory:
The output is:
When running the program through
valgrind --tool=memcheck
I get the output:inner_struct is dropped in libffi::middle::types::ffi_type_array_create can be accessed through outer.
If I change the loop in ffi_type_array_create to:
I get the correct output ("Offsets: [0, 4]"). Not sure if this introduces leaks, but Valgrind doesn't complain.
The text was updated successfully, but these errors were encountered: