linux linenumbers in stacktraces and druntime/phobos debug
bearophile
bearophileHUGS at lycos.com
Wed Feb 8 16:51:38 PST 2012
Vijay Nayar:
> First, let's start with a simple program that segfaults due to a null
> pointer.
>
> // File seg.d
> class Dummy {
> int a;
> }
>
> void main() {
> Dummy d;
> d.a = 3;
> }
>
> You compile and run the program with expected results.
>
> $ dmd seg.d
> $ ./seg
> Segmentation fault
Also try to compile it with -O :-)
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list