Skip to content
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

CyberRT10.0 reader segment fault when protobuf string length > 16 #15649

Open
buaaliyuan opened this issue Feb 14, 2025 · 1 comment
Open

CyberRT10.0 reader segment fault when protobuf string length > 16 #15649

buaaliyuan opened this issue Feb 14, 2025 · 1 comment

Comments

@buaaliyuan
Copy link

buaaliyuan commented Feb 14, 2025

Describe the bug
protobuf string length > 16 cause reader crash

To Reproduce
Steps to reproduce the behavior:

  1. config channel zero copy communication
  2. assign string value (char*、&&、& )>16
  3. writer publish message
  4. reader subscribe

Expected behavior
reader don't crash

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: x86 or aarch64(orin)
  • OS: Linux

Additional context

@buaaliyuan buaaliyuan changed the title Reader segment fault when protobuf string length > 16 CyberRTReader segment fault when protobuf string length > 16 Feb 14, 2025
@buaaliyuan buaaliyuan changed the title CyberRTReader segment fault when protobuf string length > 16 CyberRT10.0 reader segment fault when protobuf string length > 16 Feb 14, 2025
@hearto1314
Copy link
Contributor

https://protobuf.dev/reference/cpp/arenas/#arenastring
String fields store their data on the heap even when their parent message is on the arena.

You should avoid accessing string fields if arena is enabled, otherwise coredump may be caused as the address spaces of different processes are different.

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

No branches or pull requests

2 participants