On Tue, 2010-09-14 at 11:29 -0700, Josh Faust wrote:
> Hi Tonu,
>
>
> This is a known issue when running on ARM that is scheduled to be
> fixed for 1.3: https://code.ros.org/trac/ros/ticket/2883. There's a
> patch for at least part of the problem attached to that ticket, and
> the original thread regarding it is archived on
> gmane: http://comments.gmane.org/gmane.science.robotics.ros.user/6294
For purpose of documenting my progress, this is what I did:
ros@arm7:~/ros$ svn diff ./ros/core/roslib/include/ros/serialization.h
Index: ros/core/roslib/include/ros/serialization.h
===================================================================
--- ros/core/roslib/include/ros/serialization.h (revision 11023)
+++ ros/core/roslib/include/ros/serialization.h (working copy)
@@ -172,12 +172,12 @@
{ \
template<typename Stream> inline static void write(Stream& stream,
const Type v) \
{ \
- *reinterpret_cast<Type*>(stream.advance(sizeof(v))) = v; \
+ memcpy(stream.advance(sizeof(v)), &v, sizeof(v)); \
} \
\
template<typename Stream> inline static void read(Stream& stream,
Type& v) \
{ \
- v = *reinterpret_cast<Type*>(stream.advance(sizeof(v))); \
+ memcpy(&v, stream.advance(sizeof(v)), sizeof(v)); \
} \
\
inline static uint32_t serializedLength(const Type t) \
ros@arm7:~/ros$
Recompiled (which took about hour :D) and it does not crash anymore.
Thanks for help!
Tõnu