www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD 2.063 produces broken binaries

reply Jerry <jlquinn optonline.net> writes:
Hi folks,

I've downloaded the current dmd 2.063 zip and tried it out.  This is
Ubuntu 12.10 x86_64.  Every program I compile segfaults when I try to
run it.  As a simple example:

jlquinn wyvern:~/re/test$ cat junk.d 
import std.stdio;
void main() {
  writeln("Hi");
}
jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk.d
jlquinn wyvern:~/re/test$ ./junk
Segmentation fault (core dumped)

The gdb backtrace is somewhere in __libc_start_main, before main() is
run.

I assume I'm not in the majority, but I literally can't compile and run
anything.

Any help would be appreciated
Thanks
Jerry
Jun 04 2013
next sibling parent "Rob T" <alanb ucora.com> writes:
On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  
 This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I 
 try to
 run it.  As a simple example:

 jlquinn wyvern:~/re/test$ cat junk.d
 import std.stdio;
 void main() {
   writeln("Hi");
 }
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd 
 junk.d
 jlquinn wyvern:~/re/test$ ./junk
 Segmentation fault (core dumped)

 The gdb backtrace is somewhere in __libc_start_main, before 
 main() is
 run.

 I assume I'm not in the majority, but I literally can't compile 
 and run
 anything.

 Any help would be appreciated
 Thanks
 Jerry

Is this a clean install? I'm using Debian, and had to fully remove the prev version before installing the newer version otherwise I got linking issues. I did however use the deb package, not the zip. There's some discussion in another thread about doing proper deb packaging, so I think the DMD devs know about these problems, at least in the general sense. --rt
Jun 04 2013
prev sibling next sibling parent reply "Gary Willoughby" <dev kalekold.net> writes:
On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  
 This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I 
 try to
 run it.  As a simple example:

 jlquinn wyvern:~/re/test$ cat junk.d
 import std.stdio;
 void main() {
   writeln("Hi");
 }
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd 
 junk.d
 jlquinn wyvern:~/re/test$ ./junk
 Segmentation fault (core dumped)

 The gdb backtrace is somewhere in __libc_start_main, before 
 main() is
 run.

 I assume I'm not in the majority, but I literally can't compile 
 and run
 anything.

 Any help would be appreciated
 Thanks
 Jerry

Try compiling with the -v -w flags for more verbose output. It may be an installation problem.
Jun 04 2013
next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/4/13 10:30 PM, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063
 config    /home/jlquinn/dmd2/linux/bin64/dmd.conf
 parse     junk
 importall junk
 import    object	(/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/object.di)

Can anyone reproduce this problem? Thanks, Andrei
Jun 05 2013
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/10/13 2:41 AM, Jerry wrote:
 "Andrei Alexandrescu"<SeeWebsiteForEmail erdani.org>  writes:

 On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu wrote:
 On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu wrote:
 On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation?

Forgot to mention - details at http://d.puremagic.com/issues/show_bug.cgi?id=10274

One thought that comes to mind - you may want to double-check LD_LIBRARY_PATH to make sure there's no stray reference to an old libphobos.a dir.

LD_LIBRARY_PATH is empty. I've now reproduced this segfault on a Debian testing machine as well as my Ubuntu one. I'm pretty confused. Jerry

Appreciate the work. (BTW nice to see you again, recall we talked at that NLP conference a while back.) Let's focus on Ubuntu/64 because that's what I have on my end too. 1. Which Ubuntu version are you using? 2. Can you compile and run "hello, world" in C? 3. If you replace the D call to writeln() with a call to printf(), does that work? 4. If you make any other calls into the stdlib aside from I/O, do they work? 5. Does gdb reveal anything interesting? Andrei
Jun 10 2013
next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 6/10/2013 2:28 PM, nazriel wrote:
 program was compiled with dmd (2.063) using the following flags: -g -debug
 -unittest

I suspected it may be the problem with shared libraries. Can you try compiling that hello world with static libphobos? Or can you attach your segfaulting binary?

Statically linking with libphobos2.a is the default.
Jun 10 2013
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 6/10/2013 2:38 PM, nazriel wrote:
 On Monday, 10 June 2013 at 21:33:20 UTC, Walter Bright wrote:
 On 6/10/2013 2:28 PM, nazriel wrote:
 program was compiled with dmd (2.063) using the following flags: -g -debug
 -unittest

I suspected it may be the problem with shared libraries. Can you try compiling that hello world with static libphobos? Or can you attach your segfaulting binary?

Statically linking with libphobos2.a is the default.

Brandon's back-trace mentions libphobos2.so.0.63 OP's backtrace shows that SIGSEGV occurs in _d_dso_registry() My guess would be to check that first.

linking with -g -debug -unittest will statically link, it will not link with the .so
Jun 10 2013
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 6/10/2013 2:56 PM, Walter Bright wrote:
 On 6/10/2013 2:38 PM, nazriel wrote:
 On Monday, 10 June 2013 at 21:33:20 UTC, Walter Bright wrote:
 On 6/10/2013 2:28 PM, nazriel wrote:
 program was compiled with dmd (2.063) using the following flags: -g -debug
 -unittest

I suspected it may be the problem with shared libraries. Can you try compiling that hello world with static libphobos? Or can you attach your segfaulting binary?

Statically linking with libphobos2.a is the default.

Brandon's back-trace mentions libphobos2.so.0.63 OP's backtrace shows that SIGSEGV occurs in _d_dso_registry() My guess would be to check that first.

linking with -g -debug -unittest will statically link, it will not link with the .so

One way to be sure - delete all the libphobos2.so files. All of them, then try again.
Jun 10 2013
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/10/13 6:10 PM, Jerry wrote:
 [pid 23169] open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a",
O_RDONLY|O_CLOEXEC) = 11

OK, so it seems this is the cause. I'm trying to repro it on a fresh Ubuntu 12.10 VM. So at least two bugs: 1. We link dynamically by default at least on some systems. 2. The dynamically linked programs crash again at least on some systems. Andrei
Jun 10 2013
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/11/13 12:22 AM, Andrei Alexandrescu wrote:
 On 6/10/13 6:10 PM, Jerry wrote:
 [pid 23169]
 open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a",
 O_RDONLY|O_CLOEXEC) = 11

OK, so it seems this is the cause. I'm trying to repro it on a fresh Ubuntu 12.10 VM. So at least two bugs: 1. We link dynamically by default at least on some systems. 2. The dynamically linked programs crash again at least on some systems.

Was unable to repro on a fresh installation of ubu 12.10/64 in a VirtualBox on OSX. (It's clear there is a problem somewhere though.) Andrei
Jun 10 2013
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/11/13 5:17 AM, nazriel wrote:
 On Tuesday, 11 June 2013 at 06:00:01 UTC, Andrei Alexandrescu wrote:
 On 6/11/13 12:22 AM, Andrei Alexandrescu wrote:
 On 6/10/13 6:10 PM, Jerry wrote:
 [pid 23169]
 open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a",
 O_RDONLY|O_CLOEXEC) = 11

OK, so it seems this is the cause. I'm trying to repro it on a fresh Ubuntu 12.10 VM. So at least two bugs: 1. We link dynamically by default at least on some systems. 2. The dynamically linked programs crash again at least on some systems.

Was unable to repro on a fresh installation of ubu 12.10/64 in a VirtualBox on OSX. (It's clear there is a problem somewhere though.) Andrei

I asked twice for attaching binary produced by compiler. It would allow to see if the problem is with OP setup, hardware or system. If their binary will crash on our system, then something with D(md) itself is borken. It would also allow for disassembling and better debugging by interested in solving problem people. But I am totally ignored here. Andrei, can you help? ;)

Well Jerry can help. Jerry? Nazriel, if you want me to attach the binary I produced, sure, I can do that. But that works... Andrei
Jun 11 2013
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 6/10/2013 9:52 AM, Jerry wrote:
 5. Does gdb reveal anything interesting?

Unfortunately there's no debugging symbols in _d_dso_registry(). I assume the compiler is writing asm directly.

Use the 'disassemble' command starting at _d_dso_registry, and point out which instruction is faulting. You might also try running the program under valgrind.
Jun 10 2013
prev sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 6/9/2013 11:41 PM, Jerry wrote:
 LD_LIBRARY_PATH is empty.  I've now reproduced this segfault on a Debian
 testing machine as well as my Ubuntu one.  I'm pretty confused.

LD_LIBRARY_PATH only applies to shared libraries.
Jun 10 2013
prev sibling next sibling parent "Anthony Goins" <neontotem gmail.com> writes:
On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  
 This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I 
 try to
 run it.  As a simple example:

 jlquinn wyvern:~/re/test$ cat junk.d
 import std.stdio;
 void main() {
   writeln("Hi");
 }
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd 
 junk.d
 jlquinn wyvern:~/re/test$ ./junk
 Segmentation fault (core dumped)

 The gdb backtrace is somewhere in __libc_start_main, before 
 main() is
 run.

 I assume I'm not in the majority, but I literally can't compile 
 and run
 anything.

 Any help would be appreciated
 Thanks
 Jerry

Similar problem, you aren't alone. Poster noticed the segfaults after installing gdc. http://forum.dlang.org/post/mailman.573.1370076049.13711.digitalmars-d-learn puremagic.com
Jun 04 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
"Rob T" <alanb ucora.com> writes:

 On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I try to
 run it.  As a simple example:

Is this a clean install? I'm using Debian, and had to fully remove the prev version before installing the newer version otherwise I got linking issues. I did however use the deb package, not the zip.

It was a clean install. I removed the prior dmd directory before unzipping. I also tried installing the deb package and still get a segfault.
Jun 04 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
"Gary Willoughby" <dev kalekold.net> writes:

 On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I try to
 run it.  As a simple example:

 jlquinn wyvern:~/re/test$ cat junk.d
 import std.stdio;
 void main() {
   writeln("Hi");
 }
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk.d
 jlquinn wyvern:~/re/test$ ./junk
 Segmentation fault (core dumped)

 The gdb backtrace is somewhere in __libc_start_main, before main() is
 run.

 I assume I'm not in the majority, but I literally can't compile and run
 anything.

 Any help would be appreciated
 Thanks
 Jerry

Try compiling with the -v -w flags for more verbose output. It may be an installation problem.

jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd -v -w junk.d binary /home/jlquinn/dmd2/linux/bin64/dmd version v2.063 config /home/jlquinn/dmd2/linux/bin64/dmd.conf parse junk importall junk import object (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/object.di) import std.stdio (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdio.d) import core.stdc.stdio (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdio.d) import core.stdc.config (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/config.d) import core.stdc.stddef (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stddef.d) import core.stdc.stdarg (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdarg.d) import std.string (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/string.d) import core.exception (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/exception.d) import core.vararg (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/vararg.d) import core.stdc.stdlib (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdlib.d) import core.stdc.string (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/string.d) import std.algorithm (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/algorithm.d) import std.c.string (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/string.d) import core.bitop (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/bitop.d) import std.array (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/array.d) import core.memory (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/memory.d) import std.ascii (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/ascii.d) import std.conv (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/conv.d) import std.math (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/math.d) import core.stdc.math (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/math.d) import std.range (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/range.d) import std.exception (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/exception.d) import std.traits (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/traits.d) import std.typetuple (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/typetuple.d) import std.typecons (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/typecons.d) import std.format (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/format.d) import std.bitmanip (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/bitmanip.d) import std.system (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/system.d) import std.functional (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/functional.d) import std.utf (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/utf.d) import core.stdc.errno (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/errno.d) import std.uni (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/uni.d) import std.container (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/container.d) import std.random (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/random.d) import std.c.time (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/time.d) import core.stdc.time (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/time.d) import std.numeric (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/numeric.d) import std.c.stdlib (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/stdlib.d) import std.complex (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/complex.d) import core.thread (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/thread.di) import core.time (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/time.d) import core.sys.posix.time (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/time.d) import core.sys.posix.config (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/config.d) import core.sys.posix.sys.types (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/types.d) import core.stdc.stdint (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdint.d) import core.stdc.signal (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/signal.d) import core.stdc.wchar_ (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/wchar_.d) import core.sys.posix.signal (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/signal.d) import core.sys.posix.sys.time (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/time.d) import core.sys.posix.sys.select (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/select.d) import core.sys.posix.unistd (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/unistd.d) import core.sys.posix.inttypes (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/inttypes.d) import core.stdc.inttypes (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/stdc/inttypes.d) import std.regex (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/regex.d) import std.internal.uni (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/internal/uni.d) import std.internal.uni_tab (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/internal/uni_tab.d) import std.c.stdio (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/stdio.d) import std.stdiobase (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/stdiobase.d) import core.sys.posix.stdio (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/stdio.d) import std.c.linux.linux (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/linux/linux.d) import std.c.linux.pthread (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/linux/pthread.d) import core.sys.posix.dirent (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/dirent.d) import core.sys.posix.dlfcn (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/dlfcn.d) import core.sys.posix.fcntl (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/fcntl.d) import core.sys.posix.sys.stat (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/stat.d) import core.sys.posix.pwd (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/pwd.d) import core.sys.posix.utime (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/utime.d) import core.sys.posix.sys.mman (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/mman.d) import core.sys.posix.sys.wait (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/wait.d) import std.c.linux.socket (/home/jlquinn/dmd2/linux/bin64/../../src/phobos/std/c/linux/socket.d) import core.sys.posix.arpa.inet (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/arpa/inet.d) import core.sys.posix.sys.socket (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/socket.d) import core.sys.posix.sys.uio (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/uio.d) import core.sys.posix.netdb (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/netdb.d) import core.sys.posix.netinet.in_ (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/netinet/in_.d) import core.sys.posix.netinet.tcp (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/netinet/tcp.d) semantic junk import core.sys.posix.pthread (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/pthread.d) import core.sys.posix.sched (/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sched.d) entry main junk.d semantic2 junk semantic3 junk code junk function D main function std.traits.Demangle!(uint).Demangle.__xopEquals function std.complex.Complex!(real).Complex.toString function std.complex.Complex!(real).Complex.toString.__lambda1314 function std.complex.Complex!(real).Complex.__xopEquals function std.complex.Complex!(real).Complex.opAssign!(real).opAssign function std.complex.Complex!(real).Complex.opEquals!(real).opEquals function std.stdio.writeln!(string).writeln function std.stdio.writeln!(string).writeln.__dgliteral1469 function std.exception.enforce!(bool).enforce function object.reserve!(char).reserve function std.format.formattedWrite!(void delegate(const(char)[]), char, const(real)).formattedWrite function std.format.formattedWrite!(void delegate(const(char)[]), char, const(real)).formattedWrite.__dgliteral1642 function std.format.FormatSpec!(char).FormatSpec.flDash function std.format.FormatSpec!(char).FormatSpec.flDash function std.format.FormatSpec!(char).FormatSpec.flZero function std.format.FormatSpec!(char).FormatSpec.flZero function std.format.FormatSpec!(char).FormatSpec.flSpace function std.format.FormatSpec!(char).FormatSpec.flSpace function std.format.FormatSpec!(char).FormatSpec.flPlus function std.format.FormatSpec!(char).FormatSpec.flPlus function std.format.FormatSpec!(char).FormatSpec.flHash function std.format.FormatSpec!(char).FormatSpec.flHash function std.format.FormatSpec!(char).FormatSpec.this function std.format.FormatSpec!(char).FormatSpec.fillUp function std.format.FormatSpec!(char).FormatSpec.fillUp.check function std.format.FormatSpec!(char).FormatSpec.fillUp.check.__dgliteral1530 function std.format.FormatSpec!(char).FormatSpec.fillUp.__dgliteral1629 function std.format.FormatSpec!(char).FormatSpec.fillUp.__dgliteral1630 function std.format.FormatSpec!(char).FormatSpec.fillUp.__dgliteral1636 function std.format.FormatSpec!(char).FormatSpec.fillUp.__dgliteral1641 function std.format.FormatSpec!(char).FormatSpec.getCurFmtStr function std.format.FormatSpec!(char).FormatSpec.headUpToNextSpec function std.format.FormatSpec!(char).FormatSpec.toString function std.format.FormatSpec!(char).FormatSpec.__xopEquals function std.format.formatGeneric!(void delegate(const(char)[]), const(real), char).formatGeneric function std.format.formatValue!(void delegate(const(char)[]), const(real), char).formatValue function std.format.formatValue!(void delegate(const(char)[]), const(real), char).formatValue.__dgliteral1519 function std.format.formatValue!(void delegate(const(char)[]), const(real), char).formatValue.__dgliteral1520 function std.range.put!(void delegate(const(char)[]), const(char)).put function std.array.empty!(char).empty function std.array.popFront!(immutable(char)).popFront function std.array.front!(immutable(char)).front function std.utf.decode!(string).decode function std.utf.decodeImpl!(true, string).decodeImpl function std.utf.decodeImpl!(true, string).decodeImpl.invalidUTF function std.utf.decodeImpl!(true, string).decodeImpl.outOfBounds function std.utf.decodeImpl!(true, string).decodeImpl.exception!(string).exception function std.functional.binaryFun!("a == b").binaryFun!(dchar, char).binaryFun function std.array.save!(immutable(char)).save function std.array.popBack!(immutable(char)).popBack function std.utf.strideBack!(string).strideBack function std.array.back!(immutable(char)).back function std.algorithm.find!("a == b", string, char).find function std.exception.enforceEx!(FormatException).enforceEx!(ulong).enforceEx function std.exception.enforceEx!(FormatException).enforceEx!(bool).enforceEx function std.range.put!(void delegate(const(char)[]), char[]).put function std.format.FormatSpec!(char).FormatSpec.writeUpToNextSpec!(void delegate(const(char)[])).writeUpToNextSpec function std.range.put!(void delegate(const(char)[]), const(char)[]).put function std.conv.text!(string, const(char)[]).text function std.conv.textImpl!(string, string, const(char)[]).textImpl function std.conv.to!(string).to!(string).to function std.conv.toImpl!(string, string).toImpl function std.conv.to!(string).to!(const(char)[]).to function std.conv.toImpl!(string, const(char)[]).toImpl function std.conv.to!(const(char)[]).to!(const(char)[]).to function std.conv.toImpl!(const(char)[], const(char)[]).toImpl function std.array.front!(const(char)).front function std.utf.decode!(const(char)[]).decode function std.array.popFront!(const(char)).popFront function std.utf.decodeImpl!(true, const(char)[]).decodeImpl function std.utf.decodeImpl!(true, const(char)[]).decodeImpl.invalidUTF function std.utf.decodeImpl!(true, const(char)[]).decodeImpl.outOfBounds function std.utf.decodeImpl!(true, const(char)[]).decodeImpl.exception!(const(char)[]).exception function std.conv.parse!(int, const(char)[]).parse function std.conv.convError!(const(char)[], int).convError function std.conv.convError_unexpected!(const(char)[]).convError_unexpected function std.conv.text!(string, dchar, string).text function std.conv.textImpl!(string, string, dchar, string).textImpl function std.conv.to!(string).to!(dchar).to function std.conv.toImpl!(string, dchar).toImpl function std.conv.toStr!(string, dchar).toStr function std.array.appender!(string, immutable(char)).appender function std.array.Appender!(string).Appender.Data.__xopEquals function std.array.Appender!(string).Appender.this function std.array.Appender!(string).Appender.reserve function std.array.Appender!(string).Appender.capacity function std.array.Appender!(string).Appender.data function std.array.Appender!(string).Appender.ensureAddable function std.array.Appender!(string).Appender.newCapacity function object.capacity!(immutable(char)).capacity function std.format.formatValue!(Appender!(string), dchar, char).formatValue function std.range.put!(Appender!(string), dchar).put function std.array.Appender!(string).Appender.put!(dchar).put function std.array.popFront!(char).popFront function std.array.front!(char).front function std.utf.decode!(char[]).decode function std.utf.decodeImpl!(true, char[]).decodeImpl function std.utf.decodeImpl!(true, char[]).decodeImpl.invalidUTF function std.utf.decodeImpl!(true, char[]).decodeImpl.outOfBounds function std.utf.decodeImpl!(true, char[]).decodeImpl.exception!(char[]).exception function std.array.Appender!(string).Appender.put!(char[]).put function std.format.formatValue!(Appender!(string), uint, char).formatValue function std.range.put!(Appender!(string), const(char)).put function std.array.Appender!(string).Appender.put!(const(char)).put function std.format.formatIntegral!(Appender!(string), ulong, char).formatIntegral function std.format.formatIntegral!(Appender!(string), ulong, char).formatIntegral.__dgliteral1619 function std.format.formatUnsigned!(Appender!(string), char).formatUnsigned function std.range.put!(Appender!(string), char).put function std.array.Appender!(string).Appender.put!(char).put function std.range.put!(Appender!(string), char[]).put function std.conv.text!(string, string, string).text function std.conv.textImpl!(string, string, string, string).textImpl function std.conv.parse!(uint, const(char)[]).parse function std.conv.convError!(const(char)[], uint).convError function std.algorithm.startsWith!("a == b", const(char)[], char).startsWith function std.conv.to!(ubyte).to!(const(uint)).to function std.conv.toImpl!(ubyte, const(uint)).toImpl function std.conv.parse!(ubyte, const(char)[]).parse function std.conv.convError!(const(char)[], ubyte).convError function std.conv.to!(int).to!(const(uint)).to function std.conv.toImpl!(int, const(uint)).toImpl function std.conv.toImpl!(int, const(uint)).toImpl.__dgliteral1640 function std.exception.enforce!(bool).enforce function std.format.getNthInt!(const(real)).getNthInt function std.format.getNthInt!().getNthInt function std.conv.to!(int).to!(int).to function std.conv.toImpl!(int, int).toImpl function std.format.formatNth!(void delegate(const(char)[]), char, const(real)).formatNth function std.format.formatNth!(void delegate(const(char)[]), char, const(real)).formatNth.gencode!(1LU).gencode function std.conv.to!(string).to!(ulong).to function std.conv.toImpl!(string, ulong).toImpl function std.conv.toStr!(string, ulong).toStr function std.format.formatValue!(Appender!(string), ulong, char).formatValue function std.format.formatValue!(Appender!(string), const(ubyte), char).formatValue function std.format.formatValue!(Appender!(string), const(int), char).formatValue function std.format.formatIntegral!(Appender!(string), long, char).formatIntegral function std.format.formatIntegral!(Appender!(string), long, char).formatIntegral.__dgliteral1690 function std.array.appender!(const(char)[], const(char)).appender function std.array.Appender!(const(char)[]).Appender.Data.__xopEquals function std.array.Appender!(const(char)[]).Appender.this function std.array.Appender!(const(char)[]).Appender.reserve function std.array.Appender!(const(char)[]).Appender.capacity function std.array.Appender!(const(char)[]).Appender.data function std.array.Appender!(const(char)[]).Appender.ensureAddable function std.array.Appender!(const(char)[]).Appender.newCapacity function object.capacity!(const(char)).capacity function std.array.Appender!(const(char)[]).Appender.put!(char).put function std.array.Appender!(const(char)[]).Appender.put!(dchar).put function std.array.Appender!(const(char)[]).Appender.put!(char[]).put function std.conv.text!(string, void*, string, int, string, int, string, char, string, ubyte, string, ubyte, string, bool, string, bool, string, bool, string, bool, string, bool, string, const(char)[], string, const(char)[], string).text function std.conv.textImpl!(string, string, void*, string, int, string, int, string, char, string, ubyte, string, ubyte, string, bool, string, bool, string, bool, string, bool, string, bool, string, const(char)[], string, const(char)[], string).textImpl function std.conv.to!(string).to!(void*).to function std.conv.toImpl!(string, void*).toImpl function std.conv.toStr!(string, void*).toStr function std.format.formatValue!(Appender!(string), void*, char).formatValue function std.format.formatValue!(Appender!(string), void*, char).formatValue.__dgliteral1720 function std.range.put!(Appender!(string), string).put function std.array.Appender!(string).Appender.put!(string).put function std.conv.to!(string).to!(int).to function std.conv.toImpl!(string, int).toImpl function std.conv.toStr!(string, int).toStr function std.format.formatValue!(Appender!(string), int, char).formatValue function std.conv.to!(string).to!(char).to function std.conv.toImpl!(string, char).toImpl function std.conv.toStr!(string, char).toStr function std.format.formatValue!(Appender!(string), char, char).formatValue function std.conv.to!(string).to!(ubyte).to function std.conv.toImpl!(string, ubyte).toImpl function std.conv.toStr!(string, ubyte).toStr function std.format.formatValue!(Appender!(string), ubyte, char).formatValue function std.conv.to!(string).to!(bool).to function std.conv.toImpl!(string, bool).toImpl function std.conv.toStr!(string, bool).toStr function std.format.formatValue!(Appender!(string), bool, char).formatValue gcc junk.o -o junk -m64 -L/home/jlquinn/dmd2/linux/bin64/../lib64 -L/home/jlquinn/dmd2/linux/bin64/../lib32 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -l:libphobos2.a -lpthread -lm -lrt jlquinn wyvern:~/re/test$ ./junk Segmentation fault (core dumped) jlquinn wyvern:~/re/test$
Jun 04 2013
prev sibling next sibling parent Martin Nowak <code dawg.eu> writes:
On 06/04/2013 08:03 PM, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I try to
 run it.  As a simple example:

 jlquinn wyvern:~/re/test$ cat junk.d
 import std.stdio;
 void main() {
    writeln("Hi");
 }
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk.d
 jlquinn wyvern:~/re/test$ ./junk
 Segmentation fault (core dumped)

http://d.puremagic.com/issues/show_bug.cgi?id=10274. Please let's continue the investigation there.
Jun 05 2013
prev sibling next sibling parent "Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> writes:
On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd -v 
 -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation? Thanks, Andrei
Jun 09 2013
prev sibling next sibling parent "Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> writes:
On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu wrote:
 On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd 
 -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation?

Forgot to mention - details at http://d.puremagic.com/issues/show_bug.cgi?id=10274 Andrei
Jun 09 2013
prev sibling next sibling parent "Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> writes:
On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu wrote:
 On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu 
 wrote:
 On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd 
 -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation?

Forgot to mention - details at http://d.puremagic.com/issues/show_bug.cgi?id=10274

One thought that comes to mind - you may want to double-check LD_LIBRARY_PATH to make sure there's no stray reference to an old libphobos.a dir.
Jun 09 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
"Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> writes:

 On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu wrote:
 On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu wrote:
 On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation?

Forgot to mention - details at http://d.puremagic.com/issues/show_bug.cgi?id=10274

One thought that comes to mind - you may want to double-check LD_LIBRARY_PATH to make sure there's no stray reference to an old libphobos.a dir.

LD_LIBRARY_PATH is empty. I've now reproduced this segfault on a Debian testing machine as well as my Ubuntu one. I'm pretty confused. Jerry
Jun 09 2013
prev sibling next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
On Monday, 10 June 2013 at 06:41:39 UTC, Jerry wrote:
 "Andrei Alexandrescu" <SeeWebsiteForEmail erdani.org> writes:

 On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu 
 wrote:
 On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu 
 wrote:
 On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ 
 /home/jlquinn/dmd2/linux/bin64/dmd -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation?

Forgot to mention - details at http://d.puremagic.com/issues/show_bug.cgi?id=10274

One thought that comes to mind - you may want to double-check LD_LIBRARY_PATH to make sure there's no stray reference to an old libphobos.a dir.

LD_LIBRARY_PATH is empty. I've now reproduced this segfault on a Debian testing machine as well as my Ubuntu one. I'm pretty confused. Jerry

I can't reproduce this anywhere. What's the output for these: gcc --version ldd --version Also, check for any stray installations or config files: find /usr /etc /opt /home/$(whoami) -name \*phobos\* -o -name \*druntime\* -o -name dmd\* 2>/dev/null Be warned that will take a while (a few minutes on my machine). Also, and I know this sounds stupidly simple, but have to tried re-downloading?
Jun 10 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote:
 Hi folks,

 I've downloaded the current dmd 2.063 zip and tried it out.  
 This is
 Ubuntu 12.10 x86_64.  Every program I compile segfaults when I 
 try to
 run it.  As a simple example:

 jlquinn wyvern:~/re/test$ cat junk.d
 import std.stdio;
 void main() {
   writeln("Hi");
 }
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd 
 junk.d
 jlquinn wyvern:~/re/test$ ./junk
 Segmentation fault (core dumped)

 The gdb backtrace is somewhere in __libc_start_main, before 
 main() is
 run.

 I assume I'm not in the majority, but I literally can't compile 
 and run
 anything.

 Any help would be appreciated
 Thanks
 Jerry

Can you upload somewhere your broken binary? x86_64 EFL binary would be great!
Jun 10 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
"John Colvin" <john.loughran.colvin gmail.com> writes:

 On Monday, 10 June 2013 at 06:41:39 UTC, Jerry wrote:
 LD_LIBRARY_PATH is empty.  I've now reproduced this segfault on a Debian
 testing machine as well as my Ubuntu one.  I'm pretty confused.

 Jerry

I can't reproduce this anywhere. What's the output for these: gcc --version ldd --version

jlquinn wyvern:~/dmd2/src/dmd$ gcc --version gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. jlquinn wyvern:~/dmd2/src/dmd$ ldd --version ldd (Ubuntu EGLIBC 2.15-0ubuntu20.1) 2.15 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.
 Also, check for any stray installations or config files:
 find /usr /etc /opt /home/$(whoami) -name \*phobos\* -o -name \*druntime\* -o
 -name dmd\* 2>/dev/null

I ran and verified that there's no stray phobos or druntime libraries.
 Be warned that will take a while (a few minutes on my machine).
 Also, and I know this sounds stupidly simple, but have to tried
 re-downloading?

Already tried it. I also get a segfault on my Debian x86_64 machine. I've straced the dmd compile and it is using the correct libraries. Compressed, the binary is 175K. Is that OK to attach to the open bug? Jerry
Jun 10 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:

 On 6/10/13 2:41 AM, Jerry wrote:
 "Andrei Alexandrescu"<SeeWebsiteForEmail erdani.org>  writes:

 On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu wrote:
 On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu wrote:
 On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote:
 jlquinn wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd -v -w junk.d
 binary    /home/jlquinn/dmd2/linux/bin64/dmd
 version   v2.063

I've done a clean room attempt at reproducing the bug, was unable to. Jerry, anything you can think of that's unusual with your installation?

Forgot to mention - details at http://d.puremagic.com/issues/show_bug.cgi?id=10274

One thought that comes to mind - you may want to double-check LD_LIBRARY_PATH to make sure there's no stray reference to an old libphobos.a dir.

LD_LIBRARY_PATH is empty. I've now reproduced this segfault on a Debian testing machine as well as my Ubuntu one. I'm pretty confused. Jerry

Appreciate the work. (BTW nice to see you again, recall we talked at that NLP conference a while back.)

I do recall. I'm glad you ended up someplace you enjoy. That was a fun conference.
 Let's focus on Ubuntu/64 because that's what I have on my end too.

 1. Which Ubuntu version are you using?

I'm running 12.10 x86_64.
 2. Can you compile and run "hello, world" in C?

That works fine.
 3. If you replace the D call to writeln() with a call to printf(), does that
 work?

No, same problem. BTW, it's segfaulting in _d_dso_registry() before main() gets run.
 4. If you make any other calls into the stdlib aside from I/O, do they
 work?

It doesn't matter. The following program segfaults: void main() {}
 5. Does gdb reveal anything interesting?

Unfortunately there's no debugging symbols in _d_dso_registry(). I assume the compiler is writing asm directly. Jerry
Jun 10 2013
prev sibling next sibling parent "Brandon" <noemail none.com> writes:
On Monday, 10 June 2013 at 16:52:51 UTC, Jerry wrote:
 No, same problem.  BTW, it's segfaulting in _d_dso_registry() 
 before
 main() gets run.

 4. If you make any other calls into the stdlib aside from I/O, 
 do they
 work?

It doesn't matter. The following program segfaults: void main() {}
 5. Does gdb reveal anything interesting?

Unfortunately there's no debugging symbols in _d_dso_registry(). I assume the compiler is writing asm directly. Jerry

I got a similar issue when upgrading to 2.063 on arch linux, so I feel this may be relevant to the current problem. Heres the backtrace for me. #0 0x00007ffff7286f54 in _d_arrayappendcd () from /usr/lib/libphobos2.so.0.63 #1 0x00007ffff721f5c4 in std.string.__T7toLowerTAyaZ.toLower() () from /usr/lib/libphobos2.so.0.63 #2 0x00007ffff72781a2 in _aApplycd1 () from /usr/lib/libphobos2.so.0.63 #3 0x00007ffff721f566 in std.string.__T7toLowerTAyaZ.toLower() () from /usr/lib/libphobos2.so.0.63 #4 0x00007ffff7278626 in _aApplycd2 () from /usr/lib/libphobos2.so.0.63 #5 0x00007ffff721f4b5 in std.string.__T7toLowerTAyaZ.toLower() () from /usr/lib/libphobos2.so.0.63 #6 0x00007ffff71b4f15 in std.encoding.EncodingScheme.register() () from /usr/lib/libphobos2.so.0.63 #7 0x00007ffff71b543a in std.encoding.EncodingSchemeASCII._sharedStaticCtor9() () from /usr/lib/libphobos2.so.0.63 #8 0x00007ffff71bb351 in std.encoding.__modsharedctor() () from /usr/lib/libphobos2.so.0.63 #9 0x00007ffff7288c54 in rt.minfo.ModuleGroup.runCtors() () from /usr/lib/libphobos2.so.0.63 #10 0x00007ffff7288196 in rt.minfo.ModuleGroup.runCtors() () from /usr/lib/libphobos2.so.0.63 #11 0x00007ffff72884dd in rt.minfo.rt_moduleCtor() () from /usr/lib/libphobos2.so.0.63 #12 0x00007ffff72891ca in rt.sections_linux.DSO.opApply() () from /usr/lib/libphobos2.so.0.63 #13 0x00007ffff72884ae in rt_moduleCtor () from /usr/lib/libphobos2.so.0.63 #14 0x00007ffff72818ad in rt.dmain2._d_run_main() () from /usr/lib/libphobos2.so.0.63 #15 0x00007ffff72813cd in rt.dmain2._d_run_main() () from /usr/lib/libphobos2.so.0.63 #16 0x00007ffff7281387 in _d_run_main () from /usr/lib/libphobos2.so.0.63 #17 0x00007ffff72811d4 in main () from /usr/lib/libphobos2.so.0.63 #18 0x00007ffff653ca15 in __libc_start_main () from /usr/lib/libc.so.6 #19 0x000000000043f9d9 in _start () Unfortunately, no debugging symbols for phobos. program was compiled with dmd (2.063) using the following flags: -g -debug -unittest
Jun 10 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Monday, 10 June 2013 at 18:50:21 UTC, Brandon wrote:
 On Monday, 10 June 2013 at 16:52:51 UTC, Jerry wrote:
 No, same problem.  BTW, it's segfaulting in _d_dso_registry() 
 before
 main() gets run.

 4. If you make any other calls into the stdlib aside from 
 I/O, do they
 work?

It doesn't matter. The following program segfaults: void main() {}
 5. Does gdb reveal anything interesting?

Unfortunately there's no debugging symbols in _d_dso_registry(). I assume the compiler is writing asm directly. Jerry

I got a similar issue when upgrading to 2.063 on arch linux, so I feel this may be relevant to the current problem. Heres the backtrace for me. #0 0x00007ffff7286f54 in _d_arrayappendcd () from /usr/lib/libphobos2.so.0.63 #1 0x00007ffff721f5c4 in std.string.__T7toLowerTAyaZ.toLower() () from /usr/lib/libphobos2.so.0.63 #2 0x00007ffff72781a2 in _aApplycd1 () from /usr/lib/libphobos2.so.0.63 #3 0x00007ffff721f566 in std.string.__T7toLowerTAyaZ.toLower() () from /usr/lib/libphobos2.so.0.63 #4 0x00007ffff7278626 in _aApplycd2 () from /usr/lib/libphobos2.so.0.63 #5 0x00007ffff721f4b5 in std.string.__T7toLowerTAyaZ.toLower() () from /usr/lib/libphobos2.so.0.63 #6 0x00007ffff71b4f15 in std.encoding.EncodingScheme.register() () from /usr/lib/libphobos2.so.0.63 #7 0x00007ffff71b543a in std.encoding.EncodingSchemeASCII._sharedStaticCtor9() () from /usr/lib/libphobos2.so.0.63 #8 0x00007ffff71bb351 in std.encoding.__modsharedctor() () from /usr/lib/libphobos2.so.0.63 #9 0x00007ffff7288c54 in rt.minfo.ModuleGroup.runCtors() () from /usr/lib/libphobos2.so.0.63 #10 0x00007ffff7288196 in rt.minfo.ModuleGroup.runCtors() () from /usr/lib/libphobos2.so.0.63 #11 0x00007ffff72884dd in rt.minfo.rt_moduleCtor() () from /usr/lib/libphobos2.so.0.63 #12 0x00007ffff72891ca in rt.sections_linux.DSO.opApply() () from /usr/lib/libphobos2.so.0.63 #13 0x00007ffff72884ae in rt_moduleCtor () from /usr/lib/libphobos2.so.0.63 #14 0x00007ffff72818ad in rt.dmain2._d_run_main() () from /usr/lib/libphobos2.so.0.63 #15 0x00007ffff72813cd in rt.dmain2._d_run_main() () from /usr/lib/libphobos2.so.0.63 #16 0x00007ffff7281387 in _d_run_main () from /usr/lib/libphobos2.so.0.63 #17 0x00007ffff72811d4 in main () from /usr/lib/libphobos2.so.0.63 #18 0x00007ffff653ca15 in __libc_start_main () from /usr/lib/libc.so.6 #19 0x000000000043f9d9 in _start () Unfortunately, no debugging symbols for phobos. program was compiled with dmd (2.063) using the following flags: -g -debug -unittest

