|
From: George S. <st...@kd...> - 2004-03-04 20:21:19
|
I was trying out valgrind on powerpc recently and while it works fine with
C applications, C++ apps seem to be giving it some serious problems. I
compiled helloworld.cpp, basically just 'cout << "Hello world." << endl;',
and when I run it through valgrind I get this assertion failure:
==20360== Reading syms from /lib/libc-2.2.5.so
==20360== Reading syms from /lib/libm-2.2.5.so
==20360== Reading syms from /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
valgrind: vg_symtab2.c:272 (addScopeRange): Assertion `range->size > 0'
failed.
==20360== at 0xFDC6694: ???
==20360== by 0xFDC670C: ???
==20360== by 0xFDD0B24: ???
==20360== by 0xFDD8268: ???
sched status:
Thread 1: status = Runnable, associated_mx = 0x0, associated_cv = 0x0
==20360== at 0xFDF55CC: ???
==20360== by 0x3000B88C: ???
==20360== by 0x3000B974: ???
==20360== by 0x3001022C: ???
Enabling debug, I see this:
---------8<--------------
initSym name="bad_exc" type=r(0,39)=&(0,40)=xstype_info:
making (0,39) 0x30FEDB64 unresolved
defining type 0x30FEDB64 (0,39) = &(0,40)=xstype_info:
making (0,40) 0x30FEDB94 unresolved
defining type 0x30FEDB94 (0,40) = xstype_info:
created struct ref for type_info = 0x30FEDB94
parsed definition: type=0x30FEDB94 symtype=0x30FEDB94
parsed definition: type=0x30FEDB64 symtype=0x30FEDB64
adding = type=0x30FEDB64
47258 type=192 othr=0 desc=0 value=0x90 strx=0
{
adding (0x3103BCB9) bad_exc to scope 0x30FEDBEC depth 6
47259 type=192 othr=0 desc=0 value=0x90 strx=0
{
47260 type=192 othr=0 desc=0 value=0x9C strx=0
{
47261 type=64 othr=0 desc=300 value=0x1F strx=188320 i:r(0,1)
initSym name="i" type=r(0,1)
reference (0,1) -> 0x30FEC2B0
adding = type=0x30FEC2B0
47262 type=192 othr=0 desc=0 value=0x9C strx=0
{
adding (0x3103BCC1) i to scope 0x30FEDCF4 depth 9
47263 type=224 othr=0 desc=0 value=0xDC strx=0
}
47264 type=224 othr=0 desc=0 value=0xDC strx=0
}
47265 type=224 othr=0 desc=0 value=0xDC strx=0
}
47266 type=64 othr=0 desc=308 value=0x1F strx=188320 i:r(0,1)
initSym name="i" type=r(0,1)
reference (0,1) -> 0x30FEC2B0
adding = type=0x30FEC2B0
47267 type=192 othr=0 desc=0 value=0xE0 strx=0
{
adding (0x3103BCC3) i to scope 0x30FEDD1C depth 7
47268 type=192 othr=0 desc=0 value=0xF0 strx=0
{
47269 type=192 othr=0 desc=0 value=0xF0 strx=0
{
47270 type=192 othr=0 desc=0 value=0x10C strx=0
{
47271 type=192 othr=0 desc=0 value=0x10C strx=0
{
47272 type=192 othr=0 desc=0 value=0x10C strx=0
{
47273 type=192 othr=0 desc=0 value=0x10C strx=0
{
47274 type=224 othr=0 desc=0 value=0x10C strx=0
}
47275 type=224 othr=0 desc=0 value=0x10C strx=0
}
47276 type=192 othr=0 desc=0 value=0x10C strx=0
{
47277 type=224 othr=0 desc=0 value=0x10C strx=0
}
47278 type=192 othr=0 desc=0 value=0x10C strx=0
{
47279 type=192 othr=0 desc=0 value=0x10C strx=0
{
47280 type=224 othr=0 desc=0 value=0x10C strx=0
}
47281 type=224 othr=0 desc=0 value=0x10C strx=0
}
47282 type=224 othr=0 desc=0 value=0x10C strx=0
}
47283 type=192 othr=0 desc=0 value=0x11C strx=0
{
47284 type=192 othr=0 desc=0 value=0x11C strx=0
{
47285 type=224 othr=0 desc=0 value=0x11C strx=0
}
47286 type=192 othr=0 desc=0 value=0x128 strx=0
{
47287 type=192 othr=0 desc=0 value=0x128 strx=0
{
47288 type=224 othr=0 desc=0 value=0x128 strx=0
}
47289 type=224 othr=0 desc=0 value=0x128 strx=0
}
47290 type=224 othr=0 desc=0 value=0x128 strx=0
}
47291 type=192 othr=0 desc=0 value=0x12C strx=0
{
47292 type=192 othr=0 desc=0 value=0x12C strx=0
{
47293 type=224 othr=0 desc=0 value=0x12C strx=0
}
47294 type=192 othr=0 desc=0 value=0x12C strx=0
{
47295 type=192 othr=0 desc=0 value=0x12C strx=0
{
47296 type=224 othr=0 desc=0 value=0x12C strx=0
}
47297 type=224 othr=0 desc=0 value=0x12C strx=0
}
47298 type=224 othr=0 desc=0 value=0x12C strx=0
}
47299 type=224 othr=0 desc=0 value=0x158 strx=0
}
47300 type=224 othr=0 desc=0 value=0x158 strx=0
}
47301 type=224 othr=0 desc=0 value=0x158 strx=0
}
47302 type=224 othr=0 desc=0 value=0x164 strx=0
}
47303 type=224 othr=0 desc=0 value=0x168 strx=0
}
47304 type=224 othr=0 desc=0 value=0x168 strx=0
}
47305 type=224 othr=0 desc=0 value=0x16C strx=0
}
47306 type=224 othr=0 desc=0 value=0x16C strx=0
}
47307 type=224 othr=0 desc=0 value=0x8C strx=0
So the failure is at the outer most scope. The assert fails because
range->size = -0xe0. I'm not sure if it's a coincidence that
0x16c=0x8c+0xe0. Any ideas what could be going wrong here? I have tried
several C++ programs and they all trigger this, while I haven't found a
single C program that fails so far. GCC version is 2.95.4.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
|