Skip to content

Make libprotobuf symbols local on OSX (#8346)#9435

Merged
acozzette merged 1 commit intoprotocolbuffers:3.19.xfrom
acozzette:setup-py
Jan 25, 2022
Merged

Make libprotobuf symbols local on OSX (#8346)#9435
acozzette merged 1 commit intoprotocolbuffers:3.19.xfrom
acozzette:setup-py

Conversation

@acozzette
Copy link
Copy Markdown

@acozzette acozzette commented Jan 22, 2022

This PR cherry-picks the fix from #8346 onto the 3.19.x branch. This fix was dropped by mistake due to a bug in our sync script.

Fixes #9395.

@gnossen gave a great overview in grpc/grpc#24992 of the overall problem.

If a python process using both protobuf _and_ another native library linking in libprotobuf
frequently can cause crashes.  This seems to frequently affect tensorflow as well:

tensorflow/tensorflow#8394,
tensorflow/tensorflow#9525 (comment)
tensorflow/tensorflow#24976,
tensorflow/tensorflow#35573,
https://github.com/tensorflow/tensorflow/blob/v2.0.0/tensorflow/contrib/makefile/rename_protobuf.sh,
tensorflow/tensorflow#16104

Testing locally this fixes both crashes when linking in multiple versions of protobuf
and fixes `DescriptorPool` clashes as well (e.g. Python and Native code import different versions of the same message).
@acozzette acozzette requested a review from anandolee January 22, 2022 01:00
@acozzette acozzette merged commit a035bd0 into protocolbuffers:3.19.x Jan 25, 2022
@acozzette acozzette deleted the setup-py branch January 25, 2022 16:24
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

Successfully merging this pull request may close these issues.

3 participants