[Issue 10274] DMD 2.063 produces broken binaries

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jun 10 09:56:29 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10274



--- Comment #12 from Jerry Quinn <jlquinn at optonline.net> 2013-06-10 09:56:26 PDT ---
(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 at 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 at 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 at wyvern:~/re/test$

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list