Comment #10 on issue 370 by richardg...@gmail.com: static initialization problem with dlopen
http://code.google.com/p/protobuf/issues/detail?id=370

I attach a quick fix to test for identical duplicate message definitons. Build libprotobuf.so with this & link to it with your .so and binaries. How it works : The protoc generated file calls InternalAddGeneratedFile with the message description first. If the message name is already present, and the description matches, it skips the assert error. Since this call is first, asserts in subsequent functions (eg. InternalRegisterGeneratedFile) are safe to ignore as we know the message description is identical. Whilst this relies on the current implementation, it is backwards compatible without an API change. I've successfully applied this to 2.3.0.


Attachments:
        quick_patch.diff  1.9 KB

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

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


Reply via email to