-
Notifications
You must be signed in to change notification settings - Fork 108
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
dylib function that returns custom type when retrieved produces Segmentation Fault on macOS #30
Comments
This could be a duplicate of #5, although I do need a backtrace to make sure. You should make sure that the functions you’re trying to load dynamically are using a well-known ABI such as the |
I'm not sure how to generate a backtrace on macOS. Any steps you could link me to? I had the same problem when I used a custom enum. Then I tried Serde Json with libloading and that works perfectly fine. So my immediate problem has "gone away", but would like to get to the bottom of the issue. |
Run your program under lldb or gdb:
lldb program # or gdb program
Wait for the program to crash. Then type
backtrace
And paste the output here. Make sure to compile both your dynamic library
and loading program with debug info enabled (i.e. not --release or if rustc
is used directly with a -g flag)
…On Sep 6, 2017 9:06 AM, "fasihrana" ***@***.***> wrote:
I'm not sure how to generate a backtrace on macOS. Any steps you could
link me to?
I had the same problem when I used a custom enum. Then I tried Serde Json
with libloading and that works perfectly fine. So my immediate problem has
"gone away", but would like to get to the bottom of the issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApc0gNMlxlym9_6F8rMwoB9_kpUyIQ6ks5sfjZUgaJpZM4PMBYw>
.
|
Closing as there has been no activity. |
macOS Sierra: 10.12.6 (16G29)
This issue references the issue created for rust-json
Sample Code is as follows:
Code for the dynamic library function is as follows:
Code for my main.rs file is as follows:
The text was updated successfully, but these errors were encountered: