Skip to content
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

[ObjC] Remove OSReadLittle* due to alignment requirements #6678

Merged
merged 1 commit into from Sep 20, 2019

Commits on Sep 20, 2019

  1. Remove OSReadLittle* due to alignment requirements

    The OSReadLittleInt64 function as defined by Apple reduces down to:
    
    `return *(volatile uint64_t *)((uintptr_t)base + byteOffset);`
    
    which means we are type-punning using a cast. On ARMv7 and other aligned architectures this can cause crashes. 
    Minimal example: https://gist.github.com/dmaclach/b10b0a71ae614d304c067cb9bd264336
    dmaclach committed Sep 20, 2019
    Copy the full SHA
    c438a59 View commit details
    Browse the repository at this point in the history