I suspected it may be the problem with shared libraries. Can you try compiling that hello world with static libphobos? Or can you attach your segfaulting binary?
Jun 10 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Monday, 10 June 2013 at 21:33:20 UTC, Walter Bright wrote:
 On 6/10/2013 2:28 PM, nazriel wrote:
 program was compiled with dmd (2.063) using the following 
 flags: -g -debug
 -unittest

I suspected it may be the problem with shared libraries. Can you try compiling that hello world with static libphobos? Or can you attach your segfaulting binary?

Statically linking with libphobos2.a is the default.

Brandon's back-trace mentions libphobos2.so.0.63 OP's backtrace shows that SIGSEGV occurs in _d_dso_registry() My guess would be to check that first.
Jun 10 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
Walter Bright <newshound2 digitalmars.com> writes:

 On 6/10/2013 2:56 PM, Walter Bright wrote:
 On 6/10/2013 2:38 PM, nazriel wrote:
 On Monday, 10 June 2013 at 21:33:20 UTC, Walter Bright wrote:
 On 6/10/2013 2:28 PM, nazriel wrote:
 program was compiled with dmd (2.063) using the following flags: -g -debug
 -unittest

I suspected it may be the problem with shared libraries. Can you try compiling that hello world with static libphobos? Or can you attach your segfaulting binary?

Statically linking with libphobos2.a is the default.

Brandon's back-trace mentions libphobos2.so.0.63



His code appears to die after main() is in progress.
 OP's backtrace shows that SIGSEGV occurs in _d_dso_registry()

 My guess would be to check that first.

linking with -g -debug -unittest will statically link, it will not link with the .so


Yes, strace on dmd shows that I'm linking with libphobos2.a. ... [pid 23169] open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a", O_RDONLY|O_CLOEXEC) = 11
Jun 10 2013
prev sibling next sibling parent "Chris Nicholson-Sauls" <ibisbasenji gmail.com> writes:
I just started having this problem as well, however it appears 
whether I'm using the latest DMD or older versions (I only tried 
as far back as 2.060).  Like others, the program compiled with 
2.063 dies at _d_dso_registry().  The programs compiled with 
previous versions die at gc_init().

I've made no other relevant changes recently, so I'm rather 
perplexed.
Jun 10 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
Walter Bright <newshound2 digitalmars.com> writes:

 On 6/10/2013 9:52 AM, Jerry wrote:
 5. Does gdb reveal anything interesting?

Unfortunately there's no debugging symbols in _d_dso_registry(). I assume the compiler is writing asm directly.

Use the 'disassemble' command starting at _d_dso_registry, and point out which instruction is faulting. You might also try running the program under valgrind.

