bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

failure notice


From: Igor Khavkine
Subject: failure notice
Date: Sun, 1 Jul 2001 20:27:17 -0400
User-agent: Mutt/1.3.18i

Hi,

I've started fixing up the thread creation stuff in pthreads, and
I've come upon a dilema. According to SUSv2, the programmer
is allowed to create a thread with specified stack location and
size. If that information is not provided, then a stack of some
default size is allocated with an extra page at the end of
the stack to create a "red zone" to detect overflows.

How is it possible to create a "red zone" if the stack has already
been allocated by the programmer. It is not garanteed that we can
snag a page of memory located contiguously after the provided stack
space. And we can't take off the last page from the user provided
stack because he's garanteed at least the provided stack size.

In this case, should the creation of the "red zone" be the programmer's
responsibility, or is there a way to create it with the library?

It is also possible that I'm misinterpreting the standard, if so, please
let me know.

Thanks.

Igor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]