-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Casting buffer memory to a serialized data type in
https://github.com/PickNikRobotics/data_tamer/blob/main/data_tamer_cpp/include/data_tamer/contrib/SerializeMe.hpp#L493 is undefined behavior due to alignment requirements, see https://en.cppreference.com/w/cpp/language/ub and https://stackoverflow.com/questions/55560713/ubsan-store-to-misaligned-address-what-is-the-problem-and-should-i-care, e.g., doubles must be 8 byte aligned.
The source variable should be memcpy()d to the destination instead.
PS: another reason to consider #34
Metadata
Metadata
Assignees
Labels
No labels