Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valgrind memory leaks #5

Open
Vanuan opened this issue Oct 4, 2011 · 3 comments
Open

valgrind memory leaks #5

Vanuan opened this issue Oct 4, 2011 · 3 comments

Comments

@Vanuan
Copy link
Contributor

Vanuan commented Oct 4, 2011

Valgrind reports possible memory leaks in my project that uses xmlbeansxx:

==26378== 32,196 bytes in 23 blocks are possibly lost in loss record 2,628 of 2,628
==26378== at 0x4C27CC1: operator new(unsigned long) (vg_replace_malloc.c:261)
==26378== by 0x4FFFABB: xercesc_3_1::MemoryManagerImpl::allocate(unsigned long) (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F63333: xercesc_3_1::RangeToken::expand(unsigned int) (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F634A4: xercesc_3_1::RangeToken::addRange(int, int) (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F64175: xercesc_3_1::RangeToken::complementRanges(xercesc_3_1::RangeToken_, xercesc_3_1::TokenFactory_, xercesc_3_1::MemoryManager_) (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F70E90: xercesc_3_1::UnicodeRangeFactory::buildRanges(xercesc_3_1::RangeTokenMap_) (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F64CCB: xercesc_3_1::RangeTokenMap::buildTokenRanges() (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F81D0C: xercesc_3_1::XMLInitializer::initializeStaticData() (in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x61B2DF: xmlbeansxx::(anonymous namespace)::initializeBeans()
==26378== by 0x61B312: xmlbeansxx::(anonymous namespace)::BeansExistence::BeansExistence()
==26378== by 0x61B361: xmlbeansxx::globalTypeSystem()
==26378== by 0x64AFA3: (anonymous namespace)::TypesExistence::TypesExistence()

Should I call deinitializeBeans or something?

@stawel
Copy link
Collaborator

stawel commented Oct 4, 2011

no you shouldn't call any deinitializeBeans
this is a bug and should be fixed.

2011/10/4 John Yani <
[email protected]>

Valgrind report possible memory leaks:

==26378== 32,196 bytes in 23 blocks are possibly lost in loss record 2,628
of 2,628
==26378== at 0x4C27CC1: operator new(unsigned long)
(vg_replace_malloc.c:261)
==26378== by 0x4FFFABB:
xercesc_3_1::MemoryManagerImpl::allocate(unsigned long) (in /usr/lib/
libxerces-c-3.1.so)
==26378== by 0x4F63333: xercesc_3_1::RangeToken::expand(unsigned int)
(in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F634A4: xercesc_3_1::RangeToken::addRange(int, int) (in
/usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F64175:
xercesc_3_1::RangeToken::complementRanges(xercesc_3_1::RangeToken_,
xercesc_3_1::TokenFactory_, xercesc_3_1::MemoryManager_) (in /usr/lib/
libxerces-c-3.1.so)
==26378== by 0x4F70E90:
xercesc_3_1::UnicodeRangeFactory::buildRanges(xercesc_3_1::RangeTokenMap_)
(in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F64CCB: xercesc_3_1::RangeTokenMap::buildTokenRanges()
(in /usr/lib/libxerces-c-3.1.so)
==26378== by 0x4F81D0C:
xercesc_3_1::XMLInitializer::initializeStaticData() (in /usr/lib/
libxerces-c-3.1.so)
==26378== by 0x61B2DF: xmlbeansxx::(anonymous
namespace)::initializeBeans()
==26378== by 0x61B312: xmlbeansxx::(anonymous
namespace)::BeansExistence::BeansExistence()
==26378== by 0x61B361: xmlbeansxx::globalTypeSystem()
==26378== by 0x64AFA3: (anonymous
namespace)::TypesExistence::TypesExistence()

Should I call deinitializeBeans or something?

Reply to this email directly or view it on GitHub:
#5

@Vanuan
Copy link
Contributor Author

Vanuan commented Oct 4, 2011

So, xmlbeansxx should call XMLInitializer::terminateStaticData() somewhere? Or some destructor doesn't get called?

@stawel
Copy link
Collaborator

stawel commented Oct 4, 2011

it should call
XMLPlatformUtils::Terminate();
in void terminateBeans() (TypeSystem.cpp line 158)

:)

2011/10/4 John Yani <
[email protected]>

So, xmlbeansxx should call XMLInitializer::terminateStaticData() somewhere?

Reply to this email directly or view it on GitHub:
#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants