Illegal Instruction in libc?
Mouawad, Tony
Tony.Mouawad at christiedigital.com
Wed Jul 4 14:04:55 UTC 2007
I'm trying to figure out why we are experiencing an illegal instruction
in libc during a call to nanosleep. The version of linux is 2.6.10 and
gcc version 4.1.1 CodeSourcery Sourcery G++ 4.1-30.
Here's a register dump and disassembly after hitting the illegal
instruction:
(gdb) info reg
d0 0x0 0
d1 0xbffff99c -1073743460
d2 0x0 0
d3 0x5dc 1500
d4 0x28 40
d5 0x113 275
d6 0x3cf 975
d7 0xc 12
a0 0x40364388 0x40364388 <<<-- BAD ADDRESS
a1 0xbffffaf8 0xbffffaf8
a2 0x0 0x0
a3 0x8008cdda 0x8008cdda
a4 0xbffff9cc 0xbffff9cc
a5 0x404e1018 0x404e1018
fp 0xbffff97c 0xbffff97c
sp 0xbffff974 0xbffff974
ps 0x8 8
pc 0x40364388 0x40364388 <__FRAME_END__+18212>
fpcontrol 0x0 0
fpstatus 0x0 0
fpiaddr 0x8 0x8
(gdb) frame 1
#1 0x404a052e in __librt_disable_asynccancel () from /lib/libc.so.6
(gdb) disass
Dump of assembler code for function __librt_disable_asynccancel:
0x404a0514 <__librt_disable_asynccancel+0>: linkw %fp,#0
0x404a0518 <__librt_disable_asynccancel+4>: movel %a5,%sp at -
0x404a051a <__librt_disable_asynccancel+6>: moveal #264956,%a5
0x404a0520 <__librt_disable_asynccancel+12>: lea %pc@(0x404a051c
<__librt_disable_asynccancel+8>,%a5:l),%a5
0x404a0524 <__librt_disable_asynccancel+16>: moveal %a5@(7704),%a0
0x404a0528 <__librt_disable_asynccancel+20>: moveal %a0@(140),%a0
0x404a052c <__librt_disable_asynccancel+24>: jsr %a0@ <<<- BAD JUMP
0x404a052e <__librt_disable_asynccancel+26>: moveb %fp@(11),%a0@(129)
0x404a0534 <__librt_disable_asynccancel+32>: moveal %fp@(-4),%a5
0x404a0538 <__librt_disable_asynccancel+36>: unlk %fp
0x404a053a <__librt_disable_asynccancel+38>: rts
End of assembler dump.
(gdb)
Do you have any insight as to what maybe going wrong? Is there
additional information I can provide?
Cheers,
Tony
More information about the coldfire-gnu-discuss
mailing list