[kaffe] 1.0.5 porting on SuperUx (64bit)

Neetu Gupta, Noida neetug at noida.hcltech.com
Wed Jun 11 04:44:01 PDT 2003


Hi,
	I've built kaffe-1.0.5 interpreter on SuperUx. But while compiling a
java file through javac, it's giving the error:
Dumping live threads:
`main' tid 4040fc030, status SUSPENDED flags NOSTACKALLOC
 blocked at 4041667e8 (4040fc030->|)
Deadlock: all threads blocked on internal events
core dumping
Abort(coredump)

While debugging I found, that in certain conditions,
jthread_on_current_stack() function in file jthread.h returns rc=0 which
means address of bp(input parameter to the function) is exceeding the
stackEnd of currentJThread.
This case had never arisen on Solaris. 

For your information, I've already changed the code in function
jthread_on_current_stack() as the following instruction was behaving
differently for 32 bit and 64 bit machines

 rc = bp >= currentJThread->stackBase && bp < currentJThread->stackEnd; 

to 

 rc = (unsigned long)bp >= (unsigned long)(currentJThread->stackBase) &&
(unsigned long)bp < (unsigned long)(currentJThread->stackEnd); 


While debugging, I've found out that 
	-this error occurs after initThreads() function is invoked (which
executes the java method with cname: 	java.lang.StackOverflowError). 
	-May be some change is needed in the formula for calculating the
stackBase and stackEnd of thread in jthread_createfirst() in jthread.c file.
		jtid->stackEnd = (void*)(((uintp)&jtid + 0x1000 - 1) &
-0x1000);
        	jtid->stackBase = (char *)jtid->stackEnd -
mainThreadStackSize;

Thanks
Regds
Neetu






More information about the kaffe mailing list