[C++] Segmentation fault when call ParseFromString with bad data
What version of protobuf and what language are you using? Version: v3.12, install by apt in Debian 12 Language: C++
What operating system (Linux, Windows, ...) and version? Debian 12
What runtime / compiler are you using (e.g., python version or gcc version) clang
What did you do? Run this code
int main(int argc, char** args)
{
string v1("1");
TestPackage p;
//if (p.ParsePartialFromString(v1))
if (p.ParseFromString(v1))
{
cout << "succeed" << endl;
}
else
{
cout << "error" << endl;
}
cout << "quit" << endl;
}
What did you expect to see print "error"
What did you see instead?
Segmentation fault
Anything else we should know about your project / environment The proto
syntax = "proto3";
option cc_enable_arenas = false;
package Base;
message TestPackage
{
int32 Function = 1;
fixed64 ID = 2;
}
Do you still hit this in a recent, supported version of protobuf e.g. 4.25.x, 5.27.x? Protobuf v3.12 is very old and out of support. https://protobuf.dev/support/version-support/#cpp
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.
This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.
This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.