{"action":"created","issue":{"url":"https://api.github.com/repos/msgpack/msgpack-c/issues/460","repository_url":"https://api.github.com/repos/msgpack/msgpack-c","labels_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/460/comments","events_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/460/events","html_url":"https://github.com/msgpack/msgpack-c/issues/460","id":150415619,"number":460,"title":"alignment trap on ARM","user":{"login":"chshaob1","id":18618322,"avatar_url":"https://avatars.githubusercontent.com/u/18618322?v=3","gravatar_id":"","url":"https://api.github.com/users/chshaob1","html_url":"https://github.com/chshaob1","followers_url":"https://api.github.com/users/chshaob1/followers","following_url":"https://api.github.com/users/chshaob1/following{/other_user}","gists_url":"https://api.github.com/users/chshaob1/gists{/gist_id}","starred_url":"https://api.github.com/users/chshaob1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chshaob1/subscriptions","organizations_url":"https://api.github.com/users/chshaob1/orgs","repos_url":"https://api.github.com/users/chshaob1/repos","events_url":"https://api.github.com/users/chshaob1/events{/privacy}","received_events_url":"https://api.github.com/users/chshaob1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-22T16:32:07Z","updated_at":"2016-04-25T07:52:14Z","closed_at":null,"body":"Hi, msgpackers:\r\n\r\nI'm trying \"zmq + msgpack-c\" to make some prototype on our embedded systems. In principal, we have one device based on PowerPC, and another on ARM (armvt5). It works fine on PowerPC. However, if I send a message between two processes on ARM or send a message from PowerPC to ARM, I will see the \"alignment trap\" prints, like below.\r\n\r\n ` Alignment trap: process (601) PC=0x000155d4 Instr=0xe1cc20d8 Address=0xb510450c FSR 0x001`\r\n\r\nThen, I want to know exactly where causes the problem, so I change the ARM build from release mode (-O2) to debug mode (no optimizations at all, so nothing). Surprisingly, the \"alignment trap\" prints do not show up.  \r\n\r\nI'm a bit stuck now and do not know which way to go. Any suggestions? Thanks!"},"comment":{"url":"https://api.github.com/repos/msgpack/msgpack-c/issues/comments/214192032","html_url":"https://github.com/msgpack/msgpack-c/issues/460#issuecomment-214192032","issue_url":"https://api.github.com/repos/msgpack/msgpack-c/issues/460","id":214192032,"user":{"login":"redboltz","id":275959,"avatar_url":"https://avatars.githubusercontent.com/u/275959?v=3","gravatar_id":"","url":"https://api.github.com/users/redboltz","html_url":"https://github.com/redboltz","followers_url":"https://api.github.com/users/redboltz/followers","following_url":"https://api.github.com/users/redboltz/following{/other_user}","gists_url":"https://api.github.com/users/redboltz/gists{/gist_id}","starred_url":"https://api.github.com/users/redboltz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redboltz/subscriptions","organizations_url":"https://api.github.com/users/redboltz/orgs","repos_url":"https://api.github.com/users/redboltz/repos","events_url":"https://api.github.com/users/redboltz/events{/privacy}","received_events_url":"https://api.github.com/users/redboltz/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T07:52:14Z","updated_at":"2016-04-25T07:52:14Z","body":"Hi @chshaob1 ,\r\n\r\n> Then, I want to know exactly where causes the problem, so I change the ARM build from release mode (-O2) to debug mode (no optimizations at all, so nothing). Surprisingly, the \"alignment trap\" prints do not show up.\r\n\r\nIf you are using some data structures and memcpy binary data into the structure, the situation above might happen.\r\nhttp://www.drdobbs.com/cpp/padding-and-rearranging-structure-member/240007649\r\n\r\nI couldn't find that kinds of code on msgpack-c, so far. If you show me a small code that reproduces the problem, it would help to understand what the problem is.\r\n\r\n"}}