no offset access after 2^32 - 3

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Atilla

no offset access after 2^32 - 3

Post by Atilla »

Hey,

I was testing out my gdt to make sure everything is alright. I did this after I loaded gdt and segment registers:

Code: Select all

xor dword eax,[es:0xffffffff]
But bochs triple faulted with:
read_virtual_checks(): write beyond limit
However, this works FINE:

Code: Select all

xor dword eax,[es:0xfffffffc]
0xfffffffc which is 2^32 - 3. This seems to be the maximum value of the offset I can use. Whats going on ??
Curufir

Re:no offset access after 2^32 - 3

Post by Curufir »

Atilla wrote: Hey,

I was testing out my gdt to make sure everything is alright. I did this after I loaded gdt and segment registers:

Code: Select all

xor dword eax,[es:0xffffffff]
Your trying to operate on the dword (4 bytes long) from 0xffffffff -> 100000002. Now fairly obviously the last 3 bytes of the dword are outside the 32-bit address space.
Post Reply