x86: avoid dereferencing beyond stack + THREAD_SIZE