3 ms·
Funny that this comment and the sibling one seem to be contradictive, "who expects this to work" vs "if it doesn't work get with the times". I bet there is a t
by 0x0 11y ago
Funny that this comment and the sibling one seem to be contradictive, "who expects this to work" vs "if it doesn't work get with the times".
I bet there is a ton of originally x86-targeted software and libraries that never paid much attention to alignment. It's pretty scary to consider what could happen with stuff like that is ported over to ARM if garbage data is returned for unaligned access - what if stuff (structs etc) is misaligned only sometimes (depending on allocator, array lengths, etc). Could it be the "next heartbleed"? :P
- TillE 11y agoSince most people don't write assembly code anymore, it usually makes sense for the hardware to be simple and fast. That means the compiler is a little more difficult to write, but code in C should be unaffected.
- 0x0 11y agoThere's lots of ways to hit aligment problems in C, at least if you do a little typecasting here and there. Coincidentally, alignment issues was the topic of yesterday's Old New Thing blog post: http://blogs.msdn.com/b/oldnewthing/archive/2015/08/20/10636350.aspx http://blogs.msdn.com/b/oldnewthing/archive/2015/08/20/10636... (and references an example of bad C code alignment in http://blogs.msdn.com/b/oldnewthing/archive/2004/08/25/220195.aspx http://blogs.msdn.com/b/oldnewthing/archive/2004/08/25/22019... )