-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zmq 4.2.1 crashes with SIGBUS under 64-bit SunOS Sparc #2588
Comments
Could you please fix a bit the formatting of the backtrace and the diff? I'm afraid they are not very readable as is |
have made a try... |
Thanks, that is much clearer now. |
Re: [zeromq/libzmq] zmq 4.2.1 crashes with SIGBUS under 64-bit SunOS (zmqsubmitter: message 3 of 3 -last one!-) Sparc (#2588)
Hello Luca,
Tuesday, June 6, 2017, 1:31:31 AM, you wrote:
Thanks, that is much clearer now.
Does that diff fix it for you?
Of course. That is why I proposed it...
…--
Best regards
|
Thanks, sorry I misunderstood. Would you like to send a PR to implement it? The fix looks fine to me, it's internal code only and everywhere it checks for the actual size of the type so I don't foresee issues. |
bluca
added a commit
to bluca/libzmq
that referenced
this issue
Aug 11, 2017
Solution: force the compiler to make the atomic_counter_t alignment friendly. This will ensure that the pointers inside the buffers allocated by shared_message_memory are aligned, at the cost of growing the memory size of atomic_counter_t from 4 to 8 bytes on 64 bit (when not using mutexes). Note that although content_t contains an atomic_counter_t, the compiler already padded the struct so there is no change in the buffer sizes used by the engines, save for the extra 4 bytes for the buffer's own single atomic counter. Fixes zeromq#2588
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SunOS 5.11 11.2 sun4v sparc
Sun C++ 5.13 SunOS_sparc
64-bit zmq build crashes with the following stack:
The trouble is apparently in decoder_allocators.cpp:45 which returns non-aligned pointer. The possible workaround is the manual expansion of atomic_counter_t to make it of align-friendly size.
The text was updated successfully, but these errors were encountered: