Probably it is nothing, but valgrind shows some strange behaviour in
xerces initialization. The code is very simple:
int main(){
XMLPlatformUtils::Initialize();
XMLPlatformUtils::Terminate();
return 0;
}
The valgrind reports some errors (see attachment) that look more like
problems in linux libc libraries, but I'm not sure. Can someone explain
this behaviour? I'm using the latest xerces 3.0, compiled from the
source code and I am on ubuntu 8.04. Thanks.
Ondrej
==10718== Memcheck, a memory error detector.
==10718== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==10718== Using LibVEX rev 1804, a library for dynamic binary translation.
==10718== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==10718== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation
framework.
==10718== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==10718== For more details, rerun with: -v
==10718==
==10718== My PID = 10718, parent PID = 6163. Prog and args are:
==10718== ./a.out
==10718==
==10718== Invalid read of size 4
==10718== at 0x40150B8: (within /lib/ld-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4010F4D: (within /lib/ld-2.7.so)
==10718== by 0x4659291: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4659454: __libc_dlopen_mode (in
/lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456BBA3: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4562736: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x45622DF: iconv_open (in /lib/tls/i686/cmov/libc-2.7.so)
==10718== Address 0x46cc688 is 48 bytes inside a block of size 49 alloc'd
==10718== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==10718== by 0x456BC97: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4562736: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x45622DF: iconv_open (in /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x430DB67:
xercesc_3_0::IconvGNUTransService::IconvGNUTransService(xercesc_3_0::MemoryManager*)
(IconvGNUTransService.cpp:428)
==10718== by 0x415964B: xercesc_3_0::XMLPlatformUtils::makeTransService()
(PlatformUtils.cpp:455)
==10718== by 0x4159A04: xercesc_3_0::XMLPlatformUtils::Initialize(char
const*, char const*, xercesc_3_0::PanicHandler*, xercesc_3_0::MemoryManager*)
(PlatformUtils.cpp:243)
==10718== by 0x804AA99: main (in /home/sluciak/Public/proj/a.out)
==10718==
==10718== Invalid read of size 4
==10718== at 0x40150B8: (within /lib/ld-2.7.so)
==10718== by 0x40079C9: (within /lib/ld-2.7.so)
==10718== by 0x4011533: (within /lib/ld-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4010F4D: (within /lib/ld-2.7.so)
==10718== by 0x4659291: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4659454: __libc_dlopen_mode (in
/lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456BBA3: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== Address 0x46cc688 is 48 bytes inside a block of size 49 alloc'd
==10718== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==10718== by 0x456BC97: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4562736: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x45622DF: iconv_open (in /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x430DB67:
xercesc_3_0::IconvGNUTransService::IconvGNUTransService(xercesc_3_0::MemoryManager*)
(IconvGNUTransService.cpp:428)
==10718== by 0x415964B: xercesc_3_0::XMLPlatformUtils::makeTransService()
(PlatformUtils.cpp:455)
==10718== by 0x4159A04: xercesc_3_0::XMLPlatformUtils::Initialize(char
const*, char const*, xercesc_3_0::PanicHandler*, xercesc_3_0::MemoryManager*)
(PlatformUtils.cpp:243)
==10718== by 0x804AA99: main (in /home/sluciak/Public/proj/a.out)
==10718==
==10718== Invalid read of size 4
==10718== at 0x4015210: (within /lib/ld-2.7.so)
==10718== by 0x40079C9: (within /lib/ld-2.7.so)
==10718== by 0x4011533: (within /lib/ld-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4010F4D: (within /lib/ld-2.7.so)
==10718== by 0x4659291: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4659454: __libc_dlopen_mode (in
/lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456BBA3: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== Address 0x46cc688 is 48 bytes inside a block of size 49 alloc'd
==10718== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==10718== by 0x456BC97: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4562736: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x45622DF: iconv_open (in /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x430DB67:
xercesc_3_0::IconvGNUTransService::IconvGNUTransService(xercesc_3_0::MemoryManager*)
(IconvGNUTransService.cpp:428)
==10718== by 0x415964B: xercesc_3_0::XMLPlatformUtils::makeTransService()
(PlatformUtils.cpp:455)
==10718== by 0x4159A04: xercesc_3_0::XMLPlatformUtils::Initialize(char
const*, char const*, xercesc_3_0::PanicHandler*, xercesc_3_0::MemoryManager*)
(PlatformUtils.cpp:243)
==10718== by 0x804AA99: main (in /home/sluciak/Public/proj/a.out)
==10718==
==10718== Invalid read of size 4
==10718== at 0x4015210: (within /lib/ld-2.7.so)
==10718== by 0x4005C59: (within /lib/ld-2.7.so)
==10718== by 0x4007A87: (within /lib/ld-2.7.so)
==10718== by 0x4011533: (within /lib/ld-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4010F4D: (within /lib/ld-2.7.so)
==10718== by 0x4659291: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x400D5C5: (within /lib/ld-2.7.so)
==10718== by 0x4659454: __libc_dlopen_mode (in
/lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456BBA3: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== Address 0x46cc688 is 48 bytes inside a block of size 49 alloc'd
==10718== at 0x4022AB8: malloc (vg_replace_malloc.c:207)
==10718== by 0x456BC97: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B0E0: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x456B7E6: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4563C10: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x4562736: (within /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x45622DF: iconv_open (in /lib/tls/i686/cmov/libc-2.7.so)
==10718== by 0x430DB67:
xercesc_3_0::IconvGNUTransService::IconvGNUTransService(xercesc_3_0::MemoryManager*)
(IconvGNUTransService.cpp:428)
==10718== by 0x415964B: xercesc_3_0::XMLPlatformUtils::makeTransService()
(PlatformUtils.cpp:455)
==10718== by 0x4159A04: xercesc_3_0::XMLPlatformUtils::Initialize(char
const*, char const*, xercesc_3_0::PanicHandler*, xercesc_3_0::MemoryManager*)
(PlatformUtils.cpp:243)
==10718== by 0x804AA99: main (in /home/sluciak/Public/proj/a.out)
==10718==
==10718== ERROR SUMMARY: 5 errors from 4 contexts (suppressed: 25 from 1)
==10718== malloc/free: in use at exit: 0 bytes in 0 blocks.
==10718== malloc/free: 3,762 allocs, 3,762 frees, 597,236 bytes allocated.
==10718== For counts of detected errors, rerun with: -v
==10718== All heap blocks were freed -- no leaks are possible.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]