> I have written the same program in C++ -- and I get no seg-fault. Well I > don't know for sure that something isn't wrong with my code, but I > suspect it is the GC that is messing things up.
This is definitly possible, I also had random segfaults GC related. It worked fine on my PC, but crashed on someone elses Ubuntu (same DMD version, same architecture). I also had random crashes in threads when they were about to finish, GC.disable() "solved" it, also rewriting the whole code (fortunatly I had to do that anyways)