title: Structure assignment in Linux fails in ARM but succeeds in x86
body: <p>I've noticed something really strange.
  say I've got the following structure defined</p>
  
  <pre><code>typedef struct
  {
    uint32_t a;
    uint16_t b;
    uint32_t c;
  } foo;
  </code></pre>
  
  <p>This structure is contained in a big buffer I receive from network.</p>
  
  <p>The following code works in x86, but I receive <code>SIGBUS</code> on ARM.</p>
  
  <pre><code>extern void * buffer;
  foo my_foo;
  my_foo = (( foo * ) buffer)[0];
  </code></pre>
  
  <p><strong>replacing the pointer dereferencing with memcpy solved the issue.</strong></p>
  
  <p>Searching about SIGBUS in ARM pointed me to the fact that this is related to memory alignment somwhow.</p>
  
  <p>Can someone explain what's going on ?</p>