segfaults
Lars T. Kyllingstad
public at kyllingen.NOSPAMnet
Mon May 3 13:57:00 PDT 2010
On Mon, 03 May 2010 15:54:28 -0500, Ellery Newcomer wrote:
> Hello.
>
> I'm trying to invoke a command inside d, and it returns a success code
> when the command in question segfaults.
>
> any ideas?
>
> // the caller
> import std.process;
>
> int main(){
> auto r = system("./test");
> return(r);
> }
>
>
> //test.d
> import std.stdio;
>
> void main()
> {
> Object o;
> writeln(o.toString());
> }
It's a null dereference. What you're doing is essentially
Object o = null;
writeln(o.toString());
-Lars
More information about the Digitalmars-d-learn
mailing list