I have found the problem and will be sending you a diff file in a separate email. The problem is due to the unique structure of the stack on ia64. libpth would write a unique value into the end of the stack and then check to see if it changed as a test for stack overrun. But linux ia64 uses that part of the stack memory for the register backing store so the test location is sure to be over written. I have put in a different test that checks for a meet in the middle.
This experience brings some questions to my mind. On some systems the stack is given a very high virtual address but only a (relatively) small amount of real memory is mapped in. Then if the user goes off the end of the stack, there is a page fault and the system has the possiblity to extend the stack. On the ia64, this hardly seems feasible. Even if one contemplated extending the stack by copying the backing store down, there doesn't seem to be any way to detect when more memory is required until it is too late. Of course, in libpth the check is only made when a thread switch is made and if an overrun is detected, the fix is to rebuild the program with a larger stack size. Richard Harke On Thursday 08 January 2004 06:20 pm, Jamin W. Collins wrote: > On Thu, Jan 08, 2004 at 03:01:24PM -0800, Richard Harke wrote: > > I haven't seen anyone else respond to this so I'll > > jump in. If you can point me to the source package, I'll > > take a look at it. > > "apt-get source pth" should give you the source for pth. "apt-get > build-dep pth" should make sure you have the necessary packages > installed to build it. >

