From: stephan b. <sg...@us...> - 2004-12-24 23:02:52
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7350/src/System Modified Files: SharedLib.generic.cpp Log Message: Removed the deletion of SharedLib objects - causes a double-delete warning from glibc! Added debuggering code. Index: SharedLib.generic.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/SharedLib.generic.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SharedLib.generic.cpp 24 Dec 2004 19:26:23 -0000 1.4 +++ SharedLib.generic.cpp 24 Dec 2004 23:02:43 -0000 1.5 @@ -3,6 +3,10 @@ #include <list> +#ifndef CERR +#define CERR std::cerr << __FILE__ << ":" << std::dec << __LINE__ << " : " +#endif + namespace P { namespace System { void* SharedLib::operator[](const std::string& symbol) throw(RuntimeError) @@ -32,7 +36,10 @@ typename list_t::iterator it = m_list.begin(); while( m_list.end() != it ) { - delete( (*it) ); + // weird: deleting these + // causes a double-delete error + // from glibc + // delete( (*it) ); ++it; } m_list.clear(); @@ -70,7 +77,10 @@ SharedLib * openSharedLib( const std::string & path ) throw(RuntimeError) { + //CERR << "openSharedLib("<<path<<")\n"; + // this is ALWAYS throwing, no matter how valid path is: SharedLib * sh = new SharedLib( path ); + //CERR << "OPENED openSharedLib("<<path<<")\n"; // ^^^^ if this throws, the mem is deallocated, right? opened_shared_libs().push_back( sh ); return sh; |