--------------------
$ unset HOME
$ dmd --help
Segmentation fault
--------------------
Comment #1 by hsteoh — 2014-09-11T18:40:21Z
Which version of dmd does this problem occur in? I can't seem to reproduce it in git HEAD.
Comment #2 by hsteoh — 2014-09-11T18:53:43Z
Can't reproduce this bug in 2.060, 2.064, 2.065, 2.066, and git HEAD. Tested on Linux/x86_64. Can you provide more info about your environment to help track this down? Thanks!
Comment #3 by maximzms — 2014-09-12T04:39:12Z
Created attachment 1423
env output
$ env > env.txt
Comment #4 by maximzms — 2014-09-12T04:42:06Z
Created attachment 1424
uname output
uname --all > uname-all.txt
Comment #5 by maximzms — 2014-09-12T04:44:29Z
Created attachment 1425
dmd
$ dmd --help > dmd-help.txt
Comment #6 by hsteoh — 2014-09-12T18:05:14Z
Aha! The problem is caused by your PATH having a literal '~' character in it. This causes dmd to call getenv("PATH"), but it fails to check a NULL return value, so when HOME is unset, it calls strlen(NULL) which segfaults.