Bug 18350 – simple hello world crashes with segfault

Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2018-02-01T08:56:30Z
Last change time
2019-08-05T08:47:16Z
Assigned to
No Owner
Creator
anonymous4

Comments

Comment #0 by dfj1esp02 — 2018-02-01T08:56:30Z
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
Comment #1 by dfj1esp02 — 2018-02-01T08:59:14Z
... 0x00432df0 <+448>: call 0x433420 <_D2rt19sections_elf_shared11getTLSRangeFNbNikkZAv> 0x00432df5 <+453>: xor %ebx,%ebx 0x00432df7 <+455>: mov %edx,-0xa0(%ebp) 0x00432dfd <+461>: mov %gs:0x0,%edx => 0x00432e04 <+468>: add 0x6cff4,%edx 0x00432e0a <+474>: mov 0x4(%edx),%ecx 0x00432e0d <+477>: lea 0x1(%ecx),%esi
Comment #2 by mt — 2018-02-14T11:24:18Z
I have the same situation, on my Ubuntu 32Bit 17.10 system. Older programs compiled before the last dist-upgrade from 17.04 to 17.10 no errors. LDC2 compilation + running works. Tried several different (older and latest) DMD releases, no change in effect. Probably a 32 Bit Ubuntu > 17.04 problem?
Comment #3 by dfj1esp02 — 2019-08-05T08:47:16Z
Guess, the same issue. *** This issue has been marked as a duplicate of issue 19116 ***