Skip to content
Snippets Groups Projects
  • Rob Swindell's avatar
    2f25f372
    Fix unaligned memory accesses as reported by ASan · 2f25f372
    Rob Swindell authored
    e.g. runtime error: store to misaligned address 0x7ffec33195e3 for type
    'short int', which requires 2 byte alignment
    
    These aren't a problem for x86, but could be a problem for some other CPU
    architectures that don't support unaligned access. I didn't use memcpy() to
    resolve this (though that would've worked) to make this change endian agnostic.
    2f25f372
    History
    Fix unaligned memory accesses as reported by ASan
    Rob Swindell authored
    e.g. runtime error: store to misaligned address 0x7ffec33195e3 for type
    'short int', which requires 2 byte alignment
    
    These aren't a problem for x86, but could be a problem for some other CPU
    architectures that don't support unaligned access. I didn't use memcpy() to
    resolve this (though that would've worked) to make this change endian agnostic.