-
Notifications
You must be signed in to change notification settings - Fork 48
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
Rust bindings #61
Comments
longjmp crash is an unfortunate bad news for threading programs.. Did you figure out why it is happening in your case? |
Oh, never mind, i see what is going on static jmp_buf ex_buf__; is one shared point for all threads, thus needs to be communicated via TLS. |
making it
(all options from https://en.wikipedia.org/wiki/Thread-local_storage#C_and_C++) |
Yep, that is what i had in mind. Thank you again for bringing it to attention! |
Fix propagated, closing. |
Hi, thanks for the great library!
I started two crates for wrapping the C FFI for using in Rust, one is the unsafe low-level bindings (
bitmagic-sys
) and another a safe/high-level/closer to Rust usage, based on the API of fixedbitset (bitmagic
), but I intend to expose more methods over time.Overall it is already working, after I commented out a line in cmake. The big problem I'm having is that if I run tests with more than 1 thread, the C++ exception emulation with
longjmp
/setjmp
creates memory corruption. I'm looking into that to see what is going on...I didn't register the crates in crates.io because I wanted to check if you first to see if that's OK, and I would also like to try to use the crate a bit more before registering anyway.
The text was updated successfully, but these errors were encountered: