Posted at the newsgroup http://forum.dlang.org/thread/87fvwx3g8o.fsf@wyvern.i-did-not-set--mail-host-address--so-tickle-me.
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
Comment #1 by code — 2013-06-05T06:22:31Z
(In reply to comment #0)
> jlquinn@wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk.d
> jlquinn@wyvern:~/re/test$ ./junk
> Segmentation fault (core dumped)
Can you please post the output of "ldd -r executable"?
Comment #2 by jlquinn — 2013-06-05T12:31:36Z
*** Issue 10261 has been marked as a duplicate of this issue. ***
Comment #3 by jlquinn — 2013-06-06T08:44:06Z
(In reply to comment #1)
> Can you please post the output of "ldd -r executable"?
jlquinn@wyvern:~/re/test$ ldd -r junk
linux-vdso.so.1 => (0x00007fff32dff000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f63b1ae3000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f63b18db000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f63b151b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f63b1d21000)
Comment #4 by jlquinn — 2013-06-06T08:44:57Z
Detailed compilation output:
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$
Comment #5 by andrei — 2013-06-09T10:19:53Z
I attempted to reproduce the issue as follows:
1. Downloaded Ubuntu 13.04/64
2. Installed it under VirtualBox hosted on OSX
3. In the VM, downloaded and installed 2.063 from dlang.org/download.html.
4. Created file junk.d as indicated
5. Compiled as indicated (log below)
6. Ran the resulting executable, which printed "Hi" and exited normally.
This seems to be an installation issue. Jerry, could you please download again, reinstall, and recheck? Thanks!
Build log:
binary /home/andrei/dmd2/linux/bin64/dmd
version v2.063
config /home/andrei/dmd2/linux/bin64/dmd.conf
parse junk
importall junk
import object (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/object.di)
import std.stdio (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/stdio.d)
import core.stdc.stdio (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdio.d)
import core.stdc.config (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/config.d)
import core.stdc.stddef (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stddef.d)
import core.stdc.stdarg (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdarg.d)
import std.string (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/string.d)
import core.exception (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/exception.d)
import core.vararg (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/vararg.d)
import core.stdc.stdlib (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdlib.d)
import core.stdc.string (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/string.d)
import std.algorithm (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/algorithm.d)
import std.c.string (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/string.d)
import core.bitop (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/bitop.d)
import std.array (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/array.d)
import core.memory (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/memory.d)
import std.ascii (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/ascii.d)
import std.conv (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/conv.d)
import std.math (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/math.d)
import core.stdc.math (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/math.d)
import std.range (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/range.d)
import std.exception (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/exception.d)
import std.traits (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/traits.d)
import std.typetuple (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/typetuple.d)
import std.typecons (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/typecons.d)
import std.format (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/format.d)
import std.bitmanip (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/bitmanip.d)
import std.system (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/system.d)
import std.functional (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/functional.d)
import std.utf (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/utf.d)
import core.stdc.errno (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/errno.d)
import std.uni (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/uni.d)
import std.container (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/container.d)
import std.random (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/random.d)
import std.c.time (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/time.d)
import core.stdc.time (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/time.d)
import std.numeric (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/numeric.d)
import std.c.stdlib (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/stdlib.d)
import std.complex (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/complex.d)
import core.thread (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/thread.di)
import core.time (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/time.d)
import core.sys.posix.time (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/time.d)
import core.sys.posix.config (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/config.d)
import core.sys.posix.sys.types (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/types.d)
import core.stdc.stdint (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/stdint.d)
import core.stdc.signal (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/signal.d)
import core.stdc.wchar_ (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/wchar_.d)
import core.sys.posix.signal (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/signal.d)
import core.sys.posix.sys.time (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/time.d)
import core.sys.posix.sys.select (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/select.d)
import core.sys.posix.unistd (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/unistd.d)
import core.sys.posix.inttypes (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/inttypes.d)
import core.stdc.inttypes (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/stdc/inttypes.d)
import std.regex (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/regex.d)
import std.internal.uni (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/internal/uni.d)
import std.internal.uni_tab (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/internal/uni_tab.d)
import std.c.stdio (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/stdio.d)
import std.stdiobase (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/stdiobase.d)
import core.sys.posix.stdio (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/stdio.d)
import std.c.linux.linux (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/linux/linux.d)
import std.c.linux.pthread (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/linux/pthread.d)
import core.sys.posix.dirent (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/dirent.d)
import core.sys.posix.dlfcn (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/dlfcn.d)
import core.sys.posix.fcntl (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/fcntl.d)
import core.sys.posix.sys.stat (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/stat.d)
import core.sys.posix.pwd (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/pwd.d)
import core.sys.posix.utime (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/utime.d)
import core.sys.posix.sys.mman (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/mman.d)
import core.sys.posix.sys.wait (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/wait.d)
import std.c.linux.socket (/home/andrei/dmd2/linux/bin64/../../src/phobos/std/c/linux/socket.d)
import core.sys.posix.arpa.inet (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/arpa/inet.d)
import core.sys.posix.sys.socket (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/socket.d)
import core.sys.posix.sys.uio (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/sys/uio.d)
import core.sys.posix.netdb (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/netdb.d)
import core.sys.posix.netinet.in_ (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/netinet/in_.d)
import core.sys.posix.netinet.tcp (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/netinet/tcp.d)
semantic junk
import core.sys.posix.pthread (/home/andrei/dmd2/linux/bin64/../../src/druntime/import/core/sys/posix/pthread.d)
import core.sys.posix.sched (/home/andrei/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/andrei/dmd2/linux/bin64/../lib64 -L/home/andrei/dmd2/linux/bin64/../lib32 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -l:libphobos2.a -lpthread -lm -lrt
Comment #6 by jlquinn — 2013-06-09T12:42:24Z
(In reply to comment #5)
> I attempted to reproduce the issue as follows:
>
> 1. Downloaded Ubuntu 13.04/64
>
> 2. Installed it under VirtualBox hosted on OSX
>
> 3. In the VM, downloaded and installed 2.063 from dlang.org/download.html.
>
> 4. Created file junk.d as indicated
>
> 5. Compiled as indicated (log below)
>
> 6. Ran the resulting executable, which printed "Hi" and exited normally.
>
> This seems to be an installation issue. Jerry, could you please download again,
> reinstall, and recheck? Thanks!
I just pulled down a fresh copy onto my Debian testing x86_64 box and tried it there. Same issue - segfault. I'll repeat on my Ubuntu system but expect the same result.
Is there a way we can compare .s files or other intermediate product? Unless there's code in the compiler that says
if (user == "jlquinn") { insert segfault; }
:-)
Would swapping binaries be useful?
Comment #7 by jlquinn — 2013-06-09T23:20:42Z
I pulled down a fresh copy of dmd 2.063 and I still reproduce the segfault on my Ubuntu 12.10 x86_64 system.
Comment #8 by code — 2013-06-10T07:54:40Z
I tried Ubuntu 12.04, Ubuntu 12.10 and Debian in VirtualBox and couldn't reproduce it either.
It would be helpful to know more about where it crashes.
Can you gdb into the core dump and print the disassemble and backtrace.
To enable core dumps use
"ulimit -c unlimited"
To disable them again
"ulimit -c 0"
Run the binary to produce a core dump.
"./junk"
Run gdb and get more information.
"gdb junk core.<PID>"
"(gdb) disas"
"(gdb) bt"
I tried building dmd on my machine but irstate.h is missing from the zip file.
Comment #11 by code — 2013-06-10T09:46:49Z
(In reply to comment #10)
> I tried building dmd on my machine but irstate.h is missing from the zip file.
No problem, I already found something. The +4 offset is wrong it should be +8 because it's the length field of rt.util.container.Array(T) and on X86_64 the pointer before it is 8 byte.
<_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4>
Also the rest of your asm slightly differs from mine. So either we're not linking against the same library or your linker rewrites code (LTO?).
Comment #12 by jlquinn — 2013-06-10T09:56:26Z
(In reply to comment #11)
> (In reply to comment #10)
> > I tried building dmd on my machine but irstate.h is missing from the zip file.
>
> No problem, I already found something. The +4 offset is wrong it should be +8
> because it's the length field of rt.util.container.Array(T) and on X86_64 the
> pointer before it is 8 byte.
> <_D2rt14sections_linux12_static_dsosS2rt4util9container36__T5ArrayTPS2rt14sections_linux3DSOZ5Array+4>
Good, I'm glad I'm not undergoing severe hallucination :-)
> Also the rest of your asm slightly differs from mine. So either we're not
> linking against the same library or your linker rewrites code (LTO?).
jlquinn@wyvern:~/re/test$ ldd --version
ldd (Ubuntu EGLIBC 2.15-0ubuntu20.1) 2.15
Here's the strace of all files opened while compiling:
jlquinn@wyvern:~/re/test$ strace -f -e open ~/dmd2/linux/bin64/dmd -g junk.d
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/home/jlquinn/dmd2/linux/bin64/dmd.conf", O_RDONLY) = 3
open("/home/jlquinn/dmd2/linux/bin64/dmd.conf", O_RDONLY) = 3
Process 22301 attached
[pid 22301] open("junk.d", O_RDONLY) = 3
[pid 22301] open("/sys/devices/system/cpu/online", O_RDONLY|O_CLOEXEC) = 4
[pid 22300] open("/home/jlquinn/dmd2/linux/bin64/../../src/druntime/import/object.di", O_RDONLY) = 3
Process 22301 detached
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
open("junk.o", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 3
Process 22302 attached
[pid 22302] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 22302] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 22302] open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 22302] open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
[pid 22302] open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale/en_US.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale/en_US/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale/en.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale/en.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale/en/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale-langpack/en_US/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22302] open("/usr/share/locale-langpack/en/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
Process 22303 attached
Process 22302 suspended
[pid 22303] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 22303] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 22303] open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 22303] open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
[pid 22303] open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale/en_US.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale/en_US/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale/en.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale/en.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale/en/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale-langpack/en_US/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/usr/share/locale-langpack/en/LC_MESSAGES/gcc-4.7.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 22303] open("/tmp/cchy5rqP.c", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
[pid 22303] open("/tmp/ccannUTm.o", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
[pid 22303] open("/tmp/ccCqnnnU.ld", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
[pid 22303] open("/tmp/ccCA2QQr.le", O_RDWR|O_CREAT|O_EXCL, 0600) = 3
[pid 22303] open("/tmp/ccCqnnnU.ld", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
[pid 22303] open("/tmp/ccCA2QQr.le", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5
Process 22304 attached
Process 22303 suspended
[pid 22304] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o", O_RDONLY|O_CLOEXEC) = 3
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o", O_RDONLY|O_CLOEXEC) = 5
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/crtbegin.o", O_RDONLY|O_CLOEXEC) = 6
[pid 22304] open("junk.o", O_RDONLY|O_CLOEXEC) = 7
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/crtend.o", O_RDONLY|O_CLOEXEC) = 8
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o", O_RDONLY|O_CLOEXEC) = 9
[pid 22304] open("/home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a", O_RDONLY|O_CLOEXEC) = 10
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libpthread.so", O_RDONLY|O_CLOEXEC) = 11
[pid 22304] open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 12
[pid 22304] open("/usr/lib/x86_64-linux-gnu/libpthread_nonshared.a", O_RDONLY|O_CLOEXEC) = 13
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.so", O_RDONLY|O_CLOEXEC) = 14
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/librt.so", O_RDONLY|O_CLOEXEC) = 15
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a", O_RDONLY|O_CLOEXEC) = 16
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so", O_RDONLY|O_CLOEXEC) = 17
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libc.so", O_RDONLY|O_CLOEXEC) = 18
[pid 22304] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 19
[pid 22304] open("/usr/lib/x86_64-linux-gnu/libc_nonshared.a", O_RDONLY|O_CLOEXEC) = 20
[pid 22304] open("/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2", O_RDONLY|O_CLOEXEC) = 21
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a", O_RDONLY|O_CLOEXEC) = 22
[pid 22304] open("/usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so", O_RDONLY|O_CLOEXEC) = 23
[pid 22304] open("junk", O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0777) = 24
Process 22303 resumed
Process 22304 detached
[pid 22303] --- SIGCHLD (Child exited) @ 0 (0) ---
[pid 22303] open("/tmp/ccCqnnnU.ld", O_RDONLY) = 3
[pid 22303] open("/tmp/ccCA2QQr.le", O_RDONLY) = 3
Process 22302 resumed
Process 22303 detached
[pid 22302] --- SIGCHLD (Child exited) @ 0 (0) ---
Process 22302 detached
--- SIGCHLD (Child exited) @ 0 (0) ---
jlquinn@wyvern:~/re/test$
Comment #13 by bugzilla — 2013-06-10T23:11:35Z
Jerry reported on the n.g. that valgrind reports an "Invalid write of size 8" at:
0x0000000000438cc8 <+512>: mov %r14,-0x8(%rax)
Comment #14 by code — 2013-06-11T04:56:16Z
OK, let's start with a simple thing.
sha1sum /usr/lib64/libphobos2.a
40cddd5a8a9f28c000346014cbb4221a3bbd91b4 /usr/lib64/libphobos2.a
Additional data - the following gives me a working program:
dmd -c junk.d
copy junk.o libphobos2.a to centos6.4 x86_64 machine
on centos6.4, link using gcc link line given by dmd -v junk.d
Comment #17 by jlquinn — 2013-06-11T06:27:07Z
Also, the stdio bits are a red herring. The following also segfaults:
void main() {}
Comment #18 by jlquinn — 2013-06-11T06:31:36Z
Created attachment 1224
Crashing binary
cat > junk.d
void main() {
}
dmd junk.d
This is the executable junk.
Comment #19 by code — 2013-06-11T07:03:15Z
OK, can you dump the linker output?
dmd junk -L--verbose
Comment #20 by jlquinn — 2013-06-11T07:31:24Z
jlquinn@wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk -L--verbose
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o succeeded
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crti.o succeeded
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/crtbegin.o succeeded
/usr/bin/ld: Attempt to open junk.o succeeded
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/crtend.o succeeded
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crtn.o succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libphobos2.a succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libpthread.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libpthread.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libpthread.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libpthread.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libpthread.so failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libpthread.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libpthread.so succeeded
/usr/bin/ld: Attempt to open /lib/x86_64-linux-gnu/libpthread.so.0 succeeded
/usr/bin/ld: Attempt to open /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libm.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libm.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libm.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libm.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libm.so failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libm.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libm.so succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/librt.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/librt.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/librt.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/librt.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/librt.so failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/librt.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/librt.so succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.so failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc_s.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc_s.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc_s.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc_s.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libc.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libc.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libc.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libc.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libc.so failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libc.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libc.so succeeded
/usr/bin/ld: Attempt to open /lib/x86_64-linux-gnu/libc.so.6 succeeded
/usr/bin/ld: Attempt to open /usr/lib/x86_64-linux-gnu/libc_nonshared.a succeeded
/usr/bin/ld: Attempt to open /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.so failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc.a succeeded
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc_s.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib64/libgcc_s.a failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc_s.so failed
/usr/bin/ld: Attempt to open /home/jlquinn/dmd2/linux/bin64/../lib32/libgcc_s.a failed
/usr/bin/ld: Attempt to open /usr/lib/gcc/x86_64-linux-gnu/4.7/libgcc_s.so succeeded
Comment #21 by code — 2013-06-11T11:53:31Z
(In reply to comment #20)
> jlquinn@wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk -L--verbose
Please with the linker version and the linker script.
Comment #22 by maxim — 2013-06-11T12:21:59Z
(In reply to comment #18)
> Created an attachment (id=1224) [details]
> Crashing binary
>
> cat > junk.d
> void main() {
> }
>
> dmd junk.d
>
> This is the executable junk.
Object file (dmd -c) would be helpful too.
Comment #23 by jlquinn — 2013-06-11T13:09:09Z
I assume this is the linker script generated by dmd -v:
gcc junk.o -o junk -m64 -Xlinker --verbose -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$ 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.
Comment #24 by jlquinn — 2013-06-11T13:10:56Z
Created attachment 1225
Program object file
output of dmd -c junk.d
Comment #25 by code — 2013-06-11T13:35:58Z
(In reply to comment #23)
> I assume this is the linker script generated by dmd -v:
>
No, it's part of the output when you pass --verbose to the linker.
When I compile dmd junk -L--verbose the linker output should contain them.
On my machine this looks like this.
GNU ld version 2.23.51.0.1-3.fc18 20120806
...
using internal linker script:
==================================================
...
==================================================
attempt to open /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crt1.o succeeded
...
> jlquinn@wyvern:~/re/test$ ldd --version
The linker is usually called ld, ldd is a different tool.
Comment #26 by jlquinn — 2013-06-11T14:01:07Z
(In reply to comment #25)
> (In reply to comment #23)
> > I assume this is the linker script generated by dmd -v:
> >
> No, it's part of the output when you pass --verbose to the linker.
> When I compile dmd junk -L--verbose the linker output should contain them.
>
> On my machine this looks like this.
>
>
> GNU ld version 2.23.51.0.1-3.fc18 20120806
> ...
> using internal linker script:
> ==================================================
> ...
> ==================================================
> attempt to open /usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/crt1.o
> succeeded
> ...
>
> > jlquinn@wyvern:~/re/test$ ldd --version
> The linker is usually called ld, ldd is a different tool.
oops:
jlquinn@wyvern:~/re/test$ ld --version
GNU gold (GNU Binutils for Ubuntu 2.22.90.20120924) 1.11
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
OK, apparently it's a difference between gnu ld and gold. There doesn't seem to be a linker script. -L--verbose doesn't dump the script for gold:
jlquinn@wyvern:~/re/test$ /home/jlquinn/dmd2/linux/bin64/dmd junk.d -L--debug=script
/usr/bin/ld: Dumping linker script
jlquinn@wyvern:~/re/test$