Valgrind output followed by disassembly within gdb: jlquinn wyvern:~/re/test$ valgrind ./junk ==24371== Memcheck, a memory error detector ==24371== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==24371== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==24371== Command: ./junk ==24371== ==24371== Invalid write of size 8 ==24371== at 0x4187B0: _d_dso_registry (in /home/jlquinn/re/test/junk) ==24371== by 0x4176B6: ??? (in /home/jlquinn/re/test/junk) ==24371== by 0x4302BC: __libc_csu_init (in /home/jlquinn/re/test/junk) ==24371== by 0x52786FF: (below main) (libc-start.c:185) ==24371== Address 0x105616130 is not stack'd, malloc'd or (recently) free'd ==24371== ==24371== ==24371== Process terminating with default action of signal 11 (SIGSEGV) ==24371== Access not within mapped region at address 0x105616130 ==24371== at 0x4187B0: _d_dso_registry (in /home/jlquinn/re/test/junk) ==24371== by 0x4176B6: ??? (in /home/jlquinn/re/test/junk) ==24371== by 0x4302BC: __libc_csu_init (in /home/jlquinn/re/test/junk) ==24371== by 0x52786FF: (below main) (libc-start.c:185) ==24371== If you believe this happened as a result of a stack ==24371== overflow in your program's main thread (unlikely but ==24371== possible), you can try to increase the size of the ==24371== main thread stack using the --main-stacksize= flag. ==24371== The main thread stack size used in this run was 8388608. ==24371== ==24371== HEAP SUMMARY: ==24371== in use at exit: 120 bytes in 3 blocks ==24371== total heap usage: 3 allocs, 0 frees, 120 bytes allocated ==24371== ==24371== LEAK SUMMARY: ==24371== definitely lost: 8 bytes in 1 blocks ==24371== indirectly lost: 0 bytes in 0 blocks ==24371== possibly lost: 0 bytes in 0 blocks ==24371== still reachable: 112 bytes in 2 blocks ==24371== suppressed: 0 bytes in 0 blocks ==24371== Rerun with --leak-check=full to see details of leaked memory ==24371== ==24371== For counts of detected and suppressed errors, rerun with: -v ==24371== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2) Segmentation fault (core dumped) Program received signal SIGSEGV, Segmentation fault. 0x00000000004187b0 in _d_dso_registry () (gdb) disassemble Dump of assembler code for function _d_dso_registry: 0x00000000004185b0 <+0>: push %rbp 0x00000000004185b1 <+1>: mov %rsp,%rbp 0x00000000004185b4 <+4>: sub $0x98,%rsp 0x00000000004185bb <+11>: push %rbx 0x00000000004185bc <+12>: push %r12 0x00000000004185be <+14>: push %r13 0x00000000004185c0 <+16>: push %r14 0x00000000004185c2 <+18>: push %r15 0x00000000004185c4 <+20>: mov %rdi,%r12 0x00000000004185c7 <+23>: movabs $0x1,%rax 0x00000000004185d1 <+33>: cmp %rax,(%r12) 0x00000000004185d5 <+37>: jae 0x4185d8 <_d_dso_registry+40> 0x00000000004185d7 <+39>: hlt 0x00000000004185d8 <+40>: mov 0x8(%r12),%rcx 0x00000000004185dd <+45>: cmpq $0x0,(%rcx) 0x00000000004185e1 <+49>: jne 0x4187b6 <_d_dso_registry+518> 0x00000000004185e7 <+55>: movabs $0x60,%rsi 0x00000000004185f1 <+65>: mov %rax,%rdi 0x00000000004185f4 <+68>: callq 0x417220 <calloc plt> 0x00000000004185f9 <+73>: mov %rax,%r14 0x00000000004185fc <+76>: mov 0x8(%r12),%rdx 0x0000000000418601 <+81>: mov %r14,(%rdx) ---Type <return> to continue, or q <return> to quit--- 0x0000000000418604 <+84>: lea -0x70(%rbp),%rax 0x0000000000418608 <+88>: xor %rcx,%rcx 0x000000000041860b <+91>: mov %rcx,(%rax) 0x000000000041860e <+94>: mov %rcx,0x8(%rax) 0x0000000000418612 <+98>: mov %rcx,0x10(%rax) 0x0000000000418616 <+102>: mov %rcx,0x18(%rax) 0x000000000041861a <+106>: mov %rcx,0x20(%rax) 0x000000000041861e <+110>: mov %rcx,0x28(%rax) 0x0000000000418622 <+114>: mov 0x18(%r12),%rax 0x0000000000418627 <+119>: mov 0x10(%r12),%rbx 0x000000000041862c <+124>: sub %rbx,%rax 0x000000000041862f <+127>: cqto 0x0000000000418631 <+129>: and $0x7,%rdx 0x0000000000418638 <+136>: add %rdx,%rax 0x000000000041863b <+139>: sar $0x3,%rax 0x000000000041863f <+143>: mov %rbx,%rdx 0x0000000000418642 <+146>: mov %rax,-0x70(%rbp) 0x0000000000418646 <+150>: mov %rdx,-0x68(%rbp) 0x000000000041864a <+154>: lea -0x70(%rbp),%rsi 0x000000000041864e <+158>: lea 0x10(%r14),%rdi 0x0000000000418652 <+162>: movsq %ds:(%rsi),%es:(%rdi) 0x0000000000418654 <+164>: movsq %ds:(%rsi),%es:(%rdi) 0x0000000000418656 <+166>: movsq %ds:(%rsi),%es:(%rdi) ---Type <return> to continue, or q <return> to quit--- 0x0000000000418658 <+168>: movsq %ds:(%rsi),%es:(%rdi) 0x000000000041865a <+170>: movsq %ds:(%rsi),%es:(%rdi) 0x000000000041865c <+172>: movsq %ds:(%rsi),%es:(%rdi) 0x000000000041865e <+174>: mov 0x28(%r12),%rcx 0x0000000000418663 <+179>: mov 0x20(%r12),%r13 0x0000000000418668 <+184>: sub %r13,%rcx 0x000000000041866b <+187>: movabs $0xaaaaaaaaaaaaaaab,%rax 0x0000000000418675 <+197>: imul %rcx 0x0000000000418678 <+200>: add %rcx,%rdx 0x000000000041867b <+203>: mov %rcx,%rax 0x000000000041867e <+206>: sar $0x3f,%rax 0x0000000000418682 <+210>: sar $0x4,%rdx 0x0000000000418686 <+214>: sub %rax,%rdx 0x0000000000418689 <+217>: mov %rdx,%rax 0x000000000041868c <+220>: mov %r13,%rdx 0x000000000041868f <+223>: mov %rax,(%r14) 0x0000000000418692 <+226>: mov %rdx,0x8(%r14) 0x0000000000418696 <+230>: mov 0x8(%r12),%rsi 0x000000000041869b <+235>: lea -0x40(%rbp),%rdi 0x000000000041869f <+239>: callq 0x418828 <_D2rt14sections_linux18findDSOInfoForAddrFNbxPvPS4core3sys5linux4link12dl_phdr_infoZb> 0x00000000004186a4 <+244>: test %al,%al 0x00000000004186a6 <+246>: jne 0x4186a9 <_d_dso_registry+249> ---Type <return> to continue, or q <return> to quit--- 0x00000000004186a8 <+248>: hlt 0x00000000004186a9 <+249>: mov -0x28(%rbp),%ax 0x00000000004186ad <+253>: and $0xffff,%eax 0x00000000004186b2 <+258>: mov %eax,%eax 0x00000000004186b4 <+260>: mov -0x30(%rbp),%rcx 0x00000000004186b8 <+264>: mov %rax,-0x90(%rbp) 0x00000000004186bf <+271>: mov %rcx,-0x88(%rbp) 0x00000000004186c6 <+278>: cmpq $0x0,-0x90(%rbp) 0x00000000004186ce <+286>: je 0x41877a <_d_dso_registry+458> 0x00000000004186d4 <+292>: mov -0x88(%rbp),%r12 0x00000000004186db <+299>: mov -0x90(%rbp),%rdx 0x00000000004186e2 <+306>: imul $0x38,%rdx,%rbx 0x00000000004186e6 <+310>: add -0x88(%rbp),%rbx 0x00000000004186ed <+317>: mov (%r12),%esi 0x00000000004186f1 <+321>: cmp $0x1,%esi 0x00000000004186f4 <+324>: jne 0x418757 <_d_dso_registry+423> 0x00000000004186f6 <+326>: testl $0x2,0x4(%r12) 0x00000000004186ff <+335>: je 0x418757 <_d_dso_registry+423> 0x0000000000418701 <+337>: mov 0x28(%r12),%rsi 0x0000000000418706 <+342>: mov 0x10(%r12),%rcx 0x000000000041870b <+347>: add -0x40(%rbp),%rcx 0x000000000041870f <+351>: mov %rsi,-0x80(%rbp) 0x0000000000418713 <+355>: mov %rcx,-0x78(%rbp) ---Type <return> to continue, or q <return> to quit--- 0x0000000000418717 <+359>: lea 0x40(%r14),%r13 0x000000000041871b <+363>: mov 0x0(%r13),%rsi 0x000000000041871f <+367>: mov 0x8(%r13),%r15 0x0000000000418723 <+371>: inc %r15 0x0000000000418726 <+374>: mov %r15,%rdi 0x0000000000418729 <+377>: shl $0x4,%rdi 0x000000000041872d <+381>: callq 0x418b28 <_D2rt4util9container8xreallocFPvmZPv> 0x0000000000418732 <+386>: mov %rax,0x0(%r13) 0x0000000000418736 <+390>: mov %r15,0x8(%r13) 0x000000000041873a <+394>: mov -0x78(%rbp),%rdx 0x000000000041873e <+398>: mov -0x80(%rbp),%rax 0x0000000000418742 <+402>: mov %r15,%r8 0x0000000000418745 <+405>: shl $0x4,%r8 0x0000000000418749 <+409>: add 0x0(%r13),%r8 0x000000000041874d <+413>: mov %rax,-0x10(%r8) 0x0000000000418751 <+417>: mov %rdx,-0x8(%r8) 0x0000000000418755 <+421>: jmp 0x41876d <_d_dso_registry+445> 0x0000000000418757 <+423>: cmp $0x7,%esi 0x000000000041875a <+426>: jne 0x41876d <_d_dso_registry+445> 0x000000000041875c <+428>: mov -0x10(%rbp),%rdi 0x0000000000418760 <+432>: mov %rdi,0x50(%r14) 0x0000000000418764 <+436>: mov 0x28(%r12),%rax ---Type <return> to continue, or q <return> to quit--- 0x0000000000418769 <+441>: mov %rax,0x58(%r14) 0x000000000041876d <+445>: add $0x38,%r12 0x0000000000418771 <+449>: cmp %rbx,%r12 0x0000000000418774 <+452>: jb 0x4186ed <_d_dso_registry+317> 0x000000000041877a <+458>: mov 0x2359f(%rip),%rsi # 0x43bd20 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array> 0x0000000000418781 <+465>: mov 0x2359c(%rip),%rbx # 0x43bd24 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4> 0x0000000000418788 <+472>: inc %rbx 0x000000000041878b <+475>: mov %rbx,%rdi 0x000000000041878e <+478>: shl $0x3,%rdi 0x0000000000418792 <+482>: callq 0x418b28 <_D2rt4util9container8xreallocFPvmZPv> 0x0000000000418797 <+487>: mov %rax,0x23582(%rip) # 0x43bd20 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array> 0x000000000041879e <+494>: mov %rbx,0x2357f(%rip) # 0x43bd24 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4> 0x00000000004187a5 <+501>: mov 0x23574(%rip),%rcx # 0x43bd20 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2r 14sections_l---Type <return> to continue, or q <return> to quit--- inux3DSOZ5Array> 0x00000000004187ac <+508>: lea (%rcx,%rbx,8),%rax => 0x00000000004187b0 <+512>: mov %r14,-0x8(%rax) 0x00000000004187b4 <+516>: jmp 0x418819 <_d_dso_registry+617> 0x00000000004187b6 <+518>: mov 0x8(%r12),%rdx 0x00000000004187bb <+523>: mov (%rdx),%rbx 0x00000000004187be <+526>: mov 0x2355b(%rip),%rsi # 0x43bd20 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array> 0x00000000004187c5 <+533>: mov 0x23558(%rip),%r14 # 0x43bd24 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4> 0x00000000004187cc <+540>: dec %r14 0x00000000004187cf <+543>: mov %r14,%rdi 0x00000000004187d2 <+546>: shl $0x3,%rdi 0x00000000004187d6 <+550>: callq 0x418b28 <_D2rt4util9container8xreallocFPvmZPv> 0x00000000004187db <+555>: mov %rax,0x2353e(%rip) # 0x43bd20 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array> 0x00000000004187e2 <+562>: mov %r14,0x2353b(%rip) # 0x43bd24 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4> ---Type <return> to continue, or q <return> to quit--- 0x00000000004187e9 <+569>: mov 0x8(%r12),%rcx 0x00000000004187ee <+574>: movq $0x0,(%rcx) 0x00000000004187f5 <+581>: lea 0x40(%rbx),%r13 0x00000000004187f9 <+585>: mov 0x0(%r13),%rsi 0x00000000004187fd <+589>: xor %rdi,%rdi 0x0000000000418800 <+592>: callq 0x418b28 <_D2rt4util9container8xreallocFPvmZPv> 0x0000000000418805 <+597>: mov %rax,0x0(%r13) 0x0000000000418809 <+601>: movq $0x0,0x8(%r13) 0x0000000000418811 <+609>: mov %rbx,%rdi 0x0000000000418814 <+612>: callq 0x417230 <free plt> 0x0000000000418819 <+617>: pop %r15 0x000000000041881b <+619>: pop %r14 0x000000000041881d <+621>: pop %r13 0x000000000041881f <+623>: pop %r12 0x0000000000418821 <+625>: pop %rbx 0x0000000000418822 <+626>: mov %rbp,%rsp 0x0000000000418825 <+629>: pop %rbp 0x0000000000418826 <+630>: retq End of assembler dump. (gdb)
Jun 10 2013
prev sibling next sibling parent "nazriel" <spam dzfl.pl> writes:
On Tuesday, 11 June 2013 at 06:00:01 UTC, Andrei Alexandrescu 
wrote:
 On 6/11/13 12:22 AM, Andrei Alexandrescu wrote:
 On 6/10/13 6:10 PM, Jerry wrote:
 [pid 23169]
 open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a",
 O_RDONLY|O_CLOEXEC) = 11

