title: Every program I build with dmd crashes with a segfault
body: <p>Every single D program that I compile with <code>dmd</code> crashes with a segfault when I to run them.</p>
  <p>I stripped more and more out of the program I was writing to get the smallest program that does this and this</p>
  <pre><code>void main() {}
  </code></pre>
  <p>will crash with a segfault.</p>
  <p>I have not used D or dmd in a few weeks, but it was working fine last I noticed. I have not upgraded or changed dmd in that time, and can not think of any other change or update that might have affected dmd.</p>
  <p>Since finding that this was happening with dmd, I have re-installed the operating system and all the software and the same behaviour persists.</p>
  <p>I have tried building dmd from source but the first thing it does is run a <code>../generated/build</code> program, but that is a D program so it crashes.</p>
  <p>It also happens if I <code>dub init</code> a new project, <code>dub build</code> it and run the output. It is not just calling using dmd alone that produces executables that crash.</p>
  <p>I have tried reverting to former versions of dmd, versions that I am pretty sure that I have used successfully before, and programs built with them also crash now where they did not crash before.</p>
  <p>The Linux distribution is lxle, but /etc/os-release identifies the system as Ubuntu 18.04.4 LTS.</p>
  <p>Any help or ideas about what is causing this behaviour, and how to fix it, would be hugely appreciated.</p>
  <p>Thank you.</p>
  <p><strong>Edit</strong></p>
  <p><code>ldd</code> shows</p>
  <pre><code>linux-gate.so.1 (0xb7f4b000)
  libpthread.so.0 =&gt; /lib/i386-linux-gnu/libpthread.so.0 (0xb7e7c000)
  librt.so.1 =&gt; /lib/i386-linux-gnu/librt.so.1 (0xb7e72000)
  libgcc_s.so.1 =&gt; /lib/i386-linux-gnu/libgcc_s.so.1 (0xb7e54000)
  libc.so.6 =&gt; /lib/i386-linux-gnu/libc.so.6 (0xb7c78000)
  /lib/ld-linux.so.2 (0xb7f4d000)
  </code></pre>
  <p>I have no idea if that is typical, but the files listed there exist, or are symlinks to files that exist.</p>
  <p><code>break main</code> and <code>run</code> in <code>gdb</code> gives</p>
  <pre><code>Starting program: /home/ant/dtest/dtest 
  [Thread debugging using libthread_db enabled]
  Using host libthread_db library &quot;/lib/i386-linux-gnu/libthread_db.so.1&quot;.
  
  Program received signal SIGSEGV, Segmentation fault.
  0x00448865 in _D2rt19sections_elf_shared10_tlsRangesFNbNcNdNiZSQBv4util9container5array__T5ArrayTAvZQk ()
  </code></pre>
  <p>but I don't know what to do with that information.</p>
  <p><strong>Further edit</strong></p>
  <p>Adding <code>--DRT-gcopts=&quot;parallel:0&quot;</code> to the <code>dmd</code> command line made no difference to the program's behaviour. The generated program still crashes with a seg fault (and a claim that the core was dumped but no noticeable coredump file).</p>