roscpp_core icon indicating copy to clipboard operation
roscpp_core copied to clipboard

ros serialization get wrong message size when compile on arm64 with gcc -O3

Open randoms opened this issue 4 years ago • 1 comments

Example Project: https://github.com/AutoxingTech/simple_publisher_crash

output message size

Publication::enqueueMessage 1 2427156042
Publication::enqueueMessage 2 2427156042
Publication::enqueueMessage 3

randoms avatar Nov 19 '21 03:11 randoms

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.

randoms avatar Nov 19 '21 07:11 randoms

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?

peci1 avatar Apr 09 '23 21:04 peci1

@randoms #136 should fix this. Could you verify?

peci1 avatar Jun 06 '23 18:06 peci1

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

ros-discourse avatar Jun 06 '23 19:06 ros-discourse