OK, so it seems this is the cause. I'm trying to repro it on a fresh Ubuntu 12.10 VM. So at least two bugs: 1. We link dynamically by default at least on some systems. 2. The dynamically linked programs crash again at least on some systems.

Was unable to repro on a fresh installation of ubu 12.10/64 in a VirtualBox on OSX. (It's clear there is a problem somewhere though.) Andrei

I asked twice for attaching binary produced by compiler. It would allow to see if the problem is with OP setup, hardware or system. If their binary will crash on our system, then something with D(md) itself is borken. It would also allow for disassembling and better debugging by interested in solving problem people. But I am totally ignored here. Andrei, can you help? ;)
Jun 11 2013
prev sibling next sibling parent Jerry <jlquinn optonline.net> writes:
"nazriel" <spam dzfl.pl> writes:

 On Tuesday, 11 June 2013 at 06:00:01 UTC, Andrei Alexandrescu wrote:
 On 6/11/13 12:22 AM, Andrei Alexandrescu wrote:
 On 6/10/13 6:10 PM, Jerry wrote:
 [pid 23169]
 open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a",
 O_RDONLY|O_CLOEXEC) = 11

OK, so it seems this is the cause. I'm trying to repro it on a fresh Ubuntu 12.10 VM. So at least two bugs: 1. We link dynamically by default at least on some systems. 2. The dynamically linked programs crash again at least on some systems.

Was unable to repro on a fresh installation of ubu 12.10/64 in a VirtualBox on OSX. (It's clear there is a problem somewhere though.) Andrei

I asked twice for attaching binary produced by compiler. It would allow to see if the problem is with OP setup, hardware or system. If their binary will crash on our system, then something with D(md) itself is borken. It would also allow for disassembling and better debugging by interested in solving problem people. But I am totally ignored here. Andrei, can you help? ;)

Sorry about that. I was hesitant to post a binary to a newsgroup. http://d.puremagic.com/issues/attachment.cgi?id=1224 Thanks for looking, Jerry
Jun 11 2013
prev sibling parent "nazriel" <spam dzfl.pl> writes:
On Tuesday, 11 June 2013 at 12:40:23 UTC, Andrei Alexandrescu 
wrote:
 Well Jerry can help. Jerry? Nazriel, if you want me to attach 
 the binary I produced, sure, I can do that. But that works...

 Andrei

Thanks to your authority, your posts are more visible than mine that's why I asked for help :PPP On Tuesday, 11 June 2013 at 13:32:51 UTC, Jerry wrote:
 "nazriel" <spam dzfl.pl> writes:


 Sorry about that.  I was hesitant to post a binary to a 
 newsgroup.

 http://d.puremagic.com/issues/attachment.cgi?id=1224

 Thanks for looking,
 Jerry

Thanks a lot! Few things I gathered so far: It isn't your setup/system/hardware problem when launching application. It does also segfault on my system. So for some reason DMD or/and linker produce broken executable on your system. I created same hello world with same DMD revision and segfault doesn't occur when I launch created binary on my machine. From fast debugging and reversing looks like segfault occurs in _d_dso_registry. We may want to ping Martin Nowak with that because it seems to be related to shared libraries which is his baby. Segfault occurs exactly at this instruction: => 0x00000000004187b0 <+512>: mov QWORD PTR [rax-0x8],r14 I created an breakpoint at 1 instruction before the one mentioned above. Reg info: Breakpoint 1, 0x00000000004187ac in _d_dso_registry () (gdb) info reg rax 0x43d0a0 4444320 rbx 0x1 1 rcx 0x10043d0a0 4299411616 rdx 0x43d0a0 4444320 rsi 0x0 0 rdi 0x4 4 rbp 0x7fffffffe8d0 0x7fffffffe8d0 rsp 0x7fffffffe810 0x7fffffffe810 r8 0x3 3 r9 0x7fffffffe760 140737488349024 r10 0x7fffffffe5a0 140737488348576 r11 0x7ffff7686320 140737344201504 r12 0x400270 4194928 r13 0x43d050 4444240 r14 0x43d010 4444176 r15 0x1 1 rip 0x4187ac 0x4187ac <_d_dso_registry+508> eflags 0x206 [ PF IF ] cs 0x33 51 ss 0x2b 43 ds 0x0 0 es 0x0 0 fs 0x0 0 gs 0x0 0 I can't find address pointed by RAX+SIB in IDA listing unless I am missing something. I compared assembly created by my working binary and your's and there few interesting things: Working binary: mov rbx,QWORD PTR [rip+0x247b30] # 0x680808 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+8> Borked one: mov rbx,QWORD PTR [rip+0x2359c] # 0x43bd24 <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4> See the 4 vs 8 offset
Jun 11 2013