Is there a situation where unbalanced data causes the x86 processor to throw an exception?

I read that some processors will throw an exception if they try to access unbalanced data.

Based on my testing, the x86 processor did not throw an exception when trying to access unbalanced data, but I wonder if there is a situation where the unbalanced data causes the x86 processor to throw an exception?

+4
source share
1 answer

On x86, if you set the AM flag in the CR0 register and set the AC flag in the EFLAGS register, any unaccepted memory access on CPL 3 (user user level) will throw a #AC exception (interrupt 17). Since these bits are usually clear, and access to them is privileged, you will need to make some effort to enable them (which may not be possible on some operating systems).

+6
source

Source: https://habr.com/ru/post/1684336/


All Articles