On Oct 14, 2010, at 11:32 , CB wrote:
Actually, yes, we have a shared library containing our protobuf code,
which we do load with dlopen.  A command line option tells the app
which protocol it needs to use, and the app loads the appropriate
library.  The open only happens once, very shortly after program
launch.  We're not constantly loading and unloading.

Do you ever call dlclose() on this library? Protobuf has some complicated initialization time and shutdown clean up code buried in descriptor.cc that I don't really understand. At the very least, there is a call to this:

internal::OnShutdown(&DeleteGeneratedPool);


I'm a little surprised that I don't see that function appear on your stack trace, if that is in fact the problem, but it must be something like that. Could you try adding a printf() to the DeleteGeneratedPool() function in protobuf/descriptor.cc and see if that is getting called multiple times?

This FileDescriptorTable object is used internally by the protobuf library and I don't really understand it. I'm hoping someone who might understand this code might be able to suggest where this double free could be coming from.

Evan

--
Evan Jones
http://evanjones.ca/

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to