[Issue 893] New: The profile flag no longer seems to work on Linux x86 64
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 26 18:37:30 PST 2007
http://d.puremagic.com/issues/show_bug.cgi?id=893
Summary: The profile flag no longer seems to work on Linux x86 64
Product: D
Version: 1.003
Platform: PC
OS/Version: Linux
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: kevinbealer at gmail.com
The -profile flag no longer works for me. I am compiling under 64 bit linux on
a dual core machine (the binaries are 32 bit of course). This is broken on 1.0
and 1.003 at least.
If I look at it in gdb, I see this as the crash point.
0x0804a365 in _D6object6Object5opCmpMFC6ObjectZi ()
The insns at this point (I replace the mangled name from each line with
"function" to make it easier to read, look for the line marked with <<<.
Dump of assembler code for function _D6object6Object5opCmpMFC6ObjectZi:
0x0804a344 <function+0>: push %ebp
0x0804a345 <function+1>: mov %esp,%ebp
0x0804a347 <function+3>: sub $0xc,%esp
0x0804a34a <function+6>: push %ebx
0x0804a34b <function+7>: push %esi
0x0804a34c <function+8>: mov %eax,0xfffffff8(%ebp)
0x0804a34f <function+11>: mov $0x805e790,%ecx
0x0804a354 <function+16>: push %ecx
0x0804a355 <function+17>: call 0x80555e8 <_d_newclass>
0x0804a35a <function+22>: add $0x4,%esp
0x0804a35d <function+25>: mov %eax,0xfffffffc(%ebp)
0x0804a360 <function+28>: push $0x1
0x0804a362 <function+30>: mov 0xfffffff8(%ebp),%edx
0x0804a365 <function+33>: <<< mov (%edx),%ebx
0x0804a367 <function+35>: mov (%ebx),%esi
0x0804a369 <function+37>: pushl 0x14(%esi)
0x0804a36c <function+40>: pushl 0x10(%esi)
0x0804a36f <function+43>: pushl 0x805afd6
0x0804a375 <function+49>: pushl 0x805afd2
0x0804a37b <function+55>: call 0x80561c4 <_d_arraycat>
0x0804a380 <function+60>: add $0x14,%esp
0x0804a383 <function+63>: push %edx
0x0804a384 <function+64>: push %eax
0x0804a385 <function+65>: mov 0xfffffffc(%ebp),%eax
0x0804a388 <function+68>: call 0x804b404
<_D6object5Error5_ctorMFAaZC6object5Error>
0x0804a38d <function+73>: push %eax
0x0804a38e <function+74>: call 0x8057f5c <_d_throw at 4>
0x0804a393 <function+79>: pop %esi
0x0804a394 <function+80>: pop %ebx
0x0804a395 <function+81>: mov %ebp,%esp
0x0804a397 <function+83>: pop %ebp
0x0804a398 <function+84>: ret $0x4
0x0804a39b <function+87>: nop
End of assembler dump.
(gdb) info reg
eax 0x556e4fe0 1433292768
ecx 0x0 0
edx 0x18 24
ebx 0x1 1
esp 0xffffd0fc 0xffffd0fc
ebp 0xffffd114 0xffffd114
esi 0x1 1
edi 0x1 1
eip 0x804a365 0x804a365
<_D6object6Object5opCmpMFC6ObjectZi+33>
eflags 0x10296 66198
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x63 99
Just for completeness:
//hello.d
import std.stdio;
int main(char[][] x)
{
writefln("hello.");
return 0;
}
$ dmd -ofhello hello.d
$ ./hello
hello.
$ dmd -ofhello hello.d -profile
$ ./hello
Segmentation fault
--
More information about the Digitalmars-d-bugs
mailing list