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

bug or feature?



Hi,

In LinuxThreads, the stackaddr argument in pthread_attr_setstackaddr()
is interpreted as the highest memory address of the stack region plus 1.
NPTL seems to assume stackaddr is the lowest memory address of the
stack. Though it is the behavior of many other pthread libraries, this
change will crash user code that otherwise works fine under LinuxThreads
if the program supplies thread stacks.

Same applies to pthread_getattr_np - in LinuxThreads the returned stack
address is the stack top, in NPTL it is the stack bottom.

The spec seems a little vague about stackaddr and doesn't say exactly
what it means. I think for compatibility NPTL should do what
LinuxThreads does. Comments?

thanks,
-hui





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