On x86 CPUs, working with latest compilers in -O3 optimization level is becoming like working with old RISC CPUs without hardware for unaligned load/store: except if you write your code using memcpy/memmove for unaligned
load/store, you'll get caught by some crash. E.g. in x86-64 in -O3 GCC emits SIMD instructions that can crash your code if not properly aligned. E.g. the typical cast to 32 or 64 bit that worked in C on x86 processors, is no longer guaranteed to work:
uint8_t * p = some_address_not_aligned;
uint32_t i = * (uint32_t *)p;
In order to be safe previous code should be replaced by:
memcpy(&i, p, sizeof(uint32_t));
(the compiler is smart enough for inlining the above memcpy call, so is as fast as the previous case)