www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18350] New: simple hello world crashes with segfault

https://issues.dlang.org/show_bug.cgi?id=18350

          Issue ID: 18350
           Summary: simple hello world crashes with segfault
           Product: D
           Version: D2
          Hardware: x86
               URL: https://forum.dlang.org/post/jjaynewwdsyntyehvahq foru
                    m.dlang.org
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: dfj1esp02 sneakemail.com

Reported on forum:
---
import std.stdio;
void main()
{
    writeln("hi");
}
---
$ rdmd main.d
Segmentation fault
$ dmd --version
DMD32 D Compiler v2.078.1
$ rdmd --version
rdmd build 20180121
$ uname -a
Linux timoses-home-debian 4.9.0-4-686 #1 SMP Debian 4.9.65-3+deb9u1
(2017-12-23) i686 GNU/Linux
$ dmd main.d
$ gdb ./main
(gdb) r
Starting program: /home/timoses/test3/main
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00432e04 in _d_dso_registry ()
(gdb) bt
#0  0x00432e04 in _d_dso_registry ()
#1  0x00431c63 in ?? ()
#2  0x0045c08b in __libc_csu_init ()
#3  0xb7d8e206 in __libc_start_main (main=0x431c24 <main>, argc=1,
argv=0xbffff784,
    init=0x45c040 <__libc_csu_init>, fini=0x45c0a0 <__libc_csu_fini>,
    rtld_fini=0xb7feb080 <_dl_fini>, stack_end=0xbffff77c) at
../csu/libc-start.c:247
#4  0x004315c1 in _start ()

$ (gdb) disas
https://pastebin.com/raw/SSx0P1Av

--
Feb 01