[OpenAFS-devel] Pointers on getting lwp ported?

Nathan Neulinger nneul@umr.edu
25 Oct 2001 13:16:41 -0500


Nope, definately did not like the ucontext approach as
getcontext/setcontext are apparently not implemented. 

BTW, How did it do this?

/products/openafs/build/lib/liblwp.a(process.o): In function `L35':
process.o(.text+0xb0): warning: setcontext is not implemented and will
always fail
process.o(.text+0xa4): warning: makecontext is not implemented and will
always fail

-- Nathan

On Thu, 2001-10-25 at 13:11, Nathan Neulinger wrote:
> Been working on the parisc_linux24 port, and trying to get LWP
> functional so that tools would work.
> 
> I found the LWP_SP definition, and the corresponding value from setjmp.h
> (or at least what looked to be the corresponding value based on the
> other architectures), and set that in process.c, but am still not having
> much luck.
> 
> Starting program: /products/openafs/build/src/volser/vos e users
> 
> Program received signal SIGBUS, Bus error.
> 0x400af338 in vfprintf () from /lib/libc.so.6
> (gdb) bt
> #0  0x400af338 in vfprintf () from /lib/libc.so.6
> #1  0x400b7490 in printf () from /lib/libc.so.6
> #2  0x0004c624 in Dispatcher () at ../../../openafs/src/lwp/lwp.c:844
> #3  0x0004ccb0 in savecontext (ep=0xcccccccd, savearea=0x8fad8, sp=0x0)
>     at ../../../openafs/src/lwp/process.c:176
> #4  0x0004c4e0 in Create_Process_Part2 () at
> ../../../openafs/src/lwp/lwp.c:739
> #5  0x0004cc80 in savecontext (ep=0xcccccccd, savearea=0x94959697, 
>     sp=0x90919293 <Address 0x90919293 out of bounds>)
>     at ../../../openafs/src/lwp/process.c:189
> Cannot access memory at address 0xa8a9aaa8
> 
> 
> Looks like savecontext is being passed a bogus stack pointer?
> 
> When I build lwp with -DDEBUG I get:
> 
> inst2:/products/openafs/build/src/volser# ./vos e users
> savecontext
> (0) 0x90870   (1) 0x0   (2) 0x62800   (3) 0x78980   (4) 0x2   
> (5) 0x81180   (6) 0xfaf00bc8   (7) 0x78980   (8) 0xfaf001f4   (9) 0x3f  
> Returning to 
> (0) 0x90870   (1) 0x0   (2) 0x62800   (3) 0x78980   (4) 0x2   
> (5) 0x81180   (6) 0xfaf00bc8   (7) 0x78980   (8) 0xfaf001f4   (9) 0x3f  
> savecontext
> (0) 0x90870   (1) 0x0   (2) 0x62800   (3) 0x78980   (4) 0x2   
> (5) 0x81180   (6) 0xfaf00bc8   (7) 0x78980   (8) 0xfaf001f4   (9) 0x3f  
> savecontext
> (0) 0x90870   (1) 0x0   (2) 0x62800   (3) 0x78980   (4) 0x2   
> (5) 0x81180   (6) 0xfaf00bc8   (7) 0x78980   (8) 0xfaf001f4   (9) 0x3f  
> Returning to 
> (0) 0x90870   (1) 0x0   (2) 0x62800   (3) 0x78980   (4) 0x2   
> (5) 0x81180   (6) 0xfaf00bc8   (7) 0x78980   (8) 0xfaf001f4   (9) 0x3f  
> savecontext
> (0) 0x90870   (1) 0x0   (2) 0x62800   (3) 0x78980   (4) 0x2   
> (5) 0x81180   (6) 0xfaf00bc8   (7) 0x78980   (8) 0xfaf001f4   (9) 0x3f  
> savecontext
> (0) 0x401aa008   (1) 0x0   (2) 0x30000   (3) 0x90a80   (4) 0x90870   
> (5) 0x81180   (6) 0x78980   (7) 0x0   (8) 0xfaf001f4   (9) 0x3f   
> savecontext
> Bus error
> 
> I noticed that lwp/process.c seems to have some code that is looking for
> HAVE_UCONTEXT_H, but the check for that was not present in configure...
> I'm going to look into enabling that check and see if I get anywhere
> with that.
> 
> -- Nathan
> 
> ------------------------------------------------------------
> Nathan Neulinger                       EMail:  nneul@umr.edu
> University of Missouri - Rolla         Phone: (573) 341-4841
> Computing Services                       Fax: (573) 341-4216
> 
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
-- 
-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216