I'm not sure whether this is an issue with compiler or Phobos. A testcase close to minimal: import std.stdio; import std.stream; class S : Stream { override size_t readBlock(void* buffer, size_t size) { (cast(ubyte*) buffer)[0 .. size] = 0; return size; } override size_t writeBlock(const void* buffer, size_t size) { writefln("%s", size); return size; } override ulong seek(long offset, SeekPos whence) { throw new SeekException("seek not implemented"); } } void main() { auto s = new S; writeln("created"); ubyte[] z = [0, 1, 2, 3]; auto w = s.write(z); writeln(w); } Saved as t1.d and compiled using command "dmd t1.d". On windows 7 (64-bit) outputs: D:\proj\d\utest6>t1 created object.Error: Stack Overflow On ubuntu 10.04 (32-bit) outputs: epi@vbox:~/proj/xedisk/test$ ./t1 created Segmentation fault
buggy testcase, shame on me.