[uClibc] Dynamic libstdc++ still crashes on PowerPC with 0.9.22
Richard_Theil at dadebehring.com
Richard_Theil at dadebehring.com
Tue Nov 11 15:04:26 UTC 2003
I built the toolchain for uclibc 0.9.22 and ran some checks on whether
the previous problems have disappeared. ldso seems to work nicely
now, but a dynamically linked libstdc++ still crashes exactly as before
(and the static-linked programs run just as well).
The point of the crash is exactly reproducible in gdb on a Powerbook
G3 (PPC750) (but alas, I can't devote the time to take the whole load
process apart ...) - it happens on the sixth entry of
std::locale::operator=(std::locale const&) at the second lwarx operation.
For the first 5 calls, r31 contains reasonable values, on the 6th call,
it reliably contains $00000008 (which it loads before), causing a
SIGSEGV. Could that be a problem with loader-provided
pre-initialized data (?!).
Any hint on how to sort that out would of course be appreciated :)
Rich
Logs for the curious:
Program received signal SIGSEGV, Segmentation fault.
0x30048e20 in std::locale::operator=(std::locale const&) ()
from /home/rich/target/lib/libstdc++.so.5
(gdb) bt
#0 0x30048e20 in std::locale::operator=(std::locale const&) ()
from /home/rich/target/lib/libstdc++.so.5
#1 0x3004464c in std::ios_base::_M_init() ()
from /home/rich/target/lib/libstdc++.so.5
#2 0x30043964 in std::basic_ios<char, std::char_traits<char>
>::init(std::basic_streambuf<char, std::char_traits<char> >*) ()
from /home/rich/target/lib/libstdc++.so.5
#3 0x30044240 in std::ios_base::Init::_S_ios_create(bool) ()
from /home/rich/target/lib/libstdc++.so.5
#4 0x30044384 in std::ios_base::Init::Init() ()
from /home/rich/target/lib/libstdc++.so.5
#5 0x30043dd0 in std::iostream::~iostream() ()
from /home/rich/target/lib/libstdc++.so.5
#6 0x30073ae8 in __cxa_dyn_string_eq ()
from /home/rich/target/lib/libstdc++.so.5
#7 0x3003bdb0 in _SDA_BASE_ () from /home/rich/target/lib/libstdc++.so.5
#8 0x30002958 in _dl_parse_copy_information () from /lib/ld-uClibc.so.0
#9 0x30001d4c in _dl_parse_copy_information () from /lib/ld-uClibc.so.0
#10 0x30000d3c in _dl_boot () from /lib/ld-uClibc.so.0
(gdb) disas
Dump of assembler code for function _ZNSt6localeaSERKS_:
0x30048df0 <_ZNSt6localeaSERKS_>: stwu r1,-32(r1)
0x30048df4 <_ZNSt6localeaSERKS_+4>: mflr r0
0x30048df8 <_ZNSt6localeaSERKS_+8>: stmw r29,20(r1)
0x30048dfc <_ZNSt6localeaSERKS_+12>: stw r0,36(r1)
0x30048e00 <_ZNSt6localeaSERKS_+16>: mr r29,r4
0x30048e04 <_ZNSt6localeaSERKS_+20>: mr r30,r3
0x30048e08 <_ZNSt6localeaSERKS_+24>: lwz r0,0(r4)
0x30048e0c <_ZNSt6localeaSERKS_+28>: lwarx r9,r0,r0
0x30048e10 <_ZNSt6localeaSERKS_+32>: addi r9,r9,1
0x30048e14 <_ZNSt6localeaSERKS_+36>: stwcx. r9,r0,r0
0x30048e18 <_ZNSt6localeaSERKS_+40>:
bne- 0x30048e0c <_ZNSt6localeaSERKS_+28>
0x30048e1c <_ZNSt6localeaSERKS_+44>: lwz r31,0(r3)
0x30048e20 <_ZNSt6localeaSERKS_+48>: lwarx r9,r0,r31
0x30048e24 <_ZNSt6localeaSERKS_+52>: addi r0,r9,-1
0x30048e28 <_ZNSt6localeaSERKS_+56>: stwcx. r0,r0,r31
0x30048e2c <_ZNSt6localeaSERKS_+60>:
bne- 0x30048e20 <_ZNSt6localeaSERKS_+48>
0x30048e30 <_ZNSt6localeaSERKS_+64>: cmpwi r9,1
0x30048e34 <_ZNSt6localeaSERKS_+68>: cmpwi cr7,r31,0
0x30048e38 <_ZNSt6localeaSERKS_+72>:
bne+ 0x30048e50 <_ZNSt6localeaSERKS_+96>
r0 0x30094d88 805916040
r1 0x7ffff2d0 2147480272
r2 0x0 0
r3 0x30095230 805917232
r4 0x7ffff2f8 2147480312
r5 0x10 16
r6 0x0 0
r7 0x30130f7c 806555516
r8 0x30094e08 805916168
r9 0xc 12
r10 0x3009375c 805910364
r11 0x30094d88 805916040
r12 0x3000021c 805306908
r13 0x0 0
r14 0x30005140 805327168
r15 0x30005000 805326848
r16 0x2 2
r17 0xe4 228
r18 0x300050a0 805327008
r19 0xe4 228
r20 0x30002a90 805317264
r21 0x10010e88 268504712
r22 0x30000000 805306368
r23 0x7ffff92c 2147481900
r24 0x30005140 805327168
r25 0x6 6
r26 0x0 0
r27 0x30130dd8 806555096
r28 0x300951d0 805917136
r29 0x7ffff2f8 2147480312
r30 0x30095230 805917232
r31 0x8 8
pc 0x30048e20 805604896
ps 0xd032 53298
cr 0x20000004 536870916
lr 0x3004464c 805586508
ctr 0x0 0
xer 0x0 0
0x30095230 <_ZSt3cin+108>: 0x00000008
0x30094d88 <_ZGVNSt7collateIcE2idE+5560>: 0x0000000c
0x30094d8c <_ZGVNSt7collateIcE2idE+5564>: 0x30094e08
0x30094d90 <_ZGVNSt7collateIcE2idE+5568>: 0x0000000e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20031111/389d726b/attachment.htm
More information about the uClibc
mailing list