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
Deserialzed string has incorrect length #5401
Comments
@ejoebstl Have you checked that |
@acozzette Thanks for the input. Yes, it is returning true. This is such a minimal example, I'm puzzled why it goes wrong in the first place. |
That is strange, I just tried out your example and couldn't reproduce the problem. When I run it I just get |
When running with Valgrind, I can see a memory error when accessing
|
@ejoebstl Oh, I suspect it's an ABI issue. I believe the |
Thank you a lot for your help so far. I still face the issue when using C++11. Since you can not reproduce the problem, I'm assuming there is something wrong with my setup or the build environment I am using. I will investigate and come back as soon as I find the issue. |
I had a reference to It might be important to note that What puzzels me is that there was no compiler or linker error, which I would have expected on a library/symbol mismatch. I'm still not sure why this happened, but now that we know it's not a problem of |
Environment
Version: libprotoc 3.6.1
Language: C++ 17
OS: Linux archlinux 4.18.9-arch1-1-ARCH
Compiler: g++ (GCC) 8.2.1 20180831
What did you do?
Using the following proto layout:
Executing the following minimal example:
On the following example data:
Which is
Text = "Test", A = 120, B = 120
.What did you expect to see
What did you see instead?
The string length was set to
48
.PrintDebugString() seems to give an appropriate output:
The text was updated successfully, but these errors were encountered: