ros serialization get wrong message size when compile on arm64 with gcc -O3
Example Project: https://github.com/AutoxingTech/simple_publisher_crash
output message size
Publication::enqueueMessage 1 2427156042
Publication::enqueueMessage 2 2427156042
Publication::enqueueMessage 3
This is a bug of gcc. The issue was caused by -ftree-loop-vectorize optimization option which is included by -O3 option. The issue was reported here and still not fixed in gcc 9.3. Upgrade to gcc 10.x should fix this issue.
Would it be a solution to mark some function in the serialization code as non-optimized, or e.g. -O2-optimized? https://stackoverflow.com/a/13825238/1076564 . Can you try?
@randoms #136 should fix this. Could you verify?
This issue has been mentioned on ROS Discourse. There might be relevant details there:
https://discourse.ros.org/t/who-are-current-roscpp-core-maintaners/31247/5