Bonus fixes: make the guard page PROT_NONE instead of PROT_READ, and correct the stack bounds passed to pthread_attr_setstack.