> I've found a bug in the scheduler: > > When a main thread finishes (e.g. returning from a ffi callback), the > GC might be run before it is removed from the main_threads list. If a > major collection happens, the thread will be garbage > collected and the > GC barfs when it updates the pointers in the main_threads list. > This scenario is quite unlikely during normal operation, but when > heap-profiling a HOpenGL program it leads to certain death > after a few > seconds. > I don't know how to fix it in a clean way (I have no idea how my > changes would affect the threaded rts or the other "ways") --- so can > someone else please fix this?
Hmm, yes that looks like a bug. I've put together a patch (enclosed),
could you tell me if it helps?
Cheers,
Simon
patch
Description: Binary data
