icon/arrow Back to news Leading to consequences of unexpected program behavior TL;DR This post shows that modern optimizing C compilers assume that the source code they are compiling respects memory alignment constraints, even if the target architecture imposes no such restriction. This can lead to compiled programs not behaving as the programmer intended. C: The […]
The real issue here is aliasing not alignment. Don’t break strict aliasing rules and it’ll be fine even with misaligned pointers. The article mixed up the two separate issues together.
The real issue here is aliasing not alignment. Don’t break strict aliasing rules and it’ll be fine even with misaligned pointers. The article mixed up the two separate issues together.