-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Linking with both -lprotobuf and -lprotobuf-lite #44
Comments
I don't think linking with both -lprotobuf and -lprotobuf-lite is a supported use case. -lprotobuf has a duplicate version of everything that -lprotobuf-lite has. You should only link with one of them. |
Ok, thanks. I wanted to be sure :) |
I have the same problem, but my case is some more complex: I have already compiled dynamic libraries (i. e. from packages) used in my binary, and one of them was linked with '-lprotobuf', and the second with '-lprotobuf-lite'. I suppose that so trivial fix can be accepted to avoid this weird behaviour... |
Add missing upb_fielddef_fullname implementation
Hello,
I had my C++ binary linked dynamically together by accident with -lprotobuf and -lprotobuf-lite. Therefore after my commits (pull request #43) I noticed that binary is executing google::protobuf::internal::InitializeDefaultRepeatedFields twice and crashing after calling google::protobuf::internal::DestroyDefaultRepeatedFields second time (once for protobuf and once for protobuf-lite). Because this operates on one memory (global variables are overridden on second initialization) there is double free...
Is this valid scenario? Having two libraries linked in? Or should I fix this crash? This can be easily fixed by using GoogleOnceInit however I don't know if this is worth fixing...
What do you think?
The text was updated successfully, but these errors were encountered: