-
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
SegFault accessing Any
in Map
#19567
Comments
Is this specific to just |
I can confirm the segfaults happens for custom messages as well, i.e:
and
with segfault
Also using an integral key results in a segfault:
code:
Segfault:
|
Im using protobuf 29.1 with llvm 19.1.5 on Mac OS X 15.1.1 (24B91) to generate C++ bindings:
What did you do?
Since the switch to 29.X my code segfaults with
EXC_BAD_ACCESS
.I have narrowed it down to an access to an
Any
in aMap
that was filled previously. The proto spec isand the C++ code is generated like this:
protoc --cpp_out . test.proto
The C++ minimal reproducer is:
compiled using this command
clang++ -fclang-abi-compat=17 $(pkg-config --cflags --libs protobuf) test.pb.cc main.cpp -o test
What did you expect to see
The debug string is printed correctly.
What did you see instead?
A segfault occurs:
Anything else we should know about your project / environment
It is not just accessing the debug string, any access to the stored
Any
results in a segfault. Any idea what is going on?I also tested different ways of inserting into the
Map
and they all fail:The text was updated successfully, but these errors were encountered: