You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the fields of zmq::msg_t is a pointer, which in some environments (in our case, this is a SPARC CPU in 64-bit mode) requires that an instance of the class be aligned to an 8-byte boundary in memory. SPARC is very picky about alignment - you will get a SIGBUS if this is not observed. Many other RISC CPUs behave similarly.
However the zmq_msg_t type which is used as a placeholder to contain a zmq::msg_t instance in the C API, only contains a char array, which will make the compiler apply a less strict alignment requirement. This results in several test cases failing with SIGBUS.
This could be fixed by turning zmq_msg_t into a union, having a pointer as one of its fields, which will force the compiler to apply correct alignment when allocating a zmq_msg_t.
One of the fields of zmq::msg_t is a pointer, which in some environments (in our case, this is a SPARC CPU in 64-bit mode) requires that an instance of the class be aligned to an 8-byte boundary in memory. SPARC is very picky about alignment - you will get a SIGBUS if this is not observed. Many other RISC CPUs behave similarly.
However the zmq_msg_t type which is used as a placeholder to contain a zmq::msg_t instance in the C API, only contains a char array, which will make the compiler apply a less strict alignment requirement. This results in several test cases failing with SIGBUS.
This could be fixed by turning zmq_msg_t into a union, having a pointer as one of its fields, which will force the compiler to apply correct alignment when allocating a zmq_msg_t.
The text was updated successfully, but these errors were encountered: