https://issues.dlang.org/show_bug.cgi?id=1164
--- Comment #14 from Pieter Penninckx <pieter.pennin...@scarlet.be> --- (In reply to comment #11) Woops. You're right. The segfault is caused by an infinite recursion and probably not by a GC problem. We can avoid the infinite recursion by marking fun() as private: class X { X sibling; private bool fun() const { return true; } // Note: this line changed. invariant() { if(sibling !is null) { if (sibling.fun()) { assert(true); } } } this() {sibling = new X(this); } this(X sibling_) {sibling = sibling_;} ~this() {} } int main() { X x = new X(); return 0; } This just runs normally for me. But if I understand comment #13 correctly, this is just luck and I shouldn't count on it, especially when the runtime is compiled with the MEMSTOMP option. --