Hi again,

I think this is a bug in rust. Here is a minimal example attached. Uncompress and type "make run".
On my debian amd64 unstable machine, I get:
fatal runtime error:  assertion failed: !ptr.is_null()
Illegal instruction

I'm not sure how to report it, where should I upload the file?

Philippe

On 09/17/2014 11:34 PM, Philippe wrote:
Hi,

I have a case very similar to the one described here: http://doc.rust-lang.org/guide-ffi.html#asynchronous-callbacks . The guide explains what to do but not how to do it. I tried to share a Mutex between the rust thread and the c thread using combinations of Arc, std::mem::drop and stuff, std::ptr::read and stuff. So far I got only segfaults and assertion failures when I try to lock the mutex. How are we supposed to send an object to a C callback and give it ownership?

Also, there seems not to be Promise/Future classes in the standard library, why is that?

Thanks,
Philippe

Attachment: rustcrash.tar.bz2
Description: BZip2 compressed data

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to