Skip to content

Instantly share code, notes, and snippets.

@xophiix
Last active August 29, 2015 14:19
Show Gist options
  • Save xophiix/1fe48684de4cba73076e to your computer and use it in GitHub Desktop.
Save xophiix/1fe48684de4cba73076e to your computer and use it in GitHub Desktop.
solve pointer alignment bug on ios device
// see http://www.galloway.me.uk/2010/10/arm-hacking-exc_arm_da_align-exception/
// force size to align 4 byte
if ((dataSize & 0x3) != 0) {
dataSize += 4 - (dataSize & 0x3);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment