[phobos] parallelism segfaults
Martin Nowak
dawg at dawgfoto.de
Tue Sep 13 11:59:06 PDT 2011
I've had a look the core dumps from the sometimes failing std.parallelism
test.
The issue is one of having daemon threads running while the GC is
unmapping memory.
Usually this goes unnoticed because the parallelism threads wait in a work
queue condition.
Sometimes a daemon thread is awakening from it's GC suspend handler after
memory was already
freed. This issue is already mentioned in a comment at gc_term.
Thread obj = Thread.getThis();
...
suspend
...
if( obj && !obj.m_lock ) // <- segfault
I think we should bluntly kill daemon threads after thread_joinAll.
martin
More information about the phobos
mailing list