Hello, I don't understand why this code segfault on Linux/FreeBSD:

import std.stdio;
struct _Poc {
  this(this) { writeln("_Poc.this(this)"); }
}
void main() {
  _Poc[1] valueArray = [ _Poc() ];
  writeln(valueArray);
}

I've just defined the postblit function in _Poc to see how much it's invoked.
In my system, it's invoked 3 time after the segfault.
When the array is allocated on the heap, nothing happen.
So I guess it's because it's located on the stack but why?

regard.

Reply via email to