News for hackers. Stuff that matters.
Re:A bug story: data alignment on x86 by GlitchMr on Monday November 07, 2016 @12:56PM (#12893165)
The thing is, many compilers just assume that undefined behaviour won't happen, without defining any particular behaviour. And testing for something like pointer alignment on architectures that silently allow pointer misalignment is really, really expensive.

That said, you can use -fsanitize=undefined to verify correctness of a program (as far specification is concerned). Just be prepared for it being a bit slow.

Re:A bug story: data alignment on x86 by Jweb_Guru on Monday November 07, 2016 @12:59PM (#12893202)
It's not possible to determine all possible undefined behavior in a C program. -fsanitize=undefined is best-effort.