-
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
segmentation fault for protos with optional fields #7801
Comments
Filed on behavior of ads team. This blocks their August release. @BenRKarl |
Additional detail - This error occurs in protos generated with |
Does 3.12.0 have same issue? |
@anandolee Yes it appears so. |
In the protobuf package in message.py Message.Clear() is defined as: def Clear(self): which is the line being called where the SEGFAULT occurs. Since Message is the abstract base class, the derived class should implement this method, but I don't see the implementation in api-core. |
I believe it is using cpp extension, so it will call the Clear() in message.cc |
* Fix segment fault for proto3 optional Fixes protocolbuffers#7801
* Fix segment fault for proto3 optional Fixes #7801
* Fix segment fault for proto3 optional Fixes protocolbuffers#7801
* Fix segment fault for proto3 optional Fixes protocolbuffers#7801
What version of protobuf and what language are you using?
Version: v3.12.4
Language: Python
What operating system (Linux, Windows, ...) and version?
gLinux
What runtime / compiler are you using (e.g., python version or gcc version)
python 3.6.9, gcc 9.3.0
What did you do?
Steps to reproduce the behavior:
foo.proto
:Compile with
protoc
:protoc --experimental_allow_proto3_optional --python_out=. foo.proto
Write the following to
repro.py
:python repro.py
, segv happens at linefoo.Clear()
The text was updated successfully, but these errors were encountered: