3 ms·
If you're at byte 4095 and you advance by 1 byte and the next page is a guard page, you're dead. You can minimize the risk of this by requiring that input addr
by kevingadd 6y ago
If you're at byte 4095 and you advance by 1 byte and the next page is a guard page, you're dead.
You can minimize the risk of this by requiring that input addresses be aligned (and many ABIs/APIs do require this) but it's realistic to say that an extra byte of lookahead can and will SIGSEGV in unfortunate cases.
- mehrdadn 6y agoWhat I'm saying is that the compiler can generate code that examines the memory address and looks ahead only when it's safe to do so.