Bug 7247 – All programs segfault before main

Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-01-07T23:51:00Z
Last change time
2012-07-10T07:43:24Z
Assigned to
nobody
Creator
jlquinn

Comments

Comment #0 by jlquinn — 2012-01-07T23:51:51Z
dmd 2.057, Ubuntu 11.10 x86_64 jlquinn@wyvern:~/bluemax/src/trlblues$ cat junk2.d import std.stdio; int main(string[] args) { writefln("hi"); // string s; // stdin.readln("%s", s); return 0; }jlquinn@wyvern:~/bluemax/src/trlblues$ cat junk2.d import std.stdio; int main(string[] args) { writefln("hi"); return 0; } jlquinn@wyvern:~/bluemax/src/trlblues$ ~/dmd2/linux/bin64/dmd junk2.d jlquinn@wyvern:~/bluemax/src/trlblues$ ./junk2 Segmentation fault
Comment #1 by jlquinn — 2012-01-07T23:53:26Z
Not sure how useful it is, but here's the gdb backtrace. jlquinn@wyvern:~/bluemax/src/trlblues$ ~/dmd2/linux/bin64/dmd -g junk2.d jlquinn@wyvern:~/bluemax/src/trlblues$ gdb junk2 GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://bugs.launchpad.net/gdb-linaro/>... Reading symbols from /home/jlquinn/bluemax/src/trlblues/junk2...done. (gdb) run Starting program: /home/jlquinn/bluemax/src/trlblues/junk2 [Thread debugging using libthread_db enabled] Program received signal SIGSEGV, Segmentation fault. 0x0000000000451306 in gc_init () (gdb) bt #0 0x0000000000451306 in gc_init () #1 0x00007fffffffe110 in ?? () #2 0x00007fffffffe010 in ?? () #3 0x000000000044b1c2 in rt.dmain2.main() () #4 0x00007fffffffe110 in ?? () #5 0x00007fffffffe060 in ?? () #6 0x000000000044ad4a in rt.dmain2.main() () #7 0x0000000000000001 in ?? () #8 0x0000000000000028 in ?? () #9 0x0000000000492020 in ?? () #10 0x0000000000000001 in ?? () #11 0x0000000000492020 in ?? () #12 0x00007fffffffe4c6 in ?? () #13 0x00007fffffffe110 in ?? () #14 0x00007fffffffe110 in ?? () #15 0x000000000044acdb in main ()
Comment #2 by jlquinn — 2012-01-13T20:51:34Z
2.056 worked fine for me.
Comment #3 by jlquinn — 2012-01-13T21:06:10Z
Rebuilding dmd from src didn't help. I get the same segfault.
Comment #4 by jlquinn — 2012-01-13T21:16:11Z
32 bit dmd works, 64 bit dmd is busted.
Comment #5 by timon.gehr — 2012-01-14T11:21:22Z
I don't think the bug tracker is the right place to get help for solving your problem, because it must be some issue with your specific setup rather than a compiler bug. (dmd 2.057 works fine for me on Ubuntu 11.10 x86_64). Maybe you want to discuss the crashes on the newsgroup?
Comment #6 by bugzilla — 2012-01-19T02:30:46Z
I suspect something is wrong with your installation, as this is not failing like this on any of our test machines nor any other users. Lots of times this kind of mysterious failure can come about from having another, older, libphobos2.a somewhere on your system that is getting linked in instead.
Comment #7 by jlquinn — 2012-01-19T10:00:19Z
jlquinn@wyvern:~$ locate libphobos2.a /home/jlquinn/dmd2/freebsd/lib32/libphobos2.a /home/jlquinn/dmd2/linux/lib32/libphobos2.a /home/jlquinn/dmd2/linux/lib64/libphobos2.a /home/jlquinn/dmd2/osx/lib/libphobos2.a Anything else I can check?
Comment #8 by bugzilla — 2012-01-19T13:23:53Z
Delete them all and reinstall. Also, make sure you don't have other phobos directories around. Just a note: I've seen a pattern over and over - the person will insist they did a clean installation, and then a while later will discover an old version floating around somewhere they hadn't looked.
Comment #9 by lovelydear — 2012-04-19T12:15:22Z
Given that this wasn't reproduced, should be closed ?
Comment #10 by yebblies — 2012-07-10T07:43:24Z
Closing as it appears to be an environment problem rather than a bug.