With Intel x86_64 CPU. I am trying to catch "unaligned memory access fault" on Windows. this works perfectly on Linux (Ubuntu).
For example, I can turn on the AC flag on EFLAGS register like this
pushfd
or DWORD PTR[esp], 0x40000
popfd
Then, misaligned memory access (e.g., DWORD read/write on 0x804a003) raises SIGBUS error for Linux process.
However, with same CPU, if I do the same thing on Windows (7 and 8), nothing happens. can someone explain me why?? is this because Windows disables the CR0.AM flag and Linux does not?
I would appreciate some advises. thank you.