Re: [racket-dev] posting to semaphore from C causes seg fault

2011-09-17 Thread John Clements
On Sep 17, 2011, at 7:32 AM, Matthew Flatt wrote: > It looks like the call in C might have been in a thread other than the > thread where Racket was started. In that case, when scheme_post_sema() > tries to cooperate with the GC, then it would end up with a NULL > pointer for the Racket GC inform

Re: [racket-dev] posting to semaphore from C causes seg fault

2011-09-17 Thread Matthew Flatt
It looks like the call in C might have been in a thread other than the thread where Racket was started. In that case, when scheme_post_sema() tries to cooperate with the GC, then it would end up with a NULL pointer for the Racket GC information of the current thread. In particular, since you're as

[racket-dev] posting to semaphore from C causes seg fault

2011-09-14 Thread John Clements
I'm unable to pass a semaphore to C and post to it from there. In particular, it causes a seg fault. I'm testing the Scheme_Object * with SCHEME_SEMAP, so I'm pretty sure it's a semaphore. Also, I can see this happen in gdb, but the code is optimized, so it's hard to see exactly where it's faili